path
stringlengths
5
304
repo_name
stringlengths
6
79
content
stringlengths
27
1.05M
lib/util/contexts.js
opentripplanner/otp-react-redux
import React from 'react' export const ComponentContext = React.createContext({})
src/Modules/Settings/Dnn.PersonaBar.SiteImportExport/SiteImportExport.Web/.eslintskipwords.js
dnnsoftware/Dnn.AdminExperience.Extensions
module.exports = [ "dnn", "evoq", "eslint", "fetch-ie8", "react-dom", "lodash", "bool", "func", "dropdown", "globals", "init", "cors", "api", "integrations", "const", "dom", "stringify", "debounce", "debounced", "unmount", "ceil", "px", "rgba", "svg", "html", "src", "calc", "img", "jpg", "nowrap", "js", "dropzone", "ondropactivate", "ondragenter", "draggable", "ondrop", "ondragleave", "ondropdeactivate", "droppable", "onmove", "onend", "interactable", "webkit", "rect", "concat", "resize", "sortable", "socialpanelheader", "socialpanelbody", "asc", "dx", "dy", "num", "reactid", "currentcolor", "ui", "checkbox", "tooltip", "scrollbar", "unshift", "dragstart", "contenteditable", "addons", "tbody", "resizable", "resizemove", "resizestart", "resizeend", "resizing", "resized", "ondropmove", "moz", "evq", "btn", "addon", "substring", "jpeg", "gif", "pdf", "png", "ppt", "txt", "autocomplete", "utils", "js-htmlencode", "webpack", "undef", "analytics", "dataset", "checkmark", "li", "br", "localizations", "javascript", "ie", "pikaday", "na", "searchable", "clearable", "http", "decrement", "ok", "checkboxes", "ddmmyy", "mmddyy", "ddmmyyyy", "mmddyyyy", "yyyymmdd", "td", "th", "marketo", "salesforce", "captcha", "rgb", "sunday", "xxxx", "typeof", "popup", "ccc", "aaf", "dddd", "redux", "middleware", "dev", "util", "searchpanel", "uncollapse", "dev", "devtools", "ctrl" ]
packages/es-components/src/components/controls/textbox/Textbox.js
TWExchangeSolutions/es-components
import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import Icon from '../../base/icons/Icon'; import InputBase from './InputBase'; import { Prepend, Append, InputWrapper } from './TextAddons'; import { useTheme } from '../../util/useTheme'; import ValidationContext from '../ValidationContext'; const defaultBorderRadius = '2px'; const TextboxBase = styled(InputBase)` border-bottom-left-radius: ${props => props.hasPrepend ? '0' : defaultBorderRadius}; border-bottom-right-radius: ${props => props.hasAppend ? '0' : defaultBorderRadius}; border-top-left-radius: ${props => props.hasPrepend ? '0' : defaultBorderRadius}; border-top-right-radius: ${props => props.hasAppend ? '0' : defaultBorderRadius}; display: table-cell; -webkit-appearance: none; `; const Textbox = React.forwardRef(function Textbox(props, ref) { const { prependIconName, appendIconName, type, ...additionalTextProps } = props; const theme = useTheme(); const validationState = React.useContext(ValidationContext); const inputRef = React.useRef(); React.useImperativeHandle(ref, () => inputRef.current); const hasPrepend = !!prependIconName; const hasAppend = !!appendIconName; const hasValidationState = validationState !== 'default'; const addOnTextColor = hasValidationState ? theme.colors.white : theme.colors.gray8; const addOnBgColor = hasValidationState ? theme.validationTextColor[validationState] : theme.colors.gray3; function focusInput() { inputRef.current.focus(); } return ( <InputWrapper> {hasPrepend && ( <Prepend addOnTextColor={addOnTextColor} addOnBgColor={addOnBgColor} aria-hidden="true" onClick={focusInput} > <Icon aria-hidden="true" name={prependIconName} size={18} /> </Prepend> )} <TextboxBase hasAppend={hasAppend} hasPrepend={hasPrepend} ref={inputRef} type={type} {...additionalTextProps} {...theme.validationInputColor[validationState]} /> {hasAppend && ( <Append addOnTextColor={addOnTextColor} addOnBgColor={addOnBgColor} aria-hidden="true" onClick={focusInput} > <Icon aria-hidden="true" name={appendIconName} size={18} /> </Append> )} </InputWrapper> ); }); Textbox.propTypes = { /** Content to prepend input box with */ prependIconName: PropTypes.string, /** Content to append to input box */ appendIconName: PropTypes.string, /** The type attribute for the textboxa */ type: PropTypes.string }; Textbox.defaultProps = { prependIconName: undefined, appendIconName: undefined, type: 'text' }; export default Textbox;
ajax/libs/oojs-ui/0.24.4/oojs-ui-windows.js
holtkamp/cdnjs
/*! * OOjs UI v0.24.4 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2018 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * * Date: 2018-01-02T19:08:58Z */ ( function ( OO ) { 'use strict'; /** * An ActionWidget is a {@link OO.ui.ButtonWidget button widget} that executes an action. * Action widgets are used with OO.ui.ActionSet, which manages the behavior and availability * of the actions. * * Both actions and action sets are primarily used with {@link OO.ui.Dialog Dialogs}. * Please see the [OOjs UI documentation on MediaWiki] [1] for more information * and examples. * * [1]: https://www.mediawiki.org/wiki/OOjs_UI/Windows/Process_Dialogs#Action_sets * * @class * @extends OO.ui.ButtonWidget * @mixins OO.ui.mixin.PendingElement * * @constructor * @param {Object} [config] Configuration options * @cfg {string} [action] Symbolic name of the action (e.g., ‘continue’ or ‘cancel’). * @cfg {string[]} [modes] Symbolic names of the modes (e.g., ‘edit’ or ‘read’) in which the action * should be made available. See the action set's {@link OO.ui.ActionSet#setMode setMode} method * for more information about setting modes. * @cfg {boolean} [framed=false] Render the action button with a frame */ OO.ui.ActionWidget = function OoUiActionWidget( config ) { // Configuration initialization config = $.extend( { framed: false }, config ); // Parent constructor OO.ui.ActionWidget.parent.call( this, config ); // Mixin constructors OO.ui.mixin.PendingElement.call( this, config ); // Properties this.action = config.action || ''; this.modes = config.modes || []; this.width = 0; this.height = 0; // Initialization this.$element.addClass( 'oo-ui-actionWidget' ); }; /* Setup */ OO.inheritClass( OO.ui.ActionWidget, OO.ui.ButtonWidget ); OO.mixinClass( OO.ui.ActionWidget, OO.ui.mixin.PendingElement ); /* Methods */ /** * Check if the action is configured to be available in the specified `mode`. * * @param {string} mode Name of mode * @return {boolean} The action is configured with the mode */ OO.ui.ActionWidget.prototype.hasMode = function ( mode ) { return this.modes.indexOf( mode ) !== -1; }; /** * Get the symbolic name of the action (e.g., ‘continue’ or ‘cancel’). * * @return {string} */ OO.ui.ActionWidget.prototype.getAction = function () { return this.action; }; /** * Get the symbolic name of the mode or modes for which the action is configured to be available. * * The current mode is set with the action set's {@link OO.ui.ActionSet#setMode setMode} method. * Only actions that are configured to be avaiable in the current mode will be visible. All other actions * are hidden. * * @return {string[]} */ OO.ui.ActionWidget.prototype.getModes = function () { return this.modes.slice(); }; /* eslint-disable no-unused-vars */ /** * ActionSets manage the behavior of the {@link OO.ui.ActionWidget action widgets} that comprise them. * Actions can be made available for specific contexts (modes) and circumstances * (abilities). Action sets are primarily used with {@link OO.ui.Dialog Dialogs}. * * ActionSets contain two types of actions: * * - Special: Special actions are the first visible actions with special flags, such as 'safe' and 'primary', the default special flags. Additional special flags can be configured in subclasses with the static #specialFlags property. * - Other: Other actions include all non-special visible actions. * * Please see the [OOjs UI documentation on MediaWiki][1] for more information. * * @example * // Example: An action set used in a process dialog * function MyProcessDialog( config ) { * MyProcessDialog.parent.call( this, config ); * } * OO.inheritClass( MyProcessDialog, OO.ui.ProcessDialog ); * MyProcessDialog.static.title = 'An action set in a process dialog'; * MyProcessDialog.static.name = 'myProcessDialog'; * // An action set that uses modes ('edit' and 'help' mode, in this example). * MyProcessDialog.static.actions = [ * { action: 'continue', modes: 'edit', label: 'Continue', flags: [ 'primary', 'progressive' ] }, * { action: 'help', modes: 'edit', label: 'Help' }, * { modes: 'edit', label: 'Cancel', flags: 'safe' }, * { action: 'back', modes: 'help', label: 'Back', flags: 'safe' } * ]; * * MyProcessDialog.prototype.initialize = function () { * MyProcessDialog.parent.prototype.initialize.apply( this, arguments ); * this.panel1 = new OO.ui.PanelLayout( { padded: true, expanded: false } ); * this.panel1.$element.append( '<p>This dialog uses an action set (continue, help, cancel, back) configured with modes. This is edit mode. Click \'help\' to see help mode.</p>' ); * this.panel2 = new OO.ui.PanelLayout( { padded: true, expanded: false } ); * this.panel2.$element.append( '<p>This is help mode. Only the \'back\' action widget is configured to be visible here. Click \'back\' to return to \'edit\' mode.</p>' ); * this.stackLayout = new OO.ui.StackLayout( { * items: [ this.panel1, this.panel2 ] * } ); * this.$body.append( this.stackLayout.$element ); * }; * MyProcessDialog.prototype.getSetupProcess = function ( data ) { * return MyProcessDialog.parent.prototype.getSetupProcess.call( this, data ) * .next( function () { * this.actions.setMode( 'edit' ); * }, this ); * }; * MyProcessDialog.prototype.getActionProcess = function ( action ) { * if ( action === 'help' ) { * this.actions.setMode( 'help' ); * this.stackLayout.setItem( this.panel2 ); * } else if ( action === 'back' ) { * this.actions.setMode( 'edit' ); * this.stackLayout.setItem( this.panel1 ); * } else if ( action === 'continue' ) { * var dialog = this; * return new OO.ui.Process( function () { * dialog.close(); * } ); * } * return MyProcessDialog.parent.prototype.getActionProcess.call( this, action ); * }; * MyProcessDialog.prototype.getBodyHeight = function () { * return this.panel1.$element.outerHeight( true ); * }; * var windowManager = new OO.ui.WindowManager(); * $( 'body' ).append( windowManager.$element ); * var dialog = new MyProcessDialog( { * size: 'medium' * } ); * windowManager.addWindows( [ dialog ] ); * windowManager.openWindow( dialog ); * * [1]: https://www.mediawiki.org/wiki/OOjs_UI/Windows/Process_Dialogs#Action_sets * * @abstract * @class * @mixins OO.EventEmitter * * @constructor * @param {Object} [config] Configuration options */ OO.ui.ActionSet = function OoUiActionSet( config ) { // Configuration initialization config = config || {}; // Mixin constructors OO.EventEmitter.call( this ); // Properties this.list = []; this.categories = { actions: 'getAction', flags: 'getFlags', modes: 'getModes' }; this.categorized = {}; this.special = {}; this.others = []; this.organized = false; this.changing = false; this.changed = false; }; /* eslint-enable no-unused-vars */ /* Setup */ OO.mixinClass( OO.ui.ActionSet, OO.EventEmitter ); /* Static Properties */ /** * Symbolic name of the flags used to identify special actions. Special actions are displayed in the * header of a {@link OO.ui.ProcessDialog process dialog}. * See the [OOjs UI documentation on MediaWiki][2] for more information and examples. * * [2]:https://www.mediawiki.org/wiki/OOjs_UI/Windows/Process_Dialogs * * @abstract * @static * @inheritable * @property {string} */ OO.ui.ActionSet.static.specialFlags = [ 'safe', 'primary' ]; /* Events */ /** * @event click * * A 'click' event is emitted when an action is clicked. * * @param {OO.ui.ActionWidget} action Action that was clicked */ /** * @event add * * An 'add' event is emitted when actions are {@link #method-add added} to the action set. * * @param {OO.ui.ActionWidget[]} added Actions added */ /** * @event remove * * A 'remove' event is emitted when actions are {@link #method-remove removed} * or {@link #clear cleared}. * * @param {OO.ui.ActionWidget[]} added Actions removed */ /** * @event change * * A 'change' event is emitted when actions are {@link #method-add added}, {@link #clear cleared}, * or {@link #method-remove removed} from the action set or when the {@link #setMode mode} is changed. * */ /* Methods */ /** * Handle action change events. * * @private * @fires change */ OO.ui.ActionSet.prototype.onActionChange = function () { this.organized = false; if ( this.changing ) { this.changed = true; } else { this.emit( 'change' ); } }; /** * Check if an action is one of the special actions. * * @param {OO.ui.ActionWidget} action Action to check * @return {boolean} Action is special */ OO.ui.ActionSet.prototype.isSpecial = function ( action ) { var flag; for ( flag in this.special ) { if ( action === this.special[ flag ] ) { return true; } } return false; }; /** * Get action widgets based on the specified filter: ‘actions’, ‘flags’, ‘modes’, ‘visible’, * or ‘disabled’. * * @param {Object} [filters] Filters to use, omit to get all actions * @param {string|string[]} [filters.actions] Actions that action widgets must have * @param {string|string[]} [filters.flags] Flags that action widgets must have (e.g., 'safe') * @param {string|string[]} [filters.modes] Modes that action widgets must have * @param {boolean} [filters.visible] Action widgets must be visible * @param {boolean} [filters.disabled] Action widgets must be disabled * @return {OO.ui.ActionWidget[]} Action widgets matching all criteria */ OO.ui.ActionSet.prototype.get = function ( filters ) { var i, len, list, category, actions, index, match, matches; if ( filters ) { this.organize(); // Collect category candidates matches = []; for ( category in this.categorized ) { list = filters[ category ]; if ( list ) { if ( !Array.isArray( list ) ) { list = [ list ]; } for ( i = 0, len = list.length; i < len; i++ ) { actions = this.categorized[ category ][ list[ i ] ]; if ( Array.isArray( actions ) ) { matches.push.apply( matches, actions ); } } } } // Remove by boolean filters for ( i = 0, len = matches.length; i < len; i++ ) { match = matches[ i ]; if ( ( filters.visible !== undefined && match.isVisible() !== filters.visible ) || ( filters.disabled !== undefined && match.isDisabled() !== filters.disabled ) ) { matches.splice( i, 1 ); len--; i--; } } // Remove duplicates for ( i = 0, len = matches.length; i < len; i++ ) { match = matches[ i ]; index = matches.lastIndexOf( match ); while ( index !== i ) { matches.splice( index, 1 ); len--; index = matches.lastIndexOf( match ); } } return matches; } return this.list.slice(); }; /** * Get 'special' actions. * * Special actions are the first visible action widgets with special flags, such as 'safe' and 'primary'. * Special flags can be configured in subclasses by changing the static #specialFlags property. * * @return {OO.ui.ActionWidget[]|null} 'Special' action widgets. */ OO.ui.ActionSet.prototype.getSpecial = function () { this.organize(); return $.extend( {}, this.special ); }; /** * Get 'other' actions. * * Other actions include all non-special visible action widgets. * * @return {OO.ui.ActionWidget[]} 'Other' action widgets */ OO.ui.ActionSet.prototype.getOthers = function () { this.organize(); return this.others.slice(); }; /** * Set the mode (e.g., ‘edit’ or ‘view’). Only {@link OO.ui.ActionWidget#modes actions} configured * to be available in the specified mode will be made visible. All other actions will be hidden. * * @param {string} mode The mode. Only actions configured to be available in the specified * mode will be made visible. * @chainable * @fires toggle * @fires change */ OO.ui.ActionSet.prototype.setMode = function ( mode ) { var i, len, action; this.changing = true; for ( i = 0, len = this.list.length; i < len; i++ ) { action = this.list[ i ]; action.toggle( action.hasMode( mode ) ); } this.organized = false; this.changing = false; this.emit( 'change' ); return this; }; /** * Set the abilities of the specified actions. * * Action widgets that are configured with the specified actions will be enabled * or disabled based on the boolean values specified in the `actions` * parameter. * * @param {Object.<string,boolean>} actions A list keyed by action name with boolean * values that indicate whether or not the action should be enabled. * @chainable */ OO.ui.ActionSet.prototype.setAbilities = function ( actions ) { var i, len, action, item; for ( i = 0, len = this.list.length; i < len; i++ ) { item = this.list[ i ]; action = item.getAction(); if ( actions[ action ] !== undefined ) { item.setDisabled( !actions[ action ] ); } } return this; }; /** * Executes a function once per action. * * When making changes to multiple actions, use this method instead of iterating over the actions * manually to defer emitting a #change event until after all actions have been changed. * * @param {Object|null} filter Filters to use to determine which actions to iterate over; see #get * @param {Function} callback Callback to run for each action; callback is invoked with three * arguments: the action, the action's index, the list of actions being iterated over * @chainable */ OO.ui.ActionSet.prototype.forEach = function ( filter, callback ) { this.changed = false; this.changing = true; this.get( filter ).forEach( callback ); this.changing = false; if ( this.changed ) { this.emit( 'change' ); } return this; }; /** * Add action widgets to the action set. * * @param {OO.ui.ActionWidget[]} actions Action widgets to add * @chainable * @fires add * @fires change */ OO.ui.ActionSet.prototype.add = function ( actions ) { var i, len, action; this.changing = true; for ( i = 0, len = actions.length; i < len; i++ ) { action = actions[ i ]; action.connect( this, { click: [ 'emit', 'click', action ], toggle: [ 'onActionChange' ] } ); this.list.push( action ); } this.organized = false; this.emit( 'add', actions ); this.changing = false; this.emit( 'change' ); return this; }; /** * Remove action widgets from the set. * * To remove all actions, you may wish to use the #clear method instead. * * @param {OO.ui.ActionWidget[]} actions Action widgets to remove * @chainable * @fires remove * @fires change */ OO.ui.ActionSet.prototype.remove = function ( actions ) { var i, len, index, action; this.changing = true; for ( i = 0, len = actions.length; i < len; i++ ) { action = actions[ i ]; index = this.list.indexOf( action ); if ( index !== -1 ) { action.disconnect( this ); this.list.splice( index, 1 ); } } this.organized = false; this.emit( 'remove', actions ); this.changing = false; this.emit( 'change' ); return this; }; /** * Remove all action widets from the set. * * To remove only specified actions, use the {@link #method-remove remove} method instead. * * @chainable * @fires remove * @fires change */ OO.ui.ActionSet.prototype.clear = function () { var i, len, action, removed = this.list.slice(); this.changing = true; for ( i = 0, len = this.list.length; i < len; i++ ) { action = this.list[ i ]; action.disconnect( this ); } this.list = []; this.organized = false; this.emit( 'remove', removed ); this.changing = false; this.emit( 'change' ); return this; }; /** * Organize actions. * * This is called whenever organized information is requested. It will only reorganize the actions * if something has changed since the last time it ran. * * @private * @chainable */ OO.ui.ActionSet.prototype.organize = function () { var i, iLen, j, jLen, flag, action, category, list, item, special, specialFlags = this.constructor.static.specialFlags; if ( !this.organized ) { this.categorized = {}; this.special = {}; this.others = []; for ( i = 0, iLen = this.list.length; i < iLen; i++ ) { action = this.list[ i ]; if ( action.isVisible() ) { // Populate categories for ( category in this.categories ) { if ( !this.categorized[ category ] ) { this.categorized[ category ] = {}; } list = action[ this.categories[ category ] ](); if ( !Array.isArray( list ) ) { list = [ list ]; } for ( j = 0, jLen = list.length; j < jLen; j++ ) { item = list[ j ]; if ( !this.categorized[ category ][ item ] ) { this.categorized[ category ][ item ] = []; } this.categorized[ category ][ item ].push( action ); } } // Populate special/others special = false; for ( j = 0, jLen = specialFlags.length; j < jLen; j++ ) { flag = specialFlags[ j ]; if ( !this.special[ flag ] && action.hasFlag( flag ) ) { this.special[ flag ] = action; special = true; break; } } if ( !special ) { this.others.push( action ); } } } this.organized = true; } return this; }; /** * Errors contain a required message (either a string or jQuery selection) that is used to describe what went wrong * in a {@link OO.ui.Process process}. The error's #recoverable and #warning configurations are used to customize the * appearance and functionality of the error interface. * * The basic error interface contains a formatted error message as well as two buttons: 'Dismiss' and 'Try again' (i.e., the error * is 'recoverable' by default). If the error is not recoverable, the 'Try again' button will not be rendered and the widget * that initiated the failed process will be disabled. * * If the error is a warning, the error interface will include a 'Dismiss' and a 'Continue' button, which will try the * process again. * * For an example of error interfaces, please see the [OOjs UI documentation on MediaWiki][1]. * * [1]: https://www.mediawiki.org/wiki/OOjs_UI/Windows/Process_Dialogs#Processes_and_errors * * @class * * @constructor * @param {string|jQuery} message Description of error * @param {Object} [config] Configuration options * @cfg {boolean} [recoverable=true] Error is recoverable. * By default, errors are recoverable, and users can try the process again. * @cfg {boolean} [warning=false] Error is a warning. * If the error is a warning, the error interface will include a * 'Dismiss' and a 'Continue' button. It is the responsibility of the developer to ensure that the warning * is not triggered a second time if the user chooses to continue. */ OO.ui.Error = function OoUiError( message, config ) { // Allow passing positional parameters inside the config object if ( OO.isPlainObject( message ) && config === undefined ) { config = message; message = config.message; } // Configuration initialization config = config || {}; // Properties this.message = message instanceof jQuery ? message : String( message ); this.recoverable = config.recoverable === undefined || !!config.recoverable; this.warning = !!config.warning; }; /* Setup */ OO.initClass( OO.ui.Error ); /* Methods */ /** * Check if the error is recoverable. * * If the error is recoverable, users are able to try the process again. * * @return {boolean} Error is recoverable */ OO.ui.Error.prototype.isRecoverable = function () { return this.recoverable; }; /** * Check if the error is a warning. * * If the error is a warning, the error interface will include a 'Dismiss' and a 'Continue' button. * * @return {boolean} Error is warning */ OO.ui.Error.prototype.isWarning = function () { return this.warning; }; /** * Get error message as DOM nodes. * * @return {jQuery} Error message in DOM nodes */ OO.ui.Error.prototype.getMessage = function () { return this.message instanceof jQuery ? this.message.clone() : $( '<div>' ).text( this.message ).contents(); }; /** * Get the error message text. * * @return {string} Error message */ OO.ui.Error.prototype.getMessageText = function () { return this.message instanceof jQuery ? this.message.text() : this.message; }; /** * A Process is a list of steps that are called in sequence. The step can be a number, a jQuery promise, * or a function: * * - **number**: the process will wait for the specified number of milliseconds before proceeding. * - **promise**: the process will continue to the next step when the promise is successfully resolved * or stop if the promise is rejected. * - **function**: the process will execute the function. The process will stop if the function returns * either a boolean `false` or a promise that is rejected; if the function returns a number, the process * will wait for that number of milliseconds before proceeding. * * If the process fails, an {@link OO.ui.Error error} is generated. Depending on how the error is * configured, users can dismiss the error and try the process again, or not. If a process is stopped, * its remaining steps will not be performed. * * @class * * @constructor * @param {number|jQuery.Promise|Function} step Number of miliseconds to wait before proceeding, promise * that must be resolved before proceeding, or a function to execute. See #createStep for more information. see #createStep for more information * @param {Object} [context=null] Execution context of the function. The context is ignored if the step is * a number or promise. */ OO.ui.Process = function ( step, context ) { // Properties this.steps = []; // Initialization if ( step !== undefined ) { this.next( step, context ); } }; /* Setup */ OO.initClass( OO.ui.Process ); /* Methods */ /** * Start the process. * * @return {jQuery.Promise} Promise that is resolved when all steps have successfully completed. * If any of the steps return a promise that is rejected or a boolean false, this promise is rejected * and any remaining steps are not performed. */ OO.ui.Process.prototype.execute = function () { var i, len, promise; /** * Continue execution. * * @ignore * @param {Array} step A function and the context it should be called in * @return {Function} Function that continues the process */ function proceed( step ) { return function () { // Execute step in the correct context var deferred, result = step.callback.call( step.context ); if ( result === false ) { // Use rejected promise for boolean false results return $.Deferred().reject( [] ).promise(); } if ( typeof result === 'number' ) { if ( result < 0 ) { throw new Error( 'Cannot go back in time: flux capacitor is out of service' ); } // Use a delayed promise for numbers, expecting them to be in milliseconds deferred = $.Deferred(); setTimeout( deferred.resolve, result ); return deferred.promise(); } if ( result instanceof OO.ui.Error ) { // Use rejected promise for error return $.Deferred().reject( [ result ] ).promise(); } if ( Array.isArray( result ) && result.length && result[ 0 ] instanceof OO.ui.Error ) { // Use rejected promise for list of errors return $.Deferred().reject( result ).promise(); } // Duck-type the object to see if it can produce a promise if ( result && $.isFunction( result.promise ) ) { // Use a promise generated from the result return result.promise(); } // Use resolved promise for other results return $.Deferred().resolve().promise(); }; } if ( this.steps.length ) { // Generate a chain reaction of promises promise = proceed( this.steps[ 0 ] )(); for ( i = 1, len = this.steps.length; i < len; i++ ) { promise = promise.then( proceed( this.steps[ i ] ) ); } } else { promise = $.Deferred().resolve().promise(); } return promise; }; /** * Create a process step. * * @private * @param {number|jQuery.Promise|Function} step * * - Number of milliseconds to wait before proceeding * - Promise that must be resolved before proceeding * - Function to execute * - If the function returns a boolean false the process will stop * - If the function returns a promise, the process will continue to the next * step when the promise is resolved or stop if the promise is rejected * - If the function returns a number, the process will wait for that number of * milliseconds before proceeding * @param {Object} [context=null] Execution context of the function. The context is * ignored if the step is a number or promise. * @return {Object} Step object, with `callback` and `context` properties */ OO.ui.Process.prototype.createStep = function ( step, context ) { if ( typeof step === 'number' || $.isFunction( step.promise ) ) { return { callback: function () { return step; }, context: null }; } if ( $.isFunction( step ) ) { return { callback: step, context: context }; } throw new Error( 'Cannot create process step: number, promise or function expected' ); }; /** * Add step to the beginning of the process. * * @inheritdoc #createStep * @return {OO.ui.Process} this * @chainable */ OO.ui.Process.prototype.first = function ( step, context ) { this.steps.unshift( this.createStep( step, context ) ); return this; }; /** * Add step to the end of the process. * * @inheritdoc #createStep * @return {OO.ui.Process} this * @chainable */ OO.ui.Process.prototype.next = function ( step, context ) { this.steps.push( this.createStep( step, context ) ); return this; }; /** * A window instance represents the life cycle for one single opening of a window * until its closing. * * While OO.ui.WindowManager will reuse OO.ui.Window objects, each time a window is * opened, a new lifecycle starts. * * For more information, please see the [OOjs UI documentation on MediaWiki] [1]. * * [1]: https://www.mediawiki.org/wiki/OOjs_UI/Windows * * @class * * @constructor */ OO.ui.WindowInstance = function OOuiWindowInstance() { var deferreds = { opening: $.Deferred(), opened: $.Deferred(), closing: $.Deferred(), closed: $.Deferred() }; /** * @private * @property {Object} */ this.deferreds = deferreds; // Set these up as chained promises so that rejecting of // an earlier stage automatically rejects the subsequent // would-be stages as well. /** * @property {jQuery.Promise} */ this.opening = deferreds.opening.promise(); /** * @property {jQuery.Promise} */ this.opened = this.opening.then( function () { return deferreds.opened; } ); /** * @property {jQuery.Promise} */ this.closing = this.opened.then( function () { return deferreds.closing; } ); /** * @property {jQuery.Promise} */ this.closed = this.closing.then( function () { return deferreds.closed; } ); }; /* Setup */ OO.initClass( OO.ui.WindowInstance ); /** * Check if window is opening. * * @return {boolean} Window is opening */ OO.ui.WindowInstance.prototype.isOpening = function () { return this.deferreds.opened.state() === 'pending'; }; /** * Check if window is opened. * * @return {boolean} Window is opened */ OO.ui.WindowInstance.prototype.isOpened = function () { return this.deferreds.opened.state() === 'resolved' && this.deferreds.closing.state() === 'pending'; }; /** * Check if window is closing. * * @return {boolean} Window is closing */ OO.ui.WindowInstance.prototype.isClosing = function () { return this.deferreds.closing.state() === 'resolved' && this.deferreds.closed.state() === 'pending'; }; /** * Check if window is closed. * * @return {boolean} Window is closed */ OO.ui.WindowInstance.prototype.isClosed = function () { return this.deferreds.closed.state() === 'resolved'; }; /** * Window managers are used to open and close {@link OO.ui.Window windows} and control their presentation. * Managed windows are mutually exclusive. If a new window is opened while a current window is opening * or is opened, the current window will be closed and any ongoing {@link OO.ui.Process process} will be cancelled. Windows * themselves are persistent and—rather than being torn down when closed—can be repopulated with the * pertinent data and reused. * * Over the lifecycle of a window, the window manager makes available three promises: `opening`, * `opened`, and `closing`, which represent the primary stages of the cycle: * * **Opening**: the opening stage begins when the window manager’s #openWindow or a window’s * {@link OO.ui.Window#open open} method is used, and the window manager begins to open the window. * * - an `opening` event is emitted with an `opening` promise * - the #getSetupDelay method is called and the returned value is used to time a pause in execution before the * window’s {@link OO.ui.Window#method-setup setup} method is called which executes OO.ui.Window#getSetupProcess. * - a `setup` progress notification is emitted from the `opening` promise * - the #getReadyDelay method is called the returned value is used to time a pause in execution before the * window’s {@link OO.ui.Window#method-ready ready} method is called which executes OO.ui.Window#getReadyProcess. * - a `ready` progress notification is emitted from the `opening` promise * - the `opening` promise is resolved with an `opened` promise * * **Opened**: the window is now open. * * **Closing**: the closing stage begins when the window manager's #closeWindow or the * window's {@link OO.ui.Window#close close} methods is used, and the window manager begins * to close the window. * * - the `opened` promise is resolved with `closing` promise and a `closing` event is emitted * - the #getHoldDelay method is called and the returned value is used to time a pause in execution before * the window's {@link OO.ui.Window#getHoldProcess getHoldProces} method is called on the * window and its result executed * - a `hold` progress notification is emitted from the `closing` promise * - the #getTeardownDelay() method is called and the returned value is used to time a pause in execution before * the window's {@link OO.ui.Window#getTeardownProcess getTeardownProcess} method is called on the * window and its result executed * - a `teardown` progress notification is emitted from the `closing` promise * - the `closing` promise is resolved. The window is now closed * * See the [OOjs UI documentation on MediaWiki][1] for more information. * * [1]: https://www.mediawiki.org/wiki/OOjs_UI/Windows/Window_managers * * @class * @extends OO.ui.Element * @mixins OO.EventEmitter * * @constructor * @param {Object} [config] Configuration options * @cfg {OO.Factory} [factory] Window factory to use for automatic instantiation * Note that window classes that are instantiated with a factory must have * a {@link OO.ui.Dialog#static-name static name} property that specifies a symbolic name. * @cfg {boolean} [modal=true] Prevent interaction outside the dialog */ OO.ui.WindowManager = function OoUiWindowManager( config ) { // Configuration initialization config = config || {}; // Parent constructor OO.ui.WindowManager.parent.call( this, config ); // Mixin constructors OO.EventEmitter.call( this ); // Properties this.factory = config.factory; this.modal = config.modal === undefined || !!config.modal; this.windows = {}; // Deprecated placeholder promise given to compatOpening in openWindow() // that is resolved in closeWindow(). this.compatOpened = null; this.preparingToOpen = null; this.preparingToClose = null; this.currentWindow = null; this.globalEvents = false; this.$returnFocusTo = null; this.$ariaHidden = null; this.onWindowResizeTimeout = null; this.onWindowResizeHandler = this.onWindowResize.bind( this ); this.afterWindowResizeHandler = this.afterWindowResize.bind( this ); // Initialization this.$element .addClass( 'oo-ui-windowManager' ) .attr( 'aria-hidden', true ) .toggleClass( 'oo-ui-windowManager-modal', this.modal ); }; /* Setup */ OO.inheritClass( OO.ui.WindowManager, OO.ui.Element ); OO.mixinClass( OO.ui.WindowManager, OO.EventEmitter ); /* Events */ /** * An 'opening' event is emitted when the window begins to be opened. * * @event opening * @param {OO.ui.Window} win Window that's being opened * @param {jQuery.Promise} opened A promise resolved with a value when the window is opened successfully. * This promise also emits `setup` and `ready` notifications. When this promise is resolved, the first * argument of the value is an 'closed' promise, the second argument is the opening data. * @param {Object} data Window opening data */ /** * A 'closing' event is emitted when the window begins to be closed. * * @event closing * @param {OO.ui.Window} win Window that's being closed * @param {jQuery.Promise} closed A promise resolved with a value when the window is closed successfully. * This promise also emits `hold` and `teardown` notifications. When this promise is resolved, the first * argument of its value is the closing data. * @param {Object} data Window closing data */ /** * A 'resize' event is emitted when a window is resized. * * @event resize * @param {OO.ui.Window} win Window that was resized */ /* Static Properties */ /** * Map of the symbolic name of each window size and its CSS properties. * * @static * @inheritable * @property {Object} */ OO.ui.WindowManager.static.sizes = { small: { width: 300 }, medium: { width: 500 }, large: { width: 700 }, larger: { width: 900 }, full: { // These can be non-numeric because they are never used in calculations width: '100%', height: '100%' } }; /** * Symbolic name of the default window size. * * The default size is used if the window's requested size is not recognized. * * @static * @inheritable * @property {string} */ OO.ui.WindowManager.static.defaultSize = 'medium'; /* Methods */ /** * Handle window resize events. * * @private * @param {jQuery.Event} e Window resize event */ OO.ui.WindowManager.prototype.onWindowResize = function () { clearTimeout( this.onWindowResizeTimeout ); this.onWindowResizeTimeout = setTimeout( this.afterWindowResizeHandler, 200 ); }; /** * Handle window resize events. * * @private * @param {jQuery.Event} e Window resize event */ OO.ui.WindowManager.prototype.afterWindowResize = function () { if ( this.currentWindow ) { this.updateWindowSize( this.currentWindow ); } }; /** * Check if window is opening. * * @param {OO.ui.Window} win Window to check * @return {boolean} Window is opening */ OO.ui.WindowManager.prototype.isOpening = function ( win ) { return win === this.currentWindow && !!this.lifecycle && this.lifecycle.isOpening(); }; /** * Check if window is closing. * * @param {OO.ui.Window} win Window to check * @return {boolean} Window is closing */ OO.ui.WindowManager.prototype.isClosing = function ( win ) { return win === this.currentWindow && !!this.lifecycle && this.lifecycle.isClosing(); }; /** * Check if window is opened. * * @param {OO.ui.Window} win Window to check * @return {boolean} Window is opened */ OO.ui.WindowManager.prototype.isOpened = function ( win ) { return win === this.currentWindow && !!this.lifecycle && this.lifecycle.isOpened(); }; /** * Check if a window is being managed. * * @param {OO.ui.Window} win Window to check * @return {boolean} Window is being managed */ OO.ui.WindowManager.prototype.hasWindow = function ( win ) { var name; for ( name in this.windows ) { if ( this.windows[ name ] === win ) { return true; } } return false; }; /** * Get the number of milliseconds to wait after opening begins before executing the ‘setup’ process. * * @param {OO.ui.Window} win Window being opened * @param {Object} [data] Window opening data * @return {number} Milliseconds to wait */ OO.ui.WindowManager.prototype.getSetupDelay = function () { return 0; }; /** * Get the number of milliseconds to wait after setup has finished before executing the ‘ready’ process. * * @param {OO.ui.Window} win Window being opened * @param {Object} [data] Window opening data * @return {number} Milliseconds to wait */ OO.ui.WindowManager.prototype.getReadyDelay = function () { return 0; }; /** * Get the number of milliseconds to wait after closing has begun before executing the 'hold' process. * * @param {OO.ui.Window} win Window being closed * @param {Object} [data] Window closing data * @return {number} Milliseconds to wait */ OO.ui.WindowManager.prototype.getHoldDelay = function () { return 0; }; /** * Get the number of milliseconds to wait after the ‘hold’ process has finished before * executing the ‘teardown’ process. * * @param {OO.ui.Window} win Window being closed * @param {Object} [data] Window closing data * @return {number} Milliseconds to wait */ OO.ui.WindowManager.prototype.getTeardownDelay = function () { return this.modal ? 250 : 0; }; /** * Get a window by its symbolic name. * * If the window is not yet instantiated and its symbolic name is recognized by a factory, it will be * instantiated and added to the window manager automatically. Please see the [OOjs UI documentation on MediaWiki][3] * for more information about using factories. * [3]: https://www.mediawiki.org/wiki/OOjs_UI/Windows/Window_managers * * @param {string} name Symbolic name of the window * @return {jQuery.Promise} Promise resolved with matching window, or rejected with an OO.ui.Error * @throws {Error} An error is thrown if the symbolic name is not recognized by the factory. * @throws {Error} An error is thrown if the named window is not recognized as a managed window. */ OO.ui.WindowManager.prototype.getWindow = function ( name ) { var deferred = $.Deferred(), win = this.windows[ name ]; if ( !( win instanceof OO.ui.Window ) ) { if ( this.factory ) { if ( !this.factory.lookup( name ) ) { deferred.reject( new OO.ui.Error( 'Cannot auto-instantiate window: symbolic name is unrecognized by the factory' ) ); } else { win = this.factory.create( name ); this.addWindows( [ win ] ); deferred.resolve( win ); } } else { deferred.reject( new OO.ui.Error( 'Cannot get unmanaged window: symbolic name unrecognized as a managed window' ) ); } } else { deferred.resolve( win ); } return deferred.promise(); }; /** * Get current window. * * @return {OO.ui.Window|null} Currently opening/opened/closing window */ OO.ui.WindowManager.prototype.getCurrentWindow = function () { return this.currentWindow; }; /** * Open a window. * * @param {OO.ui.Window|string} win Window object or symbolic name of window to open * @param {Object} [data] Window opening data * @param {jQuery|null} [data.$returnFocusTo] Element to which the window will return focus when closed. * Defaults the current activeElement. If set to null, focus isn't changed on close. * @return {OO.ui.WindowInstance|jQuery.Promise} A lifecycle object representing this particular * opening of the window. For backwards-compatibility, then object is also a Thenable that is resolved * when the window is done opening, with nested promise for when closing starts. This behaviour * is deprecated and is not compatible with jQuery 3. See T163510. * @fires opening */ OO.ui.WindowManager.prototype.openWindow = function ( win, data, lifecycle, compatOpening ) { var error, manager = this; data = data || {}; // Internal parameter 'lifecycle' allows this method to always return // a lifecycle even if the window still needs to be created // asynchronously when 'win' is a string. lifecycle = lifecycle || new OO.ui.WindowInstance(); compatOpening = compatOpening || $.Deferred(); // Turn lifecycle into a Thenable for backwards-compatibility with // the deprecated nested-promise behaviour, see T163510. [ 'state', 'always', 'catch', 'pipe', 'then', 'promise', 'progress', 'done', 'fail' ] .forEach( function ( method ) { lifecycle[ method ] = function () { OO.ui.warnDeprecation( 'Using the return value of openWindow as a promise is deprecated. ' + 'Use .openWindow( ... ).opening.' + method + '( ... ) instead.' ); return compatOpening[ method ].apply( this, arguments ); }; } ); // Argument handling if ( typeof win === 'string' ) { this.getWindow( win ).then( function ( win ) { manager.openWindow( win, data, lifecycle, compatOpening ); }, function ( err ) { lifecycle.deferreds.opening.reject( err ); } ); return lifecycle; } // Error handling if ( !this.hasWindow( win ) ) { error = 'Cannot open window: window is not attached to manager'; } else if ( this.lifecycle && this.lifecycle.isOpened() ) { error = 'Cannot open window: another window is open'; } else if ( this.preparingToOpen || ( this.lifecycle && this.lifecycle.isOpening() ) ) { error = 'Cannot open window: another window is opening'; } if ( error ) { compatOpening.reject( new OO.ui.Error( error ) ); lifecycle.deferreds.opening.reject( new OO.ui.Error( error ) ); return lifecycle; } // If a window is currently closing, wait for it to complete this.preparingToOpen = $.when( this.lifecycle && this.lifecycle.closed ); // Ensure handlers get called after preparingToOpen is set this.preparingToOpen.done( function () { if ( manager.modal ) { manager.toggleGlobalEvents( true ); manager.toggleAriaIsolation( true ); } manager.$returnFocusTo = data.$returnFocusTo !== undefined ? data.$returnFocusTo : $( document.activeElement ); manager.currentWindow = win; manager.lifecycle = lifecycle; manager.preparingToOpen = null; manager.emit( 'opening', win, compatOpening, data ); lifecycle.deferreds.opening.resolve( data ); setTimeout( function () { manager.compatOpened = $.Deferred(); win.setup( data ).then( function () { manager.updateWindowSize( win ); compatOpening.notify( { state: 'setup' } ); setTimeout( function () { win.ready( data ).then( function () { compatOpening.notify( { state: 'ready' } ); lifecycle.deferreds.opened.resolve( data ); compatOpening.resolve( manager.compatOpened.promise(), data ); }, function () { lifecycle.deferreds.opened.reject(); compatOpening.reject(); manager.closeWindow( win ); } ); }, manager.getReadyDelay() ); }, function () { lifecycle.deferreds.opened.reject(); compatOpening.reject(); manager.closeWindow( win ); } ); }, manager.getSetupDelay() ); } ); return lifecycle; }; /** * Close a window. * * @param {OO.ui.Window|string} win Window object or symbolic name of window to close * @param {Object} [data] Window closing data * @return {OO.ui.WindowInstance|jQuery.Promise} A lifecycle object representing this particular * opening of the window. For backwards-compatibility, the object is also a Thenable that is resolved * when the window is done closing, see T163510. * @fires closing */ OO.ui.WindowManager.prototype.closeWindow = function ( win, data ) { var error, manager = this, compatClosing = $.Deferred(), lifecycle = this.lifecycle, compatOpened; // Argument handling if ( typeof win === 'string' ) { win = this.windows[ win ]; } else if ( !this.hasWindow( win ) ) { win = null; } // Error handling if ( !lifecycle ) { error = 'Cannot close window: no window is currently open'; } else if ( !win ) { error = 'Cannot close window: window is not attached to manager'; } else if ( win !== this.currentWindow || this.lifecycle.isClosed() ) { error = 'Cannot close window: window already closed with different data'; } else if ( this.preparingToClose || this.lifecycle.isClosing() ) { error = 'Cannot close window: window already closing with different data'; } if ( error ) { // This function was called for the wrong window and we don't want to mess with the current // window's state. lifecycle = new OO.ui.WindowInstance(); // Pretend the window has been opened, so that we can pretend to fail to close it. lifecycle.deferreds.opening.resolve( {} ); lifecycle.deferreds.opened.resolve( {} ); } // Turn lifecycle into a Thenable for backwards-compatibility with // the deprecated nested-promise behaviour, see T163510. [ 'state', 'always', 'catch', 'pipe', 'then', 'promise', 'progress', 'done', 'fail' ] .forEach( function ( method ) { lifecycle[ method ] = function () { OO.ui.warnDeprecation( 'Using the return value of closeWindow as a promise is deprecated. ' + 'Use .closeWindow( ... ).closed.' + method + '( ... ) instead.' ); return compatClosing[ method ].apply( this, arguments ); }; } ); if ( error ) { compatClosing.reject( new OO.ui.Error( error ) ); lifecycle.deferreds.closing.reject( new OO.ui.Error( error ) ); return lifecycle; } // If the window is currently opening, close it when it's done this.preparingToClose = $.when( this.lifecycle.opened ); // Ensure handlers get called after preparingToClose is set this.preparingToClose.always( function () { manager.preparingToClose = null; manager.emit( 'closing', win, compatClosing, data ); lifecycle.deferreds.closing.resolve( data ); compatOpened = manager.compatOpened; manager.compatOpened = null; compatOpened.resolve( compatClosing.promise(), data ); setTimeout( function () { win.hold( data ).then( function () { compatClosing.notify( { state: 'hold' } ); setTimeout( function () { win.teardown( data ).then( function () { compatClosing.notify( { state: 'teardown' } ); if ( manager.modal ) { manager.toggleGlobalEvents( false ); manager.toggleAriaIsolation( false ); } if ( manager.$returnFocusTo && manager.$returnFocusTo.length ) { manager.$returnFocusTo[ 0 ].focus(); } manager.currentWindow = null; manager.lifecycle = null; lifecycle.deferreds.closed.resolve( data ); compatClosing.resolve( data ); } ); }, manager.getTeardownDelay() ); } ); }, manager.getHoldDelay() ); } ); return lifecycle; }; /** * Add windows to the window manager. * * Windows can be added by reference, symbolic name, or explicitly defined symbolic names. * See the [OOjs ui documentation on MediaWiki] [2] for examples. * [2]: https://www.mediawiki.org/wiki/OOjs_UI/Windows/Window_managers * * This function can be called in two manners: * * 1. `.addWindows( [ windowA, windowB, ... ] )` (where `windowA`, `windowB` are OO.ui.Window objects) * * This syntax registers windows under the symbolic names defined in their `.static.name` * properties. For example, if `windowA.constructor.static.name` is `'nameA'`, calling * `.openWindow( 'nameA' )` afterwards will open the window `windowA`. This syntax requires the * static name to be set, otherwise an exception will be thrown. * * This is the recommended way, as it allows for an easier switch to using a window factory. * * 2. `.addWindows( { nameA: windowA, nameB: windowB, ... } )` * * This syntax registers windows under the explicitly given symbolic names. In this example, * calling `.openWindow( 'nameA' )` afterwards will open the window `windowA`, regardless of what * its `.static.name` is set to. The static name is not required to be set. * * This should only be used if you need to override the default symbolic names. * * Example: * * var windowManager = new OO.ui.WindowManager(); * $( 'body' ).append( windowManager.$element ); * * // Add a window under the default name: see OO.ui.MessageDialog.static.name * windowManager.addWindows( [ new OO.ui.MessageDialog() ] ); * // Add a window under an explicit name * windowManager.addWindows( { myMessageDialog: new OO.ui.MessageDialog() } ); * * // Open window by default name * windowManager.openWindow( 'message' ); * // Open window by explicitly given name * windowManager.openWindow( 'myMessageDialog' ); * * * @param {Object.<string,OO.ui.Window>|OO.ui.Window[]} windows An array of window objects specified * by reference, symbolic name, or explicitly defined symbolic names. * @throws {Error} An error is thrown if a window is added by symbolic name, but has neither an * explicit nor a statically configured symbolic name. */ OO.ui.WindowManager.prototype.addWindows = function ( windows ) { var i, len, win, name, list; if ( Array.isArray( windows ) ) { // Convert to map of windows by looking up symbolic names from static configuration list = {}; for ( i = 0, len = windows.length; i < len; i++ ) { name = windows[ i ].constructor.static.name; if ( !name ) { throw new Error( 'Windows must have a `name` static property defined.' ); } list[ name ] = windows[ i ]; } } else if ( OO.isPlainObject( windows ) ) { list = windows; } // Add windows for ( name in list ) { win = list[ name ]; this.windows[ name ] = win.toggle( false ); this.$element.append( win.$element ); win.setManager( this ); } }; /** * Remove the specified windows from the windows manager. * * Windows will be closed before they are removed. If you wish to remove all windows, you may wish to use * the #clearWindows method instead. If you no longer need the window manager and want to ensure that it no * longer listens to events, use the #destroy method. * * @param {string[]} names Symbolic names of windows to remove * @return {jQuery.Promise} Promise resolved when window is closed and removed * @throws {Error} An error is thrown if the named windows are not managed by the window manager. */ OO.ui.WindowManager.prototype.removeWindows = function ( names ) { var i, len, win, name, cleanupWindow, manager = this, promises = [], cleanup = function ( name, win ) { delete manager.windows[ name ]; win.$element.detach(); }; for ( i = 0, len = names.length; i < len; i++ ) { name = names[ i ]; win = this.windows[ name ]; if ( !win ) { throw new Error( 'Cannot remove window' ); } cleanupWindow = cleanup.bind( null, name, win ); promises.push( this.closeWindow( name ).closed.then( cleanupWindow, cleanupWindow ) ); } return $.when.apply( $, promises ); }; /** * Remove all windows from the window manager. * * Windows will be closed before they are removed. Note that the window manager, though not in use, will still * listen to events. If the window manager will not be used again, you may wish to use the #destroy method instead. * To remove just a subset of windows, use the #removeWindows method. * * @return {jQuery.Promise} Promise resolved when all windows are closed and removed */ OO.ui.WindowManager.prototype.clearWindows = function () { return this.removeWindows( Object.keys( this.windows ) ); }; /** * Set dialog size. In general, this method should not be called directly. * * Fullscreen mode will be used if the dialog is too wide to fit in the screen. * * @param {OO.ui.Window} win Window to update, should be the current window * @chainable */ OO.ui.WindowManager.prototype.updateWindowSize = function ( win ) { var isFullscreen; // Bypass for non-current, and thus invisible, windows if ( win !== this.currentWindow ) { return; } isFullscreen = win.getSize() === 'full'; this.$element.toggleClass( 'oo-ui-windowManager-fullscreen', isFullscreen ); this.$element.toggleClass( 'oo-ui-windowManager-floating', !isFullscreen ); win.setDimensions( win.getSizeProperties() ); this.emit( 'resize', win ); return this; }; /** * Bind or unbind global events for scrolling. * * @private * @param {boolean} [on] Bind global events * @chainable */ OO.ui.WindowManager.prototype.toggleGlobalEvents = function ( on ) { var scrollWidth, bodyMargin, $body = $( this.getElementDocument().body ), // We could have multiple window managers open so only modify // the body css at the bottom of the stack stackDepth = $body.data( 'windowManagerGlobalEvents' ) || 0; on = on === undefined ? !!this.globalEvents : !!on; if ( on ) { if ( !this.globalEvents ) { $( this.getElementWindow() ).on( { // Start listening for top-level window dimension changes 'orientationchange resize': this.onWindowResizeHandler } ); if ( stackDepth === 0 ) { scrollWidth = window.innerWidth - document.documentElement.clientWidth; bodyMargin = parseFloat( $body.css( 'margin-right' ) ) || 0; $body.css( { overflow: 'hidden', 'margin-right': bodyMargin + scrollWidth } ); } stackDepth++; this.globalEvents = true; } } else if ( this.globalEvents ) { $( this.getElementWindow() ).off( { // Stop listening for top-level window dimension changes 'orientationchange resize': this.onWindowResizeHandler } ); stackDepth--; if ( stackDepth === 0 ) { $body.css( { overflow: '', 'margin-right': '' } ); } this.globalEvents = false; } $body.data( 'windowManagerGlobalEvents', stackDepth ); return this; }; /** * Toggle screen reader visibility of content other than the window manager. * * @private * @param {boolean} [isolate] Make only the window manager visible to screen readers * @chainable */ OO.ui.WindowManager.prototype.toggleAriaIsolation = function ( isolate ) { var $topLevelElement; isolate = isolate === undefined ? !this.$ariaHidden : !!isolate; if ( isolate ) { if ( !this.$ariaHidden ) { // Find the top level element containing the window manager or the // window manager's element itself in case its a direct child of body $topLevelElement = this.$element.parentsUntil( 'body' ).last(); $topLevelElement = $topLevelElement.length === 0 ? this.$element : $topLevelElement; // In case previously set by another window manager this.$element.removeAttr( 'aria-hidden' ); // Hide everything other than the window manager from screen readers this.$ariaHidden = $( 'body' ) .children() .not( 'script' ) .not( $topLevelElement ) .attr( 'aria-hidden', true ); } } else if ( this.$ariaHidden ) { // Restore screen reader visibility this.$ariaHidden.removeAttr( 'aria-hidden' ); this.$ariaHidden = null; // and hide the window manager this.$element.attr( 'aria-hidden', true ); } return this; }; /** * Destroy the window manager. * * Destroying the window manager ensures that it will no longer listen to events. If you would like to * continue using the window manager, but wish to remove all windows from it, use the #clearWindows method * instead. */ OO.ui.WindowManager.prototype.destroy = function () { this.toggleGlobalEvents( false ); this.toggleAriaIsolation( false ); this.clearWindows(); this.$element.remove(); }; /** * A window is a container for elements that are in a child frame. They are used with * a window manager (OO.ui.WindowManager), which is used to open and close the window and control * its presentation. The size of a window is specified using a symbolic name (e.g., ‘small’, ‘medium’, * ‘large’), which is interpreted by the window manager. If the requested size is not recognized, * the window manager will choose a sensible fallback. * * The lifecycle of a window has three primary stages (opening, opened, and closing) in which * different processes are executed: * * **opening**: The opening stage begins when the window manager's {@link OO.ui.WindowManager#openWindow * openWindow} or the window's {@link #open open} methods are used, and the window manager begins to open * the window. * * - {@link #getSetupProcess} method is called and its result executed * - {@link #getReadyProcess} method is called and its result executed * * **opened**: The window is now open * * **closing**: The closing stage begins when the window manager's * {@link OO.ui.WindowManager#closeWindow closeWindow} * or the window's {@link #close} methods are used, and the window manager begins to close the window. * * - {@link #getHoldProcess} method is called and its result executed * - {@link #getTeardownProcess} method is called and its result executed. The window is now closed * * Each of the window's processes (setup, ready, hold, and teardown) can be extended in subclasses * by overriding the window's #getSetupProcess, #getReadyProcess, #getHoldProcess and #getTeardownProcess * methods. Note that each {@link OO.ui.Process process} is executed in series, so asynchronous * processing can complete. Always assume window processes are executed asynchronously. * * For more information, please see the [OOjs UI documentation on MediaWiki] [1]. * * [1]: https://www.mediawiki.org/wiki/OOjs_UI/Windows * * @abstract * @class * @extends OO.ui.Element * @mixins OO.EventEmitter * * @constructor * @param {Object} [config] Configuration options * @cfg {string} [size] Symbolic name of the dialog size: `small`, `medium`, `large`, `larger` or * `full`. If omitted, the value of the {@link #static-size static size} property will be used. */ OO.ui.Window = function OoUiWindow( config ) { // Configuration initialization config = config || {}; // Parent constructor OO.ui.Window.parent.call( this, config ); // Mixin constructors OO.EventEmitter.call( this ); // Properties this.manager = null; this.size = config.size || this.constructor.static.size; this.$frame = $( '<div>' ); /** * Overlay element to use for the `$overlay` configuration option of widgets that support it. * Things put inside of it are overlaid on top of the window and are not bound to its dimensions. * See <https://www.mediawiki.org/wiki/OOjs_UI/Concepts#Overlays>. * * MyDialog.prototype.initialize = function () { * ... * var popupButton = new OO.ui.PopupButtonWidget( { * $overlay: this.$overlay, * label: 'Popup button', * popup: { * $content: $( '<p>Popup contents.</p><p>Popup contents.</p><p>Popup contents.</p>' ), * padded: true * } * } ); * ... * }; * * @property {jQuery} */ this.$overlay = $( '<div>' ); this.$content = $( '<div>' ); this.$focusTrapBefore = $( '<div>' ).prop( 'tabIndex', 0 ); this.$focusTrapAfter = $( '<div>' ).prop( 'tabIndex', 0 ); this.$focusTraps = this.$focusTrapBefore.add( this.$focusTrapAfter ); // Initialization this.$overlay.addClass( 'oo-ui-window-overlay' ); this.$content .addClass( 'oo-ui-window-content' ) .attr( 'tabindex', 0 ); this.$frame .addClass( 'oo-ui-window-frame' ) .append( this.$focusTrapBefore, this.$content, this.$focusTrapAfter ); this.$element .addClass( 'oo-ui-window' ) .append( this.$frame, this.$overlay ); // Initially hidden - using #toggle may cause errors if subclasses override toggle with methods // that reference properties not initialized at that time of parent class construction // TODO: Find a better way to handle post-constructor setup this.visible = false; this.$element.addClass( 'oo-ui-element-hidden' ); }; /* Setup */ OO.inheritClass( OO.ui.Window, OO.ui.Element ); OO.mixinClass( OO.ui.Window, OO.EventEmitter ); /* Static Properties */ /** * Symbolic name of the window size: `small`, `medium`, `large`, `larger` or `full`. * * The static size is used if no #size is configured during construction. * * @static * @inheritable * @property {string} */ OO.ui.Window.static.size = 'medium'; /* Methods */ /** * Handle mouse down events. * * @private * @param {jQuery.Event} e Mouse down event */ OO.ui.Window.prototype.onMouseDown = function ( e ) { // Prevent clicking on the click-block from stealing focus if ( e.target === this.$element[ 0 ] ) { return false; } }; /** * Check if the window has been initialized. * * Initialization occurs when a window is added to a manager. * * @return {boolean} Window has been initialized */ OO.ui.Window.prototype.isInitialized = function () { return !!this.manager; }; /** * Check if the window is visible. * * @return {boolean} Window is visible */ OO.ui.Window.prototype.isVisible = function () { return this.visible; }; /** * Check if the window is opening. * * This method is a wrapper around the window manager's {@link OO.ui.WindowManager#isOpening isOpening} * method. * * @return {boolean} Window is opening */ OO.ui.Window.prototype.isOpening = function () { return this.manager.isOpening( this ); }; /** * Check if the window is closing. * * This method is a wrapper around the window manager's {@link OO.ui.WindowManager#isClosing isClosing} method. * * @return {boolean} Window is closing */ OO.ui.Window.prototype.isClosing = function () { return this.manager.isClosing( this ); }; /** * Check if the window is opened. * * This method is a wrapper around the window manager's {@link OO.ui.WindowManager#isOpened isOpened} method. * * @return {boolean} Window is opened */ OO.ui.Window.prototype.isOpened = function () { return this.manager.isOpened( this ); }; /** * Get the window manager. * * All windows must be attached to a window manager, which is used to open * and close the window and control its presentation. * * @return {OO.ui.WindowManager} Manager of window */ OO.ui.Window.prototype.getManager = function () { return this.manager; }; /** * Get the symbolic name of the window size (e.g., `small` or `medium`). * * @return {string} Symbolic name of the size: `small`, `medium`, `large`, `larger`, `full` */ OO.ui.Window.prototype.getSize = function () { var viewport = OO.ui.Element.static.getDimensions( this.getElementWindow() ), sizes = this.manager.constructor.static.sizes, size = this.size; if ( !sizes[ size ] ) { size = this.manager.constructor.static.defaultSize; } if ( size !== 'full' && viewport.rect.right - viewport.rect.left < sizes[ size ].width ) { size = 'full'; } return size; }; /** * Get the size properties associated with the current window size * * @return {Object} Size properties */ OO.ui.Window.prototype.getSizeProperties = function () { return this.manager.constructor.static.sizes[ this.getSize() ]; }; /** * Disable transitions on window's frame for the duration of the callback function, then enable them * back. * * @private * @param {Function} callback Function to call while transitions are disabled */ OO.ui.Window.prototype.withoutSizeTransitions = function ( callback ) { // Temporarily resize the frame so getBodyHeight() can use scrollHeight measurements. // Disable transitions first, otherwise we'll get values from when the window was animating. // We need to build the transition CSS properties using these specific properties since // Firefox doesn't return anything useful when asked just for 'transition'. var oldTransition = this.$frame.css( 'transition-property' ) + ' ' + this.$frame.css( 'transition-duration' ) + ' ' + this.$frame.css( 'transition-timing-function' ) + ' ' + this.$frame.css( 'transition-delay' ); this.$frame.css( 'transition', 'none' ); callback(); // Force reflow to make sure the style changes done inside callback // really are not transitioned this.$frame.height(); this.$frame.css( 'transition', oldTransition ); }; /** * Get the height of the full window contents (i.e., the window head, body and foot together). * * What consistitutes the head, body, and foot varies depending on the window type. * A {@link OO.ui.MessageDialog message dialog} displays a title and message in its body, * and any actions in the foot. A {@link OO.ui.ProcessDialog process dialog} displays a title * and special actions in the head, and dialog content in the body. * * To get just the height of the dialog body, use the #getBodyHeight method. * * @return {number} The height of the window contents (the dialog head, body and foot) in pixels */ OO.ui.Window.prototype.getContentHeight = function () { var bodyHeight, win = this, bodyStyleObj = this.$body[ 0 ].style, frameStyleObj = this.$frame[ 0 ].style; // Temporarily resize the frame so getBodyHeight() can use scrollHeight measurements. // Disable transitions first, otherwise we'll get values from when the window was animating. this.withoutSizeTransitions( function () { var oldHeight = frameStyleObj.height, oldPosition = bodyStyleObj.position; frameStyleObj.height = '1px'; // Force body to resize to new width bodyStyleObj.position = 'relative'; bodyHeight = win.getBodyHeight(); frameStyleObj.height = oldHeight; bodyStyleObj.position = oldPosition; } ); return ( // Add buffer for border ( this.$frame.outerHeight() - this.$frame.innerHeight() ) + // Use combined heights of children ( this.$head.outerHeight( true ) + bodyHeight + this.$foot.outerHeight( true ) ) ); }; /** * Get the height of the window body. * * To get the height of the full window contents (the window body, head, and foot together), * use #getContentHeight. * * When this function is called, the window will temporarily have been resized * to height=1px, so .scrollHeight measurements can be taken accurately. * * @return {number} Height of the window body in pixels */ OO.ui.Window.prototype.getBodyHeight = function () { return this.$body[ 0 ].scrollHeight; }; /** * Get the directionality of the frame (right-to-left or left-to-right). * * @return {string} Directionality: `'ltr'` or `'rtl'` */ OO.ui.Window.prototype.getDir = function () { return OO.ui.Element.static.getDir( this.$content ) || 'ltr'; }; /** * Get the 'setup' process. * * The setup process is used to set up a window for use in a particular context, * based on the `data` argument. This method is called during the opening phase of the window’s * lifecycle. * * Override this method to add additional steps to the ‘setup’ process the parent method provides * using the {@link OO.ui.Process#first first} and {@link OO.ui.Process#next next} methods * of OO.ui.Process. * * To add window content that persists between openings, you may wish to use the #initialize method * instead. * * @param {Object} [data] Window opening data * @return {OO.ui.Process} Setup process */ OO.ui.Window.prototype.getSetupProcess = function () { return new OO.ui.Process(); }; /** * Get the ‘ready’ process. * * The ready process is used to ready a window for use in a particular * context, based on the `data` argument. This method is called during the opening phase of * the window’s lifecycle, after the window has been {@link #getSetupProcess setup}. * * Override this method to add additional steps to the ‘ready’ process the parent method * provides using the {@link OO.ui.Process#first first} and {@link OO.ui.Process#next next} * methods of OO.ui.Process. * * @param {Object} [data] Window opening data * @return {OO.ui.Process} Ready process */ OO.ui.Window.prototype.getReadyProcess = function () { return new OO.ui.Process(); }; /** * Get the 'hold' process. * * The hold process is used to keep a window from being used in a particular context, * based on the `data` argument. This method is called during the closing phase of the window’s * lifecycle. * * Override this method to add additional steps to the 'hold' process the parent method provides * using the {@link OO.ui.Process#first first} and {@link OO.ui.Process#next next} methods * of OO.ui.Process. * * @param {Object} [data] Window closing data * @return {OO.ui.Process} Hold process */ OO.ui.Window.prototype.getHoldProcess = function () { return new OO.ui.Process(); }; /** * Get the ‘teardown’ process. * * The teardown process is used to teardown a window after use. During teardown, * user interactions within the window are conveyed and the window is closed, based on the `data` * argument. This method is called during the closing phase of the window’s lifecycle. * * Override this method to add additional steps to the ‘teardown’ process the parent method provides * using the {@link OO.ui.Process#first first} and {@link OO.ui.Process#next next} methods * of OO.ui.Process. * * @param {Object} [data] Window closing data * @return {OO.ui.Process} Teardown process */ OO.ui.Window.prototype.getTeardownProcess = function () { return new OO.ui.Process(); }; /** * Set the window manager. * * This will cause the window to initialize. Calling it more than once will cause an error. * * @param {OO.ui.WindowManager} manager Manager for this window * @throws {Error} An error is thrown if the method is called more than once * @chainable */ OO.ui.Window.prototype.setManager = function ( manager ) { if ( this.manager ) { throw new Error( 'Cannot set window manager, window already has a manager' ); } this.manager = manager; this.initialize(); return this; }; /** * Set the window size by symbolic name (e.g., 'small' or 'medium') * * @param {string} size Symbolic name of size: `small`, `medium`, `large`, `larger` or * `full` * @chainable */ OO.ui.Window.prototype.setSize = function ( size ) { this.size = size; this.updateSize(); return this; }; /** * Update the window size. * * @throws {Error} An error is thrown if the window is not attached to a window manager * @chainable */ OO.ui.Window.prototype.updateSize = function () { if ( !this.manager ) { throw new Error( 'Cannot update window size, must be attached to a manager' ); } this.manager.updateWindowSize( this ); return this; }; /** * Set window dimensions. This method is called by the {@link OO.ui.WindowManager window manager} * when the window is opening. In general, setDimensions should not be called directly. * * To set the size of the window, use the #setSize method. * * @param {Object} dim CSS dimension properties * @param {string|number} [dim.width] Width * @param {string|number} [dim.minWidth] Minimum width * @param {string|number} [dim.maxWidth] Maximum width * @param {string|number} [dim.height] Height, omit to set based on height of contents * @param {string|number} [dim.minHeight] Minimum height * @param {string|number} [dim.maxHeight] Maximum height * @chainable */ OO.ui.Window.prototype.setDimensions = function ( dim ) { var height, win = this, styleObj = this.$frame[ 0 ].style; // Calculate the height we need to set using the correct width if ( dim.height === undefined ) { this.withoutSizeTransitions( function () { var oldWidth = styleObj.width; win.$frame.css( 'width', dim.width || '' ); height = win.getContentHeight(); styleObj.width = oldWidth; } ); } else { height = dim.height; } this.$frame.css( { width: dim.width || '', minWidth: dim.minWidth || '', maxWidth: dim.maxWidth || '', height: height || '', minHeight: dim.minHeight || '', maxHeight: dim.maxHeight || '' } ); return this; }; /** * Initialize window contents. * * Before the window is opened for the first time, #initialize is called so that content that * persists between openings can be added to the window. * * To set up a window with new content each time the window opens, use #getSetupProcess. * * @throws {Error} An error is thrown if the window is not attached to a window manager * @chainable */ OO.ui.Window.prototype.initialize = function () { if ( !this.manager ) { throw new Error( 'Cannot initialize window, must be attached to a manager' ); } // Properties this.$head = $( '<div>' ); this.$body = $( '<div>' ); this.$foot = $( '<div>' ); this.$document = $( this.getElementDocument() ); // Events this.$element.on( 'mousedown', this.onMouseDown.bind( this ) ); // Initialization this.$head.addClass( 'oo-ui-window-head' ); this.$body.addClass( 'oo-ui-window-body' ); this.$foot.addClass( 'oo-ui-window-foot' ); this.$content.append( this.$head, this.$body, this.$foot ); return this; }; /** * Called when someone tries to focus the hidden element at the end of the dialog. * Sends focus back to the start of the dialog. * * @param {jQuery.Event} event Focus event */ OO.ui.Window.prototype.onFocusTrapFocused = function ( event ) { var backwards = this.$focusTrapBefore.is( event.target ), element = OO.ui.findFocusable( this.$content, backwards ); if ( element ) { // There's a focusable element inside the content, at the front or // back depending on which focus trap we hit; select it. element.focus(); } else { // There's nothing focusable inside the content. As a fallback, // this.$content is focusable, and focusing it will keep our focus // properly trapped. It's not a *meaningful* focus, since it's just // the content-div for the Window, but it's better than letting focus // escape into the page. this.$content.focus(); } }; /** * Open the window. * * This method is a wrapper around a call to the window manager’s {@link OO.ui.WindowManager#openWindow openWindow} * method, which returns a promise resolved when the window is done opening. * * To customize the window each time it opens, use #getSetupProcess or #getReadyProcess. * * @param {Object} [data] Window opening data * @return {jQuery.Promise} Promise resolved with a value when the window is opened, or rejected * if the window fails to open. When the promise is resolved successfully, the first argument of the * value is a new promise, which is resolved when the window begins closing. * @throws {Error} An error is thrown if the window is not attached to a window manager */ OO.ui.Window.prototype.open = function ( data ) { if ( !this.manager ) { throw new Error( 'Cannot open window, must be attached to a manager' ); } return this.manager.openWindow( this, data ); }; /** * Close the window. * * This method is a wrapper around a call to the window * manager’s {@link OO.ui.WindowManager#closeWindow closeWindow} method, * which returns a closing promise resolved when the window is done closing. * * The window's #getHoldProcess and #getTeardownProcess methods are called during the closing * phase of the window’s lifecycle and can be used to specify closing behavior each time * the window closes. * * @param {Object} [data] Window closing data * @return {jQuery.Promise} Promise resolved when window is closed * @throws {Error} An error is thrown if the window is not attached to a window manager */ OO.ui.Window.prototype.close = function ( data ) { if ( !this.manager ) { throw new Error( 'Cannot close window, must be attached to a manager' ); } return this.manager.closeWindow( this, data ); }; /** * Setup window. * * This is called by OO.ui.WindowManager during window opening, and should not be called directly * by other systems. * * @param {Object} [data] Window opening data * @return {jQuery.Promise} Promise resolved when window is setup */ OO.ui.Window.prototype.setup = function ( data ) { var win = this; this.toggle( true ); this.focusTrapHandler = OO.ui.bind( this.onFocusTrapFocused, this ); this.$focusTraps.on( 'focus', this.focusTrapHandler ); return this.getSetupProcess( data ).execute().then( function () { // Force redraw by asking the browser to measure the elements' widths win.$element.addClass( 'oo-ui-window-active oo-ui-window-setup' ).width(); win.$content.addClass( 'oo-ui-window-content-setup' ).width(); } ); }; /** * Ready window. * * This is called by OO.ui.WindowManager during window opening, and should not be called directly * by other systems. * * @param {Object} [data] Window opening data * @return {jQuery.Promise} Promise resolved when window is ready */ OO.ui.Window.prototype.ready = function ( data ) { var win = this; this.$content.focus(); return this.getReadyProcess( data ).execute().then( function () { // Force redraw by asking the browser to measure the elements' widths win.$element.addClass( 'oo-ui-window-ready' ).width(); win.$content.addClass( 'oo-ui-window-content-ready' ).width(); } ); }; /** * Hold window. * * This is called by OO.ui.WindowManager during window closing, and should not be called directly * by other systems. * * @param {Object} [data] Window closing data * @return {jQuery.Promise} Promise resolved when window is held */ OO.ui.Window.prototype.hold = function ( data ) { var win = this; return this.getHoldProcess( data ).execute().then( function () { // Get the focused element within the window's content var $focus = win.$content.find( OO.ui.Element.static.getDocument( win.$content ).activeElement ); // Blur the focused element if ( $focus.length ) { $focus[ 0 ].blur(); } // Force redraw by asking the browser to measure the elements' widths win.$element.removeClass( 'oo-ui-window-ready' ).width(); win.$content.removeClass( 'oo-ui-window-content-ready' ).width(); } ); }; /** * Teardown window. * * This is called by OO.ui.WindowManager during window closing, and should not be called directly * by other systems. * * @param {Object} [data] Window closing data * @return {jQuery.Promise} Promise resolved when window is torn down */ OO.ui.Window.prototype.teardown = function ( data ) { var win = this; return this.getTeardownProcess( data ).execute().then( function () { // Force redraw by asking the browser to measure the elements' widths win.$element.removeClass( 'oo-ui-window-active oo-ui-window-setup' ).width(); win.$content.removeClass( 'oo-ui-window-content-setup' ).width(); win.$focusTraps.off( 'focus', win.focusTrapHandler ); win.toggle( false ); } ); }; /** * The Dialog class serves as the base class for the other types of dialogs. * Unless extended to include controls, the rendered dialog box is a simple window * that users can close by hitting the ‘Esc’ key. Dialog windows are used with OO.ui.WindowManager, * which opens, closes, and controls the presentation of the window. See the * [OOjs UI documentation on MediaWiki] [1] for more information. * * @example * // A simple dialog window. * function MyDialog( config ) { * MyDialog.parent.call( this, config ); * } * OO.inheritClass( MyDialog, OO.ui.Dialog ); * MyDialog.static.name = 'myDialog'; * MyDialog.prototype.initialize = function () { * MyDialog.parent.prototype.initialize.call( this ); * this.content = new OO.ui.PanelLayout( { padded: true, expanded: false } ); * this.content.$element.append( '<p>A simple dialog window. Press \'Esc\' to close.</p>' ); * this.$body.append( this.content.$element ); * }; * MyDialog.prototype.getBodyHeight = function () { * return this.content.$element.outerHeight( true ); * }; * var myDialog = new MyDialog( { * size: 'medium' * } ); * // Create and append a window manager, which opens and closes the window. * var windowManager = new OO.ui.WindowManager(); * $( 'body' ).append( windowManager.$element ); * windowManager.addWindows( [ myDialog ] ); * // Open the window! * windowManager.openWindow( myDialog ); * * [1]: https://www.mediawiki.org/wiki/OOjs_UI/Windows/Dialogs * * @abstract * @class * @extends OO.ui.Window * @mixins OO.ui.mixin.PendingElement * * @constructor * @param {Object} [config] Configuration options */ OO.ui.Dialog = function OoUiDialog( config ) { // Parent constructor OO.ui.Dialog.parent.call( this, config ); // Mixin constructors OO.ui.mixin.PendingElement.call( this ); // Properties this.actions = new OO.ui.ActionSet(); this.attachedActions = []; this.currentAction = null; this.onDialogKeyDownHandler = this.onDialogKeyDown.bind( this ); // Events this.actions.connect( this, { click: 'onActionClick', change: 'onActionsChange' } ); // Initialization this.$element .addClass( 'oo-ui-dialog' ) .attr( 'role', 'dialog' ); }; /* Setup */ OO.inheritClass( OO.ui.Dialog, OO.ui.Window ); OO.mixinClass( OO.ui.Dialog, OO.ui.mixin.PendingElement ); /* Static Properties */ /** * Symbolic name of dialog. * * The dialog class must have a symbolic name in order to be registered with OO.Factory. * Please see the [OOjs UI documentation on MediaWiki] [3] for more information. * * [3]: https://www.mediawiki.org/wiki/OOjs_UI/Windows/Window_managers * * @abstract * @static * @inheritable * @property {string} */ OO.ui.Dialog.static.name = ''; /** * The dialog title. * * The title can be specified as a plaintext string, a {@link OO.ui.mixin.LabelElement Label} node, or a function * that will produce a Label node or string. The title can also be specified with data passed to the * constructor (see #getSetupProcess). In this case, the static value will be overridden. * * @abstract * @static * @inheritable * @property {jQuery|string|Function} */ OO.ui.Dialog.static.title = ''; /** * An array of configured {@link OO.ui.ActionWidget action widgets}. * * Actions can also be specified with data passed to the constructor (see #getSetupProcess). In this case, the static * value will be overridden. * * [2]: https://www.mediawiki.org/wiki/OOjs_UI/Windows/Process_Dialogs#Action_sets * * @static * @inheritable * @property {Object[]} */ OO.ui.Dialog.static.actions = []; /** * Close the dialog when the 'Esc' key is pressed. * * @static * @abstract * @inheritable * @property {boolean} */ OO.ui.Dialog.static.escapable = true; /* Methods */ /** * Handle frame document key down events. * * @private * @param {jQuery.Event} e Key down event */ OO.ui.Dialog.prototype.onDialogKeyDown = function ( e ) { var actions; if ( e.which === OO.ui.Keys.ESCAPE && this.constructor.static.escapable ) { this.executeAction( '' ); e.preventDefault(); e.stopPropagation(); } else if ( e.which === OO.ui.Keys.ENTER && ( e.ctrlKey || e.metaKey ) ) { actions = this.actions.get( { flags: 'primary', visible: true, disabled: false } ); if ( actions.length > 0 ) { this.executeAction( actions[ 0 ].getAction() ); e.preventDefault(); e.stopPropagation(); } } }; /** * Handle action click events. * * @private * @param {OO.ui.ActionWidget} action Action that was clicked */ OO.ui.Dialog.prototype.onActionClick = function ( action ) { if ( !this.isPending() ) { this.executeAction( action.getAction() ); } }; /** * Handle actions change event. * * @private */ OO.ui.Dialog.prototype.onActionsChange = function () { this.detachActions(); if ( !this.isClosing() ) { this.attachActions(); } }; /** * Get the set of actions used by the dialog. * * @return {OO.ui.ActionSet} */ OO.ui.Dialog.prototype.getActions = function () { return this.actions; }; /** * Get a process for taking action. * * When you override this method, you can create a new OO.ui.Process and return it, or add additional * accept steps to the process the parent method provides using the {@link OO.ui.Process#first 'first'} * and {@link OO.ui.Process#next 'next'} methods of OO.ui.Process. * * @param {string} [action] Symbolic name of action * @return {OO.ui.Process} Action process */ OO.ui.Dialog.prototype.getActionProcess = function ( action ) { return new OO.ui.Process() .next( function () { if ( !action ) { // An empty action always closes the dialog without data, which should always be // safe and make no changes this.close(); } }, this ); }; /** * @inheritdoc * * @param {Object} [data] Dialog opening data * @param {jQuery|string|Function|null} [data.title] Dialog title, omit to use * the {@link #static-title static title} * @param {Object[]} [data.actions] List of configuration options for each * {@link OO.ui.ActionWidget action widget}, omit to use {@link #static-actions static actions}. */ OO.ui.Dialog.prototype.getSetupProcess = function ( data ) { data = data || {}; // Parent method return OO.ui.Dialog.parent.prototype.getSetupProcess.call( this, data ) .next( function () { var config = this.constructor.static, actions = data.actions !== undefined ? data.actions : config.actions, title = data.title !== undefined ? data.title : config.title; this.title.setLabel( title ).setTitle( title ); this.actions.add( this.getActionWidgets( actions ) ); this.$element.on( 'keydown', this.onDialogKeyDownHandler ); }, this ); }; /** * @inheritdoc */ OO.ui.Dialog.prototype.getTeardownProcess = function ( data ) { // Parent method return OO.ui.Dialog.parent.prototype.getTeardownProcess.call( this, data ) .first( function () { this.$element.off( 'keydown', this.onDialogKeyDownHandler ); this.actions.clear(); this.currentAction = null; }, this ); }; /** * @inheritdoc */ OO.ui.Dialog.prototype.initialize = function () { // Parent method OO.ui.Dialog.parent.prototype.initialize.call( this ); // Properties this.title = new OO.ui.LabelWidget(); // Initialization this.$content.addClass( 'oo-ui-dialog-content' ); this.$element.attr( 'aria-labelledby', this.title.getElementId() ); this.setPendingElement( this.$head ); }; /** * Get action widgets from a list of configs * * @param {Object[]} actions Action widget configs * @return {OO.ui.ActionWidget[]} Action widgets */ OO.ui.Dialog.prototype.getActionWidgets = function ( actions ) { var i, len, widgets = []; for ( i = 0, len = actions.length; i < len; i++ ) { widgets.push( new OO.ui.ActionWidget( actions[ i ] ) ); } return widgets; }; /** * Attach action actions. * * @protected */ OO.ui.Dialog.prototype.attachActions = function () { // Remember the list of potentially attached actions this.attachedActions = this.actions.get(); }; /** * Detach action actions. * * @protected * @chainable */ OO.ui.Dialog.prototype.detachActions = function () { var i, len; // Detach all actions that may have been previously attached for ( i = 0, len = this.attachedActions.length; i < len; i++ ) { this.attachedActions[ i ].$element.detach(); } this.attachedActions = []; }; /** * Execute an action. * * @param {string} action Symbolic name of action to execute * @return {jQuery.Promise} Promise resolved when action completes, rejected if it fails */ OO.ui.Dialog.prototype.executeAction = function ( action ) { this.pushPending(); this.currentAction = action; return this.getActionProcess( action ).execute() .always( this.popPending.bind( this ) ); }; /** * MessageDialogs display a confirmation or alert message. By default, the rendered dialog box * consists of a header that contains the dialog title, a body with the message, and a footer that * contains any {@link OO.ui.ActionWidget action widgets}. The MessageDialog class is the only type * of {@link OO.ui.Dialog dialog} that is usually instantiated directly. * * There are two basic types of message dialogs, confirmation and alert: * * - **confirmation**: the dialog title describes what a progressive action will do and the message provides * more details about the consequences. * - **alert**: the dialog title describes which event occurred and the message provides more information * about why the event occurred. * * The MessageDialog class specifies two actions: ‘accept’, the primary * action (e.g., ‘ok’) and ‘reject,’ the safe action (e.g., ‘cancel’). Both will close the window, * passing along the selected action. * * For more information and examples, please see the [OOjs UI documentation on MediaWiki][1]. * * @example * // Example: Creating and opening a message dialog window. * var messageDialog = new OO.ui.MessageDialog(); * * // Create and append a window manager. * var windowManager = new OO.ui.WindowManager(); * $( 'body' ).append( windowManager.$element ); * windowManager.addWindows( [ messageDialog ] ); * // Open the window. * windowManager.openWindow( messageDialog, { * title: 'Basic message dialog', * message: 'This is the message' * } ); * * [1]: https://www.mediawiki.org/wiki/OOjs_UI/Windows/Message_Dialogs * * @class * @extends OO.ui.Dialog * * @constructor * @param {Object} [config] Configuration options */ OO.ui.MessageDialog = function OoUiMessageDialog( config ) { // Parent constructor OO.ui.MessageDialog.parent.call( this, config ); // Properties this.verticalActionLayout = null; // Initialization this.$element.addClass( 'oo-ui-messageDialog' ); }; /* Setup */ OO.inheritClass( OO.ui.MessageDialog, OO.ui.Dialog ); /* Static Properties */ /** * @static * @inheritdoc */ OO.ui.MessageDialog.static.name = 'message'; /** * @static * @inheritdoc */ OO.ui.MessageDialog.static.size = 'small'; /** * Dialog title. * * The title of a confirmation dialog describes what a progressive action will do. The * title of an alert dialog describes which event occurred. * * @static * @inheritable * @property {jQuery|string|Function|null} */ OO.ui.MessageDialog.static.title = null; /** * The message displayed in the dialog body. * * A confirmation message describes the consequences of a progressive action. An alert * message describes why an event occurred. * * @static * @inheritable * @property {jQuery|string|Function|null} */ OO.ui.MessageDialog.static.message = null; /** * @static * @inheritdoc */ OO.ui.MessageDialog.static.actions = [ // Note that OO.ui.alert() and OO.ui.confirm() rely on these. { action: 'accept', label: OO.ui.deferMsg( 'ooui-dialog-message-accept' ), flags: 'primary' }, { action: 'reject', label: OO.ui.deferMsg( 'ooui-dialog-message-reject' ), flags: 'safe' } ]; /* Methods */ /** * @inheritdoc */ OO.ui.MessageDialog.prototype.setManager = function ( manager ) { OO.ui.MessageDialog.parent.prototype.setManager.call( this, manager ); // Events this.manager.connect( this, { resize: 'onResize' } ); return this; }; /** * Handle window resized events. * * @private */ OO.ui.MessageDialog.prototype.onResize = function () { var dialog = this; dialog.fitActions(); // Wait for CSS transition to finish and do it again :( setTimeout( function () { dialog.fitActions(); }, 300 ); }; /** * Toggle action layout between vertical and horizontal. * * @private * @param {boolean} [value] Layout actions vertically, omit to toggle * @chainable */ OO.ui.MessageDialog.prototype.toggleVerticalActionLayout = function ( value ) { value = value === undefined ? !this.verticalActionLayout : !!value; if ( value !== this.verticalActionLayout ) { this.verticalActionLayout = value; this.$actions .toggleClass( 'oo-ui-messageDialog-actions-vertical', value ) .toggleClass( 'oo-ui-messageDialog-actions-horizontal', !value ); } return this; }; /** * @inheritdoc */ OO.ui.MessageDialog.prototype.getActionProcess = function ( action ) { if ( action ) { return new OO.ui.Process( function () { this.close( { action: action } ); }, this ); } return OO.ui.MessageDialog.parent.prototype.getActionProcess.call( this, action ); }; /** * @inheritdoc * * @param {Object} [data] Dialog opening data * @param {jQuery|string|Function|null} [data.title] Description of the action being confirmed * @param {jQuery|string|Function|null} [data.message] Description of the action's consequence * @param {string} [data.size] Symbolic name of the dialog size, see OO.ui.Window * @param {Object[]} [data.actions] List of OO.ui.ActionOptionWidget configuration options for each * action item */ OO.ui.MessageDialog.prototype.getSetupProcess = function ( data ) { data = data || {}; // Parent method return OO.ui.MessageDialog.parent.prototype.getSetupProcess.call( this, data ) .next( function () { this.title.setLabel( data.title !== undefined ? data.title : this.constructor.static.title ); this.message.setLabel( data.message !== undefined ? data.message : this.constructor.static.message ); this.size = data.size !== undefined ? data.size : this.constructor.static.size; }, this ); }; /** * @inheritdoc */ OO.ui.MessageDialog.prototype.getReadyProcess = function ( data ) { data = data || {}; // Parent method return OO.ui.MessageDialog.parent.prototype.getReadyProcess.call( this, data ) .next( function () { // Focus the primary action button var actions = this.actions.get(); actions = actions.filter( function ( action ) { return action.getFlags().indexOf( 'primary' ) > -1; } ); if ( actions.length > 0 ) { actions[ 0 ].focus(); } }, this ); }; /** * @inheritdoc */ OO.ui.MessageDialog.prototype.getBodyHeight = function () { var bodyHeight, oldOverflow, $scrollable = this.container.$element; oldOverflow = $scrollable[ 0 ].style.overflow; $scrollable[ 0 ].style.overflow = 'hidden'; OO.ui.Element.static.reconsiderScrollbars( $scrollable[ 0 ] ); bodyHeight = this.text.$element.outerHeight( true ); $scrollable[ 0 ].style.overflow = oldOverflow; return bodyHeight; }; /** * @inheritdoc */ OO.ui.MessageDialog.prototype.setDimensions = function ( dim ) { var $scrollable = this.container.$element; OO.ui.MessageDialog.parent.prototype.setDimensions.call( this, dim ); // Twiddle the overflow property, otherwise an unnecessary scrollbar will be produced. // Need to do it after transition completes (250ms), add 50ms just in case. setTimeout( function () { var oldOverflow = $scrollable[ 0 ].style.overflow, activeElement = document.activeElement; $scrollable[ 0 ].style.overflow = 'hidden'; OO.ui.Element.static.reconsiderScrollbars( $scrollable[ 0 ] ); // Check reconsiderScrollbars didn't destroy our focus, as we // are doing this after the ready process. if ( activeElement && activeElement !== document.activeElement && activeElement.focus ) { activeElement.focus(); } $scrollable[ 0 ].style.overflow = oldOverflow; }, 300 ); return this; }; /** * @inheritdoc */ OO.ui.MessageDialog.prototype.initialize = function () { // Parent method OO.ui.MessageDialog.parent.prototype.initialize.call( this ); // Properties this.$actions = $( '<div>' ); this.container = new OO.ui.PanelLayout( { scrollable: true, classes: [ 'oo-ui-messageDialog-container' ] } ); this.text = new OO.ui.PanelLayout( { padded: true, expanded: false, classes: [ 'oo-ui-messageDialog-text' ] } ); this.message = new OO.ui.LabelWidget( { classes: [ 'oo-ui-messageDialog-message' ] } ); // Initialization this.title.$element.addClass( 'oo-ui-messageDialog-title' ); this.$content.addClass( 'oo-ui-messageDialog-content' ); this.container.$element.append( this.text.$element ); this.text.$element.append( this.title.$element, this.message.$element ); this.$body.append( this.container.$element ); this.$actions.addClass( 'oo-ui-messageDialog-actions' ); this.$foot.append( this.$actions ); }; /** * @inheritdoc */ OO.ui.MessageDialog.prototype.attachActions = function () { var i, len, other, special, others; // Parent method OO.ui.MessageDialog.parent.prototype.attachActions.call( this ); special = this.actions.getSpecial(); others = this.actions.getOthers(); if ( special.safe ) { this.$actions.append( special.safe.$element ); special.safe.toggleFramed( false ); } if ( others.length ) { for ( i = 0, len = others.length; i < len; i++ ) { other = others[ i ]; this.$actions.append( other.$element ); other.toggleFramed( false ); } } if ( special.primary ) { this.$actions.append( special.primary.$element ); special.primary.toggleFramed( false ); } if ( !this.isOpening() ) { // If the dialog is currently opening, this will be called automatically soon. // This also calls #fitActions. this.updateSize(); } }; /** * Fit action actions into columns or rows. * * Columns will be used if all labels can fit without overflow, otherwise rows will be used. * * @private */ OO.ui.MessageDialog.prototype.fitActions = function () { var i, len, action, previous = this.verticalActionLayout, actions = this.actions.get(); // Detect clipping this.toggleVerticalActionLayout( false ); for ( i = 0, len = actions.length; i < len; i++ ) { action = actions[ i ]; if ( action.$element.innerWidth() < action.$label.outerWidth( true ) ) { this.toggleVerticalActionLayout( true ); break; } } // Move the body out of the way of the foot this.$body.css( 'bottom', this.$foot.outerHeight( true ) ); if ( this.verticalActionLayout !== previous ) { // We changed the layout, window height might need to be updated. this.updateSize(); } }; /** * ProcessDialog windows encapsulate a {@link OO.ui.Process process} and all of the code necessary * to complete it. If the process terminates with an error, a customizable {@link OO.ui.Error error * interface} alerts users to the trouble, permitting the user to dismiss the error and try again when * relevant. The ProcessDialog class is always extended and customized with the actions and content * required for each process. * * The process dialog box consists of a header that visually represents the ‘working’ state of long * processes with an animation. The header contains the dialog title as well as * two {@link OO.ui.ActionWidget action widgets}: a ‘safe’ action on the left (e.g., ‘Cancel’) and * a ‘primary’ action on the right (e.g., ‘Done’). * * Like other windows, the process dialog is managed by a {@link OO.ui.WindowManager window manager}. * Please see the [OOjs UI documentation on MediaWiki][1] for more information and examples. * * @example * // Example: Creating and opening a process dialog window. * function MyProcessDialog( config ) { * MyProcessDialog.parent.call( this, config ); * } * OO.inheritClass( MyProcessDialog, OO.ui.ProcessDialog ); * * MyProcessDialog.static.name = 'myProcessDialog'; * MyProcessDialog.static.title = 'Process dialog'; * MyProcessDialog.static.actions = [ * { action: 'save', label: 'Done', flags: 'primary' }, * { label: 'Cancel', flags: 'safe' } * ]; * * MyProcessDialog.prototype.initialize = function () { * MyProcessDialog.parent.prototype.initialize.apply( this, arguments ); * this.content = new OO.ui.PanelLayout( { padded: true, expanded: false } ); * this.content.$element.append( '<p>This is a process dialog window. The header contains the title and two buttons: \'Cancel\' (a safe action) on the left and \'Done\' (a primary action) on the right.</p>' ); * this.$body.append( this.content.$element ); * }; * MyProcessDialog.prototype.getActionProcess = function ( action ) { * var dialog = this; * if ( action ) { * return new OO.ui.Process( function () { * dialog.close( { action: action } ); * } ); * } * return MyProcessDialog.parent.prototype.getActionProcess.call( this, action ); * }; * * var windowManager = new OO.ui.WindowManager(); * $( 'body' ).append( windowManager.$element ); * * var dialog = new MyProcessDialog(); * windowManager.addWindows( [ dialog ] ); * windowManager.openWindow( dialog ); * * [1]: https://www.mediawiki.org/wiki/OOjs_UI/Windows/Process_Dialogs * * @abstract * @class * @extends OO.ui.Dialog * * @constructor * @param {Object} [config] Configuration options */ OO.ui.ProcessDialog = function OoUiProcessDialog( config ) { // Parent constructor OO.ui.ProcessDialog.parent.call( this, config ); // Properties this.fitOnOpen = false; // Initialization this.$element.addClass( 'oo-ui-processDialog' ); }; /* Setup */ OO.inheritClass( OO.ui.ProcessDialog, OO.ui.Dialog ); /* Methods */ /** * Handle dismiss button click events. * * Hides errors. * * @private */ OO.ui.ProcessDialog.prototype.onDismissErrorButtonClick = function () { this.hideErrors(); }; /** * Handle retry button click events. * * Hides errors and then tries again. * * @private */ OO.ui.ProcessDialog.prototype.onRetryButtonClick = function () { this.hideErrors(); this.executeAction( this.currentAction ); }; /** * @inheritdoc */ OO.ui.ProcessDialog.prototype.initialize = function () { // Parent method OO.ui.ProcessDialog.parent.prototype.initialize.call( this ); // Properties this.$navigation = $( '<div>' ); this.$location = $( '<div>' ); this.$safeActions = $( '<div>' ); this.$primaryActions = $( '<div>' ); this.$otherActions = $( '<div>' ); this.dismissButton = new OO.ui.ButtonWidget( { label: OO.ui.msg( 'ooui-dialog-process-dismiss' ) } ); this.retryButton = new OO.ui.ButtonWidget(); this.$errors = $( '<div>' ); this.$errorsTitle = $( '<div>' ); // Events this.dismissButton.connect( this, { click: 'onDismissErrorButtonClick' } ); this.retryButton.connect( this, { click: 'onRetryButtonClick' } ); // Initialization this.title.$element.addClass( 'oo-ui-processDialog-title' ); this.$location .append( this.title.$element ) .addClass( 'oo-ui-processDialog-location' ); this.$safeActions.addClass( 'oo-ui-processDialog-actions-safe' ); this.$primaryActions.addClass( 'oo-ui-processDialog-actions-primary' ); this.$otherActions.addClass( 'oo-ui-processDialog-actions-other' ); this.$errorsTitle .addClass( 'oo-ui-processDialog-errors-title' ) .text( OO.ui.msg( 'ooui-dialog-process-error' ) ); this.$errors .addClass( 'oo-ui-processDialog-errors oo-ui-element-hidden' ) .append( this.$errorsTitle, this.dismissButton.$element, this.retryButton.$element ); this.$content .addClass( 'oo-ui-processDialog-content' ) .append( this.$errors ); this.$navigation .addClass( 'oo-ui-processDialog-navigation' ) // Note: Order of appends below is important. These are in the order // we want tab to go through them. Display-order is handled entirely // by CSS absolute-positioning. As such, primary actions like "done" // should go first. .append( this.$primaryActions, this.$location, this.$safeActions ); this.$head.append( this.$navigation ); this.$foot.append( this.$otherActions ); }; /** * @inheritdoc */ OO.ui.ProcessDialog.prototype.getActionWidgets = function ( actions ) { var i, len, config, isMobile = OO.ui.isMobile(), widgets = []; for ( i = 0, len = actions.length; i < len; i++ ) { config = $.extend( { framed: !OO.ui.isMobile() }, actions[ i ] ); if ( isMobile && ( config.flags === 'back' || ( Array.isArray( config.flags ) && config.flags.indexOf( 'back' ) !== -1 ) ) ) { $.extend( config, { icon: 'previous', label: '' } ); } widgets.push( new OO.ui.ActionWidget( config ) ); } return widgets; }; /** * @inheritdoc */ OO.ui.ProcessDialog.prototype.attachActions = function () { var i, len, other, special, others; // Parent method OO.ui.ProcessDialog.parent.prototype.attachActions.call( this ); special = this.actions.getSpecial(); others = this.actions.getOthers(); if ( special.primary ) { this.$primaryActions.append( special.primary.$element ); } for ( i = 0, len = others.length; i < len; i++ ) { other = others[ i ]; this.$otherActions.append( other.$element ); } if ( special.safe ) { this.$safeActions.append( special.safe.$element ); } this.fitLabel(); this.$body.css( 'bottom', this.$foot.outerHeight( true ) ); }; /** * @inheritdoc */ OO.ui.ProcessDialog.prototype.executeAction = function ( action ) { var process = this; return OO.ui.ProcessDialog.parent.prototype.executeAction.call( this, action ) .fail( function ( errors ) { process.showErrors( errors || [] ); } ); }; /** * @inheritdoc */ OO.ui.ProcessDialog.prototype.setDimensions = function () { // Parent method OO.ui.ProcessDialog.parent.prototype.setDimensions.apply( this, arguments ); this.fitLabel(); }; /** * Fit label between actions. * * @private * @chainable */ OO.ui.ProcessDialog.prototype.fitLabel = function () { var safeWidth, primaryWidth, biggerWidth, labelWidth, navigationWidth, leftWidth, rightWidth, size = this.getSizeProperties(); if ( typeof size.width !== 'number' ) { if ( this.isOpened() ) { navigationWidth = this.$head.width() - 20; } else if ( this.isOpening() ) { if ( !this.fitOnOpen ) { // Size is relative and the dialog isn't open yet, so wait. // FIXME: This should ideally be handled by setup somehow. this.manager.lifecycle.opened.done( this.fitLabel.bind( this ) ); this.fitOnOpen = true; } return; } else { return; } } else { navigationWidth = size.width - 20; } safeWidth = this.$safeActions.is( ':visible' ) ? this.$safeActions.width() : 0; primaryWidth = this.$primaryActions.is( ':visible' ) ? this.$primaryActions.width() : 0; biggerWidth = Math.max( safeWidth, primaryWidth ); labelWidth = this.title.$element.width(); if ( 2 * biggerWidth + labelWidth < navigationWidth ) { // We have enough space to center the label leftWidth = rightWidth = biggerWidth; } else { // Let's hope we at least have enough space not to overlap, because we can't wrap the label… if ( this.getDir() === 'ltr' ) { leftWidth = safeWidth; rightWidth = primaryWidth; } else { leftWidth = primaryWidth; rightWidth = safeWidth; } } this.$location.css( { paddingLeft: leftWidth, paddingRight: rightWidth } ); return this; }; /** * Handle errors that occurred during accept or reject processes. * * @private * @param {OO.ui.Error[]|OO.ui.Error} errors Errors to be handled */ OO.ui.ProcessDialog.prototype.showErrors = function ( errors ) { var i, len, $item, actions, items = [], abilities = {}, recoverable = true, warning = false; if ( errors instanceof OO.ui.Error ) { errors = [ errors ]; } for ( i = 0, len = errors.length; i < len; i++ ) { if ( !errors[ i ].isRecoverable() ) { recoverable = false; } if ( errors[ i ].isWarning() ) { warning = true; } $item = $( '<div>' ) .addClass( 'oo-ui-processDialog-error' ) .append( errors[ i ].getMessage() ); items.push( $item[ 0 ] ); } this.$errorItems = $( items ); if ( recoverable ) { abilities[ this.currentAction ] = true; // Copy the flags from the first matching action actions = this.actions.get( { actions: this.currentAction } ); if ( actions.length ) { this.retryButton.clearFlags().setFlags( actions[ 0 ].getFlags() ); } } else { abilities[ this.currentAction ] = false; this.actions.setAbilities( abilities ); } if ( warning ) { this.retryButton.setLabel( OO.ui.msg( 'ooui-dialog-process-continue' ) ); } else { this.retryButton.setLabel( OO.ui.msg( 'ooui-dialog-process-retry' ) ); } this.retryButton.toggle( recoverable ); this.$errorsTitle.after( this.$errorItems ); this.$errors.removeClass( 'oo-ui-element-hidden' ).scrollTop( 0 ); }; /** * Hide errors. * * @private */ OO.ui.ProcessDialog.prototype.hideErrors = function () { this.$errors.addClass( 'oo-ui-element-hidden' ); if ( this.$errorItems ) { this.$errorItems.remove(); this.$errorItems = null; } }; /** * @inheritdoc */ OO.ui.ProcessDialog.prototype.getTeardownProcess = function ( data ) { // Parent method return OO.ui.ProcessDialog.parent.prototype.getTeardownProcess.call( this, data ) .first( function () { // Make sure to hide errors this.hideErrors(); this.fitOnOpen = false; }, this ); }; /** * @class OO.ui */ /** * Lazy-initialize and return a global OO.ui.WindowManager instance, used by OO.ui.alert and * OO.ui.confirm. * * @private * @return {OO.ui.WindowManager} */ OO.ui.getWindowManager = function () { if ( !OO.ui.windowManager ) { OO.ui.windowManager = new OO.ui.WindowManager(); $( 'body' ).append( OO.ui.windowManager.$element ); OO.ui.windowManager.addWindows( [ new OO.ui.MessageDialog() ] ); } return OO.ui.windowManager; }; /** * Display a quick modal alert dialog, using a OO.ui.MessageDialog. While the dialog is open, the * rest of the page will be dimmed out and the user won't be able to interact with it. The dialog * has only one action button, labelled "OK", clicking it will simply close the dialog. * * A window manager is created automatically when this function is called for the first time. * * @example * OO.ui.alert( 'Something happened!' ).done( function () { * console.log( 'User closed the dialog.' ); * } ); * * OO.ui.alert( 'Something larger happened!', { size: 'large' } ); * * @param {jQuery|string} text Message text to display * @param {Object} [options] Additional options, see OO.ui.MessageDialog#getSetupProcess * @return {jQuery.Promise} Promise resolved when the user closes the dialog */ OO.ui.alert = function ( text, options ) { return OO.ui.getWindowManager().openWindow( 'message', $.extend( { message: text, actions: [ OO.ui.MessageDialog.static.actions[ 0 ] ] }, options ) ).closed.then( function () { return undefined; } ); }; /** * Display a quick modal confirmation dialog, using a OO.ui.MessageDialog. While the dialog is open, * the rest of the page will be dimmed out and the user won't be able to interact with it. The * dialog has two action buttons, one to confirm an operation (labelled "OK") and one to cancel it * (labelled "Cancel"). * * A window manager is created automatically when this function is called for the first time. * * @example * OO.ui.confirm( 'Are you sure?' ).done( function ( confirmed ) { * if ( confirmed ) { * console.log( 'User clicked "OK"!' ); * } else { * console.log( 'User clicked "Cancel" or closed the dialog.' ); * } * } ); * * @param {jQuery|string} text Message text to display * @param {Object} [options] Additional options, see OO.ui.MessageDialog#getSetupProcess * @return {jQuery.Promise} Promise resolved when the user closes the dialog. If the user chose to * confirm, the promise will resolve to boolean `true`; otherwise, it will resolve to boolean * `false`. */ OO.ui.confirm = function ( text, options ) { return OO.ui.getWindowManager().openWindow( 'message', $.extend( { message: text }, options ) ).closed.then( function ( data ) { return !!( data && data.action === 'accept' ); } ); }; /** * Display a quick modal prompt dialog, using a OO.ui.MessageDialog. While the dialog is open, * the rest of the page will be dimmed out and the user won't be able to interact with it. The * dialog has a text input widget and two action buttons, one to confirm an operation (labelled "OK") * and one to cancel it (labelled "Cancel"). * * A window manager is created automatically when this function is called for the first time. * * @example * OO.ui.prompt( 'Choose a line to go to', { textInput: { placeholder: 'Line number' } } ).done( function ( result ) { * if ( result !== null ) { * console.log( 'User typed "' + result + '" then clicked "OK".' ); * } else { * console.log( 'User clicked "Cancel" or closed the dialog.' ); * } * } ); * * @param {jQuery|string} text Message text to display * @param {Object} [options] Additional options, see OO.ui.MessageDialog#getSetupProcess * @param {Object} [options.textInput] Additional options for text input widget, see OO.ui.TextInputWidget * @return {jQuery.Promise} Promise resolved when the user closes the dialog. If the user chose to * confirm, the promise will resolve with the value of the text input widget; otherwise, it will * resolve to `null`. */ OO.ui.prompt = function ( text, options ) { var instance, manager = OO.ui.getWindowManager(), textInput = new OO.ui.TextInputWidget( ( options && options.textInput ) || {} ), textField = new OO.ui.FieldLayout( textInput, { align: 'top', label: text } ); instance = manager.openWindow( 'message', $.extend( { message: textField.$element }, options ) ); // TODO: This is a little hacky, and could be done by extending MessageDialog instead. instance.opened.then( function () { textInput.on( 'enter', function () { manager.getCurrentWindow().close( { action: 'accept' } ); } ); textInput.focus(); } ); return instance.closed.then( function ( data ) { return data && data.action === 'accept' ? textInput.getValue() : null; } ); }; }( OO ) ); //# sourceMappingURL=oojs-ui-windows.js.map
public/assets/application-c32f7b43ef73cc850befd1856d8b4e067c4ed248e90b4ea4793762b7bb4642f2.js
xjoxjox/helpperi
/*! * jQuery JavaScript Library v1.12.1 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2016-02-22T19:07Z */ (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 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. module.exports = global.document ? factory( global, true ) : function( w ) { if ( !w.document ) { throw new Error( "jQuery requires a window with a document" ); } return factory( w ); }; } else { factory( global ); } // Pass this if window is not defined yet }(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { // 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) //"use strict"; var deletedIds = []; var document = window.document; var slice = deletedIds.slice; var concat = deletedIds.concat; var push = deletedIds.push; var indexOf = deletedIds.indexOf; var class2type = {}; var toString = class2type.toString; var hasOwn = class2type.hasOwnProperty; var support = {}; var version = "1.12.1", // Define a local copy of jQuery jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' // Need init if jQuery is called (just allow error to be thrown if not included) return new jQuery.fn.init( selector, context ); }, // Support: Android<4.1, IE<9 // Make sure we trim BOM and NBSP rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, // Matches dashed string for camelizing rmsPrefix = /^-ms-/, rdashAlpha = /-([\da-z])/gi, // Used by jQuery.camelCase as callback to replace() fcamelCase = function( all, letter ) { return letter.toUpperCase(); }; jQuery.fn = jQuery.prototype = { // The current version of jQuery being used jquery: version, constructor: jQuery, // Start with an empty selector selector: "", // The default length of a jQuery object is 0 length: 0, toArray: function() { return slice.call( this ); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { return num != null ? // Return just the one element from the set ( num < 0 ? this[ num + this.length ] : this[ num ] ) : // Return all the elements in a clean array slice.call( this ); }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems ) { // Build a new jQuery matched element set var ret = jQuery.merge( this.constructor(), elems ); // Add the old object onto the stack (as a reference) ret.prevObject = this; ret.context = this.context; // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. each: function( callback ) { return jQuery.each( this, callback ); }, map: function( callback ) { return this.pushStack( jQuery.map( this, function( elem, i ) { return callback.call( elem, i, elem ); } ) ); }, slice: function() { return this.pushStack( slice.apply( this, arguments ) ); }, first: function() { return this.eq( 0 ); }, last: function() { return this.eq( -1 ); }, eq: function( i ) { var len = this.length, j = +i + ( i < 0 ? len : 0 ); return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); }, end: function() { return this.prevObject || this.constructor(); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: push, sort: deletedIds.sort, splice: deletedIds.splice }; jQuery.extend = jQuery.fn.extend = function() { var src, copyIsArray, copy, name, options, clone, target = arguments[ 0 ] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; // skip the boolean and the target target = arguments[ i ] || {}; i++; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { target = {}; } // extend jQuery itself if only one argument is passed if ( i === length ) { target = this; i--; } for ( ; i < length; i++ ) { // Only deal with non-null/undefined values if ( ( options = arguments[ i ] ) != null ) { // Extend the base object for ( name in options ) { src = target[ name ]; copy = options[ name ]; // Prevent never-ending loop if ( target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject( copy ) || ( copyIsArray = jQuery.isArray( copy ) ) ) ) { if ( copyIsArray ) { copyIsArray = false; clone = src && jQuery.isArray( src ) ? src : []; } else { clone = src && jQuery.isPlainObject( src ) ? src : {}; } // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); // Don't bring in undefined values } else if ( copy !== undefined ) { target[ name ] = copy; } } } } // Return the modified object return target; }; jQuery.extend( { // Unique for each copy of jQuery on the page expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), // Assume jQuery is ready without the ready module isReady: true, error: function( msg ) { throw new Error( msg ); }, 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"; }, isWindow: function( obj ) { /* jshint eqeqeq: false */ 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 // adding 1 corrects loss of precision from parseFloat (#15100) var realStringObj = obj && obj.toString(); return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0; }, isEmptyObject: function( obj ) { var name; for ( name in obj ) { return false; } return true; }, 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 ) ) { 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 return false; } // Support: IE<9 // Handle iteration over inherited properties before own properties. if ( !support.ownFirst ) { 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 ) {} return key === undefined || hasOwn.call( obj, key ); }, type: function( obj ) { if ( obj == null ) { return obj + ""; } return typeof obj === "object" || typeof obj === "function" ? class2type[ toString.call( obj ) ] || "object" : typeof obj; }, // 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 ); // jscs:ignore requireDotNotation } )( data ); } }, // Convert dashed to camelCase; used by the css and data modules // Microsoft forgot to hump their vendor prefix (#9572) camelCase: function( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); }, nodeName: function( elem, name ) { return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); }, each: function( obj, callback ) { var length, i = 0; if ( isArrayLike( obj ) ) { length = obj.length; for ( ; i < length; i++ ) { if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { break; } } } else { for ( i in obj ) { if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { break; } } } return obj; }, // Support: Android<4.1, IE<9 trim: function( text ) { return text == null ? "" : ( text + "" ).replace( rtrim, "" ); }, // results is for internal usage only makeArray: function( arr, results ) { var ret = results || []; if ( arr != null ) { if ( isArrayLike( Object( arr ) ) ) { jQuery.merge( ret, typeof arr === "string" ? [ arr ] : arr ); } else { push.call( ret, arr ); } } return ret; }, 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; }, merge: function( first, second ) { var len = +second.length, 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++ ]; } } first.length = i; return first; }, grep: function( elems, callback, invert ) { var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert; // Go through the array, only saving the items // that pass the validator function for ( ; i < length; i++ ) { callbackInverse = !callback( elems[ i ], i ); if ( callbackInverse !== callbackExpect ) { matches.push( elems[ i ] ); } } return matches; }, // arg is for internal usage only map: function( elems, callback, arg ) { var length, value, i = 0, ret = []; // Go through the array, translating each of the items to their new values if ( isArrayLike( elems ) ) { length = elems.length; for ( ; i < length; i++ ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } // Go through every key on the object, } else { for ( i in elems ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } } // Flatten any nested arrays return concat.apply( [], ret ); }, // A global GUID counter for objects guid: 1, // Bind a function to a context, optionally partially applying any // arguments. proxy: function( fn, context ) { var args, proxy, tmp; if ( typeof context === "string" ) { tmp = fn[ context ]; context = fn; fn = tmp; } // Quick check to determine if target is callable, in the spec // this throws a TypeError, but we will just return undefined. if ( !jQuery.isFunction( fn ) ) { return undefined; } // Simulated bind args = slice.call( arguments, 2 ); proxy = function() { return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || jQuery.guid++; return proxy; }, now: function() { return +( new Date() ); }, // jQuery.support is not used in Core but other projects attach their // properties to it so it needs to exist. support: support } ); // JSHint would error on this code due to the Symbol not being defined in ES5. // Defining this global in .jshintrc would create a danger of using the global // unguarded in another place, it seems safer to just disable JSHint for these // three lines. /* jshint ignore: start */ if ( typeof Symbol === "function" ) { jQuery.fn[ Symbol.iterator ] = deletedIds[ Symbol.iterator ]; } /* jshint ignore: end */ // Populate the class2type map jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), function( i, name ) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); } ); function isArrayLike( obj ) { // 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 = !!obj && "length" in obj && obj.length, type = jQuery.type( obj ); if ( type === "function" || jQuery.isWindow( obj ) ) { return false; } return type === "array" || length === 0 || typeof length === "number" && length > 0 && ( length - 1 ) in obj; } var Sizzle = /*! * Sizzle CSS Selector Engine v2.2.1 * http://sizzlejs.com/ * * Copyright jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2015-10-17 */ (function( window ) { var i, support, Expr, getText, isXML, tokenize, compile, select, outermostContext, sortInput, hasDuplicate, // Local document vars setDocument, document, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, // Instance-specific data expando = "sizzle" + 1 * new Date(), preferredDoc = window.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; } return 0; }, // General-purpose constants MAX_NEGATIVE = 1 << 31, // Instance methods hasOwn = ({}).hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, push = arr.push, slice = arr.slice, // 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 = list.length; for ( ; i < len; i++ ) { if ( list[i] === elem ) { return i; } } return -1; }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", // Regular expressions // http://www.w3.org/TR/css3-selectors/#whitespace whitespace = "[\\x20\\t\\r\\n\\f]", // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2) "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + identifier + ")(?:\\((" + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: // 1. quoted (capture 3; capture 4 or capture 5) "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + // 2. simple (capture 6) "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + // 3. anything else (capture 2) ".*" + ")\\)|)", // 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 + "*" ), rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), rpseudo = new RegExp( pseudos ), ridentifier = new RegExp( "^" + identifier + "$" ), matchExpr = { "ID": new RegExp( "^#(" + identifier + ")" ), "CLASS": new RegExp( "^\\.(" + identifier + ")" ), "TAG": new RegExp( "^(" + identifier + "|[*])" ), "ATTR": new RegExp( "^" + attributes ), "PSEUDO": new RegExp( "^" + pseudos ), "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), // For use in libraries implementing .is() // We use this for POS matching in `select` "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rnative = /^[^{]+\{\s*\[native \w/, // Easily-parseable/retrievable ID or TAG or CLASS selectors rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, rescape = /'|\\/g, // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), funescape = function( _, escaped, escapedWhitespace ) { var high = "0x" + escaped - 0x10000; // NaN means non-codepoint // Support: Firefox<24 // Workaround erroneous numeric interpretation of +"0x" return high !== high || escapedWhitespace ? escaped : high < 0 ? // BMP codepoint 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 ) try { push.apply( (arr = slice.call( preferredDoc.childNodes )), preferredDoc.childNodes ); // Support: Android<4.0 // Detect silently failing push.apply arr[ preferredDoc.childNodes.length ].nodeType; } catch ( e ) { push = { apply: arr.length ? // Leverage slice if possible function( target, els ) { push_native.apply( target, slice.call(els) ); } : // Support: IE<9 // Otherwise append directly function( target, els ) { var j = target.length, i = 0; // Can't trust NodeList.length while ( (target[j++] = els[i++]) ) {} target.length = j - 1; } }; } function Sizzle( selector, context, results, seed ) { var m, i, elem, nid, nidselect, match, groups, newSelector, newContext = context && context.ownerDocument, // nodeType defaults to 9, since context defaults to document nodeType = context ? context.nodeType : 9; results = results || []; // Return early from calls with invalid selector or context if ( typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { return results; } // Try to shortcut find operations (as opposed to filters) in HTML documents if ( !seed ) { if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { setDocument( context ); } context = context || document; if ( documentIsHTML ) { // If the selector is sufficiently simple, try using a "get*By*" DOM method // (excepting DocumentFragment context, where the methods don't exist) if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { // ID selector if ( (m = match[1]) ) { // Document context if ( nodeType === 9 ) { if ( (elem = context.getElementById( m )) ) { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID if ( elem.id === m ) { results.push( elem ); return results; } } else { return results; } // Element context } else { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID if ( newContext && (elem = newContext.getElementById( m )) && contains( context, elem ) && elem.id === m ) { results.push( elem ); return results; } } // Type selector } else if ( match[2] ) { push.apply( results, context.getElementsByTagName( selector ) ); return results; // Class selector } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { push.apply( results, context.getElementsByClassName( m ) ); return results; } } // Take advantage of querySelectorAll if ( support.qsa && !compilerCache[ selector + " " ] && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { if ( nodeType !== 1 ) { newContext = context; newSelector = selector; // qSA looks outside Element context, which is not what we want // Thanks to Andrew Dupont for this workaround technique // Support: IE <=8 // Exclude object elements } else if ( context.nodeName.toLowerCase() !== "object" ) { // Capture the context ID, setting it first if necessary if ( (nid = context.getAttribute( "id" )) ) { nid = nid.replace( rescape, "\\$&" ); } else { context.setAttribute( "id", (nid = expando) ); } // Prefix every selector in the list groups = tokenize( selector ); i = groups.length; nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']"; while ( i-- ) { groups[i] = nidselect + " " + toSelector( groups[i] ); } newSelector = groups.join( "," ); // Expand context for sibling selectors newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; } if ( newSelector ) { try { push.apply( results, newContext.querySelectorAll( newSelector ) ); return results; } catch ( qsaError ) { } finally { if ( nid === expando ) { context.removeAttribute( "id" ); } } } } } } // All others return select( selector.replace( rtrim, "$1" ), context, results, seed ); } /** * Create key-value caches of limited size * @returns {function(string, object)} Returns the Object data after storing it on itself with * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) * deleting the oldest entry */ function createCache() { var keys = []; function cache( key, value ) { // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) if ( keys.push( key + " " ) > Expr.cacheLength ) { // Only keep the most recent entries delete cache[ keys.shift() ]; } return (cache[ key + " " ] = value); } return cache; } /** * Mark a function for special use by Sizzle * @param {Function} fn The function to mark */ function markFunction( fn ) { fn[ expando ] = true; return fn; } /** * Support testing using an element * @param {Function} fn Passed the created div and expects a boolean result */ function assert( fn ) { var div = document.createElement("div"); try { return !!fn( div ); } catch (e) { return false; } finally { // Remove from its parent by default if ( div.parentNode ) { div.parentNode.removeChild( div ); } // release memory in IE div = null; } } /** * Adds the same handler for all of the specified attrs * @param {String} attrs Pipe-separated list of attributes * @param {Function} handler The method that will be applied */ function addHandle( attrs, handler ) { var arr = attrs.split("|"), i = arr.length; while ( i-- ) { Expr.attrHandle[ arr[i] ] = handler; } } /** * Checks document order of two siblings * @param {Element} a * @param {Element} b * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b */ function siblingCheck( a, b ) { var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE ); // Use IE sourceIndex if available on both nodes if ( diff ) { return diff; } // Check if b follows a if ( cur ) { while ( (cur = cur.nextSibling) ) { if ( cur === b ) { return -1; } } } return a ? 1 : -1; } /** * Returns a function to use in pseudos for input types * @param {String} type */ function createInputPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === type; }; } /** * Returns a function to use in pseudos for buttons * @param {String} type */ function createButtonPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && elem.type === type; }; } /** * Returns a function to use in pseudos for positionals * @param {Function} fn */ function createPositionalPseudo( fn ) { return markFunction(function( argument ) { argument = +argument; return markFunction(function( seed, matches ) { var j, matchIndexes = fn( [], seed.length, argument ), i = matchIndexes.length; // Match elements found at the specified indexes while ( i-- ) { if ( seed[ (j = matchIndexes[i]) ] ) { seed[j] = !(matches[j] = seed[j]); } } }); }); } /** * Checks a node for validity as a Sizzle context * @param {Element|Object=} context * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value */ function testContext( context ) { return context && typeof context.getElementsByTagName !== "undefined" && context; } // Expose support vars for convenience support = Sizzle.support = {}; /** * Detects XML nodes * @param {Element|Object} elem An element or a document * @returns {Boolean} True iff elem is a non-HTML XML node */ isXML = Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist // (such as loading iframes in IE - #4833) var documentElement = elem && (elem.ownerDocument || elem).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; /** * Sets document-related variables once based on the current document * @param {Element|Object} [doc] An element or document object to use to set the document * @returns {Object} Returns the current document */ setDocument = Sizzle.setDocument = function( node ) { var hasCompare, parent, doc = node ? node.ownerDocument || node : preferredDoc; // Return early if doc is invalid or already selected if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { return document; } // Update global variables document = doc; docElem = document.documentElement; documentIsHTML = !isXML( document ); // Support: IE 9-11, Edge // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) if ( (parent = document.defaultView) && parent.top !== parent ) { // Support: IE 11 if ( parent.addEventListener ) { parent.addEventListener( "unload", unloadHandler, false ); // Support: IE 9 - 10 only } else if ( parent.attachEvent ) { parent.attachEvent( "onunload", unloadHandler ); } } /* Attributes ---------------------------------------------------------------------- */ // Support: IE<8 // Verify that getAttribute really returns attributes and not properties // (excepting IE8 booleans) support.attributes = assert(function( div ) { div.className = "i"; return !div.getAttribute("className"); }); /* getElement(s)By* ---------------------------------------------------------------------- */ // Check if getElementsByTagName("*") returns only elements support.getElementsByTagName = assert(function( div ) { div.appendChild( document.createComment("") ); return !div.getElementsByTagName("*").length; }); // Support: IE<9 support.getElementsByClassName = rnative.test( document.getElementsByClassName ); // Support: IE<10 // Check if getElementById returns elements by name // The broken getElementById methods don't pick up programatically-set names, // so use a roundabout getElementsByName test support.getById = assert(function( div ) { docElem.appendChild( div ).id = expando; return !document.getElementsByName || !document.getElementsByName( expando ).length; }); // ID find and filter if ( support.getById ) { Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var m = context.getElementById( id ); return m ? [ m ] : []; } }; Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { return elem.getAttribute("id") === attrId; }; }; } else { // Support: IE6/7 // getElementById is not reliable as a find shortcut delete Expr.find["ID"]; Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return node && node.value === attrId; }; }; } // Tag Expr.find["TAG"] = support.getElementsByTagName ? function( tag, context ) { 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 if ( tag === "*" ) { while ( (elem = results[i++]) ) { if ( elem.nodeType === 1 ) { tmp.push( elem ); } } return tmp; } return results; }; // Class Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { return context.getElementsByClassName( className ); } }; /* QSA/matchesSelector ---------------------------------------------------------------------- */ // QSA and matchesSelector support // matchesSelector(:active) reports false when true (IE9/Opera 11.5) rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21) // We allow this because of a bug in IE8/9 that throws an error // whenever `document.activeElement` is accessed on an iframe // So, we allow :focus to pass through QSA all the time to avoid the IE error // See http://bugs.jquery.com/ticket/13378 rbuggyQSA = []; if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { // Build QSA regex // Regex strategy adopted from Diego Perini assert(function( div ) { // Select is set to empty string on purpose // This is to test IE's treatment of not explicitly // setting a boolean content attribute, // since its presence should be enough // http://bugs.jquery.com/ticket/12359 docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" + "<select id='" + expando + "-\r\\' 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("[msallowcapture^='']").length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); } // Support: IE8 // Boolean attributes and "value" are not treated correctly if ( !div.querySelectorAll("[selected]").length ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); } // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ 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 ) { // Support: Windows 8 Native Apps // The type and name attributes are restricted during .innerHTML assignment var input = document.createElement("input"); input.setAttribute( "type", "hidden" ); div.appendChild( input ).setAttribute( "name", "D" ); // Support: IE8 // Enforce case-sensitivity of name attribute if ( div.querySelectorAll("[name=d]").length ) { rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // IE8 throws error here and will not see later tests if ( !div.querySelectorAll(":enabled").length ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Opera 10-11 does not throw on post-comma invalid pseudos div.querySelectorAll("*,:x"); rbuggyQSA.push(",.*:"); }); } if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector) )) ) { assert(function( div ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9) support.disconnectedMatch = matches.call( div, "div" ); // This should fail with an exception // Gecko does not error, returns false instead matches.call( div, "[s!='']:x" ); rbuggyMatches.push( "!=", pseudos ); }); } rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); /* Contains ---------------------------------------------------------------------- */ hasCompare = rnative.test( docElem.compareDocumentPosition ); // Element contains another // Purposefully self-exclusive // As in, an element does not contain itself contains = hasCompare || rnative.test( docElem.contains ) ? function( a, b ) { var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode; return a === bup || !!( bup && bup.nodeType === 1 && ( adown.contains ? adown.contains( bup ) : a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 )); } : function( a, b ) { if ( b ) { while ( (b = b.parentNode) ) { if ( b === a ) { return true; } } } return false; }; /* Sorting ---------------------------------------------------------------------- */ // Document order sorting sortOrder = hasCompare ? function( a, b ) { // Flag for duplicate removal if ( a === b ) { hasDuplicate = true; return 0; } // Sort on method existence if only one input has compareDocumentPosition var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; if ( compare ) { return compare; } // Calculate position if both inputs belong to the same document compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? a.compareDocumentPosition( b ) : // Otherwise we know they are disconnected 1; // Disconnected nodes if ( compare & 1 || (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { // Choose the first element that is related to our preferred document if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { return -1; } if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { return 1; } // Maintain original order return sortInput ? ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; } return compare & 4 ? -1 : 1; } : function( a, b ) { // Exit early if the nodes are identical if ( a === b ) { hasDuplicate = true; return 0; } var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [ a ], bp = [ b ]; // Parentless nodes are either documents or disconnected if ( !aup || !bup ) { return a === document ? -1 : b === document ? 1 : aup ? -1 : bup ? 1 : sortInput ? ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; // If the nodes are siblings, we can do a quick check } else if ( aup === bup ) { return siblingCheck( a, b ); } // Otherwise we need full lists of their ancestors for comparison cur = a; while ( (cur = cur.parentNode) ) { ap.unshift( cur ); } cur = b; while ( (cur = cur.parentNode) ) { bp.unshift( cur ); } // Walk down the tree looking for a discrepancy while ( ap[i] === bp[i] ) { i++; } return i ? // Do a sibling check if the nodes have a common ancestor siblingCheck( ap[i], bp[i] ) : // Otherwise nodes in our document sort first ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0; }; return document; }; Sizzle.matches = function( expr, elements ) { return Sizzle( expr, null, null, elements ); }; Sizzle.matchesSelector = function( elem, expr ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } // Make sure that attribute selectors are quoted expr = expr.replace( rattributeQuotes, "='$1']" ); if ( support.matchesSelector && documentIsHTML && !compilerCache[ expr + " " ] && ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { try { var ret = matches.call( elem, expr ); // IE 9's matchesSelector returns false on disconnected nodes if ( ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9 elem.document && elem.document.nodeType !== 11 ) { return ret; } } catch (e) {} } return Sizzle( expr, document, null, [ elem ] ).length > 0; }; Sizzle.contains = function( context, elem ) { // Set document vars if needed if ( ( context.ownerDocument || context ) !== document ) { setDocument( context ); } return contains( context, elem ); }; Sizzle.attr = function( elem, name ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } var fn = Expr.attrHandle[ name.toLowerCase() ], // Don't get fooled by Object.prototype properties (jQuery #13807) val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? fn( elem, name, !documentIsHTML ) : undefined; return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute( name ) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; }; Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; /** * Document sorting and removing duplicates * @param {ArrayLike} results */ Sizzle.uniqueSort = function( results ) { var elem, duplicates = [], j = 0, i = 0; // Unless we *know* we can detect duplicates, assume their presence hasDuplicate = !support.detectDuplicates; sortInput = !support.sortStable && results.slice( 0 ); results.sort( sortOrder ); if ( hasDuplicate ) { while ( (elem = results[i++]) ) { if ( elem === results[ i ] ) { j = duplicates.push( i ); } } while ( j-- ) { results.splice( duplicates[ j ], 1 ); } } // Clear input after sorting to release objects // See https://github.com/jquery/sizzle/pull/225 sortInput = null; return results; }; /** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */ getText = Sizzle.getText = function( elem ) { var node, ret = "", i = 0, nodeType = elem.nodeType; if ( !nodeType ) { // If no nodeType, this is expected to be an array while ( (node = elem[i++]) ) { // Do not traverse comment nodes ret += getText( node ); } } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { // Use textContent for elements // innerText usage removed for consistency of new lines (jQuery #11153) if ( typeof elem.textContent === "string" ) { return elem.textContent; } else { // Traverse its children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { ret += getText( elem ); } } } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } // Do not include comment or processing instruction nodes return ret; }; Expr = Sizzle.selectors = { // Can be adjusted by the user cacheLength: 50, createPseudo: markFunction, match: matchExpr, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: true }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: true }, "~": { dir: "previousSibling" } }, preFilter: { "ATTR": function( match ) { match[1] = match[1].replace( runescape, funescape ); // Move the given value to match[3] whether quoted or unquoted match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); if ( match[2] === "~=" ) { match[3] = " " + match[3] + " "; } return match.slice( 0, 4 ); }, "CHILD": function( match ) { /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 4 xn-component of xn+y argument ([+-]?\d*n|) 5 sign of xn-component 6 x of xn-component 7 sign of y-component 8 y of y-component */ match[1] = match[1].toLowerCase(); if ( match[1].slice( 0, 3 ) === "nth" ) { // nth-* requires argument if ( !match[3] ) { Sizzle.error( match[0] ); } // numeric x and y parameters for Expr.filter.CHILD // remember that false/true cast respectively to 0/1 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); // other types prohibit arguments } else if ( match[3] ) { Sizzle.error( match[0] ); } return match; }, "PSEUDO": function( match ) { var excess, unquoted = !match[6] && match[2]; if ( matchExpr["CHILD"].test( match[0] ) ) { return null; } // Accept quoted arguments as-is if ( match[3] ) { match[2] = match[4] || match[5] || ""; // Strip excess characters from unquoted arguments } else if ( unquoted && rpseudo.test( unquoted ) && // Get excess from tokenize (recursively) (excess = tokenize( unquoted, true )) && // advance to the next closing parenthesis (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { // excess is a negative index match[0] = match[0].slice( 0, excess ); match[2] = unquoted.slice( 0, excess ); } // Return only captures needed by the pseudo filter method (type and argument) return match.slice( 0, 3 ); } }, filter: { "TAG": function( nodeNameSelector ) { var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); return nodeNameSelector === "*" ? function() { return true; } : function( elem ) { return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; }; }, "CLASS": function( className ) { var pattern = classCache[ className + " " ]; return pattern || (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && classCache( className, function( elem ) { return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); }); }, "ATTR": function( name, operator, check ) { return function( elem ) { var result = Sizzle.attr( elem, name ); if ( result == null ) { return operator === "!="; } if ( !operator ) { return true; } result += ""; return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf( check ) === 0 : operator === "*=" ? check && result.indexOf( check ) > -1 : operator === "$=" ? check && result.slice( -check.length ) === check : operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : false; }; }, "CHILD": function( type, what, argument, first, last ) { var simple = type.slice( 0, 3 ) !== "nth", forward = type.slice( -4 ) !== "last", ofType = what === "of-type"; return first === 1 && last === 0 ? // Shortcut for :nth-*(n) function( elem ) { return !!elem.parentNode; } : function( elem, context, xml ) { var cache, uniqueCache, outerCache, node, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false; if ( parent ) { // :(first|last|only)-(child|of-type) if ( simple ) { while ( dir ) { node = elem; while ( (node = node[ dir ]) ) { if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { return false; } } // Reverse direction for :only-* (if we haven't yet done so) start = dir = type === "only" && !start && "nextSibling"; } return true; } start = [ forward ? parent.firstChild : parent.lastChild ]; // non-xml :nth-child(...) stores cache data on `parent` if ( forward && useCache ) { // Seek `elem` from a previously-cached index // ...in a gzip-friendly way node = parent; outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || (outerCache[ node.uniqueID ] = {}); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; diff = nodeIndex && cache[ 2 ]; node = nodeIndex && parent.childNodes[ nodeIndex ]; while ( (node = ++nodeIndex && node && node[ dir ] || // Fallback to seeking `elem` from the start (diff = nodeIndex = 0) || start.pop()) ) { // When found, cache indexes on `parent` and break if ( node.nodeType === 1 && ++diff && node === elem ) { uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; break; } } } else { // Use previously-cached element index if available if ( useCache ) { // ...in a gzip-friendly way node = elem; outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || (outerCache[ node.uniqueID ] = {}); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; diff = nodeIndex; } // xml :nth-child(...) // or :nth-last-child(...) or :nth(-last)?-of-type(...) if ( diff === false ) { // Use the same loop as above to seek `elem` from the start while ( (node = ++nodeIndex && node && node[ dir ] || (diff = nodeIndex = 0) || start.pop()) ) { if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { // Cache the index of each encountered element if ( useCache ) { outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || (outerCache[ node.uniqueID ] = {}); uniqueCache[ type ] = [ dirruns, diff ]; } if ( node === elem ) { break; } } } } } // Incorporate the offset, then check against cycle size diff -= last; return diff === first || ( diff % first === 0 && diff / first >= 0 ); } }; }, "PSEUDO": function( pseudo, argument ) { // pseudo-class names are case-insensitive // http://www.w3.org/TR/selectors/#pseudo-classes // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters // Remember that setFilters inherits from pseudos var args, fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || Sizzle.error( "unsupported pseudo: " + pseudo ); // The user may use createPseudo to indicate that // arguments are needed to create the filter function // just as Sizzle does if ( fn[ expando ] ) { return fn( argument ); } // But maintain support for old signatures if ( fn.length > 1 ) { args = [ pseudo, pseudo, "", argument ]; return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? markFunction(function( seed, matches ) { var idx, matched = fn( seed, argument ), i = matched.length; while ( i-- ) { idx = indexOf( seed, matched[i] ); seed[ idx ] = !( matches[ idx ] = matched[i] ); } }) : function( elem ) { return fn( elem, 0, args ); }; } return fn; } }, pseudos: { // Potentially complex pseudos "not": markFunction(function( selector ) { // Trim the selector passed to compile // to avoid treating leading and trailing // spaces as combinators var input = [], results = [], matcher = compile( selector.replace( rtrim, "$1" ) ); return matcher[ expando ] ? markFunction(function( seed, matches, context, xml ) { var elem, unmatched = matcher( seed, null, xml, [] ), i = seed.length; // Match elements unmatched by `matcher` while ( i-- ) { if ( (elem = unmatched[i]) ) { seed[i] = !(matches[i] = elem); } } }) : 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(); }; }), "has": markFunction(function( selector ) { return function( elem ) { return Sizzle( selector, elem ).length > 0; }; }), "contains": markFunction(function( text ) { text = text.replace( runescape, funescape ); return function( elem ) { return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; }; }), // "Whether an element is represented by a :lang() selector // is based solely on the element's language value // being equal to the identifier C, // or beginning with the identifier C immediately followed by "-". // The matching of C against the element's language value is performed case-insensitively. // The identifier C does not have to be a valid language name." // http://www.w3.org/TR/selectors/#lang-pseudo "lang": markFunction( function( lang ) { // lang value must be a valid identifier if ( !ridentifier.test(lang || "") ) { Sizzle.error( "unsupported lang: " + lang ); } lang = lang.replace( runescape, funescape ).toLowerCase(); return function( elem ) { var elemLang; do { if ( (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { elemLang = elemLang.toLowerCase(); return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; } } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); return false; }; }), // Miscellaneous "target": function( elem ) { var hash = window.location && window.location.hash; return hash && hash.slice( 1 ) === elem.id; }, "root": function( elem ) { return elem === docElem; }, "focus": function( elem ) { return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); }, // Boolean properties "enabled": function( elem ) { return elem.disabled === false; }, "disabled": function( elem ) { return elem.disabled === true; }, "checked": function( elem ) { // In CSS3, :checked should return both checked and selected elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked var nodeName = elem.nodeName.toLowerCase(); return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); }, "selected": function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { elem.parentNode.selectedIndex; } return elem.selected === true; }, // Contents "empty": function( elem ) { // http://www.w3.org/TR/selectors/#empty-pseudo // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), // but not by others (comment: 8; processing instruction: 7; etc.) // nodeType < 6 works because attributes (2) do not appear as children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { if ( elem.nodeType < 6 ) { return false; } } return true; }, "parent": function( elem ) { return !Expr.pseudos["empty"]( elem ); }, // Element/input types "header": function( elem ) { return rheader.test( elem.nodeName ); }, "input": function( elem ) { return rinputs.test( elem.nodeName ); }, "button": function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === "button" || name === "button"; }, "text": function( elem ) { var attr; return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && // Support: IE<8 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); }, // Position-in-collection "first": createPositionalPseudo(function() { return [ 0 ]; }), "last": createPositionalPseudo(function( matchIndexes, length ) { return [ length - 1 ]; }), "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { return [ argument < 0 ? argument + length : argument ]; }), "even": createPositionalPseudo(function( matchIndexes, length ) { var i = 0; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "odd": createPositionalPseudo(function( matchIndexes, length ) { var i = 1; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; --i >= 0; ) { matchIndexes.push( i ); } return matchIndexes; }), "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; ++i < length; ) { matchIndexes.push( i ); } return matchIndexes; }) } }; Expr.pseudos["nth"] = Expr.pseudos["eq"]; // Add button/input type pseudos for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { Expr.pseudos[ i ] = createInputPseudo( i ); } for ( i in { submit: true, reset: true } ) { Expr.pseudos[ i ] = createButtonPseudo( i ); } // Easy API for creating new setFilters function setFilters() {} setFilters.prototype = Expr.filters = Expr.pseudos; Expr.setFilters = new setFilters(); tokenize = Sizzle.tokenize = function( selector, parseOnly ) { var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[ selector + " " ]; if ( cached ) { return parseOnly ? 0 : cached.slice( 0 ); } soFar = selector; groups = []; preFilters = Expr.preFilter; while ( soFar ) { // Comma and first run if ( !matched || (match = rcomma.exec( soFar )) ) { if ( match ) { // Don't consume trailing commas as valid soFar = soFar.slice( match[0].length ) || soFar; } groups.push( (tokens = []) ); } matched = false; // Combinators if ( (match = rcombinators.exec( soFar )) ) { matched = match.shift(); tokens.push({ value: matched, // Cast descendant combinators to space type: match[0].replace( rtrim, " " ) }); soFar = soFar.slice( matched.length ); } // Filters for ( type in Expr.filter ) { if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || (match = preFilters[ type ]( match ))) ) { matched = match.shift(); tokens.push({ value: matched, type: type, matches: match }); soFar = soFar.slice( matched.length ); } } if ( !matched ) { break; } } // Return the length of the invalid excess // if we're just parsing // Otherwise, throw an error or return tokens return parseOnly ? soFar.length : soFar ? Sizzle.error( selector ) : // Cache the tokens tokenCache( selector, groups ).slice( 0 ); }; function toSelector( tokens ) { var i = 0, len = tokens.length, selector = ""; for ( ; i < len; i++ ) { selector += tokens[i].value; } return selector; } function addCombinator( matcher, combinator, base ) { var dir = combinator.dir, checkNonElements = base && dir === "parentNode", doneName = done++; return combinator.first ? // Check against closest ancestor/preceding element function( elem, context, xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { return matcher( elem, context, xml ); } } } : // Check against all ancestor/preceding elements function( elem, context, xml ) { var oldCache, uniqueCache, outerCache, newCache = [ dirruns, doneName ]; // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching if ( xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { if ( matcher( elem, context, xml ) ) { return true; } } } } else { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { outerCache = elem[ expando ] || (elem[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); if ( (oldCache = uniqueCache[ dir ]) && oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { // Assign to newCache so results back-propagate to previous elements return (newCache[ 2 ] = oldCache[ 2 ]); } else { // Reuse newcache so results back-propagate to previous elements uniqueCache[ dir ] = newCache; // A match means we're done; a fail means we have to keep checking if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { return true; } } } } } }; } function elementMatcher( matchers ) { return matchers.length > 1 ? function( elem, context, xml ) { var i = matchers.length; while ( i-- ) { if ( !matchers[i]( elem, context, xml ) ) { return false; } } return true; } : matchers[0]; } function multipleContexts( selector, contexts, results ) { var i = 0, len = contexts.length; for ( ; i < len; i++ ) { Sizzle( selector, contexts[i], results ); } return results; } function condense( unmatched, map, filter, context, xml ) { var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null; for ( ; i < len; i++ ) { if ( (elem = unmatched[i]) ) { if ( !filter || filter( elem, context, xml ) ) { newUnmatched.push( elem ); if ( mapped ) { map.push( i ); } } } } return newUnmatched; } function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { if ( postFilter && !postFilter[ expando ] ) { postFilter = setMatcher( postFilter ); } if ( postFinder && !postFinder[ expando ] ) { postFinder = setMatcher( postFinder, postSelector ); } return markFunction(function( seed, results, context, xml ) { var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, // Get initial elements from seed or context elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), // Prefilter to get matcher input, preserving a map for seed-results synchronization matcherIn = preFilter && ( seed || !selector ) ? condense( elems, preMap, preFilter, context, xml ) : elems, matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, postFinder || ( seed ? preFilter : preexisting || postFilter ) ? // ...intermediate processing is necessary [] : // ...otherwise use results directly results : matcherIn; // Find primary matches if ( matcher ) { matcher( matcherIn, matcherOut, context, xml ); } // Apply postFilter if ( postFilter ) { temp = condense( matcherOut, postMap ); postFilter( temp, [], context, xml ); // Un-match failing elements by moving them back to matcherIn i = temp.length; while ( i-- ) { if ( (elem = temp[i]) ) { matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); } } } if ( seed ) { if ( postFinder || preFilter ) { if ( postFinder ) { // Get the final matcherOut by condensing this intermediate into postFinder contexts temp = []; i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) ) { // Restore matcherIn since elem is not yet a final match temp.push( (matcherIn[i] = elem) ); } } postFinder( null, (matcherOut = []), temp, xml ); } // Move matched elements from seed to results to keep them synchronized i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) && (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { seed[temp] = !(results[temp] = elem); } } } // Add elements to results, through postFinder if defined } else { matcherOut = condense( matcherOut === results ? matcherOut.splice( preexisting, matcherOut.length ) : matcherOut ); if ( postFinder ) { postFinder( null, results, matcherOut, xml ); } else { push.apply( results, matcherOut ); } } }); } function matcherFromTokens( tokens ) { var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[ tokens[0].type ], implicitRelative = leadingRelative || Expr.relative[" "], i = leadingRelative ? 1 : 0, // The foundational matcher ensures that elements are reachable from top-level context(s) matchContext = addCombinator( function( elem ) { return elem === checkContext; }, implicitRelative, true ), matchAnyContext = addCombinator( function( elem ) { return indexOf( checkContext, elem ) > -1; }, implicitRelative, true ), matchers = [ function( elem, context, xml ) { 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++ ) { if ( (matcher = Expr.relative[ tokens[i].type ]) ) { matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; } else { matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); // Return special upon seeing a positional matcher if ( matcher[ expando ] ) { // Find the next relative operator (if any) for proper handling j = ++i; for ( ; j < len; j++ ) { if ( Expr.relative[ tokens[j].type ] ) { break; } } return setMatcher( i > 1 && elementMatcher( matchers ), i > 1 && toSelector( // If the preceding token was a descendant combinator, insert an implicit any-element `*` tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) ).replace( rtrim, "$1" ), matcher, i < j && matcherFromTokens( tokens.slice( i, j ) ), j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), j < len && toSelector( tokens ) ); } matchers.push( matcher ); } } return elementMatcher( matchers ); } function matcherFromGroupMatchers( elementMatchers, setMatchers ) { var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function( seed, context, xml, results, outermost ) { var elem, j, matcher, matchedCount = 0, i = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, // We must always have either seed elements or outermost context elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), // Use integer dirruns iff this is the outermost matcher dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), len = elems.length; if ( outermost ) { outermostContext = context === document || context || outermost; } // Add elements passing elementMatchers directly to results // Support: IE<9, Safari // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id for ( ; i !== len && (elem = elems[i]) != null; i++ ) { if ( byElement && elem ) { j = 0; if ( !context && elem.ownerDocument !== document ) { setDocument( elem ); xml = !documentIsHTML; } while ( (matcher = elementMatchers[j++]) ) { if ( matcher( elem, context || document, xml) ) { results.push( elem ); break; } } if ( outermost ) { dirruns = dirrunsUnique; } } // Track unmatched elements for set filters if ( bySet ) { // They will have gone through all possible matchers if ( (elem = !matcher && elem) ) { matchedCount--; } // Lengthen the array for every element, matched or not if ( seed ) { unmatched.push( elem ); } } } // `i` is now the count of elements visited above, and adding it to `matchedCount` // makes the latter nonnegative. matchedCount += i; // Apply set filters to unmatched elements // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` // equals `i`), unless we didn't visit _any_ elements in the above loop because we have // no element matchers and no seed. // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that // case, which will result in a "00" `matchedCount` that differs from `i` but is also // numerically zero. if ( bySet && i !== matchedCount ) { j = 0; while ( (matcher = setMatchers[j++]) ) { matcher( unmatched, setMatched, context, xml ); } if ( seed ) { // Reintegrate element matches to eliminate the need for sorting if ( matchedCount > 0 ) { while ( i-- ) { if ( !(unmatched[i] || setMatched[i]) ) { setMatched[i] = pop.call( results ); } } } // Discard index placeholder values to get only actual matches setMatched = condense( setMatched ); } // Add matches to results push.apply( results, setMatched ); // Seedless set matches succeeding multiple successful matchers stipulate sorting if ( outermost && !seed && setMatched.length > 0 && ( matchedCount + setMatchers.length ) > 1 ) { Sizzle.uniqueSort( results ); } } // Override manipulation of globals by nested matchers if ( outermost ) { dirruns = dirrunsUnique; outermostContext = contextBackup; } return unmatched; }; return bySet ? markFunction( superMatcher ) : superMatcher; } compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { var i, setMatchers = [], elementMatchers = [], cached = compilerCache[ selector + " " ]; if ( !cached ) { // Generate a function of recursive functions that can be used to check each element if ( !match ) { match = tokenize( selector ); } i = match.length; while ( i-- ) { cached = matcherFromTokens( match[i] ); if ( cached[ expando ] ) { setMatchers.push( cached ); } else { elementMatchers.push( cached ); } } // Cache the compiled function cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); // Save selector and tokenization cached.selector = selector; } return cached; }; /** * A low-level selection function that works with Sizzle's compiled * selector functions * @param {String|Function} selector A selector or a pre-compiled * selector function built with Sizzle.compile * @param {Element} context * @param {Array} [results] * @param {Array} [seed] A set of elements to match against */ select = Sizzle.select = function( selector, context, results, seed ) { var i, tokens, token, type, find, compiled = typeof selector === "function" && selector, match = !seed && tokenize( (selector = compiled.selector || selector) ); results = results || []; // Try to minimize operations if there is only one selector in the list and no seed // (the latter of which guarantees us context) if ( match.length === 1 ) { // Reduce context if the leading compound selector is an ID tokens = match[0] = match[0].slice( 0 ); if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && support.getById && context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; if ( !context ) { return results; // Precompiled matchers will still verify ancestry, so step up a level } else if ( compiled ) { context = context.parentNode; } selector = selector.slice( tokens.shift().value.length ); } // Fetch a seed set for right-to-left matching i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; while ( i-- ) { token = tokens[i]; // Abort if we hit a combinator if ( Expr.relative[ (type = token.type) ] ) { break; } if ( (find = Expr.find[ type ]) ) { // Search, expanding context for leading sibling combinators if ( (seed = find( token.matches[0].replace( runescape, funescape ), rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context )) ) { // If seed is empty or no tokens remain, we can return early tokens.splice( i, 1 ); selector = seed.length && toSelector( tokens ); if ( !selector ) { push.apply( results, seed ); return results; } break; } } } } // Compile and execute a filtering function if one is not provided // Provide `match` to avoid retokenization if we modified the selector above ( compiled || compile( selector, match ) )( seed, context, !documentIsHTML, results, !context || rsibling.test( selector ) && testContext( context.parentNode ) || context ); return results; }; // One-time assignments // Sort stability support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; // Support: Chrome 14-35+ // Always assume duplicates if they aren't passed to the comparison function support.detectDuplicates = !!hasDuplicate; // Initialize against the default document setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) // Detached nodes confoundingly follow *each other* support.sortDetached = assert(function( div1 ) { // Should return 1, but returns 4 (following) return div1.compareDocumentPosition( document.createElement("div") ) & 1; }); // Support: IE<8 // Prevent attribute/property "interpolation" // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx if ( !assert(function( div ) { div.innerHTML = "<a href='#'></a>"; return div.firstChild.getAttribute("href") === "#" ; }) ) { addHandle( "type|href|height|width", function( elem, name, isXML ) { if ( !isXML ) { return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); } }); } // Support: IE<9 // Use defaultValue in place of getAttribute("value") if ( !support.attributes || !assert(function( div ) { div.innerHTML = "<input/>"; div.firstChild.setAttribute( "value", "" ); return div.firstChild.getAttribute( "value" ) === ""; }) ) { addHandle( "value", function( elem, name, isXML ) { if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { return elem.defaultValue; } }); } // Support: IE<9 // Use getAttributeNode to fetch booleans when getAttribute lies if ( !assert(function( div ) { return div.getAttribute("disabled") == null; }) ) { addHandle( booleans, function( elem, name, isXML ) { var val; if ( !isXML ) { return elem[ name ] === true ? name.toLowerCase() : (val = elem.getAttributeNode( name )) && val.specified ? val.value : null; } }); } return Sizzle; })( window ); jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; jQuery.expr[ ":" ] = jQuery.expr.pseudos; jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; var dir = function( elem, dir, until ) { var matched = [], truncate = until !== undefined; while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { if ( elem.nodeType === 1 ) { if ( truncate && jQuery( elem ).is( until ) ) { break; } matched.push( elem ); } } return matched; }; var siblings = function( n, elem ) { var matched = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { matched.push( n ); } } return matched; }; var rneedsContext = jQuery.expr.match.needsContext; var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ ); var risSimple = /^.[^:#\[\.,]*$/; // Implement the identical functionality for filter and not function winnow( elements, qualifier, not ) { if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { /* jshint -W018 */ return !!qualifier.call( elem, i, elem ) !== not; } ); } if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( elem === qualifier ) !== not; } ); } if ( typeof qualifier === "string" ) { if ( risSimple.test( qualifier ) ) { return jQuery.filter( qualifier, elements, not ); } qualifier = jQuery.filter( qualifier, elements ); } return jQuery.grep( elements, function( elem ) { return ( jQuery.inArray( elem, qualifier ) > -1 ) !== not; } ); } jQuery.filter = function( expr, elems, not ) { var elem = elems[ 0 ]; if ( not ) { expr = ":not(" + expr + ")"; } return elems.length === 1 && elem.nodeType === 1 ? jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { return elem.nodeType === 1; } ) ); }; jQuery.fn.extend( { find: function( selector ) { var i, ret = [], self = this, len = self.length; if ( typeof selector !== "string" ) { return this.pushStack( jQuery( selector ).filter( function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } } ) ); } for ( i = 0; i < len; i++ ) { jQuery.find( selector, self[ i ], ret ); } // Needed because $( selector, context ) becomes $( context ).find( selector ) ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); ret.selector = this.selector ? this.selector + " " + selector : selector; return ret; }, filter: function( selector ) { return this.pushStack( winnow( this, selector || [], false ) ); }, not: function( selector ) { return this.pushStack( winnow( this, selector || [], true ) ); }, is: function( selector ) { return !!winnow( this, // If this is a positional/relative selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". typeof selector === "string" && rneedsContext.test( selector ) ? jQuery( selector ) : selector || [], false ).length; } } ); // Initialize a jQuery object // A central reference to the root jQuery(document) var rootjQuery, // 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 <) rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, init = jQuery.fn.init = function( selector, context, root ) { var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false) if ( !selector ) { return this; } // init accepts an alternate rootjQuery // so migrate can support jQuery.sub (gh-2101) root = root || rootjQuery; // Handle HTML strings if ( typeof selector === "string" ) { if ( selector.charAt( 0 ) === "<" && selector.charAt( 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 ]; } else { match = rquickExpr.exec( selector ); } // Match html or make sure no context is specified for #id if ( match && ( match[ 1 ] || !context ) ) { // HANDLE: $(html) -> $(array) if ( match[ 1 ] ) { context = context instanceof jQuery ? context[ 0 ] : context; // scripts is true for back-compat // Intentionally let the error be thrown if parseHTML is not present jQuery.merge( this, jQuery.parseHTML( match[ 1 ], context && context.nodeType ? context.ownerDocument || context : document, true ) ); // HANDLE: $(html, props) if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { for ( match in context ) { // Properties of context are called as methods if possible if ( jQuery.isFunction( this[ match ] ) ) { this[ match ]( context[ match ] ); // ...and otherwise set as attributes } else { this.attr( match, context[ match ] ); } } } return this; // HANDLE: $(#id) } else { elem = document.getElementById( match[ 2 ] ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are 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 this.length = 1; this[ 0 ] = elem; } this.context = document; this.selector = selector; return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { return ( context || root ).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor( context ).find( selector ); } // HANDLE: $(DOMElement) } else if ( selector.nodeType ) { this.context = this[ 0 ] = selector; this.length = 1; return this; // HANDLE: $(function) // Shortcut for document ready } else if ( jQuery.isFunction( selector ) ) { return typeof root.ready !== "undefined" ? root.ready( selector ) : // Execute immediately if ready is not present selector( jQuery ); } if ( selector.selector !== undefined ) { this.selector = selector.selector; this.context = selector.context; } return jQuery.makeArray( selector, this ); }; // Give the init function the jQuery prototype for later instantiation init.prototype = jQuery.fn; // Initialize central reference rootjQuery = jQuery( document ); var rparentsprev = /^(?:parents|prev(?:Until|All))/, // methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.fn.extend( { has: function( target ) { var i, targets = jQuery( target, this ), len = targets.length; return this.filter( function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( this, targets[ i ] ) ) { return true; } } } ); }, closest: function( selectors, context ) { var cur, i = 0, l = this.length, matched = [], pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? jQuery( selectors, context || this.context ) : 0; for ( ; i < l; i++ ) { for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { // Always skip document fragments if ( cur.nodeType < 11 && ( pos ? pos.index( cur ) > -1 : // Don't pass non-elements to Sizzle cur.nodeType === 1 && jQuery.find.matchesSelector( cur, selectors ) ) ) { matched.push( cur ); break; } } } return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); }, // Determine the position of an element within // the matched set of elements index: function( elem ) { // No argument, return index in parent if ( !elem ) { return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; } // index in selector if ( typeof elem === "string" ) { return jQuery.inArray( this[ 0 ], jQuery( elem ) ); } // Locate the position of the desired element return jQuery.inArray( // If it receives a jQuery object, the first element is used elem.jquery ? elem[ 0 ] : elem, this ); }, add: function( selector, context ) { return this.pushStack( jQuery.uniqueSort( jQuery.merge( this.get(), jQuery( selector, context ) ) ) ); }, addBack: function( selector ) { return this.add( selector == null ? this.prevObject : this.prevObject.filter( selector ) ); } } ); function sibling( cur, dir ) { do { cur = cur[ dir ]; } while ( cur && cur.nodeType !== 1 ); return cur; } jQuery.each( { parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { return dir( elem, "parentNode" ); }, parentsUntil: function( elem, i, until ) { return dir( elem, "parentNode", until ); }, next: function( elem ) { return sibling( elem, "nextSibling" ); }, prev: function( elem ) { return sibling( elem, "previousSibling" ); }, nextAll: function( elem ) { return dir( elem, "nextSibling" ); }, prevAll: function( elem ) { return dir( elem, "previousSibling" ); }, nextUntil: function( elem, i, until ) { return dir( elem, "nextSibling", until ); }, prevUntil: function( elem, i, until ) { return dir( elem, "previousSibling", until ); }, siblings: function( elem ) { return siblings( ( elem.parentNode || {} ).firstChild, elem ); }, children: function( elem ) { return siblings( elem.firstChild ); }, contents: function( elem ) { return jQuery.nodeName( elem, "iframe" ) ? elem.contentDocument || elem.contentWindow.document : jQuery.merge( [], elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { var ret = jQuery.map( this, fn, until ); if ( name.slice( -5 ) !== "Until" ) { selector = until; } if ( selector && typeof selector === "string" ) { ret = jQuery.filter( selector, ret ); } if ( this.length > 1 ) { // Remove duplicates if ( !guaranteedUnique[ name ] ) { ret = jQuery.uniqueSort( ret ); } // Reverse order for parents* and prev-derivatives if ( rparentsprev.test( name ) ) { ret = ret.reverse(); } } return this.pushStack( ret ); }; } ); var rnotwhite = ( /\S+/g ); // Convert String-formatted options into Object-formatted ones function createOptions( options ) { var object = {}; jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { object[ flag ] = true; } ); return object; } /* * Create a callback list using the following parameters: * * options: an optional list of space-separated options that will change how * the callback list behaves or a more traditional option object * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible options: * * once: will ensure the callback list can only be fired once (like a Deferred) * * memory: will keep track of previous values and will call any callback added * after the list has been fired right away with the latest "memorized" * values (like a Deferred) * * unique: will ensure a callback can only be added once (no duplicate in the list) * * stopOnFalse: interrupt callings when a callback returns false * */ jQuery.Callbacks = function( options ) { // Convert options from String-formatted to Object-formatted if needed // (we check in cache first) options = typeof options === "string" ? createOptions( options ) : jQuery.extend( {}, options ); var // Flag to know if list is currently firing firing, // Last fire value for non-forgettable lists memory, // Flag to know if list was already fired fired, // Flag to prevent firing locked, // Actual callback list list = [], // Queue of execution data for repeatable lists queue = [], // Index of currently firing callback (modified by add/remove as needed) firingIndex = -1, // Fire callbacks fire = function() { // Enforce single-firing locked = options.once; // Execute callbacks for all pending executions, // respecting firingIndex overrides and runtime changes fired = firing = true; for ( ; queue.length; firingIndex = -1 ) { memory = queue.shift(); while ( ++firingIndex < list.length ) { // Run callback and check for early termination if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && options.stopOnFalse ) { // Jump to end and forget the data so .add doesn't re-fire firingIndex = list.length; memory = false; } } } // Forget the data if we're done with it if ( !options.memory ) { memory = false; } firing = false; // Clean up if we're done firing for good if ( locked ) { // Keep an empty list if we have data for future add calls if ( memory ) { list = []; // Otherwise, this object is spent } else { list = ""; } } }, // Actual Callbacks object self = { // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { // If we have memory from a past run, we should fire after adding if ( memory && !firing ) { firingIndex = list.length - 1; queue.push( memory ); } ( function add( args ) { jQuery.each( args, function( _, arg ) { if ( jQuery.isFunction( arg ) ) { if ( !options.unique || !self.has( arg ) ) { list.push( arg ); } } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { // Inspect recursively add( arg ); } } ); } )( arguments ); if ( memory && !firing ) { fire(); } } return this; }, // Remove a callback from the list remove: function() { jQuery.each( arguments, function( _, arg ) { var index; while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { list.splice( index, 1 ); // Handle firing indexes if ( index <= firingIndex ) { firingIndex--; } } } ); return this; }, // Check if a given callback is in the list. // If no argument is given, return whether or not list has callbacks attached. has: function( fn ) { return fn ? jQuery.inArray( fn, list ) > -1 : list.length > 0; }, // Remove all callbacks from the list empty: function() { if ( list ) { list = []; } return this; }, // Disable .fire and .add // Abort any current/pending executions // Clear all callbacks and values disable: function() { locked = queue = []; list = memory = ""; return this; }, disabled: function() { return !list; }, // Disable .fire // Also disable .add unless we have memory (since it would have no effect) // Abort any pending executions lock: function() { locked = true; if ( !memory ) { self.disable(); } return this; }, locked: function() { return !!locked; }, // Call all callbacks with the given context and arguments fireWith: function( context, args ) { if ( !locked ) { args = args || []; args = [ context, args.slice ? args.slice() : args ]; queue.push( args ); if ( !firing ) { fire(); } } return this; }, // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, // To know if the callbacks have already been called at least once fired: function() { return !!fired; } }; return self; }; jQuery.extend( { Deferred: function( func ) { var tuples = [ // action, add listener, listener list, final state [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ], [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ], [ "notify", "progress", jQuery.Callbacks( "memory" ) ] ], state = "pending", promise = { state: function() { return state; }, always: function() { deferred.done( arguments ).fail( arguments ); return this; }, then: function( /* fnDone, fnFail, fnProgress */ ) { var fns = arguments; return jQuery.Deferred( function( newDefer ) { jQuery.each( tuples, function( i, tuple ) { var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; // deferred[ done | fail | progress ] for forwarding actions to newDefer deferred[ tuple[ 1 ] ]( function() { var returned = fn && fn.apply( this, arguments ); if ( returned && jQuery.isFunction( returned.promise ) ) { returned.promise() .progress( newDefer.notify ) .done( newDefer.resolve ) .fail( newDefer.reject ); } else { newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); } } ); } ); fns = null; } ).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { return obj != null ? jQuery.extend( obj, promise ) : promise; } }, deferred = {}; // Keep pipe for back-compat promise.pipe = promise.then; // Add list-specific methods jQuery.each( tuples, function( i, tuple ) { var list = tuple[ 2 ], stateString = tuple[ 3 ]; // promise[ done | fail | progress ] = list.add promise[ tuple[ 1 ] ] = list.add; // Handle state if ( stateString ) { list.add( function() { // state = [ resolved | rejected ] state = stateString; // [ reject_list | resolve_list ].disable; progress_list.lock }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); } // deferred[ resolve | reject | notify ] deferred[ tuple[ 0 ] ] = function() { deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments ); return this; }; deferred[ tuple[ 0 ] + "With" ] = list.fireWith; } ); // Make the deferred a promise promise.promise( deferred ); // Call given func if any if ( func ) { func.call( deferred, deferred ); } // All done! return deferred; }, // Deferred helper when: function( subordinate /* , ..., subordinateN */ ) { var i = 0, resolveValues = slice.call( arguments ), length = resolveValues.length, // the count of uncompleted subordinates remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, // the master Deferred. // If resolveValues consist of only a single Deferred, just use that. deferred = remaining === 1 ? subordinate : jQuery.Deferred(), // Update function for both resolve and progress values updateFunc = function( i, contexts, values ) { return function( value ) { contexts[ i ] = this; values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; if ( values === progressValues ) { deferred.notifyWith( contexts, values ); } else if ( !( --remaining ) ) { deferred.resolveWith( contexts, values ); } }; }, progressValues, progressContexts, resolveContexts; // add listeners to Deferred subordinates; treat others as resolved if ( length > 1 ) { progressValues = new Array( length ); progressContexts = new Array( length ); resolveContexts = new Array( length ); for ( ; i < length; i++ ) { if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { resolveValues[ i ].promise() .progress( updateFunc( i, progressContexts, progressValues ) ) .done( updateFunc( i, resolveContexts, resolveValues ) ) .fail( deferred.reject ); } else { --remaining; } } } // if we're not waiting on anything, resolve the master if ( !remaining ) { deferred.resolveWith( resolveContexts, resolveValues ); } return deferred.promise(); } } ); // The deferred used on DOM ready var readyList; jQuery.fn.ready = function( fn ) { // Add the callback jQuery.ready.promise().done( fn ); return this; }; jQuery.extend( { // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Hold (or release) the ready event holdReady: function( hold ) { if ( hold ) { jQuery.readyWait++; } else { jQuery.ready( true ); } }, // Handle when the DOM is ready ready: function( wait ) { // Abort if there are pending holds or we're already ready if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { return; } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if ( wait !== true && --jQuery.readyWait > 0 ) { return; } // If there are functions bound, to execute readyList.resolveWith( document, [ jQuery ] ); // Trigger any bound ready events if ( jQuery.fn.triggerHandler ) { jQuery( document ).triggerHandler( "ready" ); jQuery( document ).off( "ready" ); } } } ); /** * Clean-up method for dom ready events */ function detach() { if ( document.addEventListener ) { document.removeEventListener( "DOMContentLoaded", completed ); window.removeEventListener( "load", completed ); } 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 || window.event.type === "load" || document.readyState === "complete" ) { detach(); jQuery.ready(); } } jQuery.ready.promise = function( obj ) { if ( !readyList ) { readyList = jQuery.Deferred(); // Catch cases where $(document).ready() is called // after the browser event has already occurred. // Support: IE6-10 // Older IE sometimes signals "interactive" too soon if ( document.readyState === "complete" || ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { // Handle it asynchronously to allow scripts the opportunity to delay ready window.setTimeout( jQuery.ready ); // Standards-based browsers support DOMContentLoaded } else if ( document.addEventListener ) { // Use the handy event callback document.addEventListener( "DOMContentLoaded", completed ); // A fallback to window.onload, that will always work window.addEventListener( "load", completed ); // 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 window.setTimeout( doScrollCheck, 50 ); } // detach all dom ready events detach(); // and execute any waiting functions jQuery.ready(); } } )(); } } } return readyList.promise( obj ); }; // 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.ownFirst = 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 !== "undefined" ) { // 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"; 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; } } body.removeChild( container ); } ); ( function() { var div = document.createElement( "div" ); // Support: IE<9 support.deleteExpando = true; try { delete div.test; } catch ( e ) { support.deleteExpando = false; } // Null elements to avoid leaks in IE. div = null; } )(); var 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; }; 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; } } return data; } // checks a cache object for emptiness function isEmptyDataObject( obj ) { var name; for ( name in obj ) { // 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; } } return true; } function internalData( elem, name, data, pvt /* Internal Use Only */ ) { if ( !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; } 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 ( !cache[ id ] ) { // Avoid exposing jQuery metadata on plain JS objects when the object // is serialized using JSON.stringify cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; } // 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 ); } } 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 = {}; } 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 ]; // Test for null|undefined property data if ( ret == null ) { // Try to find the camelCased property ret = thisCache[ jQuery.camelCase( name ) ]; } } else { ret = thisCache; } return ret; } function internalRemoveData( elem, name, pvt ) { if ( !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; 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 { // 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 { // 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 ) ); } 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; } } } // See jQuery.data for more information if ( !pvt ) { delete cache[ id ].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 ]; // When all else fails, undefined } else { cache[ id ] = undefined; } } 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 ); }, data: function( elem, name, data ) { return internalData( elem, name, data ); }, removeData: function( elem, name ) { return internalRemoveData( elem, name ); }, // For internal use only. _data: function( elem, name, data ) { return internalData( elem, name, data, true ); }, _removeData: function( elem, name ) { return internalRemoveData( elem, name, true ); } } ); jQuery.fn.extend( { data: function( key, value ) { var i, name, data, 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 ); if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { i = attrs.length; while ( i-- ) { // Support: IE11+ // The attrs elements can be null (#14894) if ( attrs[ i ] ) { name = attrs[ i ].name; if ( name.indexOf( "data-" ) === 0 ) { name = jQuery.camelCase( name.slice( 5 ) ); dataAttr( elem, name, data[ name ] ); } } } jQuery._data( elem, "parsedAttrs", true ); } } return data; } // Sets multiple values if ( typeof key === "object" ) { return this.each( function() { jQuery.data( this, key ); } ); } return arguments.length > 1 ? // Sets one value this.each( function() { jQuery.data( this, key, value ); } ) : // Gets one value // Try to fetch any internally stored data first elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined; }, removeData: function( key ) { return this.each( function() { jQuery.removeData( this, key ); } ); } } ); jQuery.extend( { queue: function( elem, type, data ) { var queue; if ( elem ) { type = ( type || "fx" ) + "queue"; queue = jQuery._data( 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 ) ); } else { queue.push( data ); } } return queue || []; } }, dequeue: function( elem, type ) { type = type || "fx"; var queue = jQuery.queue( elem, type ), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks( elem, type ), next = function() { jQuery.dequeue( elem, type ); }; // If the fx queue is dequeued, always remove the progress sentinel if ( fn === "inprogress" ) { fn = queue.shift(); startLength--; } if ( fn ) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if ( type === "fx" ) { queue.unshift( "inprogress" ); } // clear up the last queue stop function delete hooks.stop; fn.call( elem, next, hooks ); } if ( !startLength && hooks ) { hooks.empty.fire(); } }, // not intended for public consumption - generates a queueHooks object, // or returns the current one _queueHooks: function( elem, type ) { var key = type + "queueHooks"; return jQuery._data( elem, key ) || jQuery._data( elem, key, { empty: jQuery.Callbacks( "once memory" ).add( function() { jQuery._removeData( elem, type + "queue" ); jQuery._removeData( elem, key ); } ) } ); } } ); jQuery.fn.extend( { queue: function( type, data ) { var setter = 2; if ( typeof type !== "string" ) { data = type; type = "fx"; setter--; } if ( arguments.length < setter ) { return jQuery.queue( this[ 0 ], type ); } return data === undefined ? this : this.each( function() { var queue = jQuery.queue( this, type, data ); // ensure a hooks for this queue jQuery._queueHooks( this, type ); if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { jQuery.dequeue( this, type ); } } ); }, dequeue: function( type ) { return this.each( function() { jQuery.dequeue( this, type ); } ); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, obj ) { var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } }; if ( typeof type !== "string" ) { obj = type; type = undefined; } type = type || "fx"; while ( i-- ) { tmp = jQuery._data( elements[ i ], type + "queueHooks" ); if ( tmp && tmp.empty ) { count++; tmp.empty.add( resolve ); } } resolve(); return defer.promise( obj ); } } ); ( 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 !== "undefined" ) { // 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 pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; var isHidden = function( elem, el ) { // isHidden might be called from jQuery#filter function; // in that case, element will be second argument elem = el || elem; return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); }; function adjustCSS( elem, prop, valueParts, tween ) { var adjusted, scale = 1, maxIterations = 20, currentValue = tween ? function() { return tween.cur(); } : function() { return jQuery.css( elem, prop, "" ); }, initial = currentValue(), unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), // Starting value computation is required for potential unit mismatches initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && rcssNum.exec( jQuery.css( elem, prop ) ); if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { // Trust units reported by jQuery.css unit = unit || initialInUnit[ 3 ]; // Make sure we update the tween properties later on valueParts = valueParts || []; // Iteratively approximate from a nonzero starting point initialInUnit = +initial || 1; do { // 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 initialInUnit = initialInUnit / scale; jQuery.style( elem, prop, initialInUnit + unit ); // 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 = currentValue() / initial ) && scale !== 1 && --maxIterations ); } if ( valueParts ) { initialInUnit = +initialInUnit || +initial || 0; // Apply relative offset (+=/-=) if specified adjusted = valueParts[ 1 ] ? initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : +valueParts[ 2 ]; if ( tween ) { tween.unit = unit; tween.start = initialInUnit; tween.end = adjusted; } } return adjusted; } // Multifunctional method to get and set values of a collection // The value/s can optionally be executed if it's a function var 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 ) { 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 ); var rtagName = ( /<([\w:-]+)/ ); var rscriptType = ( /^$|\/(?:java|ecma)script/i ); var rleadingWhitespace = ( /^\s+/ ); var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|" + "details|dialog|figcaption|figure|footer|header|hgroup|main|" + "mark|meter|nav|output|picture|progress|section|summary|template|time|video"; function createSafeFragment( document ) { var list = nodeNames.split( "|" ), safeFrag = document.createDocumentFragment(); if ( safeFrag.createElement ) { while ( list.length ) { safeFrag.createElement( list.pop() ); } } return safeFrag; } ( function() { var div = document.createElement( "div" ), fragment = document.createDocumentFragment(), input = document.createElement( "input" ); // 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; // 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>"; // 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; // 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 ); // Support: Windows Web Apps (WWA) // `name` and `type` must use .setAttribute for WWA (#14901) input = document.createElement( "input" ); input.setAttribute( "type", "radio" ); input.setAttribute( "checked", "checked" ); input.setAttribute( "name", "t" ); div.appendChild( input ); // 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 // Cloned elements keep attachEvent handlers, we use addEventListener on IE9+ support.noCloneEvent = !!div.addEventListener; // Support: IE<9 // Since attributes and properties are the same in IE, // cleanData must set properties to undefined rather than use removeAttribute div[ jQuery.expando ] = 1; support.attributes = !div.getAttribute( jQuery.expando ); } )(); // We have to close these tags to support XHTML (#13200) var wrapMap = { option: [ 1, "<select multiple='multiple'>", "</select>" ], legend: [ 1, "<fieldset>", "</fieldset>" ], area: [ 1, "<map>", "</map>" ], // Support: IE8 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>" ], // 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>" ] }; // Support: IE8-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 !== "undefined" ? context.getElementsByTagName( tag || "*" ) : typeof context.querySelectorAll !== "undefined" ? 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; } // 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 rhtml = /<|&#?\w+;/, rtbody = /<tbody/i; function fixDefaultChecked( elem ) { if ( rcheckableType.test( elem.type ) ) { elem.defaultChecked = elem.checked; } } function buildFragment( elems, context, scripts, selection, ignored ) { var j, elem, contains, tmp, tag, tbody, wrap, l = elems.length, // Ensure a safe fragment safe = createSafeFragment( context ), nodes = [], i = 0; for ( ; i < l; i++ ) { elem = elems[ i ]; if ( elem || elem === 0 ) { // Add nodes directly if ( jQuery.type( elem ) === "object" ) { jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); // Convert non-html into a text node } else if ( !rhtml.test( elem ) ) { nodes.push( context.createTextNode( elem ) ); // Convert html into DOM nodes } else { tmp = tmp || safe.appendChild( context.createElement( "div" ) ); // Deserialize a standard representation tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); wrap = wrapMap[ tag ] || wrapMap._default; tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; // Descend through wrappers to the right content 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 ); } } } jQuery.merge( nodes, tmp.childNodes ); // Fix #12392 for WebKit and IE > 9 tmp.textContent = ""; // Fix #12392 for oldIE while ( tmp.firstChild ) { tmp.removeChild( tmp.firstChild ); } // Remember the top-level container for proper cleanup tmp = safe.lastChild; } } } // 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 ); } i = 0; while ( ( elem = nodes[ i++ ] ) ) { // Skip elements already in the context collection (trac-4087) if ( selection && jQuery.inArray( elem, selection ) > -1 ) { if ( ignored ) { ignored.push( elem ); } continue; } contains = jQuery.contains( elem.ownerDocument, elem ); // Append to fragment tmp = getAll( safe.appendChild( elem ), "script" ); // Preserve script evaluation history if ( contains ) { setGlobalEval( tmp ); } // Capture executables if ( scripts ) { j = 0; while ( ( elem = tmp[ j++ ] ) ) { if ( rscriptType.test( elem.type || "" ) ) { scripts.push( elem ); } } } } tmp = null; return safe; } ( function() { var i, eventName, div = document.createElement( "div" ); // Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events) for ( i in { submit: true, change: true, focusin: true } ) { eventName = "on" + i; if ( !( support[ i ] = eventName in window ) ) { // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) div.setAttribute( eventName, "t" ); support[ i ] = div.attributes[ eventName ].expando === false; } } // Null elements to avoid leaks in IE. div = null; } )(); var rformElems = /^(?:input|select|textarea)$/i, rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, rtypenamespace = /^([^.]*)(?:\.(.+)|)/; function returnTrue() { return true; } function returnFalse() { return false; } // Support: IE9 // See #13393 for more info function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } } function on( elem, types, selector, data, fn, one ) { var origFn, type; // Types can be a map of types/handlers if ( typeof types === "object" ) { // ( types-Object, selector, data ) if ( typeof selector !== "string" ) { // ( types-Object, data ) data = data || selector; selector = undefined; } for ( type in types ) { on( elem, type, selector, data, types[ type ], one ); } return elem; } if ( data == null && fn == null ) { // ( types, fn ) fn = selector; data = selector = undefined; } else if ( fn == null ) { if ( typeof selector === "string" ) { // ( types, selector, fn ) fn = data; data = undefined; } else { // ( types, data, fn ) fn = data; data = selector; selector = undefined; } } if ( fn === false ) { fn = returnFalse; } else if ( !fn ) { return elem; } if ( one === 1 ) { origFn = fn; fn = function( event ) { // Can use an empty set, since event contains the info jQuery().off( event ); return origFn.apply( this, arguments ); }; // Use same guid so caller can remove using origFn fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); } return elem.each( function() { jQuery.event.add( this, types, fn, data, selector ); } ); } /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ 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 ); // Don't attach events to noData or text/comment nodes (but allow plain objects) if ( !elemData ) { return; } // Caller can pass in an object of custom data in lieu of the handler if ( handler.handler ) { handleObjIn = handler; handler = handleObjIn.handler; selector = handleObjIn.selector; } // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first if ( !( events = elemData.events ) ) { events = elemData.events = {}; } if ( !( eventHandle = elemData.handle ) ) { 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 !== "undefined" && ( !e || jQuery.event.triggered !== e.type ) ? jQuery.event.dispatch.apply( eventHandle.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 types = ( types || "" ).match( rnotwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[ t ] ) || []; type = origType = tmp[ 1 ]; namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); // There *must* be a type, no attaching namespace-only handlers if ( !type ) { continue; } // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[ type ] || {}; // If selector defined, determine special event api type, otherwise given type type = ( selector ? special.delegateType : special.bindType ) || type; // Update special based on newly reset type special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers handleObj = jQuery.extend( { type: type, origType: origType, data: data, handler: handler, guid: handler.guid, selector: selector, needsContext: selector && jQuery.expr.match.needsContext.test( selector ), namespace: namespaces.join( "." ) }, handleObjIn ); // Init the event handler queue if we're the first if ( !( handlers = events[ type ] ) ) { handlers = events[ type ] = []; handlers.delegateCount = 0; // Only use addEventListener/attachEvent 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 ); } } } if ( special.add ) { special.add.call( elem, handleObj ); if ( !handleObj.handler.guid ) { handleObj.handler.guid = handler.guid; } } // Add to the element's handler list, delegates in front if ( selector ) { handlers.splice( handlers.delegateCount++, 0, handleObj ); } else { handlers.push( handleObj ); } // Keep track of which events have ever been used, for event optimization 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 ); if ( !elemData || !( events = elemData.events ) ) { return; } // Once for each type.namespace in types; type may be omitted types = ( types || "" ).match( rnotwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[ t ] ) || []; type = origType = tmp[ 1 ]; namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); // Unbind all events (on this namespace, if provided) for the element if ( !type ) { for ( type in events ) { jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); } continue; } special = jQuery.event.special[ type ] || {}; type = ( selector ? special.delegateType : special.bindType ) || type; handlers = events[ type ] || []; tmp = tmp[ 2 ] && new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); // Remove matching events origCount = j = handlers.length; while ( j-- ) { handleObj = handlers[ j ]; if ( ( mappedTypes || origType === handleObj.origType ) && ( !handler || handler.guid === handleObj.guid ) && ( !tmp || tmp.test( handleObj.namespace ) ) && ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { handlers.splice( j, 1 ); if ( handleObj.selector ) { handlers.delegateCount--; } if ( special.remove ) { special.remove.call( elem, handleObj ); } } } // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( origCount && !handlers.length ) { if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { jQuery.removeEvent( elem, type, elemData.handle ); } delete events[ type ]; } } // 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" ); } }, trigger: function( event, data, elem, onlyHandlers ) { var handle, ontype, cur, bubbleType, special, tmp, i, eventPath = [ elem || document ], type = hasOwn.call( event, "type" ) ? event.type : event, namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; cur = tmp = elem = elem || document; // Don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } // focus/blur morphs to focusin/out; ensure we're not firing them right now if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { return; } if ( type.indexOf( "." ) > -1 ) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split( "." ); type = namespaces.shift(); namespaces.sort(); } ontype = type.indexOf( ":" ) < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string event = event[ jQuery.expando ] ? event : new jQuery.Event( type, typeof event === "object" && event ); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) event.isTrigger = onlyHandlers ? 2 : 3; event.namespace = namespaces.join( "." ); event.rnamespace = event.namespace ? new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : null; // Clean up the event in case it is being reused event.result = undefined; if ( !event.target ) { event.target = elem; } // Clone any incoming data and prepend the event, creating the handler arg list data = data == null ? [ event ] : jQuery.makeArray( data, [ event ] ); // Allow special events to draw outside the lines special = jQuery.event.special[ type ] || {}; if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { return; } // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { bubbleType = special.delegateType || type; if ( !rfocusMorph.test( bubbleType + type ) ) { cur = cur.parentNode; } for ( ; cur; cur = cur.parentNode ) { eventPath.push( cur ); tmp = cur; } // Only add window if we got to document (e.g., not plain obj or detached DOM) if ( tmp === ( elem.ownerDocument || document ) ) { eventPath.push( tmp.defaultView || tmp.parentWindow || window ); } } // Fire handlers on the event path i = 0; while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); } // Native handler handle = ontype && cur[ ontype ]; if ( handle && handle.apply && acceptData( cur ) ) { event.result = handle.apply( cur, data ); if ( event.result === false ) { event.preventDefault(); } } } event.type = type; // If nobody prevented the default action, do it now if ( !onlyHandlers && !event.isDefaultPrevented() ) { if ( ( !special._default || special._default.apply( eventPath.pop(), data ) === false ) && 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 ) ) { // Don't re-trigger an onFOO event when we call its FOO() method tmp = elem[ ontype ]; if ( tmp ) { elem[ ontype ] = null; } // 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 } jQuery.event.triggered = undefined; if ( tmp ) { elem[ ontype ] = tmp; } } } } return event.result; }, dispatch: function( event ) { // Make a writable jQuery.Event from the native event object event = jQuery.event.fix( event ); var i, j, ret, matched, handleObj, handlerQueue = [], args = slice.call( arguments ), handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event args[ 0 ] = event; event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { return; } // Determine handlers handlerQueue = jQuery.event.handlers.call( this, event, handlers ); // Run delegates first; they may want to stop propagation beneath us i = 0; while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { event.currentTarget = matched.elem; 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). if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { event.handleObj = handleObj; event.data = handleObj.data; ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || handleObj.handler ).apply( matched.elem, args ); if ( ret !== undefined ) { if ( ( event.result = ret ) === false ) { event.preventDefault(); event.stopPropagation(); } } } } } // Call the postDispatch hook for the mapped type if ( special.postDispatch ) { special.postDispatch.call( this, event ); } return event.result; }, handlers: function( event, handlers ) { var i, matches, sel, handleObj, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; // Support (at least): Chrome, IE9 // Find delegate handlers // Black-hole SVG <use> instance trees (#13180) // // Support: Firefox<=42+ // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) if ( delegateCount && cur.nodeType && ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) { /* jshint eqeqeq: false */ for ( ; cur != this; cur = cur.parentNode || this ) { /* jshint eqeqeq: true */ // 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" ) ) { matches = []; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; // Don't conflict with Object.prototype properties (#13203) sel = handleObj.selector + " "; if ( matches[ sel ] === undefined ) { matches[ sel ] = handleObj.needsContext ? jQuery( sel, this ).index( cur ) > -1 : jQuery.find( sel, this, null, [ cur ] ).length; } if ( matches[ sel ] ) { matches.push( handleObj ); } } if ( matches.length ) { handlerQueue.push( { elem: cur, handlers: matches } ); } } } } // Add the remaining (directly-bound) handlers if ( delegateCount < handlers.length ) { handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } ); } 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: Safari 6-8+ // 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 detail eventPhase " + "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ), fixHooks: {}, keyHooks: { props: "char charCode key keyCode".split( " " ), filter: function( event, original ) { // Add which for key events if ( event.which == null ) { event.which = original.charCode != null ? original.charCode : original.keyCode; } return event; } }, mouseHooks: { props: ( "button buttons clientX clientY fromElement offsetX offsetY " + "pageX pageY screenX screenY toElement" ).split( " " ), filter: function( event, original ) { var body, eventDoc, doc, button = original.button, fromElement = original.fromElement; // Calculate pageX/Y if missing and clientX/Y available if ( event.pageX == null && original.clientX != null ) { eventDoc = event.target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); 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 ) { event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); } return event; } }, special: { load: { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, focus: { // 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 } } }, delegateType: "focusin" }, blur: { trigger: function() { if ( this === safeActiveElement() && this.blur ) { this.blur(); return false; } }, delegateType: "focusout" }, click: { // For checkbox, fire native event so checked state will be right trigger: function() { if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { this.click(); return false; } }, // For cross-browser consistency, don't fire native .click() on links _default: function( event ) { return jQuery.nodeName( event.target, "a" ); } }, beforeunload: { postDispatch: function( event ) { // Support: Firefox 20+ // Firefox doesn't alert if the returnValue field is not set. if ( event.result !== undefined && event.originalEvent ) { event.originalEvent.returnValue = event.result; } } } }, // Piggyback on a donor event to simulate a different one simulate: function( type, elem, event ) { var e = jQuery.extend( new jQuery.Event(), event, { type: type, isSimulated: true // Previously, `originalEvent: {}` was set here, so stopPropagation call // would not be triggered on donor event, since in our own // jQuery.event.stopPropagation function we had a check for existence of // originalEvent.stopPropagation method, so, consequently it would be a noop. // // Guard for simulated events was moved to jQuery.event.stopPropagation function // since `originalEvent` should point to the original event for the // constancy with other events and for more focused logic } ); jQuery.event.trigger( e, null, elem ); if ( e.isDefaultPrevented() ) { event.preventDefault(); } } }; jQuery.removeEvent = document.removeEventListener ? function( elem, type, handle ) { // This "if" is needed for plain objects if ( elem.removeEventListener ) { elem.removeEventListener( type, handle ); } } : 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 ] === "undefined" ) { elem[ name ] = null; } elem.detachEvent( name, handle ); } }; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword if ( !( this instanceof jQuery.Event ) ) { return new jQuery.Event( src, props ); } // Event object if ( src && src.type ) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && // Support: IE < 9, Android < 4.0 src.returnValue === false ? returnTrue : returnFalse; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if ( props ) { jQuery.extend( this, props ); } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || jQuery.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { constructor: jQuery.Event, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, preventDefault: function() { var e = this.originalEvent; this.isDefaultPrevented = returnTrue; if ( !e ) { return; } // If preventDefault exists, run it on the original event if ( 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 || this.isSimulated ) { return; } // If stopPropagation exists, run it on the original event if ( 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; this.isImmediatePropagationStopped = returnTrue; if ( e && e.stopImmediatePropagation ) { e.stopImmediatePropagation(); } this.stopPropagation(); } }; // Create mouseenter/leave events using mouseover/out and event-time checks // so that event delegation works in jQuery. // Do the same for pointerenter/pointerleave and pointerover/pointerout // // Support: Safari 7 only // Safari sends mouseenter too often; see: // https://code.google.com/p/chromium/issues/detail?id=470258 // for the description of the bug (it existed in older Chrome versions as well). jQuery.each( { mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function( orig, fix ) { jQuery.event.special[ orig ] = { delegateType: fix, bindType: fix, handle: function( event ) { var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj; // For mouseenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); event.type = fix; } return ret; } }; } ); // IE submit delegation if ( !support.submit ) { 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" ) ? // Support: IE <=8 // We use jQuery.prop instead of elem.form // to allow fixing the IE8 delegated submit issue (gh-2332) // by 3rd party polyfills/workarounds. jQuery.prop( elem, "form" ) : undefined; if ( form && !jQuery._data( form, "submit" ) ) { jQuery.event.add( form, "submit._submit", function( event ) { event._submitBubble = true; } ); jQuery._data( form, "submit", 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._submitBubble ) { delete event._submitBubble; if ( this.parentNode && !event.isTrigger ) { jQuery.event.simulate( "submit", this.parentNode, event ); } } }, 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.change ) { 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._justChanged = true; } } ); jQuery.event.add( this, "click._change", function( event ) { if ( this._justChanged && !event.isTrigger ) { this._justChanged = false; } // Allow triggered, simulated change events (#11500) jQuery.event.simulate( "change", this, event ); } ); } 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, "change" ) ) { jQuery.event.add( elem, "change._change", function( event ) { if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { jQuery.event.simulate( "change", this.parentNode, event ); } } ); jQuery._data( elem, "change", 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 // Firefox doesn't have focus(in | out) events // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 // // Support: Chrome, Safari // focus(in | out) events fire after focus & blur events, // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order // Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857 if ( !support.focusin ) { jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { // Attach a single capturing handler on the document while someone wants focusin/focusout var handler = function( event ) { jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); }; jQuery.event.special[ fix ] = { setup: function() { var doc = this.ownerDocument || this, attaches = jQuery._data( doc, fix ); if ( !attaches ) { doc.addEventListener( orig, handler, true ); } jQuery._data( doc, fix, ( attaches || 0 ) + 1 ); }, teardown: function() { var doc = this.ownerDocument || this, attaches = jQuery._data( doc, fix ) - 1; if ( !attaches ) { doc.removeEventListener( orig, handler, true ); jQuery._removeData( doc, fix ); } else { jQuery._data( doc, fix, attaches ); } } }; } ); } jQuery.fn.extend( { on: function( types, selector, data, fn ) { return on( this, types, selector, data, fn ); }, one: function( types, selector, data, fn ) { return on( this, types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { var handleObj, type; if ( types && types.preventDefault && types.handleObj ) { // ( event ) dispatched jQuery.Event handleObj = types.handleObj; jQuery( types.delegateTarget ).off( handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if ( typeof types === "object" ) { // ( types-object [, selector] ) for ( type in types ) { this.off( type, selector, types[ type ] ); } return this; } if ( selector === false || typeof selector === "function" ) { // ( types [, fn] ) fn = selector; selector = undefined; } if ( fn === false ) { fn = returnFalse; } return this.each( function() { jQuery.event.remove( this, types, fn, selector ); } ); }, trigger: function( type, data ) { return this.each( function() { jQuery.event.trigger( type, data, this ); } ); }, triggerHandler: function( type, data ) { var elem = this[ 0 ]; if ( elem ) { return jQuery.event.trigger( type, data, elem, true ); } } } ); var rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, rnoshimcache = new RegExp( "<(?:" + nodeNames + ")[\\s/>]", "i" ), rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, // Support: IE 10-11, Edge 10240+ // In IE/Edge using regex groups here causes severe slowdowns. // See https://connect.microsoft.com/IE/feedback/details/1736512/ rnoInnerhtml = /<script|<style|<link/i, // checked="checked" or checked rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rscriptTypeMasked = /^true\/(.*)/, rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, safeFragment = createSafeFragment( document ), fragmentDiv = safeFragment.appendChild( document.createElement( "div" ) ); // Support: IE<8 // Manipulating tables requires a tbody function manipulationTarget( elem, content ) { return jQuery.nodeName( elem, "table" ) && jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? elem.getElementsByTagName( "tbody" )[ 0 ] || elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) : elem; } // 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; return elem; } function restoreScript( elem ) { var match = rscriptTypeMasked.exec( elem.type ); if ( match ) { elem.type = match[ 1 ]; } else { elem.removeAttribute( "type" ); } return elem; } function cloneCopyEvent( src, dest ) { if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { return; } var type, i, l, oldData = jQuery._data( src ), curData = jQuery._data( dest, oldData ), events = oldData.events; if ( events ) { delete curData.handle; curData.events = {}; 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 ); 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 ); } // 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 dest.defaultChecked = dest.checked = src.checked; // 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; } // 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; // IE6-8 fails to set the defaultValue to the correct value when // cloning other types of input fields } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } } function domManip( collection, args, callback, ignored ) { // Flatten any nested arrays args = concat.apply( [], args ); var first, node, hasScripts, scripts, doc, fragment, i = 0, l = collection.length, iNoClone = l - 1, value = args[ 0 ], isFunction = jQuery.isFunction( value ); // We can't cloneNode fragments that contain checked, in WebKit if ( isFunction || ( l > 1 && typeof value === "string" && !support.checkClone && rchecked.test( value ) ) ) { return collection.each( function( index ) { var self = collection.eq( index ); if ( isFunction ) { args[ 0 ] = value.call( this, index, self.html() ); } domManip( self, args, callback, ignored ); } ); } if ( l ) { fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); first = fragment.firstChild; if ( fragment.childNodes.length === 1 ) { fragment = first; } // Require either new content or an interest in ignored elements to invoke the callback if ( first || ignored ) { scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); hasScripts = scripts.length; // Use the original fragment for the last item // instead of the first because it can end up // being emptied incorrectly in certain situations (#8070). for ( ; i < l; i++ ) { node = fragment; if ( i !== iNoClone ) { node = jQuery.clone( node, true, true ); // Keep references to cloned scripts for later restoration if ( hasScripts ) { // Support: Android<4.1, PhantomJS<2 // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( scripts, getAll( node, "script" ) ); } } callback.call( collection[ i ], node, i ); } if ( hasScripts ) { doc = scripts[ scripts.length - 1 ].ownerDocument; // Reenable scripts jQuery.map( scripts, restoreScript ); // Evaluate executable scripts on first document insertion for ( i = 0; i < hasScripts; i++ ) { node = scripts[ i ]; if ( rscriptType.test( node.type || "" ) && !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { if ( node.src ) { // Optional AJAX dependency, but won't run scripts if not present if ( jQuery._evalUrl ) { jQuery._evalUrl( node.src ); } } else { jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ) .replace( rcleanScript, "" ) ); } } } } // Fix #11809: Avoid leaking memory fragment = first = null; } } return collection; } function remove( elem, selector, keepData ) { var node, elems = selector ? jQuery.filter( selector, elem ) : elem, i = 0; for ( ; ( node = elems[ i ] ) != null; i++ ) { if ( !keepData && node.nodeType === 1 ) { jQuery.cleanData( getAll( node ) ); } if ( node.parentNode ) { if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { setGlobalEval( getAll( node, "script" ) ); } node.parentNode.removeChild( node ); } } return elem; } jQuery.extend( { htmlPrefilter: function( html ) { return html.replace( rxhtmlTag, "<$1></$2>" ); }, clone: function( elem, dataAndEvents, deepDataAndEvents ) { var destElements, node, clone, i, srcElements, 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 ) ) { // 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 ] ); } } } // Copy the events from the original to the clone if ( dataAndEvents ) { if ( deepDataAndEvents ) { srcElements = srcElements || getAll( elem ); destElements = destElements || getAll( clone ); for ( i = 0; ( node = srcElements[ i ] ) != null; i++ ) { cloneCopyEvent( node, destElements[ i ] ); } } else { cloneCopyEvent( elem, clone ); } } // Preserve script evaluation history destElements = getAll( clone, "script" ); if ( destElements.length > 0 ) { setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); } destElements = srcElements = node = null; // Return the cloned set return clone; }, cleanData: function( elems, /* internal */ forceAcceptData ) { var elem, type, id, data, i = 0, internalKey = jQuery.expando, cache = jQuery.cache, attributes = support.attributes, special = jQuery.event.special; for ( ; ( elem = elems[ i ] ) != null; i++ ) { if ( forceAcceptData || acceptData( elem ) ) { id = elem[ internalKey ]; data = id && cache[ id ]; if ( data ) { if ( data.events ) { for ( type in data.events ) { if ( special[ type ] ) { jQuery.event.remove( elem, type ); // This is a shortcut to avoid jQuery.event.remove's overhead } else { jQuery.removeEvent( elem, type, data.handle ); } } } // Remove cache only if it was not already removed by jQuery.event.remove if ( cache[ id ] ) { delete cache[ id ]; // Support: IE<9 // IE does not allow us to delete expando properties from nodes // IE creates expando attributes along with the property // IE does not have a removeAttribute function on Document nodes if ( !attributes && typeof elem.removeAttribute !== "undefined" ) { elem.removeAttribute( internalKey ); // Webkit & Blink performance suffers when deleting properties // from DOM nodes, so set to undefined instead // https://code.google.com/p/chromium/issues/detail?id=378607 } else { elem[ internalKey ] = undefined; } deletedIds.push( id ); } } } } } } ); jQuery.fn.extend( { // Keep domManip exposed until 3.0 (gh-2225) domManip: domManip, detach: function( selector ) { return remove( this, selector, true ); }, remove: function( selector ) { return remove( this, selector ); }, text: function( value ) { return access( this, function( value ) { return value === undefined ? jQuery.text( this ) : this.empty().append( ( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value ) ); }, null, value, arguments.length ); }, append: function() { return domManip( this, arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.appendChild( elem ); } } ); }, prepend: function() { return domManip( this, arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.insertBefore( elem, target.firstChild ); } } ); }, before: function() { return domManip( this, arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this ); } } ); }, after: function() { return domManip( this, arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this.nextSibling ); } } ); }, empty: function() { var elem, 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 ); } // 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; } } return this; }, clone: function( dataAndEvents, deepDataAndEvents ) { dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map( function() { return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); } ); }, html: function( value ) { return access( this, function( value ) { var elem = this[ 0 ] || {}, i = 0, l = this.length; if ( value === undefined ) { return elem.nodeType === 1 ? elem.innerHTML.replace( rinlinejQuery, "" ) : undefined; } // 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() ] ) { value = jQuery.htmlPrefilter( value ); try { for ( ; i < l; i++ ) { // Remove element nodes and prevent memory leaks elem = this[ i ] || {}; if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); elem.innerHTML = value; } } elem = 0; // If using innerHTML throws an exception, use the fallback method } catch ( e ) {} } if ( elem ) { this.empty().append( value ); } }, null, value, arguments.length ); }, replaceWith: function() { var ignored = []; // Make the changes, replacing each non-ignored context element with the new content return domManip( this, arguments, function( elem ) { var parent = this.parentNode; if ( jQuery.inArray( this, ignored ) < 0 ) { jQuery.cleanData( getAll( this ) ); if ( parent ) { parent.replaceChild( elem, this ); } } // Force callback invocation }, ignored ); } } ); jQuery.each( { appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var elems, i = 0, ret = [], insert = jQuery( selector ), last = insert.length - 1; for ( ; i <= last; i++ ) { 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() push.apply( ret, elems.get() ); } return this.pushStack( ret ); }; } ); var iframe, elemdisplay = { // Support: Firefox // We have to pre-define these values for FF (#10227) HTML: "block", BODY: "block" }; /** * Retrieve the actual display of a element * @param {String} name nodeName of the element * @param {Object} doc Document object */ // Called only from within defaultDisplay function actualDisplay( name, doc ) { var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), display = jQuery.css( elem[ 0 ], "display" ); // We don't have any data stored on the element, // so use "detach" method as fast way to get rid of the element elem.detach(); return display; } /** * Try to determine the default display value of an element * @param {String} nodeName */ function defaultDisplay( nodeName ) { var doc = document, display = elemdisplay[ nodeName ]; if ( !display ) { display = actualDisplay( nodeName, doc ); // If the simple way fails, read from inside an iframe if ( display === "none" || !display ) { // Use the already-created iframe if possible 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; // Support: IE doc.write(); doc.close(); display = actualDisplay( nodeName, doc ); iframe.detach(); } // Store the correct default display elemdisplay[ nodeName ] = display; } return display; } var rmargin = ( /^margin/ ); var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); var swap = function( elem, options, callback, args ) { var ret, name, old = {}; // Remember the old values, and insert the new ones for ( name in options ) { old[ name ] = elem.style[ name ]; elem.style[ name ] = options[ name ]; } ret = callback.apply( elem, args || [] ); // Revert the old values for ( name in options ) { elem.style[ name ] = old[ name ]; } return ret; }; var documentElement = document.documentElement; ( function() { var pixelPositionVal, pixelMarginRightVal, boxSizingReliableVal, reliableHiddenOffsetsVal, reliableMarginRightVal, reliableMarginLeftVal, container = document.createElement( "div" ), div = document.createElement( "div" ); // Finish early in limited (non-browser) environments if ( !div.style ) { return; } div.style.cssText = "float:left;opacity:.5"; // Support: IE<9 // Make sure that element opacity exists (as opposed to filter) support.opacity = div.style.opacity === "0.5"; // Verify style float existence // (IE uses styleFloat instead of cssFloat) support.cssFloat = !!div.style.cssFloat; div.style.backgroundClip = "content-box"; div.cloneNode( true ).style.backgroundClip = ""; support.clearCloneStyle = div.style.backgroundClip === "content-box"; container = document.createElement( "div" ); container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + "padding:0;margin-top:1px;position:absolute"; div.innerHTML = ""; container.appendChild( div ); // Support: Firefox<29, Android 2.3 // Vendor-prefix box-sizing support.boxSizing = div.style.boxSizing === "" || div.style.MozBoxSizing === "" || div.style.WebkitBoxSizing === ""; jQuery.extend( support, { reliableHiddenOffsets: function() { if ( pixelPositionVal == null ) { computeStyleTests(); } return reliableHiddenOffsetsVal; }, boxSizingReliable: function() { // We're checking for pixelPositionVal here instead of boxSizingReliableVal // since that compresses better and they're computed together anyway. if ( pixelPositionVal == null ) { computeStyleTests(); } return boxSizingReliableVal; }, pixelMarginRight: function() { // Support: Android 4.0-4.3 if ( pixelPositionVal == null ) { computeStyleTests(); } return pixelMarginRightVal; }, pixelPosition: function() { if ( pixelPositionVal == null ) { computeStyleTests(); } return pixelPositionVal; }, reliableMarginRight: function() { // Support: Android 2.3 if ( pixelPositionVal == null ) { computeStyleTests(); } return reliableMarginRightVal; }, reliableMarginLeft: function() { // Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37 if ( pixelPositionVal == null ) { computeStyleTests(); } return reliableMarginLeftVal; } } ); function computeStyleTests() { var contents, divStyle, documentElement = document.documentElement; // Setup documentElement.appendChild( container ); div.style.cssText = // Support: Android 2.3 // Vendor-prefix box-sizing "-webkit-box-sizing:border-box;box-sizing:border-box;" + "position:relative;display:block;" + "margin:auto;border:1px;padding:1px;" + "top:1%;width:50%"; // Support: IE<9 // Assume reasonable values in the absence of getComputedStyle pixelPositionVal = boxSizingReliableVal = reliableMarginLeftVal = false; pixelMarginRightVal = reliableMarginRightVal = true; // Check for getComputedStyle so that this code is not run in IE<9. if ( window.getComputedStyle ) { divStyle = window.getComputedStyle( div ); pixelPositionVal = ( divStyle || {} ).top !== "1%"; reliableMarginLeftVal = ( divStyle || {} ).marginLeft === "2px"; boxSizingReliableVal = ( divStyle || { width: "4px" } ).width === "4px"; // Support: Android 4.0 - 4.3 only // Some styles come back with percentage values, even though they shouldn't div.style.marginRight = "50%"; pixelMarginRightVal = ( divStyle || { marginRight: "4px" } ).marginRight === "4px"; // Support: Android 2.3 only // 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: 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 ) || {} ).marginRight ); div.removeChild( contents ); } // Support: IE6-8 // First check that getClientRects works as expected // 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.style.display = "none"; reliableHiddenOffsetsVal = div.getClientRects().length === 0; if ( reliableHiddenOffsetsVal ) { div.style.display = ""; 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; } } // Teardown documentElement.removeChild( container ); } } )(); var getStyles, curCSS, rposition = /^(top|right|bottom|left)$/; if ( window.getComputedStyle ) { 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" var view = elem.ownerDocument.defaultView; if ( !view || !view.opener ) { view = window; } return view.getComputedStyle( elem ); }; 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; // Support: Opera 12.1x only // Fall back to style even without computed // computed is undefined for elems on document fragments if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) { ret = jQuery.style( elem, name ); } if ( computed ) { // 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 ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { // 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 ( documentElement.currentStyle ) { getStyles = function( elem ) { return elem.currentStyle; }; curCSS = function( elem, name, computed ) { var left, rs, rsLeft, ret, style = elem.style; computed = computed || getStyles( elem ); ret = computed ? computed[ name ] : undefined; // Avoid setting ret to empty string here // so we don't default to auto if ( ret == null && style && style[ name ] ) { ret = style[ 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 ) ) { // Remember the original values left = style.left; rs = elem.runtimeStyle; rsLeft = rs && rs.left; // 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"; // Revert the changed values style.left = left; if ( rsLeft ) { rs.left = rsLeft; } } // Support: IE // IE returns zIndex value as an integer. return ret === undefined ? ret : ret + "" || "auto"; }; } function addGetHookIf( conditionFn, hookFn ) { // Define the hook, we'll check on the first run if it's really needed. return { get: function() { 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 ); } }; } var ralpha = /alpha\([^)]*\)/i, ropacity = /opacity\s*=\s*([^)]*)/i, // 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" ), cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssNormalTransform = { letterSpacing: "0", fontWeight: "400" }, cssPrefixes = [ "Webkit", "O", "Moz", "ms" ], emptyStyle = document.createElement( "div" ).style; // return a css property mapped to a potentially vendor prefixed property function vendorPropName( name ) { // shortcut for names that are not vendor prefixed if ( name in emptyStyle ) { return name; } // check for vendor prefixed names var capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ), i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; if ( name in emptyStyle ) { return name; } } } 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 ? // Guard against undefined "subtract", e.g., when used as in cssHooks Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : value; } function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { var i = extra === ( isBorderBox ? "border" : "content" ) ? // If we already have the right measurement, avoid augmentation 4 : // Otherwise initialize for horizontal or vertical properties name === "width" ? 1 : 0, val = 0; for ( ; i < 4; i += 2 ) { // both box models exclude margin, so add it if we want it if ( extra === "margin" ) { val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); } if ( isBorderBox ) { // border-box includes padding, so remove it if we want content if ( extra === "content" ) { val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); } // 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 val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); // 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 ); } } } return val; } function getWidthOrHeight( elem, name, extra ) { // Start with offset property, which is equivalent to the border-box value var valueIsBorderBox = true, val = name === "width" ? elem.offsetWidth : elem.offsetHeight, styles = getStyles( elem ), isBorderBox = support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; // Support: IE11 only // In IE 11 fullscreen elements inside of an iframe have // 100x too small dimensions (gh-1764). if ( document.msFullscreenElement && window.top !== window ) { // Support: IE11 only // Running getBoundingClientRect on a disconnected node // in IE throws an error. if ( elem.getClientRects().length ) { val = Math.round( elem.getBoundingClientRect()[ name ] * 100 ); } } // 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 ) { // Fall back to computed then uncomputed css if necessary val = curCSS( elem, name, styles ); if ( val < 0 || val == null ) { val = elem.style[ name ]; } // Computed unit is not pixels. Stop here and return. if ( rnumnonpx.test( val ) ) { return val; } // we need the 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 ] ); // Normalize "", auto, and prepare for extra val = parseFloat( val ) || 0; } // use the active box-sizing model to add/subtract irrelevant styles return ( val + augmentWidthOrHeight( elem, name, extra || ( isBorderBox ? "border" : "content" ), valueIsBorderBox, styles ) ) + "px"; } 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; } } } }, // Don't automatically add "px" to these possibly-unitless properties cssNumber: { "animationIterationCount": true, "columnCount": true, "fillOpacity": true, "flexGrow": true, "flexShrink": true, "fontWeight": true, "lineHeight": true, "opacity": true, "order": true, "orphans": true, "widows": true, "zIndex": true, "zoom": true }, // 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" }, // 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; } // Make sure that we're working with the right name var ret, type, hooks, origName = jQuery.camelCase( name ), style = elem.style; name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName ); // gets hook for the prefixed version // followed by the unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // Check if we're setting a value if ( value !== undefined ) { type = typeof value; // Convert "+=" or "-=" to relative numbers (#7345) if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { value = adjustCSS( elem, name, ret ); // Fixes bug #9237 type = "number"; } // Make sure that null and NaN values aren't set. See: #7116 if ( value == null || value !== value ) { return; } // If a number was passed in, add the unit (except for certain CSS properties) if ( type === "number" ) { value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "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 ) { 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 ) {} } } else { // If a hook was provided get the non-computed value from there if ( hooks && "get" in hooks && ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { return ret; } // Otherwise just get the value from the style object return style[ name ]; } }, css: function( elem, name, extra, styles ) { var num, val, hooks, origName = jQuery.camelCase( name ); // Make sure that we're working with the right name name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName ); // gets hook for the prefixed version // followed by the unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // If a hook was provided get the computed value from there if ( hooks && "get" in hooks ) { val = hooks.get( elem, true, extra ); } // Otherwise, if a way to get the computed value exists, use that if ( val === undefined ) { val = curCSS( elem, name, styles ); } //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 if ( extra === "" || extra ) { num = parseFloat( val ); return extra === true || isFinite( num ) ? num || 0 : val; } return val; } } ); 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 return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ? swap( elem, cssShow, function() { return getWidthOrHeight( elem, name, extra ); } ) : getWidthOrHeight( elem, name, extra ); } }, set: function( elem, value, extra ) { var styles = extra && getStyles( elem ); return setPositiveNumber( elem, value, extra ? augmentWidthOrHeight( elem, name, extra, support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", styles ) : 0 ); } }; } ); 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; } }; } jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight, function( elem, computed ) { if ( computed ) { return swap( elem, { "display": "inline-block" }, curCSS, [ elem, "marginRight" ] ); } } ); jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, function( elem, computed ) { if ( computed ) { return ( parseFloat( curCSS( elem, "marginLeft" ) ) || // Support: IE<=11+ // Running getBoundingClientRect on a disconnected node in IE throws an error // Support: IE8 only // getClientRects() errors on disconnected elems ( jQuery.contains( elem.ownerDocument, elem ) ? elem.getBoundingClientRect().left - swap( elem, { marginLeft: 0 }, function() { return elem.getBoundingClientRect().left; } ) : 0 ) ) + "px"; } } ); // These hooks are used by animate to expand properties jQuery.each( { margin: "", padding: "", border: "Width" }, function( prefix, suffix ) { jQuery.cssHooks[ prefix + suffix ] = { expand: function( value ) { var i = 0, expanded = {}, // assumes a single number if not a string parts = typeof value === "string" ? value.split( " " ) : [ value ]; for ( ; i < 4; i++ ) { expanded[ prefix + cssExpand[ i ] + suffix ] = parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; } return expanded; } }; if ( !rmargin.test( prefix ) ) { jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; } } ); jQuery.fn.extend( { css: function( name, value ) { return access( this, function( elem, name, value ) { var styles, len, map = {}, i = 0; if ( jQuery.isArray( name ) ) { styles = getStyles( elem ); len = name.length; for ( ; i < len; i++ ) { map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); } return map; } return value !== undefined ? jQuery.style( elem, name, value ) : jQuery.css( elem, name ); }, name, value, arguments.length > 1 ); }, show: function() { return showHide( this, true ); }, hide: function() { return showHide( this ); }, toggle: function( state ) { if ( typeof state === "boolean" ) { return state ? this.show() : this.hide(); } return this.each( function() { if ( isHidden( this ) ) { jQuery( this ).show(); } else { jQuery( this ).hide(); } } ); } } ); function Tween( elem, options, prop, end, easing ) { return new Tween.prototype.init( elem, options, prop, end, easing ); } jQuery.Tween = Tween; Tween.prototype = { constructor: Tween, init: function( elem, options, prop, end, easing, unit ) { this.elem = elem; this.prop = prop; this.easing = easing || jQuery.easing._default; this.options = options; this.start = this.now = this.cur(); this.end = end; this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); }, cur: function() { var hooks = Tween.propHooks[ this.prop ]; return hooks && hooks.get ? hooks.get( this ) : Tween.propHooks._default.get( this ); }, run: function( percent ) { var eased, hooks = Tween.propHooks[ this.prop ]; if ( this.options.duration ) { this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); } else { this.pos = eased = percent; } this.now = ( this.end - this.start ) * eased + this.start; if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); } if ( hooks && hooks.set ) { hooks.set( this ); } else { Tween.propHooks._default.set( this ); } return this; } }; Tween.prototype.init.prototype = Tween.prototype; Tween.propHooks = { _default: { get: function( tween ) { var result; // Use a property on the element directly when it is not a DOM element, // or when there is no matching style property that exists. if ( tween.elem.nodeType !== 1 || tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { 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. 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 if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); } else if ( tween.elem.nodeType === 1 && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); } else { tween.elem[ tween.prop ] = tween.now; } } } }; // Support: IE <=9 // 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 ) { tween.elem[ tween.prop ] = tween.now; } } }; jQuery.easing = { linear: function( p ) { return p; }, swing: function( p ) { return 0.5 - Math.cos( p * Math.PI ) / 2; }, _default: "swing" }; jQuery.fx = Tween.prototype.init; // Back Compat <1.8 extension point jQuery.fx.step = {}; var fxNow, timerId, rfxtypes = /^(?:toggle|show|hide)$/, rrun = /queueHooks$/; // Animations created synchronously will run synchronously function createFxNow() { window.setTimeout( function() { fxNow = undefined; } ); return ( fxNow = jQuery.now() ); } // Generate parameters to create a standard animation function genFx( type, includeWidth ) { var which, attrs = { height: type }, i = 0; // 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 includeWidth = includeWidth ? 1 : 0; for ( ; i < 4 ; i += 2 - includeWidth ) { which = cssExpand[ i ]; attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; } if ( includeWidth ) { attrs.opacity = attrs.width = type; } return attrs; } function createTween( value, prop, animation ) { var tween, collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), index = 0, length = collection.length; for ( ; index < length; index++ ) { if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { // we're done with this property return tween; } } } function defaultPrefilter( elem, props, opts ) { /* jshint validthis: true */ var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHidden( elem ), dataShow = jQuery._data( elem, "fxshow" ); // handle queue: false promises if ( !opts.queue ) { hooks = jQuery._queueHooks( elem, "fx" ); if ( hooks.unqueued == null ) { hooks.unqueued = 0; oldfire = hooks.empty.fire; hooks.empty.fire = function() { if ( !hooks.unqueued ) { oldfire(); } }; } hooks.unqueued++; anim.always( function() { // doing this makes sure that the complete handler will be called // before this completes anim.always( function() { hooks.unqueued--; if ( !jQuery.queue( elem, "fx" ).length ) { hooks.empty.fire(); } } ); } ); } // 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 // change the overflow attribute when overflowX and // overflowY are set to the same value opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; // Set display property to inline-block for height/width // animations on inline elements that are having width/height animated display = jQuery.css( elem, "display" ); // Test default display if display is currently "none" checkDisplay = display === "none" ? jQuery._data( 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; } } } 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 ]; } ); } } // show/hide pass for ( prop in props ) { value = props[ prop ]; if ( rfxtypes.exec( value ) ) { delete props[ prop ]; toggle = toggle || value === "toggle"; if ( value === ( hidden ? "hide" : "show" ) ) { // If there is dataShow left over from a stopped hide or show // and we are going to proceed with show, we should pretend to be hidden if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { hidden = true; } else { continue; } } orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); // Any non-fx value stops us from restoring the original display value } else { display = undefined; } } if ( !jQuery.isEmptyObject( orig ) ) { if ( dataShow ) { if ( "hidden" in dataShow ) { hidden = dataShow.hidden; } } else { dataShow = jQuery._data( elem, "fxshow", {} ); } // store state if its toggle - enables .stop().toggle() to "reverse" if ( toggle ) { dataShow.hidden = !hidden; } if ( hidden ) { jQuery( elem ).show(); } else { anim.done( function() { jQuery( elem ).hide(); } ); } anim.done( function() { var prop; jQuery._removeData( elem, "fxshow" ); for ( prop in orig ) { jQuery.style( elem, prop, orig[ prop ] ); } } ); for ( prop in orig ) { tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); if ( !( prop in dataShow ) ) { dataShow[ prop ] = tween.start; if ( hidden ) { tween.end = tween.start; tween.start = prop === "width" || prop === "height" ? 1 : 0; } } } // If this is a noop like .hide().hide(), restore an overwritten display value } else if ( ( display === "none" ? defaultDisplay( elem.nodeName ) : display ) === "inline" ) { style.display = display; } } function propFilter( props, specialEasing ) { var index, name, easing, value, hooks; // camelCase, specialEasing and expand cssHook pass for ( index in props ) { name = jQuery.camelCase( index ); easing = specialEasing[ name ]; value = props[ index ]; if ( jQuery.isArray( value ) ) { easing = value[ 1 ]; value = props[ index ] = value[ 0 ]; } if ( index !== name ) { props[ name ] = value; delete props[ index ]; } hooks = jQuery.cssHooks[ name ]; if ( hooks && "expand" in hooks ) { 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" for ( index in value ) { if ( !( index in props ) ) { props[ index ] = value[ index ]; specialEasing[ index ] = easing; } } } else { specialEasing[ name ] = easing; } } } function Animation( elem, properties, options ) { var result, stopped, index = 0, length = Animation.prefilters.length, deferred = jQuery.Deferred().always( function() { // don't match elem in the :animated selector delete tick.elem; } ), tick = function() { if ( stopped ) { return false; } var currentTime = fxNow || createFxNow(), remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), // 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, length = animation.tweens.length; for ( ; index < length ; index++ ) { animation.tweens[ index ].run( percent ); } deferred.notifyWith( elem, [ animation, percent, remaining ] ); if ( percent < 1 && length ) { return remaining; } else { deferred.resolveWith( elem, [ animation ] ); return false; } }, animation = deferred.promise( { elem: elem, props: jQuery.extend( {}, properties ), opts: jQuery.extend( true, { specialEasing: {}, easing: jQuery.easing._default }, options ), originalProperties: properties, originalOptions: options, startTime: fxNow || createFxNow(), duration: options.duration, tweens: [], createTween: function( prop, end ) { var tween = jQuery.Tween( elem, animation.opts, prop, end, animation.opts.specialEasing[ prop ] || animation.opts.easing ); animation.tweens.push( tween ); return tween; }, stop: function( gotoEnd ) { var index = 0, // 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 ) { return this; } stopped = true; for ( ; index < length ; index++ ) { animation.tweens[ index ].run( 1 ); } // resolve when we played the last frame // otherwise, reject if ( gotoEnd ) { deferred.notifyWith( elem, [ animation, 1, 0 ] ); deferred.resolveWith( elem, [ animation, gotoEnd ] ); } else { deferred.rejectWith( elem, [ animation, gotoEnd ] ); } return this; } } ), props = animation.props; propFilter( props, animation.opts.specialEasing ); for ( ; index < length ; index++ ) { result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); if ( result ) { if ( jQuery.isFunction( result.stop ) ) { jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = jQuery.proxy( result.stop, result ); } return result; } } jQuery.map( props, createTween, animation ); if ( jQuery.isFunction( animation.opts.start ) ) { animation.opts.start.call( elem, animation ); } jQuery.fx.timer( jQuery.extend( tick, { elem: elem, anim: animation, queue: animation.opts.queue } ) ); // attach callbacks from options return animation.progress( animation.opts.progress ) .done( animation.opts.done, animation.opts.complete ) .fail( animation.opts.fail ) .always( animation.opts.always ); } jQuery.Animation = jQuery.extend( Animation, { tweeners: { "*": [ function( prop, value ) { var tween = this.createTween( prop, value ); adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); return tween; } ] }, tweener: function( props, callback ) { if ( jQuery.isFunction( props ) ) { callback = props; props = [ "*" ]; } else { props = props.match( rnotwhite ); } var prop, index = 0, length = props.length; for ( ; index < length ; index++ ) { prop = props[ index ]; Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; Animation.tweeners[ prop ].unshift( callback ); } }, prefilters: [ defaultPrefilter ], prefilter: function( callback, prepend ) { if ( prepend ) { Animation.prefilters.unshift( callback ); } else { Animation.prefilters.push( callback ); } } } ); jQuery.speed = function( speed, easing, fn ) { var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { complete: fn || !fn && easing || jQuery.isFunction( speed ) && speed, duration: speed, easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing }; 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" if ( opt.queue == null || opt.queue === true ) { opt.queue = "fx"; } // Queueing opt.old = opt.complete; opt.complete = function() { if ( jQuery.isFunction( opt.old ) ) { opt.old.call( this ); } if ( opt.queue ) { jQuery.dequeue( this, opt.queue ); } }; return opt; }; jQuery.fn.extend( { fadeTo: function( speed, to, easing, callback ) { // show any hidden elements after setting opacity to 0 return this.filter( isHidden ).css( "opacity", 0 ).show() // animate to the value specified .end().animate( { opacity: to }, speed, easing, callback ); }, animate: function( prop, speed, easing, callback ) { var empty = jQuery.isEmptyObject( prop ), optall = jQuery.speed( speed, easing, callback ), doAnimation = function() { // Operate on a copy of prop so per-property easing won't be lost var anim = Animation( this, jQuery.extend( {}, prop ), optall ); // Empty animations, or finishing resolves immediately if ( empty || jQuery._data( this, "finish" ) ) { anim.stop( true ); } }; doAnimation.finish = doAnimation; return empty || optall.queue === false ? this.each( doAnimation ) : this.queue( optall.queue, doAnimation ); }, stop: function( type, clearQueue, gotoEnd ) { var stopQueue = function( hooks ) { var stop = hooks.stop; delete hooks.stop; stop( gotoEnd ); }; if ( typeof type !== "string" ) { gotoEnd = clearQueue; clearQueue = type; type = undefined; } if ( clearQueue && type !== false ) { this.queue( type || "fx", [] ); } return this.each( function() { var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, data = jQuery._data( this ); if ( index ) { if ( data[ index ] && data[ index ].stop ) { stopQueue( data[ index ] ); } } else { for ( index in data ) { if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { stopQueue( data[ index ] ); } } } for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && ( type == null || timers[ index ].queue === type ) ) { timers[ index ].anim.stop( gotoEnd ); dequeue = false; timers.splice( index, 1 ); } } // 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 ); } } ); }, finish: function( type ) { if ( type !== false ) { type = type || "fx"; } return this.each( function() { var index, data = jQuery._data( this ), queue = data[ type + "queue" ], hooks = data[ type + "queueHooks" ], timers = jQuery.timers, length = queue ? queue.length : 0; // enable finishing flag on private data data.finish = true; // 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 for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && timers[ index ].queue === type ) { timers[ index ].anim.stop( true ); timers.splice( index, 1 ); } } // 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 delete data.finish; } ); } } ); jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { var cssFn = jQuery.fn[ name ]; jQuery.fn[ name ] = function( speed, easing, callback ) { return speed == null || typeof speed === "boolean" ? cssFn.apply( this, arguments ) : this.animate( genFx( name, true ), speed, easing, callback ); }; } ); // Generate shortcuts for custom animations jQuery.each( { slideDown: genFx( "show" ), slideUp: genFx( "hide" ), slideToggle: genFx( "toggle" ), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function( name, props ) { jQuery.fn[ name ] = function( speed, easing, callback ) { return this.animate( props, speed, easing, callback ); }; } ); jQuery.timers = []; jQuery.fx.tick = function() { var timer, timers = jQuery.timers, i = 0; fxNow = jQuery.now(); for ( ; i < timers.length; i++ ) { timer = timers[ i ]; // Checks the timer has not already been removed if ( !timer() && timers[ i ] === timer ) { timers.splice( i--, 1 ); } } if ( !timers.length ) { jQuery.fx.stop(); } fxNow = undefined; }; jQuery.fx.timer = function( timer ) { jQuery.timers.push( timer ); if ( timer() ) { jQuery.fx.start(); } else { jQuery.timers.pop(); } }; jQuery.fx.interval = 13; jQuery.fx.start = function() { if ( !timerId ) { timerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval ); } }; jQuery.fx.stop = function() { window.clearInterval( timerId ); timerId = null; }; jQuery.fx.speeds = { slow: 600, fast: 200, // Default speed _default: 400 }; // Based off of the plugin by Clint Helfers, with permission. // http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ jQuery.fn.delay = function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; type = type || "fx"; return this.queue( type, function( next, hooks ) { var timeout = window.setTimeout( next, time ); hooks.stop = function() { window.clearTimeout( timeout ); }; } ); }; ( function() { var a, input = document.createElement( "input" ), div = document.createElement( "div" ), select = document.createElement( "select" ), opt = select.appendChild( document.createElement( "option" ) ); // 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 ]; // Support: Windows Web Apps (WWA) // `type` must use .setAttribute for WWA (#14901) input.setAttribute( "type", "checkbox" ); div.appendChild( input ); a = div.getElementsByTagName( "a" )[ 0 ]; // First batch of tests. 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" ) ); // Make sure that URLs aren't manipulated // (IE normalizes it by default) support.hrefNormalized = a.getAttribute( "href" ) === "/a"; // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) 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.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) select.disabled = true; support.optDisabled = !opt.disabled; // Support: IE8 only // Check if we can trust getAttribute("value") 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" ); 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 ) > -1 ); } } }; if ( !support.checkOn ) { jQuery.valHooks[ this ].get = function( elem ) { 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; jQuery.fn.extend( { attr: function( name, value ) { return access( this, jQuery.attr, name, value, arguments.length > 1 ); }, removeAttr: function( name ) { return this.each( function() { jQuery.removeAttr( this, name ); } ); } } ); jQuery.extend( { attr: function( elem, name, value ) { var ret, hooks, nType = elem.nodeType; // Don't get/set attributes on text, comment and attribute nodes if ( nType === 3 || nType === 8 || nType === 2 ) { return; } // Fallback to prop when attributes are not supported if ( typeof elem.getAttribute === "undefined" ) { return jQuery.prop( elem, name, value ); } // All attributes are lowercase // Grab necessary hook if one is defined if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { name = name.toLowerCase(); hooks = jQuery.attrHooks[ name ] || ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); } if ( value !== undefined ) { if ( value === null ) { jQuery.removeAttr( elem, name ); return; } if ( hooks && "set" in hooks && ( ret = hooks.set( elem, value, name ) ) !== undefined ) { return ret; } elem.setAttribute( name, value + "" ); return value; } if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { return ret; } ret = jQuery.find.attr( elem, name ); // Non-existent attributes return null, we normalize to undefined return ret == null ? undefined : ret; }, 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 IE8-9 // Reset value to default in case type is set after value during creation var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { elem.value = val; } return value; } } } }, removeAttr: function( elem, value ) { var name, propName, i = 0, attrNames = value && value.match( rnotwhite ); if ( attrNames && elem.nodeType === 1 ) { while ( ( name = attrNames[ i++ ] ) ) { propName = jQuery.propFix[ name ] || name; // 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.removeAttribute( getSetAttribute ? name : propName ); } } } } ); // 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 ); } else { // Support: IE<9 // Use defaultChecked and defaultSelected for oldIE elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; } return name; } }; jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { var getter = attrHandle[ name ] || jQuery.find.attr; if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { 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; }; } else { attrHandle[ name ] = 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 sensitivity in URL's, like in "background" return elem.style.cssText || undefined; }, set: function( elem, value ) { return ( elem.style.cssText = value + "" ); } }; } var rfocusable = /^(?:input|select|textarea|button|object)$/i, rclickable = /^(?:a|area)$/i; jQuery.fn.extend( { prop: function( name, value ) { return access( this, jQuery.prop, name, value, arguments.length > 1 ); }, 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 ) {} } ); } } ); jQuery.extend( { prop: function( elem, name, value ) { var ret, hooks, nType = elem.nodeType; // Don't get/set properties on text, comment and attribute nodes if ( nType === 3 || nType === 8 || nType === 2 ) { return; } if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { // Fix name and attach hooks name = jQuery.propFix[ name ] || name; hooks = jQuery.propHooks[ name ]; } if ( value !== undefined ) { if ( hooks && "set" in hooks && ( ret = hooks.set( elem, value, name ) ) !== undefined ) { return ret; } return ( elem[ name ] = value ); } if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { return ret; } return elem[ name ]; }, 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; } } }, propFix: { "for": "htmlFor", "class": "className" } } ); // 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; } } return null; } }; } jQuery.each( [ "tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable" ], function() { jQuery.propFix[ this.toLowerCase() ] = this; } ); // IE6/7 call enctype encoding if ( !support.enctype ) { jQuery.propFix.enctype = "encoding"; } var rclass = /[\t\r\n\f]/g; function getClass( elem ) { return jQuery.attr( elem, "class" ) || ""; } jQuery.fn.extend( { addClass: function( value ) { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; if ( jQuery.isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); } ); } if ( typeof value === "string" && value ) { classes = value.match( rnotwhite ) || []; while ( ( elem = this[ i++ ] ) ) { curValue = getClass( elem ); cur = elem.nodeType === 1 && ( " " + curValue + " " ).replace( rclass, " " ); if ( cur ) { j = 0; while ( ( clazz = classes[ j++ ] ) ) { if ( cur.indexOf( " " + clazz + " " ) < 0 ) { cur += clazz + " "; } } // only assign if different to avoid unneeded rendering. finalValue = jQuery.trim( cur ); if ( curValue !== finalValue ) { jQuery.attr( elem, "class", finalValue ); } } } } return this; }, removeClass: function( value ) { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; if ( jQuery.isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); } ); } if ( !arguments.length ) { return this.attr( "class", "" ); } if ( typeof value === "string" && value ) { classes = value.match( rnotwhite ) || []; while ( ( elem = this[ i++ ] ) ) { curValue = getClass( elem ); // This expression is here for better compressibility (see addClass) cur = elem.nodeType === 1 && ( " " + curValue + " " ).replace( rclass, " " ); if ( cur ) { j = 0; while ( ( clazz = classes[ j++ ] ) ) { // Remove *all* instances while ( cur.indexOf( " " + clazz + " " ) > -1 ) { cur = cur.replace( " " + clazz + " ", " " ); } } // Only assign if different to avoid unneeded rendering. finalValue = jQuery.trim( cur ); if ( curValue !== finalValue ) { jQuery.attr( elem, "class", finalValue ); } } } } return this; }, toggleClass: function( value, stateVal ) { var type = typeof value; if ( typeof stateVal === "boolean" && type === "string" ) { return stateVal ? this.addClass( value ) : this.removeClass( value ); } if ( jQuery.isFunction( value ) ) { return this.each( function( i ) { jQuery( this ).toggleClass( value.call( this, i, getClass( this ), stateVal ), stateVal ); } ); } return this.each( function() { var className, i, self, classNames; if ( type === "string" ) { // Toggle individual class names i = 0; self = jQuery( this ); classNames = value.match( rnotwhite ) || []; while ( ( className = classNames[ i++ ] ) ) { // Check each className given, space separated list if ( self.hasClass( className ) ) { self.removeClass( className ); } else { self.addClass( className ); } } // Toggle whole class name } else if ( value === undefined || type === "boolean" ) { className = getClass( this ); if ( className ) { // store className if set jQuery._data( this, "__className__", className ); } // 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. jQuery.attr( this, "class", className || value === false ? "" : jQuery._data( this, "__className__" ) || "" ); } } ); }, hasClass: function( selector ) { var className, elem, i = 0; className = " " + selector + " "; while ( ( elem = this[ i++ ] ) ) { if ( elem.nodeType === 1 && ( " " + getClass( elem ) + " " ).replace( rclass, " " ) .indexOf( className ) > -1 ) { return true; } } return false; } } ); // Return jQuery for attributes-only inclusion jQuery.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( i, name ) { // Handle event binding jQuery.fn[ name ] = function( data, fn ) { return arguments.length > 0 ? this.on( name, null, data, fn ) : this.trigger( name ); }; } ); jQuery.fn.extend( { hover: function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); } } ); var location = window.location; var nonce = jQuery.now(); var rquery = ( /\?/ ); var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g; 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 ); }; // Cross-browser xml parsing jQuery.parseXML = function( data ) { var xml, tmp; if ( !data || typeof data !== "string" ) { return null; } try { if ( window.DOMParser ) { // Standard tmp = new window.DOMParser(); xml = tmp.parseFromString( data, "text/xml" ); } else { // IE xml = new window.ActiveXObject( "Microsoft.XMLDOM" ); xml.async = "false"; xml.loadXML( data ); } } catch ( e ) { xml = undefined; } if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { jQuery.error( "Invalid XML: " + data ); } return xml; }; var rhash = /#.*$/, rts = /([?&])_=[^&]*/, // IE leaves an \r character at EOL rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // #7653, #8125, #8152: local protocol detection rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/, /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport * - AFTER param serialization (s.data is a string if s.processData is true) * 3) key is the dataType * 4) the catchall symbol "*" can be used * 5) execution will start with transport dataType and THEN continue down to "*" if needed */ prefilters = {}, /* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed */ transports = {}, // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression allTypes = "*/".concat( "*" ), // Document location ajaxLocation = location.href, // Segment location into parts ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || []; if ( jQuery.isFunction( func ) ) { // For each dataType in the dataTypeExpression while ( ( dataType = dataTypes[ i++ ] ) ) { // Prepend if requested if ( dataType.charAt( 0 ) === "+" ) { dataType = dataType.slice( 1 ) || "*"; ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); // Otherwise append } else { ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); } } } }; } // Base inspection function for prefilters and transports function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { var inspected = {}, seekingTransport = ( structure === transports ); function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { options.dataTypes.unshift( dataTypeOrTransport ); inspect( dataTypeOrTransport ); return false; } else if ( seekingTransport ) { return !( selected = dataTypeOrTransport ); } } ); return selected; } return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); } // A special extend for ajax options // that takes "flat" options (not to be deep extended) // Fixes #9887 function ajaxExtend( target, src ) { var deep, key, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } return target; } /* Handles responses to an ajax request: * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */ function ajaxHandleResponses( s, jqXHR, responses ) { var firstDataType, ct, finalDataType, type, contents = s.contents, dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process while ( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); } } // Check if we're dealing with a known content-type if ( ct ) { for ( type in contents ) { if ( contents[ type ] && contents[ type ].test( ct ) ) { dataTypes.unshift( type ); break; } } } // Check to see if we have a response for the expected dataType if ( dataTypes[ 0 ] in responses ) { finalDataType = dataTypes[ 0 ]; } else { // Try convertible dataTypes for ( type in responses ) { if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { finalDataType = type; break; } if ( !firstDataType ) { firstDataType = type; } } // Or just use first one finalDataType = finalDataType || firstDataType; } // If we found a dataType // We add the dataType to the list if needed // and return the corresponding response if ( finalDataType ) { if ( finalDataType !== dataTypes[ 0 ] ) { dataTypes.unshift( finalDataType ); } return responses[ finalDataType ]; } } /* Chain conversions given the request and the original response * Also sets the responseXXX fields on the jqXHR instance */ function ajaxConvert( s, response, jqXHR, isSuccess ) { var conv2, current, conv, tmp, prev, converters = {}, // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys if ( dataTypes[ 1 ] ) { for ( conv in s.converters ) { converters[ conv.toLowerCase() ] = s.converters[ conv ]; } } current = dataTypes.shift(); // Convert to each sequential dataType while ( current ) { if ( s.responseFields[ current ] ) { jqXHR[ s.responseFields[ current ] ] = response; } // Apply the dataFilter if provided if ( !prev && isSuccess && s.dataFilter ) { response = s.dataFilter( response, s.dataType ); } prev = current; current = dataTypes.shift(); if ( current ) { // There's only work to do if current dataType is non-auto if ( current === "*" ) { current = prev; // Convert response if prev dataType is non-auto and differs from current } else if ( prev !== "*" && prev !== current ) { // Seek a direct converter conv = converters[ prev + " " + current ] || converters[ "* " + current ]; // If none found, seek a pair if ( !conv ) { for ( conv2 in converters ) { // If conv2 outputs current tmp = conv2.split( " " ); if ( tmp[ 1 ] === current ) { // If prev can be converted to accepted input conv = converters[ prev + " " + tmp[ 0 ] ] || converters[ "* " + tmp[ 0 ] ]; if ( conv ) { // Condense equivalence converters if ( conv === true ) { conv = converters[ conv2 ]; // Otherwise, insert the intermediate dataType } else if ( converters[ conv2 ] !== true ) { current = tmp[ 0 ]; dataTypes.unshift( tmp[ 1 ] ); } break; } } } } // Apply converter (if not an equivalence) if ( conv !== true ) { // Unless errors are allowed to bubble, catch and return them if ( conv && s[ "throws" ] ) { // jscs:ignore requireDotNotation response = conv( response ); } else { try { response = conv( response ); } catch ( e ) { return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; } } } } } } return { state: "success", data: response }; } jQuery.extend( { // Counter for holding the number of active queries active: 0, // Last-Modified header cache for next request lastModified: {}, etag: {}, ajaxSettings: { url: ajaxLocation, type: "GET", isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), global: true, processData: true, async: true, contentType: "application/x-www-form-urlencoded; charset=UTF-8", /* timeout: 0, data: null, dataType: null, username: null, password: null, cache: null, throws: false, traditional: false, headers: {}, */ accepts: { "*": allTypes, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ }, responseFields: { xml: "responseXML", text: "responseText", json: "responseJSON" }, // Data converters // Keys separate source (or catchall "*") and destination types with a single space converters: { // Convert anything to text "* text": String, // Text to html (true = no transformation) "text html": true, // Evaluate text as a json expression "text json": jQuery.parseJSON, // Parse text as xml "text xml": jQuery.parseXML }, // For options that shouldn't be deep extended: // you can add your own custom options here if // and when you create one that shouldn't be // deep extended (see ajaxExtend) flatOptions: { url: true, context: true } }, // Creates a full fledged settings object into target // with both ajaxSettings and settings fields. // If target is omitted, writes into ajaxSettings. ajaxSetup: function( target, settings ) { return settings ? // Building a settings object ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : // Extending ajaxSettings ajaxExtend( jQuery.ajaxSettings, target ); }, ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), ajaxTransport: addToPrefiltersOrTransports( transports ), // Main method ajax: function( url, options ) { // If url is an object, simulate pre-1.5 signature if ( typeof url === "object" ) { options = url; url = undefined; } // Force options to be an object options = options || {}; var // Cross-domain detection vars parts, // Loop variable i, // URL without anti-cache param cacheURL, // Response headers as string responseHeadersString, // timeout handle timeoutTimer, // To know if global events are to be dispatched fireGlobals, transport, // Response headers responseHeaders, // Create the final options object s = jQuery.ajaxSetup( {}, options ), // Callbacks context callbackContext = s.context || s, // Context for global events is callbackContext if it is a DOM node or jQuery collection globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? jQuery( callbackContext ) : jQuery.event, // Deferreds deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks( "once memory" ), // Status-dependent callbacks statusCode = s.statusCode || {}, // Headers (they are sent all at once) requestHeaders = {}, requestHeadersNames = {}, // The jqXHR state state = 0, // Default abort message strAbort = "canceled", // Fake xhr jqXHR = { readyState: 0, // Builds headers hashtable if needed getResponseHeader: function( key ) { var match; if ( state === 2 ) { if ( !responseHeaders ) { responseHeaders = {}; while ( ( match = rheaders.exec( responseHeadersString ) ) ) { responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; } } match = responseHeaders[ key.toLowerCase() ]; } return match == null ? null : match; }, // Raw string getAllResponseHeaders: function() { return state === 2 ? responseHeadersString : null; }, // Caches the header setRequestHeader: function( name, value ) { var lname = name.toLowerCase(); if ( !state ) { name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; requestHeaders[ name ] = value; } return this; }, // Overrides response content-type header overrideMimeType: function( type ) { if ( !state ) { s.mimeType = type; } return this; }, // Status-dependent callbacks statusCode: function( map ) { var code; if ( map ) { if ( state < 2 ) { for ( code in map ) { // Lazy-add the new callback in a way that preserves old ones statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; } } else { // Execute the appropriate callbacks jqXHR.always( map[ jqXHR.status ] ); } } return this; }, // Cancel the request abort: function( statusText ) { var finalText = statusText || strAbort; if ( transport ) { transport.abort( finalText ); } done( 0, finalText ); return this; } }; // Attach deferreds deferred.promise( jqXHR ).complete = completeDeferred.add; jqXHR.success = jqXHR.done; jqXHR.error = jqXHR.fail; // Remove hash character (#7531: and string promotion) // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) // 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 ] + "//" ); // Alias method option to type as per ticket #12004 s.type = options.method || options.type || s.method || s.type; // Extract dataTypes list s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ]; // A cross-domain request is in order when we have a protocol:host:port mismatch if ( s.crossDomain == null ) { parts = rurl.exec( s.url.toLowerCase() ); s.crossDomain = !!( parts && ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !== ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) ) ); } // Convert data if not already a string if ( s.data && s.processData && typeof s.data !== "string" ) { s.data = jQuery.param( s.data, s.traditional ); } // Apply prefilters inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); // If request was aborted inside a prefilter, stop there if ( state === 2 ) { return jqXHR; } // We can fire global events as of now if asked to // 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 ) { jQuery.event.trigger( "ajaxStart" ); } // Uppercase the type s.type = s.type.toUpperCase(); // Determine if request has content s.hasContent = !rnoContent.test( s.type ); // Save the URL in case we're toying with the If-Modified-Since // and/or If-None-Match header later on cacheURL = s.url; // More options handling for requests with no content if ( !s.hasContent ) { // If data is available, append data to url if ( s.data ) { cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); // #9682: remove data so that it's not used in an eventual retry delete s.data; } // Add anti-cache in url if needed if ( s.cache === false ) { s.url = rts.test( cacheURL ) ? // If there is already a '_' parameter, set its value cacheURL.replace( rts, "$1_=" + nonce++ ) : // Otherwise add one to the end cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++; } } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { if ( jQuery.lastModified[ cacheURL ] ) { jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); } if ( jQuery.etag[ cacheURL ] ) { jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); } } // Set the correct header, if data is being sent if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { jqXHR.setRequestHeader( "Content-Type", s.contentType ); } // Set the Accepts header for the server, depending on the dataType jqXHR.setRequestHeader( "Accept", s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? s.accepts[ s.dataTypes[ 0 ] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : s.accepts[ "*" ] ); // Check for headers option for ( i in s.headers ) { jqXHR.setRequestHeader( i, s.headers[ i ] ); } // Allow custom headers/mimetypes and early abort if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { // Abort if not done already and return return jqXHR.abort(); } // aborting is no longer a cancellation strAbort = "abort"; // Install callbacks on deferreds for ( i in { success: 1, error: 1, complete: 1 } ) { jqXHR[ i ]( s[ i ] ); } // Get transport transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); // If no transport, we auto-abort if ( !transport ) { done( -1, "No Transport" ); } else { jqXHR.readyState = 1; // Send global event if ( fireGlobals ) { globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); } // If request was aborted inside ajaxSend, stop there if ( state === 2 ) { return jqXHR; } // Timeout if ( s.async && s.timeout > 0 ) { timeoutTimer = window.setTimeout( function() { jqXHR.abort( "timeout" ); }, s.timeout ); } try { state = 1; transport.send( requestHeaders, done ); } catch ( e ) { // Propagate exception as error if not done if ( state < 2 ) { done( -1, e ); // Simply rethrow otherwise } else { throw e; } } } // Callback for when everything is done function done( status, nativeStatusText, responses, headers ) { var isSuccess, success, error, response, modified, statusText = nativeStatusText; // Called once if ( state === 2 ) { return; } // State is "done" now state = 2; // Clear timeout if it exists if ( timeoutTimer ) { window.clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection // (no matter how long the jqXHR object will be used) transport = undefined; // Cache response headers responseHeadersString = headers || ""; // Set readyState jqXHR.readyState = status > 0 ? 4 : 0; // Determine if successful isSuccess = status >= 200 && status < 300 || status === 304; // Get response data if ( responses ) { response = ajaxHandleResponses( s, jqXHR, responses ); } // Convert no matter what (that way responseXXX fields are always set) response = ajaxConvert( s, response, jqXHR, isSuccess ); // If successful, handle type chaining if ( isSuccess ) { // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { modified = jqXHR.getResponseHeader( "Last-Modified" ); if ( modified ) { jQuery.lastModified[ cacheURL ] = modified; } modified = jqXHR.getResponseHeader( "etag" ); if ( modified ) { jQuery.etag[ cacheURL ] = modified; } } // if no content if ( status === 204 || s.type === "HEAD" ) { statusText = "nocontent"; // if not modified } else if ( status === 304 ) { statusText = "notmodified"; // If we have data, let's convert it } else { statusText = response.state; success = response.data; error = response.error; isSuccess = !error; } } else { // We extract error from statusText // then normalize statusText and status for non-aborts error = statusText; if ( status || !statusText ) { statusText = "error"; if ( status < 0 ) { status = 0; } } } // Set data for the fake xhr object jqXHR.status = status; jqXHR.statusText = ( nativeStatusText || statusText ) + ""; // Success/Error if ( isSuccess ) { deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); } else { deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); } // Status-dependent callbacks jqXHR.statusCode( statusCode ); statusCode = undefined; if ( fireGlobals ) { globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", [ jqXHR, s, isSuccess ? success : error ] ); } // Complete completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); // Handle the global AJAX counter if ( !( --jQuery.active ) ) { jQuery.event.trigger( "ajaxStop" ); } } } return jqXHR; }, getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "json" ); }, getScript: function( url, callback ) { return jQuery.get( url, undefined, callback, "script" ); } } ); jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { // shift arguments if data argument was omitted if ( jQuery.isFunction( data ) ) { type = type || callback; callback = data; data = undefined; } // The url can be an options object (which then must have .url) return jQuery.ajax( jQuery.extend( { url: url, type: method, dataType: type, data: data, success: callback }, jQuery.isPlainObject( url ) && url ) ); }; } ); jQuery._evalUrl = function( url ) { return jQuery.ajax( { url: url, // Make this explicit, since user can override this through ajaxSetup (#11264) type: "GET", dataType: "script", cache: true, async: false, global: false, "throws": true } ); }; jQuery.fn.extend( { wrapAll: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each( function( i ) { jQuery( this ).wrapAll( html.call( this, i ) ); } ); } if ( this[ 0 ] ) { // The elements to wrap the target around var wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); if ( this[ 0 ].parentNode ) { wrap.insertBefore( this[ 0 ] ); } wrap.map( function() { var elem = this; while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { elem = elem.firstChild; } return elem; } ).append( this ); } return this; }, wrapInner: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each( function( i ) { jQuery( this ).wrapInner( html.call( this, i ) ); } ); } return this.each( function() { var self = jQuery( this ), contents = self.contents(); if ( contents.length ) { contents.wrapAll( html ); } else { self.append( html ); } } ); }, wrap: function( html ) { var isFunction = jQuery.isFunction( html ); return this.each( function( i ) { jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html ); } ); }, unwrap: function() { return this.parent().each( function() { if ( !jQuery.nodeName( this, "body" ) ) { jQuery( this ).replaceWith( this.childNodes ); } } ).end(); } } ); function getDisplay( elem ) { return elem.style && elem.style.display || jQuery.css( elem, "display" ); } function filterHidden( elem ) { while ( elem && elem.nodeType === 1 ) { if ( getDisplay( elem ) === "none" || elem.type === "hidden" ) { return true; } elem = elem.parentNode; } return false; } jQuery.expr.filters.hidden = function( elem ) { // Support: Opera <= 12.12 // Opera reports offsetWidths and offsetHeights less than zero on some elements return support.reliableHiddenOffsets() ? ( elem.offsetWidth <= 0 && elem.offsetHeight <= 0 && !elem.getClientRects().length ) : filterHidden( elem ); }; jQuery.expr.filters.visible = function( elem ) { return !jQuery.expr.filters.hidden( elem ); }; var r20 = /%20/g, rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i; function buildParams( prefix, obj, traditional, add ) { var name; if ( jQuery.isArray( obj ) ) { // Serialize array item. jQuery.each( obj, function( i, v ) { if ( traditional || rbracket.test( prefix ) ) { // Treat each array item as a scalar. add( prefix, v ); } else { // Item is non-scalar (array or object), encode its numeric index. buildParams( prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", v, traditional, add ); } } ); } else if ( !traditional && jQuery.type( obj ) === "object" ) { // Serialize object item. for ( name in obj ) { buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); } } else { // Serialize scalar item. add( prefix, obj ); } } // Serialize an array of form elements or a set of // key/values into a query string jQuery.param = function( a, traditional ) { var prefix, s = [], add = function( key, value ) { // If value is a function, invoke it and return its value value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); }; // Set traditional to true for jQuery <= 1.3.2 behavior. if ( traditional === undefined ) { traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; } // If an array was passed in, assume that it is an array of form elements. if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { // Serialize the form elements jQuery.each( a, function() { add( this.name, this.value ); } ); } else { // If traditional, encode the "old" way (the way 1.3.2 or older // did it), otherwise encode params recursively. for ( prefix in a ) { buildParams( prefix, a[ prefix ], traditional, add ); } } // Return the resulting serialization return s.join( "&" ).replace( r20, "+" ); }; jQuery.fn.extend( { serialize: function() { return jQuery.param( this.serializeArray() ); }, serializeArray: function() { return this.map( function() { // Can add propHook for "elements" to filter or add form elements var elements = jQuery.prop( this, "elements" ); return elements ? jQuery.makeArray( elements ) : this; } ) .filter( function() { var type = this.type; // 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 ) ); } ) .map( function( i, elem ) { var val = jQuery( this ).val(); return val == null ? null : jQuery.isArray( val ) ? jQuery.map( val, function( val ) { return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; } ) : { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; } ).get(); } } ); // Create the request object // (This is still attached to ajaxSettings for backward compatibility) jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ? // Support: IE6-IE8 function() { // XHR cannot access local files, always use ActiveX for that case if ( this.isLocal ) { return createActiveXHR(); } // Support: IE 9-11 // IE seems to error on cross-domain PATCH requests when ActiveX XHR // is used. In IE 9+ always use the native XHR. // Note: this condition won't catch Edge as it doesn't define // document.documentMode but it also doesn't support ActiveX so it won't // reach this code. if ( document.documentMode > 8 ) { return createStandardXHR(); } // Support: IE<9 // 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" return /^(get|post|head|put|delete|options)$/i.test( this.type ) && createStandardXHR() || createActiveXHR(); } : // For all other browsers, use the standard XMLHttpRequest object createStandardXHR; var xhrId = 0, xhrCallbacks = {}, xhrSupported = jQuery.ajaxSettings.xhr(); // Support: IE<10 // Open requests must be manually aborted on unload (#5280) // 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 ); } } ); } // 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 ) { 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 ]; } } // Override mime type if needed if ( options.mimeType && xhr.overrideMimeType ) { xhr.overrideMimeType( options.mimeType ); } // 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"; } // 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 ] + "" ); } } // 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 ); // Listener callback = function( _, isAbort ) { var status, statusText, responses; // Was never called and is aborted or complete if ( callback && ( isAbort || xhr.readyState === 4 ) ) { // Clean up delete xhrCallbacks[ id ]; callback = undefined; xhr.onreadystatechange = jQuery.noop; // Abort manually if needed if ( isAbort ) { if ( xhr.readyState !== 4 ) { xhr.abort(); } } 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; } } } // Call complete if needed if ( responses ) { complete( status, statusText, responses, xhr.getAllResponseHeaders() ); } }; // Do send the request // `xhr.send` may raise an exception, but it will be // handled in jQuery.ajax (so no try/catch here) 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 window.setTimeout( callback ); } else { // Register the callback, but delay it in case `xhr.send` throws // Add to the list of active xhr callbacks xhr.onreadystatechange = xhrCallbacks[ id ] = callback; } }, abort: function() { if ( callback ) { callback( undefined, true ); } } }; } } ); } // Functions to create xhrs function createStandardXHR() { try { return new window.XMLHttpRequest(); } catch ( e ) {} } function createActiveXHR() { try { return new window.ActiveXObject( "Microsoft.XMLHTTP" ); } catch ( e ) {} } // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) jQuery.ajaxPrefilter( function( s ) { if ( s.crossDomain ) { s.contents.script = false; } } ); // Install script dataType jQuery.ajaxSetup( { accepts: { script: "text/javascript, application/javascript, " + "application/ecmascript, application/x-ecmascript" }, contents: { script: /\b(?:java|ecma)script\b/ }, converters: { "text script": function( text ) { jQuery.globalEval( text ); return text; } } } ); // Handle cache's special case and global 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 ) { // This transport only deals with cross domain requests if ( s.crossDomain ) { var script, head = document.head || jQuery( "head" )[ 0 ] || document.documentElement; 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" ); } } }; // 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 ); }, abort: function() { if ( script ) { script.onload( undefined, true ); } } }; } } ); var oldCallbacks = [], rjsonp = /(=)\?(?=&|$)|\?\?/; // Default jsonp settings jQuery.ajaxSetup( { jsonp: "callback", jsonpCallback: function() { var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); this[ callback ] = true; return callback; } } ); // Detect, normalize options and install callbacks for jsonp requests jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? "url" : typeof s.data === "string" && ( s.contentType || "" ) .indexOf( "application/x-www-form-urlencoded" ) === 0 && rjsonp.test( s.data ) && "data" ); // Handle iff the expected data type is "jsonp" or we have a parameter to set if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { // Get callback name, remembering preexisting value associated with it callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback; // Insert callback into url or form data if ( jsonProp ) { s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); } else if ( s.jsonp !== false ) { s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; } // Use data converter to retrieve json after script execution s.converters[ "script json" ] = function() { if ( !responseContainer ) { jQuery.error( callbackName + " was not called" ); } return responseContainer[ 0 ]; }; // force json dataType s.dataTypes[ 0 ] = "json"; // Install callback overwritten = window[ callbackName ]; window[ callbackName ] = function() { responseContainer = arguments; }; // Clean-up function (fires after converters) jqXHR.always( function() { // If previous value didn't exist - remove it if ( overwritten === undefined ) { jQuery( window ).removeProp( callbackName ); // Otherwise restore preexisting value } else { window[ callbackName ] = overwritten; } // Save back as free if ( s[ callbackName ] ) { // make sure that re-using the options doesn't screw things around s.jsonpCallback = originalSettings.jsonpCallback; // save the callback name for future use oldCallbacks.push( callbackName ); } // Call if it was a function and we have a response if ( responseContainer && jQuery.isFunction( overwritten ) ) { overwritten( responseContainer[ 0 ] ); } responseContainer = overwritten = undefined; } ); // Delegate to script return "script"; } } ); // Support: Safari 8+ // In Safari 8 documents created via document.implementation.createHTMLDocument // collapse sibling forms: the second one becomes a child of the first one. // Because of that, this security measure has to be disabled in Safari 8. // https://bugs.webkit.org/show_bug.cgi?id=137337 support.createHTMLDocument = ( function() { if ( !document.implementation.createHTMLDocument ) { return false; } var doc = document.implementation.createHTMLDocument( "" ); doc.body.innerHTML = "<form></form><form></form>"; return doc.body.childNodes.length === 2; } )(); // data: string of html // context (optional): If specified, the fragment will be created in this context, // defaults to document // keepScripts (optional): If true, will include scripts passed in the html string jQuery.parseHTML = function( data, context, keepScripts ) { if ( !data || typeof data !== "string" ) { return null; } if ( typeof context === "boolean" ) { keepScripts = context; context = false; } // document.implementation stops scripts or inline event handlers from // being executed immediately context = context || ( support.createHTMLDocument ? document.implementation.createHTMLDocument( "" ) : document ); var parsed = rsingleTag.exec( data ), scripts = !keepScripts && []; // Single tag if ( parsed ) { return [ context.createElement( parsed[ 1 ] ) ]; } parsed = buildFragment( [ data ], context, scripts ); if ( scripts && scripts.length ) { jQuery( scripts ).remove(); } return jQuery.merge( [], parsed.childNodes ); }; // Keep a copy of the old load method var _load = jQuery.fn.load; /** * Load a url into a page */ jQuery.fn.load = function( url, params, callback ) { if ( typeof url !== "string" && _load ) { return _load.apply( this, arguments ); } var selector, type, response, self = this, off = url.indexOf( " " ); if ( off > -1 ) { selector = jQuery.trim( url.slice( off, url.length ) ); url = url.slice( 0, off ); } // If it's a function if ( jQuery.isFunction( params ) ) { // We assume that it's the callback callback = params; params = undefined; // Otherwise, build a param string } else if ( params && typeof params === "object" ) { type = "POST"; } // If we have elements to modify, make the request if ( self.length > 0 ) { jQuery.ajax( { url: url, // If "type" variable is undefined, then "GET" method will be used. // Make value of this field explicit since // user can override it through ajaxSetup method type: type || "GET", dataType: "html", data: params } ).done( function( responseText ) { // Save response for use in complete callback response = arguments; self.html( selector ? // If a selector was specified, locate the right elements in a dummy div // Exclude scripts to avoid IE 'Permission Denied' errors jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : // Otherwise use the full result responseText ); // If the request succeeds, this function gets "data", "status", "jqXHR" // but they are ignored because response was set above. // If it fails, this function gets "jqXHR", "status", "error" } ).always( callback && function( jqXHR, status ) { self.each( function() { callback.apply( self, response || [ jqXHR.responseText, status, jqXHR ] ); } ); } ); } return this; }; // 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; } ).length; }; /** * Gets a window from an element */ function getWindow( elem ) { return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false; } jQuery.offset = { setOffset: function( elem, options, i ) { var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, position = jQuery.css( elem, "position" ), curElem = jQuery( elem ), props = {}; // set position first, in-case top/left are set even on static elem if ( position === "static" ) { elem.style.position = "relative"; } curOffset = curElem.offset(); curCSSTop = jQuery.css( elem, "top" ); curCSSLeft = jQuery.css( elem, "left" ); calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray( "auto", [ curCSSTop, curCSSLeft ] ) > -1; // 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; } if ( jQuery.isFunction( options ) ) { // Use jQuery.extend here to allow modification of coordinates argument (gh-1848) options = options.call( elem, i, jQuery.extend( {}, curOffset ) ); } if ( options.top != null ) { props.top = ( options.top - curOffset.top ) + curTop; } if ( options.left != null ) { props.left = ( options.left - curOffset.left ) + curLeft; } if ( "using" in options ) { options.using.call( elem, props ); } else { curElem.css( props ); } } }; jQuery.fn.extend( { offset: function( options ) { if ( arguments.length ) { return options === undefined ? this : this.each( function( i ) { jQuery.offset.setOffset( this, options, i ); } ); } var docElem, win, box = { top: 0, left: 0 }, elem = this[ 0 ], doc = elem && elem.ownerDocument; if ( !doc ) { return; } docElem = doc.documentElement; // Make sure it's not a disconnected DOM node if ( !jQuery.contains( docElem, elem ) ) { return box; } // If we don't have gBCR, just use 0,0 rather than error // BlackBerry 5, iOS 3 (original iPhone) if ( typeof elem.getBoundingClientRect !== "undefined" ) { 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 ) }; }, position: function() { if ( !this[ 0 ] ) { return; } var offsetParent, offset, parentOffset = { top: 0, left: 0 }, elem = this[ 0 ]; // 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 offset = elem.getBoundingClientRect(); } else { // Get *real* offsetParent offsetParent = this.offsetParent(); // Get correct offsets offset = this.offset(); if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { parentOffset = offsetParent.offset(); } // Add offsetParent borders 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 ) }; }, offsetParent: function() { return this.map( function() { var offsetParent = this.offsetParent; while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) { offsetParent = offsetParent.offsetParent; } return offsetParent || documentElement; } ); } } ); // Create scrollLeft and scrollTop methods jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { var top = /Y/.test( 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 ]; } if ( win ) { win.scrollTo( !top ? val : jQuery( win ).scrollLeft(), top ? val : jQuery( win ).scrollTop() ); } else { elem[ method ] = val; } }, method, val, arguments.length, null ); }; } ); // Support: Safari<7-8+, Chrome<37-44+ // 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 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 return rnumnonpx.test( computed ) ? jQuery( elem ).position()[ prop ] + "px" : computed; } } ); } ); // 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 jQuery.fn[ funcName ] = function( margin, value ) { var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); return access( this, function( elem, type, value ) { var doc; if ( jQuery.isWindow( elem ) ) { // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there // isn't a whole lot we can do. See pull request at this URL for discussion: // https://github.com/jquery/jquery/pull/764 return elem.document.documentElement[ "client" + name ]; } // Get document width or height 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. return Math.max( elem.body[ "scroll" + name ], doc[ "scroll" + name ], elem.body[ "offset" + name ], doc[ "offset" + name ], doc[ "client" + name ] ); } return value === undefined ? // Get width or height on the element, requesting but not forcing parseFloat jQuery.css( elem, type, extra ) : // Set width or height on the element jQuery.style( elem, type, value, extra ); }, type, chainable ? margin : undefined, chainable, null ); }; } ); } ); jQuery.fn.extend( { bind: function( types, data, fn ) { return this.on( types, null, data, fn ); }, unbind: function( types, fn ) { return this.off( types, null, fn ); }, delegate: function( selector, types, data, fn ) { return this.on( types, selector, data, fn ); }, undelegate: function( selector, types, fn ) { // ( namespace ) or ( selector, types [, fn] ) return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); } } ); // The number of elements contained in the matched element set jQuery.fn.size = function() { return this.length; }; jQuery.fn.andSelf = jQuery.fn.addBack; // Register as a named AMD module, since jQuery can be concatenated with other // files that may use define, but not via a proper concatenation script that // understands anonymous AMD modules. A named AMD is safest and most robust // way to register. Lowercase jquery is used because AMD module names are // derived from file names, and jQuery is normally delivered in a lowercase // file name. Do this after creating the global so that if an AMD module wants // to call noConflict to hide this version of jQuery, it will work. // Note that for maximum portability, libraries that are not jQuery should // declare themselves as anonymous modules, and avoid setting a global if an // AMD loader is present. jQuery is a special case. For more information, see // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon if ( typeof define === "function" && define.amd ) { define( "jquery", [], function() { return jQuery; } ); } var // Map over jQuery in case of overwrite _jQuery = window.jQuery, // Map over the $ in case of overwrite _$ = window.$; jQuery.noConflict = function( deep ) { if ( window.$ === jQuery ) { window.$ = _$; } if ( deep && window.jQuery === jQuery ) { window.jQuery = _jQuery; } return jQuery; }; // Expose jQuery and $ identifiers, even in // AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557) // and CommonJS for browser emulators (#13566) if ( !noGlobal ) { window.jQuery = window.$ = jQuery; } return jQuery; })); (function($, undefined) { /** * Unobtrusive scripting adapter for jQuery * https://github.com/rails/jquery-ujs * * Requires jQuery 1.8.0 or later. * * Released under the MIT license * */ // Cut down on the number of issues from people inadvertently including jquery_ujs twice // by detecting and raising an error when it happens. 'use strict'; if ( $.rails !== undefined ) { $.error('jquery-ujs has already been loaded!'); } // Shorthand to make it a little easier to call public rails functions from within rails.js var rails; var $document = $(document); $.rails = rails = { // Link elements bound by jquery-ujs linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]', // Button elements bound by jquery-ujs buttonClickSelector: 'button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)', // Select elements bound by jquery-ujs inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]', // Form elements bound by jquery-ujs formSubmitSelector: 'form', // Form input elements bound by jquery-ujs formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])', // Form input elements disabled during form submission disableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled', // Form input elements re-enabled after form submission enableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled', // Form required input elements requiredInputSelector: 'input[name][required]:not([disabled]), textarea[name][required]:not([disabled])', // Form file input elements fileInputSelector: 'input[type=file]:not([disabled])', // Link onClick disable selector with possible reenable after remote submission linkDisableSelector: 'a[data-disable-with], a[data-disable]', // Button onClick disable selector with possible reenable after remote submission buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]', // Up-to-date Cross-Site Request Forgery token csrfToken: function() { return $('meta[name=csrf-token]').attr('content'); }, // URL param that must contain the CSRF token csrfParam: function() { return $('meta[name=csrf-param]').attr('content'); }, // Make sure that every Ajax request sends the CSRF token CSRFProtection: function(xhr) { var token = rails.csrfToken(); if (token) xhr.setRequestHeader('X-CSRF-Token', token); }, // Make sure that all forms have actual up-to-date tokens (cached forms contain old ones) refreshCSRFTokens: function(){ $('form input[name="' + rails.csrfParam() + '"]').val(rails.csrfToken()); }, // Triggers an event on an element and returns false if the event result is false fire: function(obj, name, data) { var event = $.Event(name); obj.trigger(event, data); return event.result !== false; }, // Default confirm dialog, may be overridden with custom confirm dialog in $.rails.confirm confirm: function(message) { return confirm(message); }, // Default ajax function, may be overridden with custom function in $.rails.ajax ajax: function(options) { return $.ajax(options); }, // Default way to get an element's href. May be overridden at $.rails.href. href: function(element) { return element[0].href; }, // Checks "data-remote" if true to handle the request through a XHR request. isRemote: function(element) { return element.data('remote') !== undefined && element.data('remote') !== false; }, // Submits "remote" forms and links with ajax handleRemote: function(element) { var method, url, data, withCredentials, dataType, options; if (rails.fire(element, 'ajax:before')) { withCredentials = element.data('with-credentials') || null; dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType); if (element.is('form')) { method = element.data('ujs:submit-button-formmethod') || element.attr('method'); url = element.data('ujs:submit-button-formaction') || element.attr('action'); data = $(element[0]).serializeArray(); // memoized value from clicked submit button var button = element.data('ujs:submit-button'); if (button) { data.push(button); element.data('ujs:submit-button', null); } element.data('ujs:submit-button-formmethod', null); element.data('ujs:submit-button-formaction', null); } else if (element.is(rails.inputChangeSelector)) { method = element.data('method'); url = element.data('url'); data = element.serialize(); if (element.data('params')) data = data + '&' + element.data('params'); } else if (element.is(rails.buttonClickSelector)) { method = element.data('method') || 'get'; url = element.data('url'); data = element.serialize(); if (element.data('params')) data = data + '&' + element.data('params'); } else { method = element.data('method'); url = rails.href(element); data = element.data('params') || null; } options = { type: method || 'GET', data: data, dataType: dataType, // stopping the "ajax:beforeSend" event will cancel the ajax request beforeSend: function(xhr, settings) { if (settings.dataType === undefined) { xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script); } if (rails.fire(element, 'ajax:beforeSend', [xhr, settings])) { element.trigger('ajax:send', xhr); } else { return false; } }, success: function(data, status, xhr) { element.trigger('ajax:success', [data, status, xhr]); }, complete: function(xhr, status) { element.trigger('ajax:complete', [xhr, status]); }, error: function(xhr, status, error) { element.trigger('ajax:error', [xhr, status, error]); }, crossDomain: rails.isCrossDomain(url) }; // There is no withCredentials for IE6-8 when // "Enable native XMLHTTP support" is disabled if (withCredentials) { options.xhrFields = { withCredentials: withCredentials }; } // Only pass url to `ajax` options if not blank if (url) { options.url = url; } return rails.ajax(options); } else { return false; } }, // Determines if the request is a cross domain request. isCrossDomain: function(url) { var originAnchor = document.createElement('a'); originAnchor.href = location.href; var urlAnchor = document.createElement('a'); try { urlAnchor.href = url; // This is a workaround to a IE bug. urlAnchor.href = urlAnchor.href; // If URL protocol is false or is a string containing a single colon // *and* host are false, assume it is not a cross-domain request // (should only be the case for IE7 and IE compatibility mode). // Otherwise, evaluate protocol and host of the URL against the origin // protocol and host. return !(((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host) || (originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host)); } catch (e) { // If there is an error parsing the URL, assume it is crossDomain. return true; } }, // Handles "data-method" on links such as: // <a href="/users/5" data-method="delete" rel="nofollow" data-confirm="Are you sure?">Delete</a> handleMethod: function(link) { var href = rails.href(link), method = link.data('method'), target = link.attr('target'), csrfToken = rails.csrfToken(), csrfParam = rails.csrfParam(), form = $('<form method="post" action="' + href + '"></form>'), metadataInput = '<input name="_method" value="' + method + '" type="hidden" />'; if (csrfParam !== undefined && csrfToken !== undefined && !rails.isCrossDomain(href)) { metadataInput += '<input name="' + csrfParam + '" value="' + csrfToken + '" type="hidden" />'; } if (target) { form.attr('target', target); } form.hide().append(metadataInput).appendTo('body'); form.submit(); }, // Helper function that returns form elements that match the specified CSS selector // If form is actually a "form" element this will return associated elements outside the from that have // the html form attribute set formElements: function(form, selector) { return form.is('form') ? $(form[0].elements).filter(selector) : form.find(selector); }, /* Disables form elements: - Caches element value in 'ujs:enable-with' data store - Replaces element text with value of 'data-disable-with' attribute - Sets disabled property to true */ disableFormElements: function(form) { rails.formElements(form, rails.disableSelector).each(function() { rails.disableFormElement($(this)); }); }, disableFormElement: function(element) { var method, replacement; method = element.is('button') ? 'html' : 'val'; replacement = element.data('disable-with'); if (replacement !== undefined) { element.data('ujs:enable-with', element[method]()); element[method](replacement); } element.prop('disabled', true); element.data('ujs:disabled', true); }, /* Re-enables disabled form elements: - Replaces element text with cached value from 'ujs:enable-with' data store (created in `disableFormElements`) - Sets disabled property to false */ enableFormElements: function(form) { rails.formElements(form, rails.enableSelector).each(function() { rails.enableFormElement($(this)); }); }, enableFormElement: function(element) { var method = element.is('button') ? 'html' : 'val'; if (element.data('ujs:enable-with') !== undefined) { element[method](element.data('ujs:enable-with')); element.removeData('ujs:enable-with'); // clean up cache } element.prop('disabled', false); element.removeData('ujs:disabled'); }, /* For 'data-confirm' attribute: - Fires `confirm` event - Shows the confirmation dialog - Fires the `confirm:complete` event Returns `true` if no function stops the chain and user chose yes; `false` otherwise. Attaching a handler to the element's `confirm` event that returns a `falsy` value cancels the confirmation dialog. Attaching a handler to the element's `confirm:complete` event that returns a `falsy` value makes this function return false. The `confirm:complete` event is fired whether or not the user answered true or false to the dialog. */ allowAction: function(element) { var message = element.data('confirm'), answer = false, callback; if (!message) { return true; } if (rails.fire(element, 'confirm')) { try { answer = rails.confirm(message); } catch (e) { (console.error || console.log).call(console, e.stack || e); } callback = rails.fire(element, 'confirm:complete', [answer]); } return answer && callback; }, // Helper function which checks for blank inputs in a form that match the specified CSS selector blankInputs: function(form, specifiedSelector, nonBlank) { var foundInputs = $(), input, valueToCheck, radiosForNameWithNoneSelected, radioName, selector = specifiedSelector || 'input,textarea', requiredInputs = form.find(selector), checkedRadioButtonNames = {}; requiredInputs.each(function() { input = $(this); if (input.is('input[type=radio]')) { // Don't count unchecked required radio as blank if other radio with same name is checked, // regardless of whether same-name radio input has required attribute or not. The spec // states https://www.w3.org/TR/html5/forms.html#the-required-attribute radioName = input.attr('name'); // Skip if we've already seen the radio with this name. if (!checkedRadioButtonNames[radioName]) { // If none checked if (form.find('input[type=radio]:checked[name="' + radioName + '"]').length === 0) { radiosForNameWithNoneSelected = form.find( 'input[type=radio][name="' + radioName + '"]'); foundInputs = foundInputs.add(radiosForNameWithNoneSelected); } // We only need to check each name once. checkedRadioButtonNames[radioName] = radioName; } } else { valueToCheck = input.is('input[type=checkbox],input[type=radio]') ? input.is(':checked') : !!input.val(); if (valueToCheck === nonBlank) { foundInputs = foundInputs.add(input); } } }); return foundInputs.length ? foundInputs : false; }, // Helper function which checks for non-blank inputs in a form that match the specified CSS selector nonBlankInputs: function(form, specifiedSelector) { return rails.blankInputs(form, specifiedSelector, true); // true specifies nonBlank }, // Helper function, needed to provide consistent behavior in IE stopEverything: function(e) { $(e.target).trigger('ujs:everythingStopped'); e.stopImmediatePropagation(); return false; }, // Replace element's html with the 'data-disable-with' after storing original html // and prevent clicking on it disableElement: function(element) { var replacement = element.data('disable-with'); if (replacement !== undefined) { element.data('ujs:enable-with', element.html()); // store enabled state element.html(replacement); } element.bind('click.railsDisable', function(e) { // prevent further clicking return rails.stopEverything(e); }); element.data('ujs:disabled', true); }, // Restore element to its original state which was disabled by 'disableElement' above enableElement: function(element) { if (element.data('ujs:enable-with') !== undefined) { element.html(element.data('ujs:enable-with')); // set to old enabled state element.removeData('ujs:enable-with'); // clean up cache } element.unbind('click.railsDisable'); // enable element element.removeData('ujs:disabled'); } }; if (rails.fire($document, 'rails:attachBindings')) { $.ajaxPrefilter(function(options, originalOptions, xhr){ if ( !options.crossDomain ) { rails.CSRFProtection(xhr); }}); // This event works the same as the load event, except that it fires every // time the page is loaded. // // See https://github.com/rails/jquery-ujs/issues/357 // See https://developer.mozilla.org/en-US/docs/Using_Firefox_1.5_caching $(window).on('pageshow.rails', function () { $($.rails.enableSelector).each(function () { var element = $(this); if (element.data('ujs:disabled')) { $.rails.enableFormElement(element); } }); $($.rails.linkDisableSelector).each(function () { var element = $(this); if (element.data('ujs:disabled')) { $.rails.enableElement(element); } }); }); $document.delegate(rails.linkDisableSelector, 'ajax:complete', function() { rails.enableElement($(this)); }); $document.delegate(rails.buttonDisableSelector, 'ajax:complete', function() { rails.enableFormElement($(this)); }); $document.delegate(rails.linkClickSelector, 'click.rails', function(e) { var link = $(this), method = link.data('method'), data = link.data('params'), metaClick = e.metaKey || e.ctrlKey; if (!rails.allowAction(link)) return rails.stopEverything(e); if (!metaClick && link.is(rails.linkDisableSelector)) rails.disableElement(link); if (rails.isRemote(link)) { if (metaClick && (!method || method === 'GET') && !data) { return true; } var handleRemote = rails.handleRemote(link); // Response from rails.handleRemote() will either be false or a deferred object promise. if (handleRemote === false) { rails.enableElement(link); } else { handleRemote.fail( function() { rails.enableElement(link); } ); } return false; } else if (method) { rails.handleMethod(link); return false; } }); $document.delegate(rails.buttonClickSelector, 'click.rails', function(e) { var button = $(this); if (!rails.allowAction(button) || !rails.isRemote(button)) return rails.stopEverything(e); if (button.is(rails.buttonDisableSelector)) rails.disableFormElement(button); var handleRemote = rails.handleRemote(button); // Response from rails.handleRemote() will either be false or a deferred object promise. if (handleRemote === false) { rails.enableFormElement(button); } else { handleRemote.fail( function() { rails.enableFormElement(button); } ); } return false; }); $document.delegate(rails.inputChangeSelector, 'change.rails', function(e) { var link = $(this); if (!rails.allowAction(link) || !rails.isRemote(link)) return rails.stopEverything(e); rails.handleRemote(link); return false; }); $document.delegate(rails.formSubmitSelector, 'submit.rails', function(e) { var form = $(this), remote = rails.isRemote(form), blankRequiredInputs, nonBlankFileInputs; if (!rails.allowAction(form)) return rails.stopEverything(e); // Skip other logic when required values are missing or file upload is present if (form.attr('novalidate') === undefined) { if (form.data('ujs:formnovalidate-button') === undefined) { blankRequiredInputs = rails.blankInputs(form, rails.requiredInputSelector, false); if (blankRequiredInputs && rails.fire(form, 'ajax:aborted:required', [blankRequiredInputs])) { return rails.stopEverything(e); } } else { // Clear the formnovalidate in case the next button click is not on a formnovalidate button // Not strictly necessary to do here, since it is also reset on each button click, but just to be certain form.data('ujs:formnovalidate-button', undefined); } } if (remote) { nonBlankFileInputs = rails.nonBlankInputs(form, rails.fileInputSelector); if (nonBlankFileInputs) { // Slight timeout so that the submit button gets properly serialized // (make it easy for event handler to serialize form without disabled values) setTimeout(function(){ rails.disableFormElements(form); }, 13); var aborted = rails.fire(form, 'ajax:aborted:file', [nonBlankFileInputs]); // Re-enable form elements if event bindings return false (canceling normal form submission) if (!aborted) { setTimeout(function(){ rails.enableFormElements(form); }, 13); } return aborted; } rails.handleRemote(form); return false; } else { // Slight timeout so that the submit button gets properly serialized setTimeout(function(){ rails.disableFormElements(form); }, 13); } }); $document.delegate(rails.formInputClickSelector, 'click.rails', function(event) { var button = $(this); if (!rails.allowAction(button)) return rails.stopEverything(event); // Register the pressed submit button var name = button.attr('name'), data = name ? {name:name, value:button.val()} : null; var form = button.closest('form'); if (form.length === 0) { form = $('#' + button.attr('form')); } form.data('ujs:submit-button', data); // Save attributes from button form.data('ujs:formnovalidate-button', button.attr('formnovalidate')); form.data('ujs:submit-button-formaction', button.attr('formaction')); form.data('ujs:submit-button-formmethod', button.attr('formmethod')); }); $document.delegate(rails.formSubmitSelector, 'ajax:send.rails', function(event) { if (this === event.target) rails.disableFormElements($(this)); }); $document.delegate(rails.formSubmitSelector, 'ajax:complete.rails', function(event) { if (this === event.target) rails.enableFormElements($(this)); }); $(function(){ rails.refreshCSRFTokens(); }); } })( jQuery ); (function() { var CSRFToken, Click, ComponentUrl, EVENTS, Link, ProgressBar, browserIsntBuggy, browserSupportsCustomEvents, browserSupportsPushState, browserSupportsTurbolinks, bypassOnLoadPopstate, cacheCurrentPage, cacheSize, changePage, clone, constrainPageCacheTo, createDocument, crossOriginRedirect, currentState, enableProgressBar, enableTransitionCache, executeScriptTags, extractTitleAndBody, fetch, fetchHistory, fetchReplacement, historyStateIsDefined, initializeTurbolinks, installDocumentReadyPageEventTriggers, installHistoryChangeHandler, installJqueryAjaxSuccessPageUpdateTrigger, loadedAssets, manuallyTriggerHashChangeForFirefox, pageCache, pageChangePrevented, pagesCached, popCookie, processResponse, progressBar, recallScrollPosition, ref, referer, reflectNewUrl, reflectRedirectedUrl, rememberCurrentState, rememberCurrentUrl, rememberReferer, removeNoscriptTags, requestMethodIsSafe, resetScrollPosition, setAutofocusElement, transitionCacheEnabled, transitionCacheFor, triggerEvent, visit, xhr, indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty, slice = [].slice, bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; pageCache = {}; cacheSize = 10; transitionCacheEnabled = false; progressBar = null; currentState = null; loadedAssets = null; referer = null; xhr = null; EVENTS = { BEFORE_CHANGE: 'page:before-change', FETCH: 'page:fetch', RECEIVE: 'page:receive', CHANGE: 'page:change', UPDATE: 'page:update', LOAD: 'page:load', RESTORE: 'page:restore', BEFORE_UNLOAD: 'page:before-unload', EXPIRE: 'page:expire' }; fetch = function(url) { var cachedPage; url = new ComponentUrl(url); rememberReferer(); cacheCurrentPage(); if (progressBar != null) { progressBar.start(); } if (transitionCacheEnabled && (cachedPage = transitionCacheFor(url.absolute))) { fetchHistory(cachedPage); return fetchReplacement(url, null, false); } else { return fetchReplacement(url, resetScrollPosition); } }; transitionCacheFor = function(url) { var cachedPage; cachedPage = pageCache[url]; if (cachedPage && !cachedPage.transitionCacheDisabled) { return cachedPage; } }; enableTransitionCache = function(enable) { if (enable == null) { enable = true; } return transitionCacheEnabled = enable; }; enableProgressBar = function(enable) { if (enable == null) { enable = true; } if (!browserSupportsTurbolinks) { return; } if (enable) { return progressBar != null ? progressBar : progressBar = new ProgressBar('html'); } else { if (progressBar != null) { progressBar.uninstall(); } return progressBar = null; } }; fetchReplacement = function(url, onLoadFunction, showProgressBar) { if (showProgressBar == null) { showProgressBar = true; } triggerEvent(EVENTS.FETCH, { url: url.absolute }); if (xhr != null) { xhr.abort(); } xhr = new XMLHttpRequest; xhr.open('GET', url.withoutHashForIE10compatibility(), true); xhr.setRequestHeader('Accept', 'text/html, application/xhtml+xml, application/xml'); xhr.setRequestHeader('X-XHR-Referer', referer); xhr.onload = function() { var doc; triggerEvent(EVENTS.RECEIVE, { url: url.absolute }); if (doc = processResponse()) { reflectNewUrl(url); reflectRedirectedUrl(); changePage.apply(null, extractTitleAndBody(doc)); manuallyTriggerHashChangeForFirefox(); if (typeof onLoadFunction === "function") { onLoadFunction(); } return triggerEvent(EVENTS.LOAD); } else { return document.location.href = crossOriginRedirect() || url.absolute; } }; if (progressBar && showProgressBar) { xhr.onprogress = (function(_this) { return function(event) { var percent; percent = event.lengthComputable ? event.loaded / event.total * 100 : progressBar.value + (100 - progressBar.value) / 10; return progressBar.advanceTo(percent); }; })(this); } xhr.onloadend = function() { return xhr = null; }; xhr.onerror = function() { return document.location.href = url.absolute; }; return xhr.send(); }; fetchHistory = function(cachedPage) { if (xhr != null) { xhr.abort(); } changePage(cachedPage.title, cachedPage.body); recallScrollPosition(cachedPage); return triggerEvent(EVENTS.RESTORE); }; cacheCurrentPage = function() { var currentStateUrl; currentStateUrl = new ComponentUrl(currentState.url); pageCache[currentStateUrl.absolute] = { url: currentStateUrl.relative, body: document.body, title: document.title, positionY: window.pageYOffset, positionX: window.pageXOffset, cachedAt: new Date().getTime(), transitionCacheDisabled: document.querySelector('[data-no-transition-cache]') != null }; return constrainPageCacheTo(cacheSize); }; pagesCached = function(size) { if (size == null) { size = cacheSize; } if (/^[\d]+$/.test(size)) { return cacheSize = parseInt(size); } }; constrainPageCacheTo = function(limit) { var cacheTimesRecentFirst, i, key, len, pageCacheKeys, results; pageCacheKeys = Object.keys(pageCache); cacheTimesRecentFirst = pageCacheKeys.map(function(url) { return pageCache[url].cachedAt; }).sort(function(a, b) { return b - a; }); results = []; for (i = 0, len = pageCacheKeys.length; i < len; i++) { key = pageCacheKeys[i]; if (!(pageCache[key].cachedAt <= cacheTimesRecentFirst[limit])) { continue; } triggerEvent(EVENTS.EXPIRE, pageCache[key]); results.push(delete pageCache[key]); } return results; }; changePage = function(title, body, csrfToken, runScripts) { triggerEvent(EVENTS.BEFORE_UNLOAD); document.title = title; document.documentElement.replaceChild(body, document.body); if (csrfToken != null) { CSRFToken.update(csrfToken); } setAutofocusElement(); if (runScripts) { executeScriptTags(); } currentState = window.history.state; if (progressBar != null) { progressBar.done(); } triggerEvent(EVENTS.CHANGE); return triggerEvent(EVENTS.UPDATE); }; executeScriptTags = function() { var attr, copy, i, j, len, len1, nextSibling, parentNode, ref, ref1, script, scripts; scripts = Array.prototype.slice.call(document.body.querySelectorAll('script:not([data-turbolinks-eval="false"])')); for (i = 0, len = scripts.length; i < len; i++) { script = scripts[i]; if (!((ref = script.type) === '' || ref === 'text/javascript')) { continue; } copy = document.createElement('script'); ref1 = script.attributes; for (j = 0, len1 = ref1.length; j < len1; j++) { attr = ref1[j]; copy.setAttribute(attr.name, attr.value); } if (!script.hasAttribute('async')) { copy.async = false; } copy.appendChild(document.createTextNode(script.innerHTML)); parentNode = script.parentNode, nextSibling = script.nextSibling; parentNode.removeChild(script); parentNode.insertBefore(copy, nextSibling); } }; removeNoscriptTags = function(node) { node.innerHTML = node.innerHTML.replace(/<noscript[\S\s]*?<\/noscript>/ig, ''); return node; }; setAutofocusElement = function() { var autofocusElement, list; autofocusElement = (list = document.querySelectorAll('input[autofocus], textarea[autofocus]'))[list.length - 1]; if (autofocusElement && document.activeElement !== autofocusElement) { return autofocusElement.focus(); } }; reflectNewUrl = function(url) { if ((url = new ComponentUrl(url)).absolute !== referer) { return window.history.pushState({ turbolinks: true, url: url.absolute }, '', url.absolute); } }; reflectRedirectedUrl = function() { var location, preservedHash; if (location = xhr.getResponseHeader('X-XHR-Redirected-To')) { location = new ComponentUrl(location); preservedHash = location.hasNoHash() ? document.location.hash : ''; return window.history.replaceState(window.history.state, '', location.href + preservedHash); } }; crossOriginRedirect = function() { var redirect; if (((redirect = xhr.getResponseHeader('Location')) != null) && (new ComponentUrl(redirect)).crossOrigin()) { return redirect; } }; rememberReferer = function() { return referer = document.location.href; }; rememberCurrentUrl = function() { return window.history.replaceState({ turbolinks: true, url: document.location.href }, '', document.location.href); }; rememberCurrentState = function() { return currentState = window.history.state; }; manuallyTriggerHashChangeForFirefox = function() { var url; if (navigator.userAgent.match(/Firefox/) && !(url = new ComponentUrl).hasNoHash()) { window.history.replaceState(currentState, '', url.withoutHash()); return document.location.hash = url.hash; } }; recallScrollPosition = function(page) { return window.scrollTo(page.positionX, page.positionY); }; resetScrollPosition = function() { if (document.location.hash) { return document.location.href = document.location.href; } else { return window.scrollTo(0, 0); } }; clone = function(original) { var copy, key, value; if ((original == null) || typeof original !== 'object') { return original; } copy = new original.constructor(); for (key in original) { value = original[key]; copy[key] = clone(value); } return copy; }; popCookie = function(name) { var ref, value; value = ((ref = document.cookie.match(new RegExp(name + "=(\\w+)"))) != null ? ref[1].toUpperCase() : void 0) || ''; document.cookie = name + '=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/'; return value; }; triggerEvent = function(name, data) { var event; if (typeof Prototype !== 'undefined') { Event.fire(document, name, data, true); } event = document.createEvent('Events'); if (data) { event.data = data; } event.initEvent(name, true, true); return document.dispatchEvent(event); }; pageChangePrevented = function(url) { return !triggerEvent(EVENTS.BEFORE_CHANGE, { url: url }); }; processResponse = function() { var assetsChanged, clientOrServerError, doc, extractTrackAssets, intersection, validContent; clientOrServerError = function() { var ref; return (400 <= (ref = xhr.status) && ref < 600); }; validContent = function() { var contentType; return ((contentType = xhr.getResponseHeader('Content-Type')) != null) && contentType.match(/^(?:text\/html|application\/xhtml\+xml|application\/xml)(?:;|$)/); }; extractTrackAssets = function(doc) { var i, len, node, ref, results; ref = doc.querySelector('head').childNodes; results = []; for (i = 0, len = ref.length; i < len; i++) { node = ref[i]; if ((typeof node.getAttribute === "function" ? node.getAttribute('data-turbolinks-track') : void 0) != null) { results.push(node.getAttribute('src') || node.getAttribute('href')); } } return results; }; assetsChanged = function(doc) { var fetchedAssets; loadedAssets || (loadedAssets = extractTrackAssets(document)); fetchedAssets = extractTrackAssets(doc); return fetchedAssets.length !== loadedAssets.length || intersection(fetchedAssets, loadedAssets).length !== loadedAssets.length; }; intersection = function(a, b) { var i, len, ref, results, value; if (a.length > b.length) { ref = [b, a], a = ref[0], b = ref[1]; } results = []; for (i = 0, len = a.length; i < len; i++) { value = a[i]; if (indexOf.call(b, value) >= 0) { results.push(value); } } return results; }; if (!clientOrServerError() && validContent()) { doc = createDocument(xhr.responseText); if (doc && !assetsChanged(doc)) { return doc; } } }; extractTitleAndBody = function(doc) { var title; title = doc.querySelector('title'); return [title != null ? title.textContent : void 0, removeNoscriptTags(doc.querySelector('body')), CSRFToken.get(doc).token, 'runScripts']; }; CSRFToken = { get: function(doc) { var tag; if (doc == null) { doc = document; } return { node: tag = doc.querySelector('meta[name="csrf-token"]'), token: tag != null ? typeof tag.getAttribute === "function" ? tag.getAttribute('content') : void 0 : void 0 }; }, update: function(latest) { var current; current = this.get(); if ((current.token != null) && (latest != null) && current.token !== latest) { return current.node.setAttribute('content', latest); } } }; createDocument = function(html) { var doc; doc = document.documentElement.cloneNode(); doc.innerHTML = html; doc.head = doc.querySelector('head'); doc.body = doc.querySelector('body'); return doc; }; ComponentUrl = (function() { function ComponentUrl(original1) { this.original = original1 != null ? original1 : document.location.href; if (this.original.constructor === ComponentUrl) { return this.original; } this._parse(); } ComponentUrl.prototype.withoutHash = function() { return this.href.replace(this.hash, '').replace('#', ''); }; ComponentUrl.prototype.withoutHashForIE10compatibility = function() { return this.withoutHash(); }; ComponentUrl.prototype.hasNoHash = function() { return this.hash.length === 0; }; ComponentUrl.prototype.crossOrigin = function() { return this.origin !== (new ComponentUrl).origin; }; ComponentUrl.prototype._parse = function() { var ref; (this.link != null ? this.link : this.link = document.createElement('a')).href = this.original; ref = this.link, this.href = ref.href, this.protocol = ref.protocol, this.host = ref.host, this.hostname = ref.hostname, this.port = ref.port, this.pathname = ref.pathname, this.search = ref.search, this.hash = ref.hash; this.origin = [this.protocol, '//', this.hostname].join(''); if (this.port.length !== 0) { this.origin += ":" + this.port; } this.relative = [this.pathname, this.search, this.hash].join(''); return this.absolute = this.href; }; return ComponentUrl; })(); Link = (function(superClass) { extend(Link, superClass); Link.HTML_EXTENSIONS = ['html']; Link.allowExtensions = function() { var extension, extensions, i, len; extensions = 1 <= arguments.length ? slice.call(arguments, 0) : []; for (i = 0, len = extensions.length; i < len; i++) { extension = extensions[i]; Link.HTML_EXTENSIONS.push(extension); } return Link.HTML_EXTENSIONS; }; function Link(link1) { this.link = link1; if (this.link.constructor === Link) { return this.link; } this.original = this.link.href; this.originalElement = this.link; this.link = this.link.cloneNode(false); Link.__super__.constructor.apply(this, arguments); } Link.prototype.shouldIgnore = function() { return this.crossOrigin() || this._anchored() || this._nonHtml() || this._optOut() || this._target(); }; Link.prototype._anchored = function() { return (this.hash.length > 0 || this.href.charAt(this.href.length - 1) === '#') && (this.withoutHash() === (new ComponentUrl).withoutHash()); }; Link.prototype._nonHtml = function() { return this.pathname.match(/\.[a-z]+$/g) && !this.pathname.match(new RegExp("\\.(?:" + (Link.HTML_EXTENSIONS.join('|')) + ")?$", 'g')); }; Link.prototype._optOut = function() { var ignore, link; link = this.originalElement; while (!(ignore || link === document)) { ignore = link.getAttribute('data-no-turbolink') != null; link = link.parentNode; } return ignore; }; Link.prototype._target = function() { return this.link.target.length !== 0; }; return Link; })(ComponentUrl); Click = (function() { Click.installHandlerLast = function(event) { if (!event.defaultPrevented) { document.removeEventListener('click', Click.handle, false); return document.addEventListener('click', Click.handle, false); } }; Click.handle = function(event) { return new Click(event); }; function Click(event1) { this.event = event1; if (this.event.defaultPrevented) { return; } this._extractLink(); if (this._validForTurbolinks()) { if (!pageChangePrevented(this.link.absolute)) { visit(this.link.href); } this.event.preventDefault(); } } Click.prototype._extractLink = function() { var link; link = this.event.target; while (!(!link.parentNode || link.nodeName === 'A')) { link = link.parentNode; } if (link.nodeName === 'A' && link.href.length !== 0) { return this.link = new Link(link); } }; Click.prototype._validForTurbolinks = function() { return (this.link != null) && !(this.link.shouldIgnore() || this._nonStandardClick()); }; Click.prototype._nonStandardClick = function() { return this.event.which > 1 || this.event.metaKey || this.event.ctrlKey || this.event.shiftKey || this.event.altKey; }; return Click; })(); ProgressBar = (function() { var className; className = 'turbolinks-progress-bar'; function ProgressBar(elementSelector) { this.elementSelector = elementSelector; this._trickle = bind(this._trickle, this); this.value = 0; this.content = ''; this.speed = 300; this.opacity = 0.99; this.install(); } ProgressBar.prototype.install = function() { this.element = document.querySelector(this.elementSelector); this.element.classList.add(className); this.styleElement = document.createElement('style'); document.head.appendChild(this.styleElement); return this._updateStyle(); }; ProgressBar.prototype.uninstall = function() { this.element.classList.remove(className); return document.head.removeChild(this.styleElement); }; ProgressBar.prototype.start = function() { return this.advanceTo(5); }; ProgressBar.prototype.advanceTo = function(value) { var ref; if ((value > (ref = this.value) && ref <= 100)) { this.value = value; this._updateStyle(); if (this.value === 100) { return this._stopTrickle(); } else if (this.value > 0) { return this._startTrickle(); } } }; ProgressBar.prototype.done = function() { if (this.value > 0) { this.advanceTo(100); return this._reset(); } }; ProgressBar.prototype._reset = function() { var originalOpacity; originalOpacity = this.opacity; setTimeout((function(_this) { return function() { _this.opacity = 0; return _this._updateStyle(); }; })(this), this.speed / 2); return setTimeout((function(_this) { return function() { _this.value = 0; _this.opacity = originalOpacity; return _this._withSpeed(0, function() { return _this._updateStyle(true); }); }; })(this), this.speed); }; ProgressBar.prototype._startTrickle = function() { if (this.trickling) { return; } this.trickling = true; return setTimeout(this._trickle, this.speed); }; ProgressBar.prototype._stopTrickle = function() { return delete this.trickling; }; ProgressBar.prototype._trickle = function() { if (!this.trickling) { return; } this.advanceTo(this.value + Math.random() / 2); return setTimeout(this._trickle, this.speed); }; ProgressBar.prototype._withSpeed = function(speed, fn) { var originalSpeed, result; originalSpeed = this.speed; this.speed = speed; result = fn(); this.speed = originalSpeed; return result; }; ProgressBar.prototype._updateStyle = function(forceRepaint) { if (forceRepaint == null) { forceRepaint = false; } if (forceRepaint) { this._changeContentToForceRepaint(); } return this.styleElement.textContent = this._createCSSRule(); }; ProgressBar.prototype._changeContentToForceRepaint = function() { return this.content = this.content === '' ? ' ' : ''; }; ProgressBar.prototype._createCSSRule = function() { return this.elementSelector + "." + className + "::before {\n content: '" + this.content + "';\n position: fixed;\n top: 0;\n left: 0;\n z-index: 2000;\n background-color: #0076ff;\n height: 3px;\n opacity: " + this.opacity + ";\n width: " + this.value + "%;\n transition: width " + this.speed + "ms ease-out, opacity " + (this.speed / 2) + "ms ease-in;\n transform: translate3d(0,0,0);\n}"; }; return ProgressBar; })(); bypassOnLoadPopstate = function(fn) { return setTimeout(fn, 500); }; installDocumentReadyPageEventTriggers = function() { return document.addEventListener('DOMContentLoaded', (function() { triggerEvent(EVENTS.CHANGE); return triggerEvent(EVENTS.UPDATE); }), true); }; installJqueryAjaxSuccessPageUpdateTrigger = function() { if (typeof jQuery !== 'undefined') { return jQuery(document).on('ajaxSuccess', function(event, xhr, settings) { if (!jQuery.trim(xhr.responseText)) { return; } return triggerEvent(EVENTS.UPDATE); }); } }; installHistoryChangeHandler = function(event) { var cachedPage, ref; if ((ref = event.state) != null ? ref.turbolinks : void 0) { if (cachedPage = pageCache[(new ComponentUrl(event.state.url)).absolute]) { cacheCurrentPage(); return fetchHistory(cachedPage); } else { return visit(event.target.location.href); } } }; initializeTurbolinks = function() { rememberCurrentUrl(); rememberCurrentState(); document.addEventListener('click', Click.installHandlerLast, true); window.addEventListener('hashchange', function(event) { rememberCurrentUrl(); return rememberCurrentState(); }, false); return bypassOnLoadPopstate(function() { return window.addEventListener('popstate', installHistoryChangeHandler, false); }); }; historyStateIsDefined = window.history.state !== void 0 || navigator.userAgent.match(/Firefox\/2[6|7]/); browserSupportsPushState = window.history && window.history.pushState && window.history.replaceState && historyStateIsDefined; browserIsntBuggy = !navigator.userAgent.match(/CriOS\//); requestMethodIsSafe = (ref = popCookie('request_method')) === 'GET' || ref === ''; browserSupportsTurbolinks = browserSupportsPushState && browserIsntBuggy && requestMethodIsSafe; browserSupportsCustomEvents = document.addEventListener && document.createEvent; if (browserSupportsCustomEvents) { installDocumentReadyPageEventTriggers(); installJqueryAjaxSuccessPageUpdateTrigger(); } if (browserSupportsTurbolinks) { visit = fetch; initializeTurbolinks(); } else { visit = function(url) { return document.location.href = url; }; } this.Turbolinks = { visit: visit, pagesCached: pagesCached, enableTransitionCache: enableTransitionCache, enableProgressBar: enableProgressBar, allowLinkExtensions: Link.allowExtensions, supported: browserSupportsTurbolinks, EVENTS: clone(EVENTS) }; }).call(this); // This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // compiled file. // // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details // about supported directives. //
public/js/jquery.min.js
OpenSaasAU/BendigoGigGuide-site
/*! jQuery v1.11.3 | (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="1.11.3",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)+1>=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="length"in a&&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"+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);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 aa(){return!0}function ba(){return!1}function ca(){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!==ca()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ca()&&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?aa:ba):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:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=aa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=aa,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=aa,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=ba;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=ba),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 da(a){var b=ea.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var ea="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fa=/ jQuery\d+="(?:null|\d+)"/g,ga=new RegExp("<(?:"+ea+")[\\s/>]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/<tbody/i,la=/<|&#?\w+;/,ma=/<(?:script|style|link)/i,na=/checked\s*(?:[^=]|=\s*.checked.)/i,oa=/^$|\/(?:java|ecma)script/i,pa=/^true\/(.*)/,qa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ra={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>"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(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,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(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 xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(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 Ba(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?(xa(b).text=a.text,ya(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)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(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=da(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(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?"<table>"!==l[1]||ka.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(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.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=wa(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=wa(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(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(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(ua(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(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(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(ua(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&&na.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(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.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(qa,"")));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 Ca,Da={};function Ea(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 Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[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 Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.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&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.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 La(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.removeChild(i)),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 Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(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",Fa(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 Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(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 Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(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]=Ua(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=Qa.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]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[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?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(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 Na.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(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[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}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),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=Ia(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 Va(this,!0)},hide:function(){return Va(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 Za(a,b,c,d,e){ return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,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=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.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):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.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}}},Za.propHooks.scrollTop=Za.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=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.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 fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(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 hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(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")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(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],ab.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?Fa(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=hb(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 jb(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 kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),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:$a||fb(),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(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,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(kb,{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],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.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=kb(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&&cb.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(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("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($a=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$a=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(){_a||(_a=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_a),_a=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 lb=/\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(lb,""):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 mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=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)?nb:mb)),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)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?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}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&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=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={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}},ob.id=ob.name=ob.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:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.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 sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?: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):sb.test(a.nodeName)||tb.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 ub=/[\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(ub," "):" ")){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(ub," "):"")){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(ub," ").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 vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\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(xb,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 yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(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 Mb(a,b,c,d){var e={},f=a===Ib;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 Nb(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 Ob(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 Pb(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:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,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?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),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=Cb.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||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),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]?", "+Jb+"; 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=Mb(Ib,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=Ob(k,v,c)),u=Pb(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._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 Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(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)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},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")&&Ub.test(this.nodeName)&&!Tb.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(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;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 Xb[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=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){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 _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.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(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.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,_b.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 bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.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.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(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=dc(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||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),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=dc(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]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.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 ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m});
packages/material-ui-icons/src/LocalHospital.js
cherniavskii/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path d="M19 3H5c-1.1 0-1.99.9-1.99 2L3 19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 11h-4v4h-4v-4H6v-4h4V6h4v4h4v4z" /></g> , 'LocalHospital');
src/pages/HomePage/HomePage.js
Danjavia/PWA-ReactJS-Starter-Pack
/** * External Resources **/ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import RaisedButton from 'material-ui/RaisedButton'; import baseTheme from 'material-ui/styles/baseThemes/lightBaseTheme'; import getMuiTheme from 'material-ui/styles/getMuiTheme'; import injectTapEventPlugin from 'react-tap-event-plugin'; import './HomePage.css'; /** * Internal Resources **/ injectTapEventPlugin(); /** * Sample class definition **/ class HomePage extends Component { /** * childContextTypes * @property {object} muiTheme MUI integration with component * */ static childContextTypes = { muiTheme: PropTypes.object }; /** * getChildContext * @return {object} muiTheme MUI theme integration * */ getChildContext() { return { muiTheme: getMuiTheme(baseTheme) }; } /** * render * @return {ReactElement} markup * */ render() { return ( <div className="home-page"> <h1>React-Apollo-MUI PWA</h1> <h2>Starter Pack</h2> <div> <RaisedButton label="View Repo" href="https://github.com/Danjavia/PWA-ReactJS-Starter-Pack" target="_blank" secondary={true} icon={<i className="fa fa-github"></i>} /> </div> </div> ); } } /** * Export class **/ export default HomePage;
ajax/libs/backbone-react-component/0.8.1/backbone-react-component-min.js
pc035860/cdnjs
!function(a,b){"function"==typeof define&&define.amd?define(["react","backbone","underscore"],b):"undefined"!=typeof module&&module.exports?module.exports=b(require("react"),require("backbone"),require("underscore")):b(a.React,a.Backbone,a._)}(this,function(a,b,c){"use strict";function d(a,b,c){this.state={},this.component=a;var d,e,f=c||a.props||{};d=a.overrideModel&&"function"==typeof a.overrideModel?a.overrideModel():f.model,e=a.overrideCollection&&"function"==typeof a.overrideCollection?a.overrideCollection():f.collection,this.setModels(d,b),this.setCollections(e,b)}b.React||(b.React={}),b.React.Component||(b.React.Component={});var e=b.React.Component.mixin={childContextTypes:{hasParentBackboneMixin:a.PropTypes.bool.isRequired,parentModel:a.PropTypes.any,parentCollection:a.PropTypes.any},contextTypes:{hasParentBackboneMixin:a.PropTypes.bool,parentModel:a.PropTypes.any,parentCollection:a.PropTypes.any},getChildContext:function(){return{hasParentBackboneMixin:!0,parentModel:this.getModel(),parentCollection:this.getCollection()}},componentDidMount:function(){this.setElement(a.findDOMNode(this))},componentDidUpdate:function(){this.setElement(a.findDOMNode(this))},getInitialState:function(){var a={};return this.wrapper||(this.wrapper=new d(this,a)),a},componentWillMount:function(){this.wrapper||(this.wrapper=new d(this))},componentWillUnmount:function(){this.wrapper&&(this.wrapper.stopListening(),delete this.wrapper)},componentWillReceiveProps:function(a){var b=a.model,c=a.collection;this.wrapper.model&&b?this.wrapper.model!==b&&(this.wrapper.stopListening(),this.wrapper=new d(this,void 0,a)):b&&(this.wrapper=new d(this,void 0,a)),this.wrapper.collection&&c?this.wrapper.collection!==c&&(this.wrapper.stopListening(),this.wrapper=new d(this,void 0,a)):c&&(this.wrapper=new d(this,void 0,a))},$:function(){var b;if(this.$el)b=this.$el.find.apply(this.$el,arguments);else{var c=a.findDOMNode(this);b=c.querySelector.apply(c,arguments)}return b},getCollection:function(){return this.wrapper.collection||this.context.parentCollection},getModel:function(){return this.wrapper.model||this.context.parentModel},setElement:function(a){if(a&&b.$&&a instanceof b.$){if(a.length>1)throw new Error("You can only assign one element to a component");this.el=a[0],this.$el=a}else a&&(this.el=a,b.$&&(this.$el=b.$(a)));return this}};return c.extend(d.prototype,b.Events,{onError:function(a,b,c){c.silent||this.component.setState({isRequesting:!1,hasError:!0,error:b})},onInvalid:function(a,b,c){c.silent||this.component.setState({isInvalid:!0})},onRequest:function(a,b,c){c.silent||this.component.setState({isRequesting:!0,hasError:!1,isInvalid:!1})},onSync:function(a,b,c){c.silent||this.component.setState({isRequesting:!1})},setModels:function(a,b,d){"undefined"!=typeof a&&(a.attributes||"object"==typeof a&&c.values(a)[0].attributes)&&(this.model=a,this.setStateBackbone(a,void 0,b,d),this.startModelListeners(a))},setCollections:function(a,b,d){"undefined"!=typeof a&&(a.models||"object"==typeof a&&c.values(a)[0].models)&&(this.collection=a,this.setStateBackbone(a,void 0,b,d),this.startCollectionListeners(a))},setStateBackbone:function(a,b,c){if(a.models||a.attributes)this.setState.apply(this,arguments);else for(b in a)this.setStateBackbone(a[b],b,c)},setState:function(a,b,d,e){var f={},g=a.toJSON?a.toJSON():a;b?f[b]=g:a.models?f.collection=g:f.model=g,d?c.extend(d,f):e?(this.nextState=c.extend(this.nextState||{},f),c.defer(c.bind(function(){this.nextState&&(this.component.setState(this.nextState),this.nextState=null)},this))):this.component.setState(f)},startCollectionListeners:function(a,b){if(a||(a=this.collection),a)if(a.models)this.listenTo(a,"add remove change sort reset",c.partial(this.setStateBackbone,a,b,void 0,!0)).listenTo(a,"error",this.onError).listenTo(a,"request",this.onRequest).listenTo(a,"sync",this.onSync);else if("object"==typeof a)for(b in a)a.hasOwnProperty(b)&&this.startCollectionListeners(a[b],b)},startModelListeners:function(a,b){if(a||(a=this.model),a)if(a.attributes)this.listenTo(a,"change",c.partial(this.setStateBackbone,a,b,void 0,!0)).listenTo(a,"error",this.onError).listenTo(a,"request",this.onRequest).listenTo(a,"sync",this.onSync).listenTo(a,"invalid",this.onInvalid);else if("object"==typeof a)for(b in a)this.startModelListeners(a[b],b)}}),e});
ajax/libs/babel-core/5.0.0-beta4/browser.min.js
boneskull/cdnjs
!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.babel=e()}}(function(){var e,t,n;return function r(e,t,n){function l(a,s){if(!t[a]){if(!e[a]){var o="function"==typeof require&&require;if(!s&&o)return o(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var p=t[a]={exports:{}};e[a][0].call(p.exports,function(t){var n=e[a][1][t];return l(n?n:t)},p,p.exports,r,e,t,n)}return t[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)l(n[a]);return l}({1:[function(e){"use strict";var t=e(".."),n=t.Parser.prototype,r=t.tokTypes;n.isRelational=function(e){return this.type===r.relational&&this.value===e},n.expectRelational=function(e){this.isRelational(e)?this.next():this.unexpected()},n.flow_parseDeclareClass=function(e){return this.next(),this.flow_parseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")},n.flow_parseDeclareFunction=function(e){this.next();var t=e.id=this.parseIdent(),n=this.startNode(),l=this.startNode();n.typeParameters=this.isRelational("<")?this.flow_parseTypeParameterDeclaration():null,this.expect(r.parenL);var i=this.flow_parseFunctionTypeParams();return n.params=i.params,n.rest=i.rest,this.expect(r.parenR),this.expect(r.colon),n.returnType=this.flow_parseType(),l.typeAnnotation=this.finishNode(n,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(l,"TypeAnnotation"),this.finishNode(t,t.type),this.semicolon(),this.finishNode(e,"DeclareFunction")},n.flow_parseDeclare=function(e){return this.type===r._class?this.flow_parseDeclareClass(e):this.type===r._function?this.flow_parseDeclareFunction(e):this.type===r._var?this.flow_parseDeclareVariable(e):this.isContextual("module")?this.flow_parseDeclareModule(e):void this.unexpected()},n.flow_parseDeclareVariable=function(e){return this.next(),e.id=this.flow_parseTypeAnnotatableIdentifier(),this.semicolon(),this.finishNode(e,"DeclareVariable")},n.flow_parseDeclareModule=function(e){this.next(),e.id=this.type===r.string?this.parseExprAtom():this.parseIdent();var t=e.body=this.startNode(),n=t.body=[];for(this.expect(r.braceL);this.type!==r.braceR;){var l=this.startNode();this.next(),n.push(this.flow_parseDeclare(l))}return this.expect(r.braceR),this.finishNode(t,"BlockStatement"),this.finishNode(e,"DeclareModule")},n.flow_parseInterfaceish=function(e,t){if(e.id=this.parseIdent(),e.typeParameters=this.isRelational("<")?this.flow_parseTypeParameterDeclaration():null,e["extends"]=[],this.eat(r._extends))do e["extends"].push(this.flow_parseInterfaceExtends());while(this.eat(r.comma));e.body=this.flow_parseObjectType(t)},n.flow_parseInterfaceExtends=function(){var e=this.startNode();return e.id=this.parseIdent(),e.typeParameters=this.isRelational("<")?this.flow_parseTypeParameterInstantiation():null,this.finishNode(e,"InterfaceExtends")},n.flow_parseInterface=function(e){return this.flow_parseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},n.flow_parseTypeAlias=function(e){return e.id=this.parseIdent(),e.typeParameters=this.isRelational("<")?this.flow_parseTypeParameterDeclaration():null,this.expect(r.eq),e.right=this.flow_parseType(),this.semicolon(),this.finishNode(e,"TypeAlias")},n.flow_parseTypeParameterDeclaration=function(){var e=this.startNode();for(e.params=[],this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flow_parseTypeAnnotatableIdentifier()),this.isRelational(">")||this.expect(r.comma);return this.expectRelational(">"),this.finishNode(e,"TypeParameterDeclaration")},n.flow_parseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.inType;for(e.params=[],this.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flow_parseType()),this.isRelational(">")||this.expect(r.comma);return this.expectRelational(">"),this.inType=t,this.finishNode(e,"TypeParameterInstantiation")},n.flow_parseObjectPropertyKey=function(){return this.type===r.num||this.type===r.string?this.parseExprAtom():this.parseIdent(!0)},n.flow_parseObjectTypeIndexer=function(e,t){return e["static"]=t,this.expect(r.bracketL),e.id=this.flow_parseObjectPropertyKey(),this.expect(r.colon),e.key=this.flow_parseType(),this.expect(r.bracketR),this.expect(r.colon),e.value=this.flow_parseType(),this.flow_objectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},n.flow_parseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flow_parseTypeParameterDeclaration()),this.expect(r.parenL);this.type===r.name;)e.params.push(this.flow_parseFunctionTypeParam()),this.type!==r.parenR&&this.expect(r.comma);return this.eat(r.ellipsis)&&(e.rest=this.flow_parseFunctionTypeParam()),this.expect(r.parenR),this.expect(r.colon),e.returnType=this.flow_parseType(),this.finishNode(e,"FunctionTypeAnnotation")},n.flow_parseObjectTypeMethod=function(e,t,n){var r=this.startNodeAt(e);return r.value=this.flow_parseObjectTypeMethodish(this.startNodeAt(e)),r["static"]=t,r.key=n,r.optional=!1,this.flow_objectTypeSemicolon(),this.finishNode(r,"ObjectTypeProperty")},n.flow_parseObjectTypeCallProperty=function(e,t){var n=this.startNode();return e["static"]=t,e.value=this.flow_parseObjectTypeMethodish(n),this.flow_objectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},n.flow_parseObjectType=function(e){var t,n,l,i=this.startNode(),a=!1;for(i.callProperties=[],i.properties=[],i.indexers=[],this.expect(r.braceL);this.type!==r.braceR;){var s=this.markPosition();t=this.startNode(),e&&this.isContextual("static")&&(this.next(),l=!0),this.type===r.bracketL?i.indexers.push(this.flow_parseObjectTypeIndexer(t,l)):this.type===r.parenL||this.isRelational("<")?i.callProperties.push(this.flow_parseObjectTypeCallProperty(t,e)):(n=l&&this.type===r.colon?this.parseIdent():this.flow_parseObjectPropertyKey(),this.isRelational("<")||this.type===r.parenL?i.properties.push(this.flow_parseObjectTypeMethod(s,l,n)):(this.eat(r.question)&&(a=!0),this.expect(r.colon),t.key=n,t.value=this.flow_parseType(),t.optional=a,t["static"]=l,this.flow_objectTypeSemicolon(),i.properties.push(this.finishNode(t,"ObjectTypeProperty"))))}return this.expect(r.braceR),this.finishNode(i,"ObjectTypeAnnotation")},n.flow_objectTypeSemicolon=function(){this.eat(r.semi)||this.type===r.braceR||this.unexpected()},n.flow_parseGenericType=function(e,t){var n=this.startNodeAt(e);for(n.typeParameters=null,n.id=t;this.eat(r.dot);){var l=this.startNodeAt(e);l.qualification=n.id,l.id=this.parseIdent(),n.id=this.finishNode(l,"QualifiedTypeIdentifier")}return this.isRelational("<")&&(n.typeParameters=this.flow_parseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")},n.flow_parseVoidType=function(){var e=this.startNode();return this.expect(r._void),this.finishNode(e,"VoidTypeAnnotation")},n.flow_parseTypeofType=function(){var e=this.startNode();return this.expect(r._typeof),e.argument=this.flow_parsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},n.flow_parseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(r.bracketL);this.pos<this.input.length&&this.type!==r.bracketR&&(e.types.push(this.flow_parseType()),this.type!==r.bracketR);)this.expect(r.comma);return this.expect(r.bracketR),this.finishNode(e,"TupleTypeAnnotation")},n.flow_parseFunctionTypeParam=function(){var e=!1,t=this.startNode();return t.name=this.parseIdent(),this.eat(r.question)&&(e=!0),this.expect(r.colon),t.optional=e,t.typeAnnotation=this.flow_parseType(),this.finishNode(t,"FunctionTypeParam")},n.flow_parseFunctionTypeParams=function(){for(var e={params:[],rest:null};this.type===r.name;)e.params.push(this.flow_parseFunctionTypeParam()),this.type!==r.parenR&&this.expect(r.comma);return this.eat(r.ellipsis)&&(e.rest=this.flow_parseFunctionTypeParam()),e},n.flow_identToTypeAnnotation=function(e,t,n){switch(n.name){case"any":return this.finishNode(t,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(t,"BooleanTypeAnnotation");case"number":return this.finishNode(t,"NumberTypeAnnotation");case"string":return this.finishNode(t,"StringTypeAnnotation");default:return this.flow_parseGenericType(e,n)}},n.flow_parsePrimaryType=function(){var e,t,n,l=this.markPosition(),i=this.startNode(),a=!1;switch(this.type){case r.name:return this.flow_identToTypeAnnotation(l,i,this.parseIdent());case r.braceL:return this.flow_parseObjectType();case r.bracketL:return this.flow_parseTupleType();case r.relational:if("<"===this.value)return i.typeParameters=this.flow_parseTypeParameterDeclaration(),this.expect(r.parenL),e=this.flow_parseFunctionTypeParams(),i.params=e.params,i.rest=e.rest,this.expect(r.parenR),this.expect(r.arrow),i.returnType=this.flow_parseType(),this.finishNode(i,"FunctionTypeAnnotation");case r.parenL:if(this.next(),this.type!==r.parenR&&this.type!==r.ellipsis)if(this.type===r.name){var t=this.lookahead().type;a=t!==r.question&&t!==r.colon}else a=!0;return a?(n=this.flow_parseType(),this.expect(r.parenR),this.eat(r.arrow)&&this.raise(i,"Unexpected token =>. It looks like you are trying to write a function type, but you ended up writing a grouped type followed by an =>, which is a syntax error. Remember, function type parameters are named so function types look like (name1: type1, name2: type2) => returnType. You probably wrote (type1) => returnType"),n):(e=this.flow_parseFunctionTypeParams(),i.params=e.params,i.rest=e.rest,this.expect(r.parenR),this.expect(r.arrow),i.returnType=this.flow_parseType(),i.typeParameters=null,this.finishNode(i,"FunctionTypeAnnotation"));case r.string:return i.value=this.value,i.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(i,"StringLiteralTypeAnnotation");default:if(this.type.keyword)switch(this.type.keyword){case"void":return this.flow_parseVoidType();case"typeof":return this.flow_parseTypeofType()}}this.unexpected()},n.flow_parsePostfixType=function(){var e=this.startNode(),t=e.elementType=this.flow_parsePrimaryType();return this.type===r.bracketL?(this.expect(r.bracketL),this.expect(r.bracketR),this.finishNode(e,"ArrayTypeAnnotation")):t},n.flow_parsePrefixType=function(){var e=this.startNode();return this.eat(r.question)?(e.typeAnnotation=this.flow_parsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flow_parsePostfixType()},n.flow_parseIntersectionType=function(){var e=this.startNode(),t=this.flow_parsePrefixType();for(e.types=[t];this.eat(r.bitwiseAND);)e.types.push(this.flow_parsePrefixType());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")},n.flow_parseUnionType=function(){var e=this.startNode(),t=this.flow_parseIntersectionType();for(e.types=[t];this.eat(r.bitwiseOR);)e.types.push(this.flow_parseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")},n.flow_parseType=function(){var e=this.inType;this.inType=!0;var t=this.flow_parseUnionType();return this.inType=e,t},n.flow_parseTypeAnnotation=function(){var e=this.startNode(),t=this.inType;return this.inType=!0,this.expect(r.colon),e.typeAnnotation=this.flow_parseType(),this.inType=t,this.finishNode(e,"TypeAnnotation")},n.flow_parseTypeAnnotatableIdentifier=function(e,t){var n=(this.startNode(),this.parseIdent()),l=!1;return t&&this.eat(r.question)&&(this.expect(r.question),l=!0),(e||this.type===r.colon)&&(n.typeAnnotation=this.flow_parseTypeAnnotation(),this.finishNode(n,n.type)),l&&(n.optional=!0,this.finishNode(n,n.type)),n},t.plugins.flow=function(e){e.extend("parseFunctionBody",function(e){return function(t,n){return this.type===r.colon&&(t.returnType=this.flow_parseTypeAnnotation()),e.call(this,t,n)}}),e.extend("parseStatement",function(e){return function(t,n){if(this.strict&&this.type===r.name&&"interface"===this.value){var l=this.startNode();return this.next(),this.flow_parseInterface(l)}return e.call(this,t,n)}}),e.extend("parseExpressionStatement",function(e){return function(t,n){if("Identifier"===n.type)if("declare"===n.name){if(this.type===r._class||this.type===r.name||this.type===r._function||this.type===r._var)return this.flow_parseDeclare(t)}else if(this.type===r.name){if("interface"===n.name)return this.flow_parseInterface(t);if("type"===n.name)return this.flow_parseTypeAlias(t)}return e.call(this,t,n)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||e.call(this)}}),e.extend("parseParenItem",function(){return function(e,t){if(this.type===r.colon){var n=this.startNodeAt(t);return n.expression=e,n.typeAnnotation=this.flow_parseTypeAnnotation(),this.finishNode(n,"TypeCastExpression")}return e}}),e.extend("parseClassId",function(e){return function(t,n){e.call(this,t,n),this.isRelational("<")&&(t.typeParameters=this.flow_parseTypeParameterDeclaration())}}),e.extend("readToken",function(e){return function(t){return!this.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(r.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){return this.inType?void 0:e.call(this)}}),e.extend("parseParenArrowList",function(e){return function(t,n,r){for(var l=0;l<n.length;l++){var i=n[l];if("TypeCastExpression"===i.type){var a=i.expression;a.typeAnnotation=i.typeAnnotation,n[l]=a}}return e.call(this,t,n,r)}}),e.extend("parseClassProperty",function(e){return function(t){return this.type===r.colon&&(t.typeAnnotation=this.flow_parseTypeAnnotation()),e.call(this,t)}}),e.extend("isClassProperty",function(e){return function(){return this.type===r.colon||e.call(this)}}),e.extend("parseClassMethod",function(){return function(e,t,n,r){var l;this.isRelational("<")&&(l=this.flow_parseTypeParameterDeclaration()),t.value=this.parseMethod(n,r),t.value.typeParameters=l,e.body.push(this.finishNode(t,"MethodDefinition"))}}),e.extend("parseClassSuper",function(e){return function(t,n){if(e.call(this,t,n),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flow_parseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var l=t["implements"]=[];do{var t=this.startNode();t.id=this.parseIdent(),t.typeParameters=this.isRelational("<")?this.flow_parseTypeParameterInstantiation():null,l.push(this.finishNode(t,"ClassImplements"))}while(this.eat(r.comma))}}}),e.extend("parseObjPropValue",function(e){return function(t){var n;this.isRelational("<")&&(n=this.flow_parseTypeParameterDeclaration(),this.type!==r.parenL&&this.unexpected()),e.apply(this,arguments),t.value.typeParameters=n}}),e.extend("parseAssignableListItemTypes",function(){return function(e){return this.eat(r.question)&&(e.optional=!0),this.type===r.colon&&(e.typeAnnotation=this.flow_parseTypeAnnotation()),this.finishNode(e,e.type),e}}),e.extend("parseImportSpecifiers",function(e){return function(t){if(t.isType=!1,this.isContextual("type")){var n=this.markPosition(),l=this.parseIdent();if(this.type===r.name&&"from"!==this.value||this.type===r.braceL||this.type===r.star)t.isType=!0;else{if(t.specifiers.push(this.parseImportSpecifierDefault(l,n)),this.isContextual("from"))return;this.eat(r.comma)}}e.call(this,t)}}),e.extend("parseFunctionParams",function(e){return function(t){this.isRelational("<")&&(t.typeParameters=this.flow_parseTypeParameterDeclaration()),e.call(this,t)}}),e.extend("parseVarHead",function(e){return function(t){e.call(this,t),this.type===r.colon&&(t.id.typeAnnotation=this.flow_parseTypeAnnotation(),this.finishNode(t.id,t.id.type))}})}},{"..":5}],2:[function(e){"use strict";function t(e){return"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?t(e.object)+"."+t(e.property):void 0}var n=e(".."),r=n.tokTypes,l=n.tokContexts;l.j_oTag=new n.TokContext("<tag",!1),l.j_cTag=new n.TokContext("</tag",!1),l.j_expr=new n.TokContext("<tag>...</tag>",!0,!0),r.jsxName=new n.TokenType("jsxName"),r.jsxText=new n.TokenType("jsxText",{beforeExpr:!0}),r.jsxTagStart=new n.TokenType("jsxTagStart"),r.jsxTagEnd=new n.TokenType("jsxTagEnd"),r.jsxTagStart.updateContext=function(){this.context.push(l.j_expr),this.context.push(l.j_oTag),this.exprAllowed=!1},r.jsxTagEnd.updateContext=function(e){var t=this.context.pop();t===l.j_oTag&&e===r.slash||t===l.j_cTag?(this.context.pop(),this.exprAllowed=this.curContext()===l.j_expr):this.exprAllowed=!0};var i=n.Parser.prototype;i.jsx_readToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");var l=this.input.charCodeAt(this.pos);switch(l){case 60:case 123:return this.pos===this.start?60===l&&this.exprAllowed?(++this.pos,this.finishToken(r.jsxTagStart)):this.getTokenFromCode(l):(e+=this.input.slice(t,this.pos),this.finishToken(r.jsxText,e));case 38:e+=this.input.slice(t,this.pos),e+=this.jsx_readEntity(),t=this.pos;break;default:n.isNewLine(l)?(e+=this.input.slice(t,this.pos),++this.pos,13===l&&10===this.input.charCodeAt(this.pos)?(++this.pos,e+="\n"):e+=String.fromCharCode(l),this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos):++this.pos}}},i.jsx_readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var l=this.input.charCodeAt(this.pos);if(l===e)break;38===l?(t+=this.input.slice(n,this.pos),t+=this.jsx_readEntity(),n=this.pos):++this.pos}return t+=this.input.slice(n,this.pos++),this.finishToken(r.string,t)};var a={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},s=/^[\da-fA-F]+$/,o=/^\d+$/;i.jsx_readEntity=function(){var e,t="",n=0,r=this.input[this.pos];"&"!==r&&this.raise(this.pos,"Entity must start with an ampersand");for(var l=++this.pos;this.pos<this.input.length&&n++<10;){if(r=this.input[this.pos++],";"===r){"#"===t[0]?"x"===t[1]?(t=t.substr(2),s.test(t)&&(e=String.fromCharCode(parseInt(t,16)))):(t=t.substr(1),o.test(t)&&(e=String.fromCharCode(parseInt(t,10)))):e=a[t];break}t+=r}return e?e:(this.pos=l,"&")},i.jsx_readWord=function(){var e,t=this.pos;do e=this.input.charCodeAt(++this.pos);while(n.isIdentifierChar(e)||45===e);return this.finishToken(r.jsxName,this.input.slice(t,this.pos))},i.jsx_parseIdentifier=function(){var e=this.startNode();return this.type===r.jsxName?e.name=this.value:this.type.keyword?e.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")},i.jsx_parseNamespacedName=function(){var e=this.markPosition(),t=this.jsx_parseIdentifier();if(!this.eat(r.colon))return t;var n=this.startNodeAt(e);return n.namespace=t,n.name=this.jsx_parseIdentifier(),this.finishNode(n,"JSXNamespacedName")},i.jsx_parseElementName=function(){for(var e=this.markPosition(),t=this.jsx_parseNamespacedName();this.eat(r.dot);){var n=this.startNodeAt(e);n.object=t,n.property=this.jsx_parseIdentifier(),t=this.finishNode(n,"JSXMemberExpression")}return t},i.jsx_parseAttributeValue=function(){switch(this.type){case r.braceL:var e=this.jsx_parseExpressionContainer();return"JSXEmptyExpression"===e.expression.type&&this.raise(e.start,"JSX attributes must only be assigned a non-empty expression"),e;case r.jsxTagStart:case r.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}},i.jsx_parseEmptyExpression=function(){var e=this.start;return this.start=this.lastTokEnd,this.lastTokEnd=e,e=this.startLoc,this.startLoc=this.lastTokEndLoc,this.lastTokEndLoc=e,this.finishNode(this.startNode(),"JSXEmptyExpression")},i.jsx_parseExpressionContainer=function(){var e=this.startNode();return this.next(),e.expression=this.type===r.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(r.braceR),this.finishNode(e,"JSXExpressionContainer")},i.jsx_parseAttribute=function(){var e=this.startNode();return this.eat(r.braceL)?(this.expect(r.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(r.braceR),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsx_parseNamespacedName(),e.value=this.eat(r.eq)?this.jsx_parseAttributeValue():null,this.finishNode(e,"JSXAttribute"))},i.jsx_parseOpeningElementAt=function(e){var t=this.startNodeAt(e);for(t.attributes=[],t.name=this.jsx_parseElementName();this.type!==r.slash&&this.type!==r.jsxTagEnd;)t.attributes.push(this.jsx_parseAttribute());return t.selfClosing=this.eat(r.slash),this.expect(r.jsxTagEnd),this.finishNode(t,"JSXOpeningElement")},i.jsx_parseClosingElementAt=function(e){var t=this.startNodeAt(e);return t.name=this.jsx_parseElementName(),this.expect(r.jsxTagEnd),this.finishNode(t,"JSXClosingElement")},i.jsx_parseElementAt=function(e){var n=this.startNodeAt(e),l=[],i=this.jsx_parseOpeningElementAt(e),a=null;if(!i.selfClosing){e:for(;;)switch(this.type){case r.jsxTagStart:if(e=this.markPosition(),this.next(),this.eat(r.slash)){a=this.jsx_parseClosingElementAt(e);break e}l.push(this.jsx_parseElementAt(e));break;case r.jsxText:l.push(this.parseExprAtom());break;case r.braceL:l.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}t(a.name)!==t(i.name)&&this.raise(a.start,"Expected corresponding JSX closing tag for <"+t(i.name)+">")}return n.openingElement=i,n.closingElement=a,n.children=l,this.finishNode(n,"JSXElement")},i.jsx_parseElement=function(){var e=this.markPosition();return this.next(),this.jsx_parseElementAt(e)},n.plugins.jsx=function(e){e.extend("parseExprAtom",function(e){return function(t){return this.type===r.jsxText?this.parseLiteral(this.value):this.type===r.jsxTagStart?this.jsx_parseElement():e.call(this,t)}}),e.extend("readToken",function(e){return function(t){var i=this.curContext();if(i===l.j_expr)return this.jsx_readToken();if(i===l.j_oTag||i===l.j_cTag){if(n.isIdentifierStart(t))return this.jsx_readWord();if(62==t)return++this.pos,this.finishToken(r.jsxTagEnd);if((34===t||39===t)&&i==l.j_oTag)return this.jsx_readString(t)}return 60===t&&this.exprAllowed?(++this.pos,this.finishToken(r.jsxTagStart)):e.call(this,t)}}),e.extend("updateContext",function(e){return function(t){if(this.type==r.braceL){var n=this.curContext();n==l.j_oTag?this.context.push(l.b_expr):n==l.j_expr?this.context.push(l.b_tmpl):e.call(this,t),this.exprAllowed=!0}else{if(this.type!==r.slash||t!==r.jsxTagStart)return e.call(this,t);this.context.length-=2,this.context.push(l.j_cTag),this.exprAllowed=!1}}})}},{"..":5}],3:[function(e){"use strict";var t=e("./tokentype").types,n=e("./state").Parser,r=e("./identifier").reservedWords,l=e("./util").has,i=n.prototype;i.checkPropClash=function(e,t){if(!(this.options.ecmaVersion>=6)){var n=e.key,r=void 0;switch(n.type){case"Identifier":r=n.name;break;case"Literal":r=String(n.value);break;default:return}var i=e.kind||"init",a=void 0;if(l(t,r)){a=t[r];var s="init"!==i;((this.strict||s)&&a[i]||!(s^a.init))&&this.raise(n.start,"Redefinition of property")}else a=t[r]={init:!1,get:!1,set:!1};a[i]=!0}},i.parseExpression=function(e,n){var r=this.markPosition(),l=this.parseMaybeAssign(e,n);if(this.type===t.comma){var i=this.startNodeAt(r);for(i.expressions=[l];this.eat(t.comma);)i.expressions.push(this.parseMaybeAssign(e,n));return this.finishNode(i,"SequenceExpression")}return l},i.parseMaybeAssign=function(e,n,r){if(this.type==t._yield&&this.inGenerator)return this.parseYield();var l=void 0;n?l=!1:(n={start:0},l=!0);var i=this.markPosition(),a=this.parseMaybeConditional(e,n);if(r&&(a=r.call(this,a,i)),this.type.isAssign){var s=this.startNodeAt(i);return s.operator=this.value,s.left=this.type===t.eq?this.toAssignable(a):a,n.start=0,this.checkLVal(a),a.parenthesizedExpression&&("ObjectPattern"===a.type?this.raise(a.start,"You're trying to assign to a parenthesized expression, instead of `({ foo }) = {}` use `({ foo } = {})`"):this.raise(a.start,"Parenthesized left hand expressions are illegal")),this.next(),s.right=this.parseMaybeAssign(e),this.finishNode(s,"AssignmentExpression")}return l&&n.start&&this.unexpected(n.start),a},i.parseMaybeConditional=function(e,n){var r=this.markPosition(),l=this.parseExprOps(e,n);if(n&&n.start)return l;if(this.eat(t.question)){var i=this.startNodeAt(r);return i.test=l,i.consequent=this.parseMaybeAssign(),this.expect(t.colon),i.alternate=this.parseMaybeAssign(e),this.finishNode(i,"ConditionalExpression")}return l},i.parseExprOps=function(e,t){var n=this.markPosition(),r=this.parseMaybeUnary(t);return t&&t.start?r:this.parseExprOp(r,n,-1,e)},i.parseExprOp=function(e,n,r,l){var i=this.type.binop;if(null!=i&&(!l||this.type!==t._in)&&i>r){var a=this.startNodeAt(n);a.left=e,a.operator=this.value;var s=this.type;this.next();var o=this.markPosition();return a.right=this.parseExprOp(this.parseMaybeUnary(),o,s.rightAssociative?i-1:i,l),this.finishNode(a,s===t.logicalOR||s===t.logicalAND?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,n,r,l)}return e},i.parseMaybeUnary=function(e){if(this.type.prefix){var n=this.startNode(),r=this.type===t.incDec;return n.operator=this.value,n.prefix=!0,this.next(),n.argument=this.parseMaybeUnary(),e&&e.start&&this.unexpected(e.start),r?this.checkLVal(n.argument):this.strict&&"delete"===n.operator&&"Identifier"===n.argument.type&&this.raise(n.start,"Deleting local variable in strict mode"),this.finishNode(n,r?"UpdateExpression":"UnaryExpression")}var l=this.markPosition(),i=this.parseExprSubscripts(e);if(e&&e.start)return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var n=this.startNodeAt(l);n.operator=this.value,n.prefix=!1,n.argument=i,this.checkLVal(i),this.next(),i=this.finishNode(n,"UpdateExpression")}return i},i.parseExprSubscripts=function(e){var t=this.markPosition(),n=this.parseExprAtom(e);return e&&e.start?n:this.parseSubscripts(n,t)},i.parseSubscripts=function(e,n,r){if(this.eat(t.dot)){var l=this.startNodeAt(n);return l.object=e,l.property=this.parseIdent(!0),l.computed=!1,this.parseSubscripts(this.finishNode(l,"MemberExpression"),n,r)}if(this.eat(t.bracketL)){var l=this.startNodeAt(n);return l.object=e,l.property=this.parseExpression(),l.computed=!0,this.expect(t.bracketR),this.parseSubscripts(this.finishNode(l,"MemberExpression"),n,r)}if(!r&&this.eat(t.parenL)){var l=this.startNodeAt(n);return l.callee=e,l.arguments=this.parseExprList(t.parenR,!1),this.parseSubscripts(this.finishNode(l,"CallExpression"),n,r)}if(this.type===t.backQuote){var l=this.startNodeAt(n);return l.tag=e,l.quasi=this.parseTemplate(),this.parseSubscripts(this.finishNode(l,"TaggedTemplateExpression"),n,r)}return e},i.parseExprAtom=function(e){var n=void 0;switch(this.type){case t._this:case t._super:var r=this.type===t._this?"ThisExpression":"Super";return n=this.startNode(),this.next(),this.finishNode(n,r);case t._yield:this.inGenerator&&unexpected();case t._do:if(this.options.features["es7.doExpressions"]){var l=this.startNode();return this.next(),l.body=this.parseBlock(),this.finishNode(l,"DoExpression")}case t.name:var i=this.markPosition();n=this.startNode();var a=this.parseIdent(this.type!==t.name);if(this.options.features["es7.asyncFunctions"])if("async"===a.name){if(this.type===t.parenL){var s=this.parseParenAndDistinguishExpression(i,!0);return"ArrowFunctionExpression"===s.type?s:(n.callee=a,n.arguments="SequenceExpression"===s.type?s.expressions:[s],this.parseSubscripts(this.finishNode(n,"CallExpression"),i))}if(this.type===t.name)return a=this.parseIdent(),this.expect(t.arrow),this.parseArrowExpression(n,[a],!0);if(this.type===t._function&&!this.canInsertSemicolon())return this.next(),this.parseFunction(n,!1,!1,!0)}else if("await"===a.name&&this.inAsync)return this.parseAwait(n);return!this.canInsertSemicolon()&&this.eat(t.arrow)?this.parseArrowExpression(this.startNodeAt(i),[a]):a;case t.regexp:var o=this.value;return n=this.parseLiteral(o.value),n.regex={pattern:o.pattern,flags:o.flags},n;case t.num:case t.string:return this.parseLiteral(this.value);case t._null:case t._true:case t._false:return n=this.startNode(),n.value=this.type===t._null?null:this.type===t._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case t.parenL:return this.parseParenAndDistinguishExpression();case t.bracketL:return n=this.startNode(),this.next(),(this.options.ecmaVersion>=7||this.options.features["es7.comprehensions"])&&this.type===t._for?this.parseComprehension(n,!1):(n.elements=this.parseExprList(t.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression"));case t.braceL:return this.parseObj(!1,e);case t._function:return n=this.startNode(),this.next(),this.parseFunction(n,!1);case t.at:this.parseDecorators();case t._class:return n=this.startNode(),this.takeDecorators(n),this.parseClass(n,!1);case t._new:return this.parseNew();case t.backQuote:return this.parseTemplate();default:this.unexpected()}},i.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},i.parseParenExpression=function(){this.expect(t.parenL);var e=this.parseExpression();return this.expect(t.parenR),e},i.parseParenAndDistinguishExpression=function(e,n){e=e||this.markPosition();var r=void 0;if(this.options.ecmaVersion>=6){if(this.next(),(this.options.features["es7.comprehensions"]||this.options.ecmaVersion>=7)&&this.type===t._for)return this.parseComprehension(this.startNodeAt(e),!0);for(var l=this.markPosition(),i=[],a=!0,s={start:0},o=void 0,u=void 0;this.type!==t.parenR;){if(a?a=!1:this.expect(t.comma),this.type===t.ellipsis){var p=this.markPosition();o=this.start,i.push(this.parseParenItem(this.parseRest(),p));break}this.type!==t.parenL||u||(u=this.start),i.push(this.parseMaybeAssign(!1,s,this.parseParenItem))}var c=this.markPosition(); if(this.expect(t.parenR),!this.canInsertSemicolon()&&this.eat(t.arrow))return u&&this.unexpected(u),this.parseParenArrowList(e,i,n);i.length||this.unexpected(this.lastTokStart),o&&this.unexpected(o),s.start&&this.unexpected(s.start),i.length>1?(r=this.startNodeAt(l),r.expressions=i,this.finishNodeAt(r,"SequenceExpression",c)):r=i[0]}else r=this.parseParenExpression();if(this.options.preserveParens){var d=this.startNodeAt(e);return d.expression=r,this.finishNode(d,"ParenthesizedExpression")}return r.parenthesizedExpression=!0,r},i.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e),t,n)},i.parseParenItem=function(e){return e};var a=[];i.parseNew=function(){var e=this.startNode(),n=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(t.dot))return e.meta=n,e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raise(e.property.start,"The only valid meta property for new is new.target"),this.finishNode(e,"MetaProperty");var r=this.markPosition();return e.callee=this.parseSubscripts(this.parseExprAtom(),r,!0),e.arguments=this.eat(t.parenL)?this.parseExprList(t.parenR,!1):a,this.finishNode(e,"NewExpression")},i.parseTemplateElement=function(){var e=this.startNode();return e.value={raw:this.input.slice(this.start,this.end),cooked:this.value},this.next(),e.tail=this.type===t.backQuote,this.finishNode(e,"TemplateElement")},i.parseTemplate=function(){var e=this.startNode();this.next(),e.expressions=[];var n=this.parseTemplateElement();for(e.quasis=[n];!n.tail;)this.expect(t.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(t.braceR),e.quasis.push(n=this.parseTemplateElement());return this.next(),this.finishNode(e,"TemplateLiteral")},i.parseObj=function(e,n){var r=this.startNode(),l=!0,i={};for(r.properties=[],this.next();!this.eat(t.braceR);){if(l)l=!1;else if(this.expect(t.comma),this.afterTrailingComma(t.braceR))break;var a=this.startNode(),s=!1,o=!1,u=void 0;if(this.options.features["es7.objectRestSpread"]&&this.type===t.ellipsis)a=this.parseSpread(),a.type="SpreadProperty",r.properties.push(a);else{if(this.options.ecmaVersion>=6&&(a.method=!1,a.shorthand=!1,(e||n)&&(u=this.markPosition()),e||(s=this.eat(t.star))),this.options.features["es7.asyncFunctions"]&&this.isContextual("async")){(s||e)&&this.unexpected();var p=this.parseIdent();this.type===t.colon||this.type===t.parenL?a.key=p:(o=!0,this.parsePropertyName(a))}else this.parsePropertyName(a);this.parseObjPropValue(a,u,s,o,e,n),this.checkPropClash(a,i),r.properties.push(this.finishNode(a,"Property"))}}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")},i.parseObjPropValue=function(e,n,l,i,a,s){this.eat(t.colon)?(e.value=a?this.parseMaybeDefault():this.parseMaybeAssign(!1,s),e.kind="init"):this.options.ecmaVersion>=6&&this.type===t.parenL?(a&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(l,i)):this.options.ecmaVersion>=5&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&this.type!=t.comma&&this.type!=t.braceR?((l||i||a)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1)):this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?(e.kind="init",a?((this.isKeyword(e.key.name)||this.strict&&(r.strictBind(e.key.name)||r.strict(e.key.name))||!this.options.allowReserved&&this.isReservedWord(e.key.name))&&this.raise(e.key.start,"Binding "+e.key.name),e.value=this.parseMaybeDefault(n,e.key)):this.type===t.eq&&s?(s.start||(s.start=this.start),e.value=this.parseMaybeDefault(n,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected()},i.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(t.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),void this.expect(t.bracketR);e.computed=!1}e.key=this.type===t.num||this.type===t.string?this.parseExprAtom():this.parseIdent(!0)},i.initFunction=function(e,t){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.features["es7.asyncFunctions"]&&(e.async=!!t)},i.parseMethod=function(e,n){var r=this.startNode();return this.initFunction(r,n),this.expect(t.parenL),r.params=this.parseBindingList(t.parenR,!1,!1),this.options.ecmaVersion>=6&&(r.generator=e),this.parseFunctionBody(r),this.finishNode(r,"FunctionExpression")},i.parseArrowExpression=function(e,t,n){return this.initFunction(e,n),e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},i.parseFunctionBody=function(e,n){var r=n&&this.type!==t.braceL,l=this.inAsync;if(this.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var i=this.inFunction,a=this.inGenerator,s=this.labels;this.inFunction=!0,this.inGenerator=e.generator,this.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.inFunction=i,this.inGenerator=a,this.labels=s}if(this.inAsync=l,this.strict||!r&&e.body.body.length&&this.isUseStrict(e.body.body[0])){var o={},u=this.strict;this.strict=!0,e.id&&this.checkLVal(e.id,!0);for(var p=0;p<e.params.length;p++)this.checkLVal(e.params[p],!0,o);this.strict=u}},i.parseExprList=function(e,n,r,l){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(t.comma),n&&this.afterTrailingComma(e))break;i.push(r&&this.type===t.comma?null:this.type===t.ellipsis?this.parseSpread(l):this.parseMaybeAssign(!1,l))}return i},i.parseIdent=function(e){var n=this.startNode();return e&&"never"==this.options.allowReserved&&(e=!1),this.type===t.name?(!e&&(!this.options.allowReserved&&this.isReservedWord(this.value)||this.strict&&r.strict(this.value)&&(this.options.ecmaVersion>=6||-1==this.input.slice(this.start,this.end).indexOf("\\")))&&this.raise(this.start,"The keyword '"+this.value+"' is reserved"),n.name=this.value):e&&this.type.keyword?n.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(n,"Identifier")},i.parseAwait=function(e){return(this.eat(t.semi)||this.canInsertSemicolon())&&this.unexpected(),e.all=this.eat(t.star),e.argument=this.parseMaybeAssign(!0),this.finishNode(e,"AwaitExpression")},i.parseYield=function(){var e=this.startNode();return this.next(),this.type==t.semi||this.canInsertSemicolon()||this.type!=t.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(t.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")},i.parseComprehension=function(e,n){for(e.blocks=[];this.type===t._for;){var r=this.startNode();this.next(),this.expect(t.parenL),r.left=this.parseBindingAtom(),this.checkLVal(r.left,!0),this.expectContextual("of"),r.right=this.parseExpression(),this.expect(t.parenR),e.blocks.push(this.finishNode(r,"ComprehensionBlock"))}return e.filter=this.eat(t._if)?this.parseParenExpression():null,e.body=this.parseExpression(),this.expect(n?t.parenR:t.bracketR),e.generator=n,this.finishNode(e,"ComprehensionExpression")}},{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],4:[function(e,t,n){"use strict";function r(e){function t(e){if(1==e.length)return n+="return str === "+JSON.stringify(e[0])+";";n+="switch(str){";for(var t=0;t<e.length;++t)n+="case "+JSON.stringify(e[t])+":";n+="return true}return false;"}e=e.split(" ");var n="",r=[];e:for(var l=0;l<e.length;++l){for(var i=0;i<r.length;++i)if(r[i][0].length==e[l].length){r[i].push(e[l]);continue e}r.push([e[l]])}if(r.length>3){r.sort(function(e,t){return t.length-e.length}),n+="switch(str.length){";for(var l=0;l<r.length;++l){var a=r[l];n+="case "+a[0].length+":",t(a)}n+="}"}else t(e);return new Function("str",n)}function l(e,t){for(var n=65536,r=0;r<t.length;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}}function i(e,t){return 65>e?36===e:91>e?!0:97>e?95===e:123>e?!0:65535>=e?e>=170&&d.test(String.fromCharCode(e)):t===!1?!1:l(e,h)}function a(e,t){return 48>e?36===e:58>e?!0:65>e?!1:91>e?!0:97>e?95===e:123>e?!0:65535>=e?e>=170&&f.test(String.fromCharCode(e)):t===!1?!1:l(e,h)||l(e,m)}n.isIdentifierStart=i,n.isIdentifierChar=a,n.__esModule=!0;var s={3:r("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"),5:r("class enum extends super const export import"),6:r("enum await"),strict:r("implements interface let package private protected public static yield"),strictBind:r("eval arguments")};n.reservedWords=s;var o="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",u={5:r(o),6:r(o+" let const class extends export import yield super")};n.keywords=u;var p="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",c="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_",d=new RegExp("["+p+"]"),f=new RegExp("["+p+c+"]");p=c=null;var h=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,99,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,98,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,955,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,38,17,2,24,133,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,32,4,287,47,21,1,2,0,185,46,82,47,21,0,60,42,502,63,32,0,449,56,1288,920,104,110,2962,1070,13266,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,16481,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,1340,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,16355,541],m=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,16,9,83,11,168,11,6,9,8,2,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,316,19,13,9,214,6,3,8,112,16,16,9,82,12,9,9,535,9,20855,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,4305,6,792618,239]},{}],5:[function(e,t,n){"use strict";function r(e,t){var n=a(t,e),r=n.options.locations?[n.pos,n.curPosition()]:n.pos;return n.nextToken(),n.parseTopLevel(n.options.program||n.startNodeAt(r))}function l(e,t,n){var r=a(n,e,t);return r.nextToken(),r.parseExpression()}function i(e,t){return a(t,e)}function a(e,t){return new o(p(e),String(t))}n.parse=r,n.parseExpressionAt=l,n.tokenizer=i,n.__esModule=!0;var s=e("./state"),o=s.Parser,u=e("./options"),p=u.getOptions;e("./parseutil"),e("./statement"),e("./lval"),e("./expression"),e("./lookahead"),n.Parser=s.Parser,n.plugins=s.plugins,n.defaultOptions=u.defaultOptions;var c=e("./location");n.SourceLocation=c.SourceLocation,n.getLineInfo=c.getLineInfo,n.Node=e("./node").Node;var d=e("./tokentype");n.TokenType=d.TokenType,n.tokTypes=d.types;var f=e("./tokencontext");n.TokContext=f.TokContext,n.tokContexts=f.types;var h=e("./identifier");n.isIdentifierChar=h.isIdentifierChar,n.isIdentifierStart=h.isIdentifierStart,n.Token=e("./tokenize").Token;var m=e("./whitespace");n.isNewLine=m.isNewLine,n.lineBreak=m.lineBreak,n.lineBreakG=m.lineBreakG,e("../plugins/flow"),e("../plugins/jsx");var g="1.0.0";n.version=g},{"../plugins/flow":1,"../plugins/jsx":2,"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(e,t,n){"use strict";function r(e,t){for(var n=1,r=0;;){a.lastIndex=r;var l=a.exec(e);if(!(l&&l.index<t))return new s(n,t-r);++n,r=l.index+l[0].length}}var l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};n.getLineInfo=r,n.__esModule=!0;var i=e("./state").Parser,a=e("./whitespace").lineBreakG,s=n.Position=function(){function e(t,n){l(this,e),this.line=t,this.column=n}return e.prototype.offset=function(t){return new e(this.line,this.column+t)},e}(),o=(n.SourceLocation=function u(e,t,n){l(this,u),this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)},i.prototype);o.raise=function(e,t){var n=r(this.input,e);t+=" ("+n.line+":"+n.column+")";var l=new SyntaxError(t);throw l.pos=e,l.loc=n,l.raisedAt=this.pos,l},o.curPosition=function(){return new s(this.curLine,this.pos-this.lineStart)},o.markPosition=function(){return this.options.locations?[this.start,this.startLoc]:this.start}},{"./state":12,"./whitespace":18}],7:[function(e){"use strict";var t=e("./state").Parser,n=t.prototype,r=["lastTokStartLoc","lastTokEndLoc","lastTokStart","lastTokEnd","lineStart","startLoc","endLoc","start","pos","end","type","value"];n.getState=function(){for(var e={},t=0;t<r.length;t++){var n=r[t];e[n]=this[n]}return e},n.lookahead=function(){var e=this.getState();this.next();var t=this.getState();for(var n in e)this[n]=e[n];return t}},{"./state":12}],8:[function(e){"use strict";var t=e("./tokentype").types,n=e("./state").Parser,r=e("./identifier").reservedWords,l=e("./util").has,i=n.prototype;i.toAssignable=function(e,t){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=0;n<e.properties.length;n++){var r=e.properties[n];"init"!==r.kind&&this.raise(r.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(r.value,t)}break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t);break;case"AssignmentExpression":"="===e.operator?e.type="AssignmentPattern":this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}return e},i.toAssignableList=function(e,t){var n=e.length;if(n){var r=e[n-1];if(r&&"RestElement"==r.type)--n;else if(r&&"SpreadElement"==r.type){r.type="RestElement";var l=r.argument;this.toAssignable(l,t),"Identifier"!==l.type&&"MemberExpression"!==l.type&&"ArrayPattern"!==l.type&&this.unexpected(l.start),--n}}for(var i=0;n>i;i++){var a=e[i];a&&this.toAssignable(a,t)}return e},i.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(e),this.finishNode(t,"SpreadElement")},i.parseRest=function(){var e=this.startNode();return this.next(),e.argument=this.type===t.name||this.type===t.bracketL?this.parseBindingAtom():this.unexpected(),this.finishNode(e,"RestElement")},i.parseBindingAtom=function(){if(this.options.ecmaVersion<6)return this.parseIdent();switch(this.type){case t.name:return this.parseIdent();case t.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(t.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case t.braceL:return this.parseObj(!0);default:this.unexpected()}},i.parseBindingList=function(e,n,r){for(var l=[],i=!0;!this.eat(e);)if(i?i=!1:this.expect(t.comma),n&&this.type===t.comma)l.push(null);else{if(r&&this.afterTrailingComma(e))break;if(this.type===t.ellipsis){l.push(this.parseAssignableListItemTypes(this.parseRest())),this.expect(e);break}l.push(this.parseAssignableListItemTypes(this.parseMaybeDefault()))}return l},i.parseAssignableListItemTypes=function(e){return e},i.parseMaybeDefault=function(e,n){if(e=e||this.markPosition(),n=n||this.parseBindingAtom(),!this.eat(t.eq))return n;var r=this.startNodeAt(e);return r.operator="=",r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},i.checkLVal=function(e,t,n){switch(e.type){case"Identifier":this.strict&&(r.strictBind(e.name)||r.strict(e.name))&&this.raise(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(l(n,e.name)&&this.raise(e.start,"Argument name clash in strict mode"),n[e.name]=!0);break;case"MemberExpression":t&&this.raise(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":for(var i=0;i<e.properties.length;i++){var a=e.properties[i];"Property"===a.type&&(a=a.value),this.checkLVal(a,t,n)}break;case"ArrayPattern":for(var i=0;i<e.elements.length;i++){var s=e.elements[i];s&&this.checkLVal(s,t,n)}break;case"AssignmentPattern":this.checkLVal(e.left,t,n);break;case"SpreadProperty":case"RestElement":this.checkLVal(e.argument,t,n);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}}},{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],9:[function(e,t,n){"use strict";var r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};n.__esModule=!0;var l=e("./state").Parser,i=e("./location").SourceLocation,a=l.prototype,s=n.Node=function o(){r(this,o)};a.startNode=function(){var e=new s;return e.start=this.start,this.options.locations&&(e.loc=new i(this,this.startLoc)),this.options.directSourceFile&&(e.sourceFile=this.options.directSourceFile),this.options.ranges&&(e.range=[this.start,0]),e},a.startNodeAt=function(e){var t=new s,n=e;return this.options.locations&&(t.loc=new i(this,n[1]),n=e[0]),t.start=n,this.options.directSourceFile&&(t.sourceFile=this.options.directSourceFile),this.options.ranges&&(t.range=[n,0]),t},a.finishNode=function(e,t){return e.type=t,e.end=this.lastTokEnd,this.options.locations&&(e.loc.end=this.lastTokEndLoc),this.options.ranges&&(e.range[1]=this.lastTokEnd),e},a.finishNodeAt=function(e,t,n){return this.options.locations&&(e.loc.end=n[1],n=n[0]),e.type=t,e.end=n,this.options.ranges&&(e.range[1]=n),e}},{"./location":6,"./state":12}],10:[function(e,t,n){"use strict";function r(e){var t={};for(var n in u)t[n]=e&&a(e,n)?e[n]:u[n];return s(t.onToken)&&!function(){var e=t.onToken;t.onToken=function(t){return e.push(t)}}(),s(t.onComment)&&(t.onComment=l(t,t.onComment)),t}function l(e,t){return function(n,r,l,i,a,s){var u={type:n?"Block":"Line",value:r,start:l,end:i};e.locations&&(u.loc=new o(this,a,s)),e.ranges&&(u.range=[l,i]),t.push(u)}}n.getOptions=r,n.__esModule=!0;var i=e("./util"),a=i.has,s=i.isArray,o=e("./location").SourceLocation,u={ecmaVersion:5,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:!0,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,plugins:{},features:{},strictMode:null};n.defaultOptions=u},{"./location":6,"./util":17}],11:[function(e){"use strict";var t=e("./tokentype").types,n=e("./state").Parser,r=e("./whitespace").lineBreak,l=n.prototype;l.isUseStrict=function(e){return this.options.ecmaVersion>=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"use strict"===e.expression.value},l.eat=function(e){return this.type===e?(this.next(),!0):!1},l.isContextual=function(e){return this.type===t.name&&this.value===e},l.eatContextual=function(e){return this.value===e&&this.eat(t.name)},l.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},l.canInsertSemicolon=function(){return this.type===t.eof||this.type===t.braceR||r.test(this.input.slice(this.lastTokEnd,this.start))},l.insertSemicolon=function(){return this.canInsertSemicolon()?(this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0):void 0},l.semicolon=function(){this.eat(t.semi)||this.insertSemicolon()||this.unexpected()},l.afterTrailingComma=function(e){return this.type==e?(this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),this.next(),!0):void 0},l.expect=function(e){this.eat(e)||this.unexpected()},l.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")}},{"./state":12,"./tokentype":16,"./whitespace":18}],12:[function(e,t,n){"use strict";function r(e,t,n){this.options=e,this.loadPlugins(this.options.plugins),this.sourceFile=this.options.sourceFile||null,this.isKeyword=a[this.options.ecmaVersion>=6?6:5],this.isReservedWord=i[this.options.ecmaVersion],this.input=t,n?(this.pos=n,this.lineStart=Math.max(0,this.input.lastIndexOf("\n",n)),this.curLine=this.input.slice(0,this.lineStart).split(u).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=o.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=null,this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===this.options.sourceType,this.strict=this.options.strictMode===!1?!1:this.inModule,this.inFunction=this.inGenerator=!1,this.labels=[],this.decorators=[],0===this.pos&&this.options.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2)}n.Parser=r,n.__esModule=!0;var l=e("./identifier"),i=l.reservedWords,a=l.keywords,s=e("./tokentype"),o=s.types,u=s.lineBreak;r.prototype.extend=function(e,t){this[e]=t(this[e])};var p={};n.plugins=p,r.prototype.loadPlugins=function(e){for(var t in e){var r=n.plugins[t];if(!r)throw new Error("Plugin '"+t+"' not found");r(this,e[t])}}},{"./identifier":4,"./tokentype":16}],13:[function(e){"use strict";var t=e("./tokentype").types,n=e("./state").Parser,r=e("./whitespace").lineBreak,l=n.prototype;l.parseTopLevel=function(e){var n=!0;for(e.body||(e.body=[]);this.type!==t.eof;){var r=this.parseStatement(!0,!0);e.body.push(r),n&&this.isUseStrict(r)&&this.setStrict(!0),n=!1}return this.next(),this.options.ecmaVersion>=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var i={kind:"loop"},a={kind:"switch"};l.parseStatement=function(e,n){this.type===t.at&&this.parseDecorators(!0);var r=this.type,l=this.startNode();switch(r){case t._break:case t._continue:return this.parseBreakContinueStatement(l,r.keyword);case t._debugger:return this.parseDebuggerStatement(l);case t._do:return this.parseDoStatement(l);case t._for:return this.parseForStatement(l);case t._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(l);case t._class:return e||this.unexpected(),this.takeDecorators(l),this.parseClass(l,!0);case t._if:return this.parseIfStatement(l);case t._return:return this.parseReturnStatement(l);case t._switch:return this.parseSwitchStatement(l);case t._throw:return this.parseThrowStatement(l);case t._try:return this.parseTryStatement(l);case t._let:case t._const:e||this.unexpected();case t._var:return this.parseVarStatement(l,r);case t._while:return this.parseWhileStatement(l);case t._with:return this.parseWithStatement(l);case t.braceL:return this.parseBlock();case t.semi:return this.parseEmptyStatement(l);case t._export:case t._import:return this.options.allowImportExportEverywhere||(n||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===t._import?this.parseImport(l):this.parseExport(l);case t.name:if(this.options.features["es7.asyncFunctions"]&&"async"===this.value&&this.lookahead().type===t._function)return this.next(),this.expect(t._function),this.parseFunction(l,!0,!1,!0);default:var i=this.value,a=this.parseExpression();return r===t.name&&"Identifier"===a.type&&this.eat(t.colon)?this.parseLabeledStatement(l,i,a):this.parseExpressionStatement(l,a)}},l.takeDecorators=function(e){this.decorators.length&&(e.decorators=this.decorators,this.decorators=[])},l.parseDecorators=function(e){for(;this.type===t.at;)this.decorators.push(this.parseDecorator());e&&this.type===t._export||this.type!==t._class&&this.raise(this.start,"Leading decorators must be attached to a class declaration")},l.parseDecorator=function(){this.options.features["es7.decorators"]||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},l.parseBreakContinueStatement=function(e,n){var r="break"==n;this.next(),this.eat(t.semi)||this.insertSemicolon()?e.label=null:this.type!==t.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var l=0;l<this.labels.length;++l){var i=this.labels[l];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(r||"loop"===i.kind))break;if(e.label&&r)break}}return l===this.labels.length&&this.raise(e.start,"Unsyntactic "+n),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},l.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},l.parseDoStatement=function(e){var n=this.markPosition();if(this.next(),this.labels.push(i),e.body=this.parseStatement(!1),this.labels.pop(),this.options.features["es7.doExpressions"]&&this.type!==t._while){var r=this.startNodeAt(n);return r.expression=this.finishNode(e,"DoExpression"),this.semicolon(),this.finishNode(r,"ExpressionStatement")}return this.expect(t._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(t.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},l.parseForStatement=function(e){if(this.next(),this.labels.push(i),this.expect(t.parenL),this.type===t.semi)return this.parseFor(e,null);if(this.type===t._var||this.type===t._let||this.type===t._const){var n=this.startNode(),r=this.type;return this.next(),this.parseVar(n,!0,r),this.finishNode(n,"VariableDeclaration"),!(this.type===t._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||r!==t._var&&n.declarations[0].init?this.parseFor(e,n):this.parseForIn(e,n)}var l={start:0},a=this.parseExpression(!0,l);return this.type===t._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(a),this.checkLVal(a),this.parseForIn(e,a)):(l.start&&this.unexpected(l.start),this.parseFor(e,a))},l.parseFunctionStatement=function(e){return this.next(),this.parseFunction(e,!0)},l.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!1),e.alternate=this.eat(t._else)?this.parseStatement(!1):null,this.finishNode(e,"IfStatement")},l.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(t.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},l.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(t.braceL),this.labels.push(a);for(var n,r;this.type!=t.braceR;)if(this.type===t._case||this.type===t._default){var l=this.type===t._case;n&&this.finishNode(n,"SwitchCase"),e.cases.push(n=this.startNode()),n.consequent=[],this.next(),l?n.test=this.parseExpression():(r&&this.raise(this.lastTokStart,"Multiple default clauses"),r=!0,n.test=null),this.expect(t.colon)}else n||this.unexpected(),n.consequent.push(this.parseStatement(!0));return n&&this.finishNode(n,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},l.parseThrowStatement=function(e){return this.next(),r.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var s=[];l.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===t._catch){var n=this.startNode();this.next(),this.expect(t.parenL),n.param=this.parseBindingAtom(),this.checkLVal(n.param,!0),this.expect(t.parenR),n.guard=null,n.body=this.parseBlock(),e.handler=this.finishNode(n,"CatchClause")}return e.guardedHandlers=s,e.finalizer=this.eat(t._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},l.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},l.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(i),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},l.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},l.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},l.parseLabeledStatement=function(e,n,r){for(var l=0;l<this.labels.length;++l)this.labels[l].name===n&&this.raise(r.start,"Label '"+n+"' is already declared");var i=this.type.isLoop?"loop":this.type===t._switch?"switch":null;return this.labels.push({name:n,kind:i}),e.body=this.parseStatement(!0),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},l.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},l.parseBlock=function(e){var n=this.startNode(),r=!0,l=void 0;for(n.body=[],this.expect(t.braceL);!this.eat(t.braceR);){var i=this.parseStatement(!0);n.body.push(i),r&&e&&this.isUseStrict(i)&&(l=this.strict,this.setStrict(this.strict=!0)),r=!1}return l===!1&&this.setStrict(!1),this.finishNode(n,"BlockStatement")},l.parseFor=function(e,n){return e.init=n,this.expect(t.semi),e.test=this.type===t.semi?null:this.parseExpression(),this.expect(t.semi),e.update=this.type===t.parenR?null:this.parseExpression(),this.expect(t.parenR),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},l.parseForIn=function(e,n){var r=this.type===t._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=n,e.right=this.parseExpression(),this.expect(t.parenR),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,r)},l.parseVar=function(e,n,r){for(e.declarations=[],e.kind=r.keyword;;){var l=this.startNode();if(this.parseVarHead(l),this.eat(t.eq)?l.init=this.parseMaybeAssign(n):r!==t._const||this.type===t._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"==l.id.type||n&&(this.type===t._in||this.isContextual("of"))?l.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(l,"VariableDeclarator")),!this.eat(t.comma))break}return e},l.parseVarHead=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0)},l.parseFunction=function(e,n,r,l){return this.initFunction(e,l),this.options.ecmaVersion>=6&&(e.generator=this.eat(t.star)),(n||this.type===t.name)&&(e.id=this.parseIdent()),this.parseFunctionParams(e),this.parseFunctionBody(e,r),this.finishNode(e,n?"FunctionDeclaration":"FunctionExpression")},l.parseFunctionParams=function(e){this.expect(t.parenL),e.params=this.parseBindingList(t.parenR,!1,!1) },l.parseClass=function(e,n){this.next(),this.parseClassId(e,n),this.parseClassSuper(e);var r=this.startNode();for(r.body=[],this.expect(t.braceL);!this.eat(t.braceR);)if(!this.eat(t.semi))if(this.type!==t.at){var l=this.startNode();this.takeDecorators(l);var i=this.eat(t.star),a=!1;this.parsePropertyName(l),this.type===t.parenL||l.computed||"Identifier"!==l.key.type||"static"!==l.key.name?l["static"]=!1:(i&&this.unexpected(),l["static"]=!0,i=this.eat(t.star),this.parsePropertyName(l)),i||"Identifier"!==l.key.type||l.computed||!this.isClassProperty()?(this.options.features["es7.asyncFunctions"]&&this.type!==t.parenL&&!l.computed&&"Identifier"===l.key.type&&"async"===l.key.name&&(a=!0,this.parsePropertyName(l)),l.kind="method",l.computed||i||("Identifier"===l.key.type?this.type===t.parenL||"get"!==l.key.name&&"set"!==l.key.name?l["static"]||"constructor"!==l.key.name||(l.kind="constructor"):(l.kind=l.key.name,this.parsePropertyName(l)):l["static"]||"Literal"!==l.key.type||"constructor"!==l.key.value||(l.kind="constructor")),"constructor"===l.kind&&l.decorators&&this.raise(l.start,"You can't attach decorators to a class constructor"),this.parseClassMethod(r,l,i,a)):r.body.push(this.parseClassProperty(l))}else this.decorators.push(this.parseDecorator());return this.decorators.length&&this.raise(this.start,"You have trailing decorators with no method"),e.body=this.finishNode(r,"ClassBody"),this.finishNode(e,n?"ClassDeclaration":"ClassExpression")},l.isClassProperty=function(){return this.type===t.eq||this.type===t.semi||this.canInsertSemicolon()},l.parseClassProperty=function(e){return this.type===t.eq?(this.options.features["es7.classProperties"]||this.unexpected(),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.finishNode(e,"ClassProperty")},l.parseClassMethod=function(e,t,n,r){t.value=this.parseMethod(n,r),e.body.push(this.finishNode(t,"MethodDefinition"))},l.parseClassId=function(e,n){e.id=this.type===t.name?this.parseIdent():n?this.unexpected():null},l.parseClassSuper=function(e){e.superClass=this.eat(t._extends)?this.parseExprSubscripts():null},l.parseExport=function(e){if(this.next(),this.eat(t.star)){if(!this.options.features["es7.exportExtensions"]||!this.eatContextual("as"))return this.parseExportFrom(e),this.finishNode(e,"ExportAllDeclaration");var n=this.startNode();n.exported=this.parseIdent(),e.specifiers=[this.finishNode(n,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e)}else if(this.isExportDefaultSpecifier()){var n=this.startNode();n.exported=this.parseIdent(!0),e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e)}else{if(this.eat(t._default)){var r=this.parseMaybeAssign(),l=!0;return("FunctionExpression"==r.type||"ClassExpression"==r.type)&&(l=!1,r.id&&(r.type="FunctionExpression"==r.type?"FunctionDeclaration":"ClassDeclaration")),e.declaration=r,l&&this.semicolon(),this.checkExport(e),this.finishNode(e,"ExportDefaultDeclaration")}this.type.keyword||this.shouldParseExportDeclaration()?(e.declaration=this.parseStatement(!0),e.specifiers=[],e.source=null):(e.declaration=null,e.specifiers=this.parseExportSpecifiers(),e.source=this.eatContextual("from")?this.type===t.string?this.parseExprAtom():this.unexpected():null,this.semicolon())}return this.checkExport(e),this.finishNode(e,"ExportNamedDeclaration")},l.isExportDefaultSpecifier=function(){if(this.type===t.name)return"type"!==this.value&&"async"!==this.value;if(this.type!==t._default)return!1;var e=this.lookahead();return e.type===t.comma||e.type===t.name&&"from"===e.value},l.parseExportSpecifiersMaybe=function(e){this.eat(t.comma)&&(e.specifiers=e.specifiers.concat(this.parseExportSpecifiers()))},l.parseExportFrom=function(e){this.expectContextual("from"),e.source=this.type===t.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.checkExport(e)},l.shouldParseExportDeclaration=function(){return this.options.features["es7.asyncFunctions"]&&this.isContextual("async")},l.checkExport=function(e){if(this.decorators.length){var t=e.declaration&&("ClassDeclaration"===e.declaration.type||"ClassExpression"===e.declaration.type);e.declaration&&t||this.raise(e.start,"You can only use decorators on an export when exporting a class"),this.takeDecorators(e.declaration)}},l.parseExportSpecifiers=function(){var e=[],n=!0;for(this.expect(t.braceL);!this.eat(t.braceR);){if(n)n=!1;else if(this.expect(t.comma),this.afterTrailingComma(t.braceR))break;var r=this.startNode();r.local=this.parseIdent(this.type===t._default),r.exported=this.eatContextual("as")?this.parseIdent(!0):r.local,e.push(this.finishNode(r,"ExportSpecifier"))}return e},l.parseImport=function(e){return this.next(),this.type===t.string?(e.specifiers=s,e.source=this.parseExprAtom(),e.kind=""):(e.specifiers=[],this.parseImportSpecifiers(e),this.expectContextual("from"),e.source=this.type===t.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},l.parseImportSpecifiers=function(e){var n=!0;if(this.type===t.name){var r=this.markPosition();if(e.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(),r)),!this.eat(t.comma))return}if(this.type===t.star){var l=this.startNode();return this.next(),this.expectContextual("as"),l.local=this.parseIdent(),this.checkLVal(l.local,!0),void e.specifiers.push(this.finishNode(l,"ImportNamespaceSpecifier"))}for(this.expect(t.braceL);!this.eat(t.braceR);){if(n)n=!1;else if(this.expect(t.comma),this.afterTrailingComma(t.braceR))break;var l=this.startNode();l.imported=this.parseIdent(!0),l.local=this.eatContextual("as")?this.parseIdent():l.imported,this.checkLVal(l.local,!0),e.specifiers.push(this.finishNode(l,"ImportSpecifier"))}},l.parseImportSpecifierDefault=function(e,t){var n=this.startNodeAt(t);return n.local=e,this.checkLVal(n.local,!0),this.finishNode(n,"ImportDefaultSpecifier")}},{"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(e,t,n){"use strict";var r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};n.__esModule=!0;var l=e("./state").Parser,i=e("./tokentype").types,a=e("./whitespace").lineBreak,s=n.TokContext=function p(e,t,n,l){r(this,p),this.token=e,this.isExpr=t,this.preserveSpace=n,this.override=l},o={b_stat:new s("{",!1),b_expr:new s("{",!0),b_tmpl:new s("${",!0),p_stat:new s("(",!1),p_expr:new s("(",!0),q_tmpl:new s("`",!0,!0,function(e){return e.readTmplToken()}),f_expr:new s("function",!0)};n.types=o;var u=l.prototype;u.initialContext=function(){return[o.b_stat]},u.braceIsBlock=function(e){var t=void 0;return e===i.colon&&"{"==(t=this.curContext()).token?!t.isExpr:e===i._return?a.test(this.input.slice(this.lastTokEnd,this.start)):e===i._else||e===i.semi||e===i.eof?!0:e==i.braceL?this.curContext()===o.b_stat:!this.exprAllowed},u.updateContext=function(e){var t=void 0,n=this.type;n.keyword&&e==i.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},i.parenR.updateContext=i.braceR.updateContext=function(){if(1==this.context.length)return void(this.exprAllowed=!0);var e=this.context.pop();e===o.b_stat&&this.curContext()===o.f_expr?(this.context.pop(),this.exprAllowed=!1):this.exprAllowed=e===o.b_tmpl?!0:!e.isExpr},i.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?o.b_stat:o.b_expr),this.exprAllowed=!0},i.dollarBraceL.updateContext=function(){this.context.push(o.b_tmpl),this.exprAllowed=!0},i.parenL.updateContext=function(e){var t=e===i._if||e===i._for||e===i._with||e===i._while;this.context.push(t?o.p_stat:o.p_expr),this.exprAllowed=!0},i.incDec.updateContext=function(){},i._function.updateContext=function(){this.curContext()!==o.b_stat&&this.context.push(o.f_expr),this.exprAllowed=!1},i.backQuote.updateContext=function(){this.curContext()===o.q_tmpl?this.context.pop():this.context.push(o.q_tmpl),this.exprAllowed=!1}},{"./state":12,"./tokentype":16,"./whitespace":18}],15:[function(e,t,n){"use strict";function r(e){return 65535>=e?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};n.__esModule=!0;var i=e("./identifier"),a=i.isIdentifierStart,s=i.isIdentifierChar,o=e("./tokentype"),u=o.types,p=o.keywords,c=e("./state").Parser,d=e("./location").SourceLocation,f=e("./whitespace"),h=f.lineBreak,m=f.lineBreakG,g=f.isNewLine,y=f.nonASCIIwhitespace,b=n.Token=function S(e){l(this,S),this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new d(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},v=c.prototype;v.next=function(){this.options.onToken&&this.options.onToken(new b(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},v.getToken=function(){return this.next(),new b(this)},"undefined"!=typeof Symbol&&(v[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===u.eof,value:t}}}}),v.setStrict=function(e){if(this.strict=e,this.type===u.num||this.type===u.string){if(this.pos=this.start,this.options.locations)for(;this.pos<this.lineStart;)this.lineStart=this.input.lastIndexOf("\n",this.lineStart-2)+1,--this.curLine;this.nextToken()}},v.curContext=function(){return this.context[this.context.length-1]},v.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(u.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},v.readToken=function(e){return a(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},v.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(55295>=e||e>=57344)return e;var t=this.input.charCodeAt(this.pos+1);return(e<<10)+t-56613888},v.skipBlockComment=function(){var e=this.options.onComment&&this.options.locations&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations){m.lastIndex=t;for(var r=void 0;(r=m.exec(this.input))&&r.index<this.pos;)++this.curLine,this.lineStart=r.index+r[0].length}this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.options.locations&&this.curPosition())},v.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.options.locations&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&10!==r&&13!==r&&8232!==r&&8233!==r;)++this.pos,r=this.input.charCodeAt(this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.options.locations&&this.curPosition())},v.skipSpace=function(){for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);if(32===e)++this.pos;else if(13===e){++this.pos;var t=this.input.charCodeAt(this.pos);10===t&&++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos)}else if(10===e||8232===e||8233===e)++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);else if(e>8&&14>e)++this.pos;else if(47===e){var t=this.input.charCodeAt(this.pos+1);if(42===t)this.skipBlockComment();else{if(47!==t)break;this.skipLineComment(2)}}else if(160===e)++this.pos;else{if(!(e>=5760&&y.test(String.fromCharCode(e))))break;++this.pos}}},v.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},v.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&57>=e)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(u.ellipsis)):(++this.pos,this.finishToken(u.dot))},v.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(u.assign,2):this.finishOp(u.slash,1)},v.readToken_mult_modulo=function(e){var t=42===e?u.star:u.modulo,n=1,r=this.input.charCodeAt(this.pos+1);return 42===r&&(n++,r=this.input.charCodeAt(this.pos+2),t=u.exponent),61===r&&(n++,t=u.assign),this.finishOp(t,n)},v.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?u.logicalOR:u.logicalAND,2):61===t?this.finishOp(u.assign,2):this.finishOp(124===e?u.bitwiseOR:u.bitwiseAND,1)},v.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(u.assign,2):this.finishOp(u.bitwiseXOR,1)},v.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45==t&&62==this.input.charCodeAt(this.pos+2)&&h.test(this.input.slice(this.lastTokEnd,this.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(u.incDec,2):61===t?this.finishOp(u.assign,2):this.finishOp(u.plusMin,1)},v.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(u.assign,n+1):this.finishOp(u.bitShift,n)):33==t&&60==e&&45==this.input.charCodeAt(this.pos+2)&&45==this.input.charCodeAt(this.pos+3)?(this.inModule&&unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(n=61===this.input.charCodeAt(this.pos+2)?3:2),this.finishOp(u.relational,n))},v.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(u.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(u.arrow)):this.finishOp(61===e?u.eq:u.prefix,1)},v.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(u.parenL);case 41:return++this.pos,this.finishToken(u.parenR);case 59:return++this.pos,this.finishToken(u.semi);case 44:return++this.pos,this.finishToken(u.comma);case 91:return++this.pos,this.finishToken(u.bracketL);case 93:return++this.pos,this.finishToken(u.bracketR);case 123:return++this.pos,this.finishToken(u.braceL);case 125:return++this.pos,this.finishToken(u.braceR);case 58:return++this.pos,this.finishToken(u.colon);case 63:return++this.pos,this.finishToken(u.question);case 64:return++this.pos,this.finishToken(u.at);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(u.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(u.prefix,1)}this.raise(this.pos,"Unexpected character '"+r(e)+"'")},v.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var x=!1;try{new RegExp("￿","u"),x=!0}catch(E){}v.readRegexp=function(){for(var e=void 0,t=void 0,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(h.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var l=this.input.slice(n,this.pos);++this.pos;var i=this.readWord1(),a=l;if(i){var s=/^[gmsiy]*$/;this.options.ecmaVersion>=6&&(s=/^[gmsiyu]*$/),s.test(i)||this.raise(n,"Invalid regular expression flag"),i.indexOf("u")>=0&&!x&&(a=a.replace(/\\u([a-fA-F0-9]{4})|\\u\{([0-9a-fA-F]+)\}|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"))}try{new RegExp(a)}catch(o){o instanceof SyntaxError&&this.raise(n,"Error parsing regular expression: "+o.message),this.raise(o)}var p=void 0;try{p=new RegExp(l,i)}catch(c){p=null}return this.finishToken(u.regexp,{pattern:l,flags:i,value:p})},v.readInt=function(e,t){for(var n=this.pos,r=0,l=0,i=null==t?1/0:t;i>l;++l){var a=this.input.charCodeAt(this.pos),s=void 0;if(s=a>=97?a-97+10:a>=65?a-65+10:a>=48&&57>=a?a-48:1/0,s>=e)break;++this.pos,r=r*e+s}return this.pos===n||null!=t&&this.pos-n!==t?null:r},v.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),a(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(u.num,t)},v.readNumber=function(e){var t=this.pos,n=!1,r=48===this.input.charCodeAt(this.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number"),46===this.input.charCodeAt(this.pos)&&(++this.pos,this.readInt(10),n=!0);var l=this.input.charCodeAt(this.pos);(69===l||101===l)&&(l=this.input.charCodeAt(++this.pos),(43===l||45===l)&&++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0),a(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var i=this.input.slice(t,this.pos),s=void 0;return n?s=parseFloat(i):r&&1!==i.length?/[89]/.test(i)||this.strict?this.raise(t,"Invalid number"):s=parseInt(i,8):s=parseInt(i,10),this.finishToken(u.num,s)},v.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t=void 0;return 123===e?(this.options.ecmaVersion<6&&this.unexpected(),++this.pos,t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.unexpected()):t=this.readHexChar(4),t},v.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(),n=this.pos):(g(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(u.string,t)},v.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos===this.start&&this.type===u.template?36===n?(this.pos+=2,this.finishToken(u.dollarBraceL)):(++this.pos,this.finishToken(u.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(u.template,e));92===n?(e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(),t=this.pos):g(n)?(e+=this.input.slice(t,this.pos),++this.pos,13===n&&10===this.input.charCodeAt(this.pos)?(++this.pos,e+="\n"):e+=String.fromCharCode(n),this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos):++this.pos}},v.readEscapedChar=function(){var e=this.input.charCodeAt(++this.pos),t=/^[0-7]+/.exec(this.input.slice(this.pos,this.pos+3));for(t&&(t=t[0]);t&&parseInt(t,8)>255;)t=t.slice(0,-1);if("0"===t&&(t=null),++this.pos,t)return this.strict&&this.raise(this.pos-2,"Octal literal in strict mode"),this.pos+=t.length-1,String.fromCharCode(parseInt(t,8));switch(e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return r(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return" ";case 102:return"\f";case 48:return"\x00";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:return String.fromCharCode(e)}},v.readHexChar=function(e){var t=this.readInt(16,e);return null===t&&this.raise(this.start,"Bad character escape sequence"),t};var _;v.readWord1=function(){_=!1;for(var e="",t=!0,n=this.pos,l=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(s(i,l))this.pos+=65535>=i?1:2;else{if(92!==i)break;_=!0,e+=this.input.slice(n,this.pos);var o=this.pos;117!=this.input.charCodeAt(++this.pos)&&this.raise(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var u=this.readCodePoint();(t?a:s)(u,l)||this.raise(o,"Invalid Unicode escape"),e+=r(u),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},v.readWord=function(){var e=this.readWord1(),t=u.name;return(this.options.ecmaVersion>=6||!_)&&this.isKeyword(e)&&(t=p[e]),this.finishToken(t,e)}},{"./identifier":4,"./location":6,"./state":12,"./tokentype":16,"./whitespace":18}],16:[function(e,t,n){"use strict";function r(e,t){return new a(e,{beforeExpr:!0,binop:t})}function l(e){var t=void 0===arguments[1]?{}:arguments[1];t.keyword=e,p[e]=u["_"+e]=new a(e,t)}var i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};n.__esModule=!0;var a=n.TokenType=function c(e){var t=void 0===arguments[1]?{}:arguments[1];i(this,c),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null},s={beforeExpr:!0},o={startsExpr:!0},u={num:new a("num",o),regexp:new a("regexp",o),string:new a("string",o),name:new a("name",o),eof:new a("eof"),bracketL:new a("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new a("]"),braceL:new a("{",{beforeExpr:!0,startsExpr:!0}),braceR:new a("}"),parenL:new a("(",{beforeExpr:!0,startsExpr:!0}),parenR:new a(")"),comma:new a(",",s),semi:new a(";",s),colon:new a(":",s),dot:new a("."),question:new a("?",s),arrow:new a("=>",s),template:new a("template"),ellipsis:new a("...",s),backQuote:new a("`",o),dollarBraceL:new a("${",{beforeExpr:!0,startsExpr:!0}),at:new a("@"),eq:new a("=",{beforeExpr:!0,isAssign:!0}),assign:new a("_=",{beforeExpr:!0,isAssign:!0}),incDec:new a("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new a("prefix",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:r("||",1),logicalAND:r("&&",2),bitwiseOR:r("|",3),bitwiseXOR:r("^",4),bitwiseAND:r("&",5),equality:r("==/!=",6),relational:r("</>",7),bitShift:r("<</>>",8),plusMin:new a("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:r("%",10),star:r("*",10),slash:r("/",10),exponent:new a("**",{beforeExpr:!0,binop:11,rightAssociative:!0})};n.types=u;var p={};n.keywords=p,l("break"),l("case",s),l("catch"),l("continue"),l("debugger"),l("default"),l("do",{isLoop:!0}),l("else",s),l("finally"),l("for",{isLoop:!0}),l("function"),l("if"),l("return",s),l("switch"),l("throw",s),l("try"),l("var"),l("let"),l("const"),l("while",{isLoop:!0}),l("with"),l("new",{beforeExpr:!0,startsExpr:!0}),l("this",o),l("super",o),l("class"),l("extends",s),l("export"),l("import"),l("yield",{beforeExpr:!0,startsExpr:!0}),l("null",o),l("true",o),l("false",o),l("in",{beforeExpr:!0,binop:7}),l("instanceof",{beforeExpr:!0,binop:7}),l("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),l("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),l("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},{}],17:[function(e,t,n){"use strict";function r(e){return"[object Array]"===Object.prototype.toString.call(e)}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.isArray=r,n.has=l,n.__esModule=!0},{}],18:[function(e,t,n){"use strict";function r(e){return 10===e||13===e||8232===e||8233==e}n.isNewLine=r,n.__esModule=!0;var l=/\r\n?|\n|\u2028|\u2029/;n.lineBreak=l;var i=new RegExp(l.source,"g");n.lineBreakG=i;var a=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;n.nonASCIIwhitespace=a},{}],19:[function(e,t){(function(n){"use strict";var r=t.exports=e("../transformation");r.version=e("../../../package").version,r.transform=r,r.run=function(e){var t=void 0===arguments[1]?{}:arguments[1];return t.sourceMaps="inline",new Function(r(e,t).code)()},r.load=function(e,t,l,i){var a=void 0===arguments[2]?{}:arguments[2],s=a;s.filename||(s.filename=e);var o=n.ActiveXObject?new n.ActiveXObject("Microsoft.XMLHTTP"):new n.XMLHttpRequest;o.open("GET",e,!0),"overrideMimeType"in o&&o.overrideMimeType("text/plain"),o.onreadystatechange=function(){if(4===o.readyState){var n=o.status;if(0!==n&&200!==n)throw new Error("Could not load "+e);var l=[o.responseText,a];i||r.run.apply(r,l),t&&t(l)}},o.send(null)};var l=function(){for(var e=[],t=["text/ecmascript-6","text/6to5","text/babel","module"],l=0,i=function(e){var t=function(){return e.apply(this,arguments)};return t.toString=function(){return e.toString()},t}(function(){var t=e[l];t instanceof Array&&(r.run.apply(r,t),l++,i())}),a=function(t,n){var l={};t.src?r.load(t.src,function(t){e[n]=t,i()},l,!0):(l.filename="embedded",e[n]=[t.innerHTML,l])},s=n.document.getElementsByTagName("script"),o=0;o<s.length;++o){var u=s[o];t.indexOf(u.type)>=0&&e.push(u)}for(o in e)a(e[o],o);i()};n.addEventListener?n.addEventListener("DOMContentLoaded",l,!1):n.attachEvent&&n.attachEvent("onload",l)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../../package":373,"../transformation":64}],20:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e["default"]:e},r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},l=n(e("repeating")),i=n(e("trim-right")),a=n(e("lodash/lang/isBoolean")),s=n(e("lodash/collection/includes")),o=n(e("lodash/lang/isNumber")),u=function(){function e(t,n){r(this,e),this.position=t,this._indent=n.indent.base,this.format=n,this.buf=""}return e.prototype.get=function(){return i(this.buf)},e.prototype.getIndent=function(){return this.format.compact||this.format.concise?"":l(this.format.indent.style,this._indent)},e.prototype.indentSize=function(){return this.getIndent().length},e.prototype.indent=function(){this._indent++},e.prototype.dedent=function(){this._indent--},e.prototype.semicolon=function(){this.push(";")},e.prototype.ensureSemicolon=function(){this.isLast(";")||this.semicolon()},e.prototype.rightBrace=function(){this.newline(!0),this.push("}")},e.prototype.keyword=function(e){this.push(e),this.space()},e.prototype.space=function(){this.format.compact||!this.buf||this.isLast(" ")||this.isLast("\n")||this.push(" ")},e.prototype.removeLast=function(e){this.format.compact||this.isLast(e)&&(this.buf=this.buf.substr(0,this.buf.length-1),this.position.unshift(e))},e.prototype.newline=function(e,t){if(!this.format.compact){if(this.format.concise)return void this.space();if(t||(t=!1),o(e)){if(e=Math.min(2,e),(this.endsWith("{\n")||this.endsWith(":\n"))&&e--,0>=e)return;for(;e>0;)this._newline(t),e--}else a(e)&&(t=e),this._newline(t)}},e.prototype._newline=function(e){this.endsWith("\n\n")||(e&&this.isLast("\n")&&this.removeLast("\n"),this.removeLast(" "),this._removeSpacesAfterLastNewline(),this._push("\n"))},e.prototype._removeSpacesAfterLastNewline=function(){var e=this.buf.lastIndexOf("\n");if(-1!==e){for(var t=this.buf.length-1;t>e&&" "===this.buf[t];)t--;t===e&&(this.buf=this.buf.substring(0,t+1))}},e.prototype.push=function(e,t){if(!this.format.compact&&this._indent&&!t&&"\n"!==e){var n=this.getIndent();e=e.replace(/\n/g,"\n"+n),this.isLast("\n")&&this._push(n)}this._push(e)},e.prototype._push=function(e){this.position.push(e),this.buf+=e},e.prototype.endsWith=function(e){return this.buf.slice(-e.length)===e},e.prototype.isLast=function(e){if(this.format.compact)return!1;var t=this.buf,n=t[t.length-1];return Array.isArray(e)?s(e,n):e===n},e}();t.exports=u},{"lodash/collection/includes":240,"lodash/lang/isBoolean":312,"lodash/lang/isNumber":316,repeating:356,"trim-right":372}],21:[function(e,t,n){"use strict";function r(e,t){t(e.program)}function l(e,t){t.sequence(e.body)}function i(e,t){0===e.body.length?this.push("{}"):(this.push("{"),this.newline(),t.sequence(e.body,{indent:!0}),this.removeLast("\n"),this.rightBrace())}n.File=r,n.Program=l,n.BlockStatement=i,n.__esModule=!0},{}],22:[function(e,t,n){"use strict";function r(e,t){t.list(e.decorators),this.push("class"),e.id&&(this.space(),t(e.id)),t(e.typeParameters),e.superClass&&(this.push(" extends "),t(e.superClass),t(e.superTypeParameters)),e["implements"]&&(this.push(" implements "),t.join(e["implements"],{separator:", "})),this.space(),t(e.body)}function l(e,t){0===e.body.length?this.push("{}"):(this.push("{"),this.newline(),this.indent(),t.sequence(e.body),this.dedent(),this.rightBrace())}function i(e,t){t.list(e.decorators),e["static"]&&this.push("static "),t(e.key),t(e.typeAnnotation),e.value&&(this.space(),this.push("="),this.space(),t(e.value)),this.semicolon()}function a(e,t){t.list(e.decorators),e["static"]&&this.push("static "),this._method(e,t)}n.ClassDeclaration=r,n.ClassBody=l,n.ClassProperty=i,n.MethodDefinition=a,n.__esModule=!0,n.ClassExpression=r},{}],23:[function(e,t,n){"use strict";function r(e,t){this.keyword("for"),this.push("("),t(e.left),this.push(" of "),t(e.right),this.push(")")}function l(e,t){this.push(e.generator?"(":"["),t.join(e.blocks,{separator:" "}),this.space(),e.filter&&(this.keyword("if"),this.push("("),t(e.filter),this.push(")"),this.space()),t(e.body),this.push(e.generator?")":"]")}n.ComprehensionBlock=r,n.ComprehensionExpression=l,n.__esModule=!0},{}],24:[function(e,t,n){"use strict";function r(e,t){var n=/[a-z]$/.test(e.operator),r=e.argument;(E.isUpdateExpression(r)||E.isUnaryExpression(r))&&(n=!0),E.isUnaryExpression(r)&&"!"===r.operator&&(n=!1),this.push(e.operator),n&&this.push(" "),t(e.argument)}function l(e,t){this.push("do"),this.space(),t(e.body)}function i(e,t){e.prefix?(this.push(e.operator),t(e.argument)):(t(e.argument),this.push(e.operator))}function a(e,t){t(e.test),this.space(),this.push("?"),this.space(),t(e.consequent),this.space(),this.push(":"),this.space(),t(e.alternate)}function s(e,t){this.push("new "),t(e.callee),this.push("("),t.list(e.arguments),this.push(")")}function o(e,t){t.list(e.expressions)}function u(){this.push("this")}function p(){this.push("super")}function c(e,t){this.push("@"),t(e.expression)}function d(e,t){t(e.callee),this.push("(");var n=",";e._prettyCall?(n+="\n",this.newline(),this.indent()):n+=" ",t.list(e.arguments,{separator:n}),e._prettyCall&&(this.newline(),this.dedent()),this.push(")")}function f(){this.semicolon()}function h(e,t){t(e.expression),this.semicolon()}function m(e,t){t(e.left),this.push(" "),this.push(e.operator),this.push(" "),t(e.right)}function g(e,t){var n=e.object;if(t(n),!e.computed&&E.isMemberExpression(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");var r=e.computed;E.isLiteral(e.property)&&x(e.property.value)&&(r=!0),r?(this.push("["),t(e.property),this.push("]")):(E.isLiteral(n)&&v(n.value)&&!w.test(n.value.toString())&&this.push("."),this.push("."),t(e.property))}var y=function(e){return e&&e.__esModule?e:{"default":e}},b=function(e){return e&&e.__esModule?e["default"]:e};n.UnaryExpression=r,n.DoExpression=l,n.UpdateExpression=i,n.ConditionalExpression=a,n.NewExpression=s,n.SequenceExpression=o,n.ThisExpression=u,n.Super=p,n.Decorator=c,n.CallExpression=d,n.EmptyStatement=f,n.ExpressionStatement=h,n.AssignmentExpression=m,n.MemberExpression=g,n.__esModule=!0;var v=b(e("is-integer")),x=b(e("lodash/lang/isNumber")),E=y(e("../../types")),_=function(e){return function(t,n){this.push(e),(t.delegate||t.all)&&this.push("*"),t.argument&&(this.space(),n(t.argument))}},S=_("yield");n.YieldExpression=S;var I=_("await");n.AwaitExpression=I,n.BinaryExpression=m,n.LogicalExpression=m,n.AssignmentPattern=m;var w=/e/i;n.MetaProperty=g},{"../../types":155,"is-integer":224,"lodash/lang/isNumber":316}],25:[function(e,t,n){"use strict";function r(){this.push("any")}function l(e,t){t(e.elementType),this.push("["),this.push("]") }function i(){this.push("bool")}function a(e,t){this.push("declare class "),this._interfaceish(e,t)}function s(e,t){this.push("declare function "),t(e.id),t(e.id.typeAnnotation.typeAnnotation),this.semicolon()}function o(e,t){this.push("declare module "),t(e.id),this.space(),t(e.body)}function u(e,t){this.push("declare var "),t(e.id),t(e.id.typeAnnotation),this.semicolon()}function p(e,t,n){t(e.typeParameters),this.push("("),t.list(e.params),e.rest&&(e.params.length&&(this.push(","),this.space()),this.push("..."),t(e.rest)),this.push(")"),"ObjectTypeProperty"===n.type||"ObjectTypeCallProperty"===n.type||"DeclareFunction"===n.type?this.push(":"):(this.space(),this.push("=>")),this.space(),t(e.returnType)}function c(e,t){t(e.name),e.optional&&this.push("?"),this.push(":"),this.space(),t(e.typeAnnotation)}function d(e,t){t(e.id),t(e.typeParameters)}function f(e,t){t(e.id),t(e.typeParameters),e["extends"].length&&(this.push(" extends "),t.join(e["extends"],{separator:", "})),this.space(),t(e.body)}function h(e,t){this.push("interface "),this._interfaceish(e,t)}function m(e,t){t.join(e.types,{separator:" & "})}function g(e,t){this.push("?"),t(e.typeAnnotation)}function y(){this.push("number")}function b(e){this._stringLiteral(e.value)}function v(){this.push("string")}function x(e,t){this.push("["),t.join(e.types,{separator:", "}),this.push("]")}function E(e,t){this.push("typeof "),t(e.argument)}function _(e,t){this.push("type "),t(e.id),t(e.typeParameters),this.space(),this.push("="),this.space(),t(e.right),this.semicolon()}function S(e,t){this.push(":"),this.space(),e.optional&&this.push("?"),t(e.typeAnnotation)}function I(e,t){this.push("<"),t.join(e.params,{separator:", "}),this.push(">")}function w(e,t){var n=this;this.push("{");var r=e.properties.concat(e.callProperties,e.indexers);r.length&&(this.space(),t.list(r,{separator:!1,indent:!0,iterator:function(){1!==r.length&&(n.semicolon(),n.space())}}),this.space()),this.push("}")}function k(e,t){e["static"]&&this.push("static "),t(e.value)}function A(e,t){e["static"]&&this.push("static "),this.push("["),t(e.id),this.push(":"),this.space(),t(e.key),this.push("]"),this.push(":"),this.space(),t(e.value)}function C(e,t){e["static"]&&this.push("static "),t(e.key),e.optional&&this.push("?"),O.isFunctionTypeAnnotation(e.value)||(this.push(":"),this.space()),t(e.value)}function T(e,t){t(e.qualification),this.push("."),t(e.id)}function M(e,t){t.join(e.types,{separator:" | "})}function j(e,t){this.push("("),t(e.expression),t(e.typeAnnotation),this.push(")")}function P(){this.push("void")}var L=function(e){return e&&e.__esModule?e:{"default":e}};n.AnyTypeAnnotation=r,n.ArrayTypeAnnotation=l,n.BooleanTypeAnnotation=i,n.DeclareClass=a,n.DeclareFunction=s,n.DeclareModule=o,n.DeclareVariable=u,n.FunctionTypeAnnotation=p,n.FunctionTypeParam=c,n.InterfaceExtends=d,n._interfaceish=f,n.InterfaceDeclaration=h,n.IntersectionTypeAnnotation=m,n.NullableTypeAnnotation=g,n.NumberTypeAnnotation=y,n.StringLiteralTypeAnnotation=b,n.StringTypeAnnotation=v,n.TupleTypeAnnotation=x,n.TypeofTypeAnnotation=E,n.TypeAlias=_,n.TypeAnnotation=S,n.TypeParameterInstantiation=I,n.ObjectTypeAnnotation=w,n.ObjectTypeCallProperty=k,n.ObjectTypeIndexer=A,n.ObjectTypeProperty=C,n.QualifiedTypeIdentifier=T,n.UnionTypeAnnotation=M,n.TypeCastExpression=j,n.VoidTypeAnnotation=P,n.__esModule=!0;var O=L(e("../../types"));n.ClassImplements=d,n.GenericTypeAnnotation=d,n.TypeParameterDeclaration=I},{"../../types":155}],26:[function(e,t,n){"use strict";function r(e,t){t(e.name),e.value&&(this.push("="),t(e.value))}function l(e){this.push(e.name)}function i(e,t){t(e.namespace),this.push(":"),t(e.name)}function a(e,t){t(e.object),this.push("."),t(e.property)}function s(e,t){this.push("{..."),t(e.argument),this.push("}")}function o(e,t){this.push("{"),t(e.expression),this.push("}")}function u(e,t){var n=this,r=e.openingElement;t(r),r.selfClosing||(this.indent(),m(e.children,function(e){g.isLiteral(e)?n.push(e.value):t(e)}),this.dedent(),t(e.closingElement))}function p(e,t){this.push("<"),t(e.name),e.attributes.length>0&&(this.push(" "),t.join(e.attributes,{separator:" "})),this.push(e.selfClosing?" />":">")}function c(e,t){this.push("</"),t(e.name),this.push(">")}function d(){}var f=function(e){return e&&e.__esModule?e:{"default":e}},h=function(e){return e&&e.__esModule?e["default"]:e};n.JSXAttribute=r,n.JSXIdentifier=l,n.JSXNamespacedName=i,n.JSXMemberExpression=a,n.JSXSpreadAttribute=s,n.JSXExpressionContainer=o,n.JSXElement=u,n.JSXOpeningElement=p,n.JSXClosingElement=c,n.JSXEmptyExpression=d,n.__esModule=!0;var m=h(e("lodash/collection/each")),g=f(e("../../types"))},{"../../types":155,"lodash/collection/each":237}],27:[function(e,t,n){"use strict";function r(e,t){var n=this;t(e.typeParameters),this.push("("),t.list(e.params,{iterator:function(e){e.optional&&n.push("?"),t(e.typeAnnotation)}}),this.push(")"),e.returnType&&t(e.returnType)}function l(e,t){var n=e.value,r=e.kind,l=e.key;("method"===r||"init"===r)&&n.generator&&this.push("*"),("get"===r||"set"===r)&&this.push(r+" "),n.async&&this.push("async "),e.computed?(this.push("["),t(l),this.push("]")):t(l),this._params(n,t),this.push(" "),t(n.body)}function i(e,t){e.async&&this.push("async "),this.push("function"),e.generator&&this.push("*"),e.id?(this.push(" "),t(e.id)):this.space(),this._params(e,t),this.space(),t(e.body)}function a(e,t){e.async&&this.push("async "),1===e.params.length&&o.isIdentifier(e.params[0])?t(e.params[0]):this._params(e,t),this.push(" => "),t(e.body)}var s=function(e){return e&&e.__esModule?e:{"default":e}};n._params=r,n._method=l,n.FunctionExpression=i,n.ArrowFunctionExpression=a,n.__esModule=!0;var o=s(e("../../types"));n.FunctionDeclaration=i},{"../../types":155}],28:[function(e,t,n){"use strict";function r(e,t){t(e.imported),e.local&&e.local!==e.imported&&(this.push(" as "),t(e.local))}function l(e,t){t(e.local)}function i(e,t){t(e.exported)}function a(e,t){t(e.local),e.exported&&e.local!==e.exported&&(this.push(" as "),t(e.exported))}function s(e,t){this.push("* as "),t(e.exported)}function o(e,t){this.push("export *"),e.exported&&(this.push(" as "),t(e.exported)),this.push(" from "),t(e.source),this.semicolon()}function u(e,t){this.push("export "),c.call(this,e,t)}function p(e,t){this.push("export default "),c.call(this,e,t)}function c(e,t){var n=e.specifiers;if(e.declaration){var r=e.declaration;if(t(r),g.isStatement(r)||g.isFunction(r)||g.isClass(r))return}else{var l=n[0],i=!1;(g.isExportDefaultSpecifier(l)||g.isExportNamespaceSpecifier(l))&&(i=!0,t(n.shift()),n.length&&this.push(", ")),(n.length||!n.length&&!i)&&(this.push("{"),n.length&&(this.space(),t.join(n,{separator:", "}),this.space()),this.push("}")),e.source&&(this.push(" from "),t(e.source))}this.ensureSemicolon()}function d(e,t){this.push("import "),e.isType&&this.push("type ");var n=e.specifiers;if(n&&n.length){var r=e.specifiers[0];(g.isImportDefaultSpecifier(r)||g.isImportNamespaceSpecifier(r))&&(t(e.specifiers.shift()),e.specifiers.length&&this.push(", ")),e.specifiers.length&&(this.push("{"),this.space(),t.join(e.specifiers,{separator:", "}),this.space(),this.push("}")),this.push(" from ")}t(e.source),this.semicolon()}function f(e,t){this.push("* as "),t(e.local)}var h=function(e){return e&&e.__esModule?e:{"default":e}},m=function(e){return e&&e.__esModule?e["default"]:e};n.ImportSpecifier=r,n.ImportDefaultSpecifier=l,n.ExportDefaultSpecifier=i,n.ExportSpecifier=a,n.ExportNamespaceSpecifier=s,n.ExportAllDeclaration=o,n.ExportNamedDeclaration=u,n.ExportDefaultDeclaration=p,n.ImportDeclaration=d,n.ImportNamespaceSpecifier=f,n.__esModule=!0;var g=(m(e("lodash/collection/each")),h(e("../../types")))},{"../../types":155,"lodash/collection/each":237}],29:[function(e,t,n){"use strict";function r(e,t){this.keyword("with"),this.push("("),t(e.object),this.push(")"),t.block(e.body)}function l(e,t){this.keyword("if"),this.push("("),t(e.test),this.push(")"),this.space(),t.indentOnComments(e.consequent),e.alternate&&(this.isLast("}")&&this.space(),this.push("else "),t.indentOnComments(e.alternate))}function i(e,t){this.keyword("for"),this.push("("),t(e.init),this.push(";"),e.test&&(this.push(" "),t(e.test)),this.push(";"),e.update&&(this.push(" "),t(e.update)),this.push(")"),t.block(e.body)}function a(e,t){this.keyword("while"),this.push("("),t(e.test),this.push(")"),t.block(e.body)}function s(e,t){this.keyword("do"),t(e.body),this.space(),this.keyword("while"),this.push("("),t(e.test),this.push(");")}function o(e,t){t(e.label),this.push(": "),t(e.body)}function u(e,t){this.keyword("try"),t(e.block),this.space(),t(e.handlers?e.handlers[0]:e.handler),e.finalizer&&(this.space(),this.push("finally "),t(e.finalizer))}function p(e,t){this.keyword("catch"),this.push("("),t(e.param),this.push(") "),t(e.body)}function c(e,t){this.push("throw "),t(e.argument),this.semicolon()}function d(e,t){this.keyword("switch"),this.push("("),t(e.discriminant),this.push(")"),this.space(),this.push("{"),t.sequence(e.cases,{indent:!0,addNewlines:function(t,n){return t||e.cases[e.cases.length-1]!==n?void 0:-1}}),this.push("}")}function f(e,t){e.test?(this.push("case "),t(e.test),this.push(":")):this.push("default:"),e.consequent.length&&(this.newline(),t.sequence(e.consequent,{indent:!0}))}function h(){this.push("debugger;")}function m(e,t,n){this.push(e.kind+" ");var r=!1;if(!x.isFor(n))for(var l=0;l<e.declarations.length;l++)e.declarations[l].init&&(r=!0);var i=",";i+=!this.format.compact&&r?"\n"+v(" ",e.kind.length+1):" ",t.list(e.declarations,{separator:i}),(!x.isFor(n)||n.left!==e&&n.init!==e)&&this.semicolon()}function g(e,t){t(e.id),t(e.id.typeAnnotation),e.init&&(this.space(),this.push("="),this.space(),t(e.init))}var y=function(e){return e&&e.__esModule?e:{"default":e}},b=function(e){return e&&e.__esModule?e["default"]:e};n.WithStatement=r,n.IfStatement=l,n.ForStatement=i,n.WhileStatement=a,n.DoWhileStatement=s,n.LabeledStatement=o,n.TryStatement=u,n.CatchClause=p,n.ThrowStatement=c,n.SwitchStatement=d,n.SwitchCase=f,n.DebuggerStatement=h,n.VariableDeclaration=m,n.VariableDeclarator=g,n.__esModule=!0;var v=b(e("repeating")),x=y(e("../../types")),E=function(e){return function(t,n){this.keyword("for"),this.push("("),n(t.left),this.push(" "+e+" "),n(t.right),this.push(")"),n.block(t.body)}},_=E("in");n.ForInStatement=_;var S=E("of");n.ForOfStatement=S;var I=function(e,t){return function(n,r){this.push(e);var l=n[t||"label"];l&&(this.push(" "),r(l)),this.semicolon()}},w=I("continue");n.ContinueStatement=w;var k=I("return","argument");n.ReturnStatement=k;var A=I("break");n.BreakStatement=A},{"../../types":155,repeating:356}],30:[function(e,t,n){"use strict";function r(e,t){t(e.tag),t(e.quasi)}function l(e){this._push(e.value.raw)}function i(e,t){var n=this;this.push("`");var r=e.quasis,l=r.length;s(r,function(r,i){t(r),l>i+1&&(n.push("${ "),t(e.expressions[i]),n.push(" }"))}),this._push("`")}var a=function(e){return e&&e.__esModule?e["default"]:e};n.TaggedTemplateExpression=r,n.TemplateElement=l,n.TemplateLiteral=i,n.__esModule=!0;var s=a(e("lodash/collection/each"))},{"lodash/collection/each":237}],31:[function(e,t,n){"use strict";function r(e){this.push(e.name)}function l(e,t){this.push("..."),t(e.argument)}function i(e,t){var n=e.properties;n.length?(this.push("{"),this.space(),t.list(n,{indent:!0}),this.space(),this.push("}")):this.push("{}")}function a(e,t){if(e.method||"get"===e.kind||"set"===e.kind)this._method(e,t);else{if(e.computed)this.push("["),t(e.key),this.push("]");else if(t(e.key),e.shorthand)return;this.push(":"),this.space(),t(e.value)}}function s(e,t){var n=this,r=e.elements,l=r.length;this.push("["),c(r,function(e,r){e?(r>0&&n.push(" "),t(e),l-1>r&&n.push(",")):n.push(",")}),this.push("]")}function o(e){var t=e.value,n=typeof t;"string"===n?this._stringLiteral(t):"number"===n?this.push(t+""):"boolean"===n?this.push(t?"true":"false"):e.regex?this.push("/"+e.regex.pattern+"/"+e.regex.flags):null===t&&this.push("null")}function u(e){e=JSON.stringify(e),e=e.replace(/[\u000A\u000D\u2028\u2029]/g,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}),"single"===this.format.quotes&&(e=e.slice(1,-1),e=e.replace(/\\"/g,'"'),e=e.replace(/'/g,"\\'"),e="'"+e+"'"),this.push(e)}var p=function(e){return e&&e.__esModule?e["default"]:e};n.Identifier=r,n.RestElement=l,n.ObjectExpression=i,n.Property=a,n.ArrayExpression=s,n.Literal=o,n._stringLiteral=u,n.__esModule=!0;var c=p(e("lodash/collection/each"));n.SpreadElement=l,n.SpreadProperty=l,n.ObjectPattern=i,n.ArrayPattern=s},{"lodash/collection/each":237}],32:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e){return e&&e.__esModule?e["default"]:e},l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=r(e("detect-indent")),a=r(e("./whitespace")),s=r(e("repeating")),o=r(e("./source-map")),u=r(e("./position")),p=n(e("../messages")),c=r(e("./buffer")),d=r(e("lodash/object/extend")),f=r(e("lodash/collection/each")),h=r(e("./node")),m=n(e("../types")),g=function(){function t(e,n,r){l(this,t),n||(n={}),this.comments=e.comments||[],this.tokens=e.tokens||[],this.format=t.normalizeOptions(r,n,this.tokens),this.opts=n,this.ast=e,this.whitespace=new a(this.tokens,this.comments,this.format),this.position=new u,this.map=new o(this.position,n,r),this.buffer=new c(this.position,this.format)}return t.normalizeOptions=function(e,n,r){var l=" ";if(e){var a=i(e).indent;a&&" "!==a&&(l=a)}var s={comments:null==n.comments||n.comments,compact:n.compact,quotes:t.findCommonStringDelimeter(e,r),indent:{adjustMultilineComment:!0,style:l,base:0}};return"auto"===s.compact&&(s.compact=e.length>1e5,s.compact&&console.error(p.get("codeGeneratorDeopt",n.filename,"100KB"))),s},t.findCommonStringDelimeter=function(e,t){for(var n={single:0,"double":0},r=0,l=0;l<t.length;l++){var i=t[l];if("string"===i.type.label&&!(r>=3)){var a=e.slice(i.start,i.end);"'"===a[0]?n.single++:n.double++,r++}}return n.single>n.double?"single":"double"},t.generators={templateLiterals:e("./generators/template-literals"),comprehensions:e("./generators/comprehensions"),expressions:e("./generators/expressions"),statements:e("./generators/statements"),classes:e("./generators/classes"),methods:e("./generators/methods"),modules:e("./generators/modules"),types:e("./generators/types"),flow:e("./generators/flow"),base:e("./generators/base"),jsx:e("./generators/jsx")},t.prototype.generate=function(){var e=this.ast;this.print(e);var t=[];return f(e.comments,function(e){e._displayed||t.push(e)}),this._printComments(t),{map:this.map.get(),code:this.buffer.get()}},t.prototype.buildPrint=function(e){var t=this,n=function(n,r){return t.print(n,e,r)};return n.sequence=function(e){var r=void 0===arguments[1]?{}:arguments[1];return r.statement=!0,t.printJoin(n,e,r)},n.join=function(e,r){return t.printJoin(n,e,r)},n.list=function(e){var t=void 0===arguments[1]?{}:arguments[1];null==t.separator&&(t.separator=", "),n.join(e,t)},n.block=function(e){return t.printBlock(n,e)},n.indentOnComments=function(e){return t.printAndIndentOnComments(n,e)},n},t.prototype.print=function(e,t){var n=this,r=void 0===arguments[2]?{}:arguments[2];if(e){t&&t._compact&&(e._compact=!0);var l=this.format.concise;e._compact&&(this.format.concise=!0);var i=function(l){if(r.statement||h.isUserWhitespacable(e,t)){var i=0;if(null==e.start||e._ignoreUserWhitespace){l||i++,r.addNewlines&&(i+=r.addNewlines(l,e)||0);var a=h.needsWhitespaceAfter;l&&(a=h.needsWhitespaceBefore),a(e,t)&&i++,n.buffer.buf||(i=0)}else i=l?n.whitespace.getNewlinesBefore(e):n.whitespace.getNewlinesAfter(e);n.newline(i)}};if(!this[e.type])throw new ReferenceError("unknown node of type "+JSON.stringify(e.type)+" with constructor "+JSON.stringify(e&&e.constructor.name));var a=h.needsParensNoLineTerminator(e,t),s=a||h.needsParens(e,t);s&&this.push("("),a&&this.indent(),this.printLeadingComments(e,t),i(!0),r.before&&r.before(),this.map.mark(e,"start"),this[e.type](e,this.buildPrint(e),t),a&&(this.newline(),this.dedent()),s&&this.push(")"),this.map.mark(e,"end"),r.after&&r.after(),i(!1),this.printTrailingComments(e,t),this.format.concise=l}},t.prototype.printJoin=function(e,t){var n=this,r=void 0===arguments[2]?{}:arguments[2];if(t&&t.length){var l=t.length;r.indent&&this.indent(),f(t,function(t,i){e(t,{statement:r.statement,addNewlines:r.addNewlines,after:function(){r.iterator&&r.iterator(t,i),r.separator&&l-1>i&&n.push(r.separator)}})}),r.indent&&this.dedent()}},t.prototype.printAndIndentOnComments=function(e,t){var n=!!t.leadingComments;n&&this.indent(),e(t),n&&this.dedent()},t.prototype.printBlock=function(e,t){m.isEmptyStatement(t)?this.semicolon():(this.push(" "),e(t))},t.prototype.generateComment=function(e){var t=e.value;return t="Line"===e.type?"//"+t:"/*"+t+"*/"},t.prototype.printTrailingComments=function(e,t){this._printComments(this.getComments("trailingComments",e,t))},t.prototype.printLeadingComments=function(e,t){this._printComments(this.getComments("leadingComments",e,t))},t.prototype.getComments=function(e,t,n){var r=this;if(m.isExpressionStatement(n))return[];var l=[],i=[t];return m.isExpressionStatement(t)&&i.push(t.argument),f(i,function(t){l=l.concat(r._getComments(e,t))}),l},t.prototype._getComments=function(e,t){return t&&t[e]||[]},t.prototype._printComments=function(e){var t=this;this.format.compact||this.format.comments&&e&&e.length&&f(e,function(e){var n=!1;if(f(t.ast.comments,function(t){return t.start===e.start?(t._displayed&&(n=!0),t._displayed=!0,!1):void 0}),!n){t.newline(t.whitespace.getNewlinesBefore(e));var r=t.position.column,l=t.generateComment(e);if(r&&!t.isLast(["\n"," ","[","{"])&&(t._push(" "),r++),"Block"===e.type&&t.format.indent.adjustMultilineComment){var i=e.loc.start.column;if(i){var a=new RegExp("\\n\\s{1,"+i+"}","g");l=l.replace(a,"\n")}var o=Math.max(t.indentSize(),r);l=l.replace(/\n/g,"\n"+s(" ",o))}0===r&&(l=t.getIndent()+l),t._push(l),t.newline(t.whitespace.getNewlinesAfter(e))}})},t}();f(c.prototype,function(e,t){g.prototype[t]=function(){return e.apply(this.buffer,arguments)}}),f(g.generators,function(e){d(g.prototype,e)}),t.exports=function(e,t,n){var r=new g(e,t,n);return r.generate()},t.exports.CodeGenerator=g},{"../messages":43,"../types":155,"./buffer":20,"./generators/base":21,"./generators/classes":22,"./generators/comprehensions":23,"./generators/expressions":24,"./generators/flow":25,"./generators/jsx":26,"./generators/methods":27,"./generators/modules":28,"./generators/statements":29,"./generators/template-literals":30,"./generators/types":31,"./node":33,"./position":36,"./source-map":37,"./whitespace":38,"detect-indent":216,"lodash/collection/each":237,"lodash/object/extend":325,repeating:356}],33:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e){return e&&e.__esModule?e["default"]:e},l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=r(e("./whitespace")),a=n(e("./parentheses")),s=r(e("lodash/collection/each")),o=r(e("lodash/collection/some")),u=n(e("../../types")),p=function(e,t,n){if(e){for(var r,l=Object.keys(e),i=0;i<l.length;i++){var a=l[i];if(u.is(a,t)){var s=e[a];if(r=s(t,n),null!=r)break}}return r}},c=function(){function e(t,n){l(this,e),this.parent=n,this.node=t}return e.isUserWhitespacable=function(e){return u.isUserWhitespacable(e)},e.needsWhitespace=function(t,n,r){if(!t)return 0;u.isExpressionStatement(t)&&(t=t.expression);var l=p(i.nodes,t,n);if(!l){var a=p(i.list,t,n);if(a)for(var s=0;s<a.length&&!(l=e.needsWhitespace(a[s],t,r));s++);}return l&&l[r]||0},e.needsWhitespaceBefore=function(t,n){return e.needsWhitespace(t,n,"before")},e.needsWhitespaceAfter=function(t,n){return e.needsWhitespace(t,n,"after")},e.needsParens=function(e,t){if(!t)return!1;if(u.isNewExpression(t)&&t.callee===e){if(u.isCallExpression(e))return!0;var n=o(e,function(e){return u.isCallExpression(e)});if(n)return!0}return p(a,e,t)},e.needsParensNoLineTerminator=function(e,t){return t&&e.leadingComments&&e.leadingComments.length?u.isYieldExpression(t)||u.isAwaitExpression(t)?!0:u.isContinueStatement(t)||u.isBreakStatement(t)||u.isReturnStatement(t)||u.isThrowStatement(t)?!0:!1:!1},e}();t.exports=c,s(c,function(e,t){c.prototype[t]=function(){var e=new Array(arguments.length+2);e[0]=this.node,e[1]=this.parent;for(var n=0;n<e.length;n++)e[n+2]=arguments[n];return c[t].apply(null,e)}})},{"../../types":155,"./parentheses":34,"./whitespace":35,"lodash/collection/each":237,"lodash/collection/some":243}],34:[function(e,t,n){"use strict";function r(e,t){return y.isArrayTypeAnnotation(t)}function l(e,t){return y.isMemberExpression(t)&&t.object===e?!0:void 0}function i(e,t){return y.isExpressionStatement(t)?!0:y.isMemberExpression(t)&&t.object===e?!0:!1}function a(e,t){if((y.isCallExpression(t)||y.isNewExpression(t))&&t.callee===e)return!0;if(y.isUnaryLike(t))return!0;if(y.isMemberExpression(t)&&t.object===e)return!0;if(y.isBinary(t)){var n=t.operator,r=b[n],l=e.operator,i=b[l];if(r>i)return!0;if(r===i&&t.right===e)return!0}}function s(e,t){if("in"===e.operator){if(y.isVariableDeclarator(t))return!0;if(y.isFor(t))return!0}}function o(e,t){return y.isForStatement(t)?!1:y.isExpressionStatement(t)&&t.expression===e?!1:!0}function u(e,t){return y.isBinary(t)||y.isUnaryLike(t)||y.isCallExpression(t)||y.isMemberExpression(t)||y.isNewExpression(t)||y.isConditionalExpression(t)||y.isYieldExpression(t)}function p(e,t){return y.isExpressionStatement(t)}function c(e,t){return y.isMemberExpression(t)&&t.object===e}function d(e,t){return y.isExpressionStatement(t)?!0:y.isMemberExpression(t)&&t.object===e?!0:y.isCallExpression(t)&&t.callee===e?!0:void 0}function f(e,t){return y.isUnaryLike(t)?!0:y.isBinary(t)?!0:(y.isCallExpression(t)||y.isNewExpression(t))&&t.callee===e?!0:y.isConditionalExpression(t)&&t.test===e?!0:y.isMemberExpression(t)&&t.object===e?!0:!1}var h=function(e){return e&&e.__esModule?e:{"default":e}},m=function(e){return e&&e.__esModule?e["default"]:e};n.NullableTypeAnnotation=r,n.UpdateExpression=l,n.ObjectExpression=i,n.Binary=a,n.BinaryExpression=s,n.SequenceExpression=o,n.YieldExpression=u,n.ClassExpression=p,n.UnaryLike=c,n.FunctionExpression=d,n.ConditionalExpression=f,n.__esModule=!0;var g=m(e("lodash/collection/each")),y=h(e("../../types")),b={};g([["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],function(e,t){g(e,function(e){b[e]=t})}),n.FunctionTypeAnnotation=r,n.AssignmentExpression=f},{"../../types":155,"lodash/collection/each":237}],35:[function(e,t,n){"use strict";function r(e){var t=void 0===arguments[1]?{}:arguments[1];if(c.isMemberExpression(e))r(e.object,t),e.computed&&r(e.property,t);else if(c.isBinary(e)||c.isAssignmentExpression(e))r(e.left,t),r(e.right,t);else if(c.isCallExpression(e))t.hasCall=!0,r(e.callee,t);else if(c.isFunction(e))t.hasFunction=!0;else if(c.isIdentifier(e)){var n=t;n.hasHelper||(n.hasHelper=l(e.callee))}return t}function l(e){return c.isMemberExpression(e)?l(e.object)||l(e.property):c.isIdentifier(e)?"require"===e.name||"_"===e.name[0]:c.isCallExpression(e)?l(e.callee):c.isBinary(e)||c.isAssignmentExpression(e)?c.isIdentifier(e.left)&&l(e.left)||l(e.right):!1}function i(e){return c.isLiteral(e)||c.isObjectExpression(e)||c.isArrayExpression(e)||c.isIdentifier(e)||c.isMemberExpression(e)}var a=function(e){return e&&e.__esModule?e:{"default":e}},s=function(e){return e&&e.__esModule?e["default"]:e},o=s(e("lodash/lang/isBoolean")),u=s(e("lodash/collection/each")),p=s(e("lodash/collection/map")),c=a(e("../../types"));n.nodes={AssignmentExpression:function(e){var t=r(e.right);return t.hasCall&&t.hasHelper||t.hasFunction?{before:t.hasFunction,after:!0}:void 0},SwitchCase:function(e,t){return{before:e.consequent.length||t.cases[0]===e}},LogicalExpression:function(e){return c.isFunction(e.left)||c.isFunction(e.right)?{after:!0}:void 0},Literal:function(e){return"use strict"===e.value?{after:!0}:void 0},CallExpression:function(e){return c.isFunction(e.callee)||l(e)?{before:!0,after:!0}:void 0},VariableDeclaration:function(e){for(var t=0;t<e.declarations.length;t++){var n=e.declarations[t],a=l(n.id)&&!i(n.init);if(!a){var s=r(n.init);a=l(n.init)&&s.hasCall||s.hasFunction}if(a)return{before:!0,after:!0}}},IfStatement:function(e){return c.isBlockStatement(e.consequent)?{before:!0,after:!0}:void 0}},n.nodes.Property=n.nodes.SpreadProperty=function(e,t){return t.properties[0]===e?{before:!0}:void 0},n.list={VariableDeclaration:function(e){return p(e.declarations,"init")},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties}},u({Function:!0,Class:!0,Loop:!0,LabeledStatement:!0,SwitchStatement:!0,TryStatement:!0},function(e,t){o(e)&&(e={after:e,before:e}),u([t].concat(c.FLIPPED_ALIAS_KEYS[t]||[]),function(t){n.nodes[t]=function(){return e}})})},{"../../types":155,"lodash/collection/each":237,"lodash/collection/map":241,"lodash/lang/isBoolean":312}],36:[function(e,t){"use strict";var n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(){function e(){n(this,e),this.line=1,this.column=0}return e.prototype.push=function(e){for(var t=0;t<e.length;t++)"\n"===e[t]?(this.line++,this.column=0):this.column++},e.prototype.unshift=function(e){for(var t=0;t<e.length;t++)"\n"===e[t]?this.line--:this.column--},e}();t.exports=r},{}],37:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e){return e&&e.__esModule?e["default"]:e},l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=r(e("source-map")),a=n(e("../types")),s=function(){function e(t,n,r){l(this,e),this.position=t,this.opts=n,n.sourceMaps?(this.map=new i.SourceMapGenerator({file:n.sourceMapName,sourceRoot:n.sourceRoot}),this.map.setSourceContent(n.sourceFileName,r)):this.map=null}return e.prototype.get=function(){var e=this.map;return e?e.toJSON():e},e.prototype.mark=function(e,t){var n=e.loc;if(n){var r=this.map;if(r&&!a.isProgram(e)&&!a.isFile(e)){var l=this.position,i={line:l.line,column:l.column},s=n[t];r.addMapping({source:this.opts.sourceFileName,generated:i,original:s})}}},e}();t.exports=s},{"../types":155,"source-map":360}],38:[function(e,t){"use strict";function n(e,t,n){return e+=t,e>=n&&(e-=n),e}var r=function(e){return e&&e.__esModule?e["default"]:e},l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=r(e("lodash/collection/sortBy")),a=function(){function e(t,n){l(this,e),this.tokens=i(t.concat(n),"start"),this.used={},this._lastFoundIndex=0}return e.prototype.getNewlinesBefore=function(e){for(var t,r,l,i=this.tokens,a=0;a<i.length;a++){var s=n(a,this._lastFoundIndex,this.tokens.length);if(l=i[s],e.start===l.start){t=i[s-1],r=l,this._lastFoundIndex=s;break}}return this.getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){for(var t,r,l,i=this.tokens,a=0;a<i.length;a++){var s=n(a,this._lastFoundIndex,this.tokens.length);if(l=i[s],e.end===l.end){t=l,r=i[s+1],this._lastFoundIndex=s;break}}if(r&&"eof"===r.type.label)return 1;var o=this.getNewlinesBetween(t,r);return"Line"!==e.type||o?o:1},e.prototype.getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var n=e?e.loc.end.line:1,r=t.loc.start.line,l=0,i=n;r>i;i++)"undefined"==typeof this.used[i]&&(this.used[i]=!0,l++);return l},e}();t.exports=a},{"lodash/collection/sortBy":244}],39:[function(e,t){"use strict";function n(e){var t=s.matchToToken(e);if("name"===t.type&&o.keyword.isReservedWordES6(t.value))return"keyword";if("punctuator"===t.type)switch(t.value){case"{":case"}":return"curly";case"(":case")":return"parens";case"[":case"]":return"square"}return t.type}function r(e){return e.replace(s,function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];var l=n(t),i=p[l];return i?t[0].split(c).map(function(e){return i(e)}).join("\n"):t[0]})}var l=function(e){return e&&e.__esModule?e["default"]:e},i=l(e("line-numbers")),a=l(e("repeating")),s=l(e("js-tokens")),o=l(e("esutils")),u=l(e("chalk")),p={string:u.red,punctuator:u.bold,curly:u.green,parens:u.blue.bold,square:u.yellow,keyword:u.cyan,number:u.magenta,regex:u.magenta,comment:u.grey,invalid:u.inverse},c=/\r\n|[\n\r\u2028\u2029]/;t.exports=function(e,t,n){var l=void 0===arguments[3]?{}:arguments[3];n=Math.max(n,0),l.highlightCode&&u.supportsColor&&(e=r(e)),e=e.split(c);var s=Math.max(t-3,0),o=Math.min(e.length,t+3);return t||n||(s=0,o=e.length),i(e.slice(s,o),{start:s+1,before:" ",after:" | ",transform:function(e){e.number===t&&(n&&(e.line+="\n"+e.before+a(" ",e.width)+e.after+a(" ",n-1)+"^"),e.before=e.before.replace(/^./,">"))}}).join("\n")}},{chalk:202,esutils:221,"js-tokens":227,"line-numbers":229,repeating:356}],40:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=n(e("../types"));t.exports=function(e,t,n){if(e&&"Program"===e.type)return r.file(e,t||[],n||[]);throw new Error("Not a valid ast?")}},{"../types":155}],41:[function(e,t){"use strict";t.exports=function(){return Object.create(null)}},{}],42:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e){return e&&e.__esModule?e["default"]:e},l=r(e("./normalize-ast")),i=r(e("estraverse")),a=r(e("./code-frame")),s=n(e("../../acorn"));t.exports=function(e,t,n){try{var r=[],o=[],u={allowImportExportEverywhere:e.looseModules,allowReturnOutsideFunction:e.looseModules,ecmaVersion:6,strictMode:e.strictMode,sourceType:e.sourceType,onComment:r,locations:!0,features:e.features||{},plugins:e.plugins||{},onToken:o,ranges:!0};e.nonStandard&&(u.plugins.jsx=!0,u.plugins.flow=!0);var p=s.parse(t,u);return i.attachComments(p,r,o),p=l(p,r,o),n?n(p):p}catch(c){if(!c._babel){c._babel=!0;var d=c.message=""+e.filename+": "+c.message,f=c.loc;if(f&&(c.codeFrame=a(t,f.line,f.column+1,e),d+="\n"+c.codeFrame),c.stack){var h=c.stack.replace(c.message,d);try{c.stack=h}catch(m){}}}throw c}}},{"../../acorn":5,"./code-frame":39,"./normalize-ast":40,estraverse:217}],43:[function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];var i=s[e];if(!i)throw new ReferenceError("Unknown message "+JSON.stringify(e));return n=l(n),i.replace(/\$(\d+)/g,function(e,t){return n[--t]})}function l(e){return e.map(function(e){if(null!=e&&e.inspect)return e.inspect();try{return JSON.stringify(e)||e+""}catch(t){return a.inspect(e)}})}var i=function(e){return e&&e.__esModule?e:{"default":e}};n.get=r,n.parseArgs=l,n.__esModule=!0;var a=i(e("util")),s={tailCallReassignmentDeopt:"Function reference has been reassigned so it's probably be dereferenced so we can't optimise this with confidence",JSXNamespacedTags:"Namespace tags are not supported. ReactJSX is not XML.",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",classesIllegalConstructorKind:"Illegal kind for constructor method",scopeDuplicateDeclaration:"Duplicate declaration $1",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",settersInvalidParamLength:"Setters must have exactly one parameter",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemeberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",modulesIllegalExportName:"Illegal export $1",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",evalInStrictMode:"eval is not allowed in strict mode",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1"}; n.MESSAGES=s},{util:201}],44:[function(e){"use strict";var t=function(e){return e&&e.__esModule?e:{"default":e}},n=function(e){return e&&e.__esModule?e["default"]:e},r=n(e("estraverse")),l=n(e("lodash/object/extend")),i=n(e("ast-types")),a=t(e("./types"));l(r.VisitorKeys,a.VISITOR_KEYS);var s=i.Type.def,o=i.Type.or;s("File").bases("Node").build("program").field("program",s("Program")),s("AssignmentPattern").bases("Pattern").build("left","right").field("left",s("Pattern")).field("right",s("Expression")),s("RestElement").bases("Pattern").build("argument").field("argument",s("expression")),s("DoExpression").bases("Expression").build("body").field("body",[s("Statement")]),s("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",o(s("Declaration"),s("Expression"),null)),s("ExportNamedDeclaration").bases("Declaration").build("declaration").field("declaration",o(s("Declaration"),s("Expression"),null)).field("specifiers",[o(s("ExportSpecifier"))]).field("source",o(s("ModuleSpecifier"),null)),i.finalize()},{"./types":155,"ast-types":173,estraverse:217,"lodash/object/extend":325}],45:[function(e,t){"use strict";function n(e){if(!a.existsSync)return!1;var t=s[e];return null!=t?t:s[e]=a.existsSync(e)}var r=function(e){return e&&e.__esModule?e["default"]:e},l=r(e("lodash/object/merge")),i=r(e("path")),a=r(e("fs")),s={},o={};t.exports=function(e){function t(e,s){var u=i.join(e,s);if(n(u)){var p,c=a.readFileSync(u,"utf8");try{var d,f;d=o,f=c,!d[f]&&(d[f]=JSON.parse(c)),p=d[f]}catch(h){throw h.message=""+u+": "+h.message,h}if(p.breakConfig)return;l(r,p,function(e,t){return Array.isArray(e)?e.concat(t):void 0})}var m=i.dirname(e);m!==e&&t(m,s)}var r=void 0===arguments[1]?{}:arguments[1],s=".babelrc";return t(e,s),r}},{fs:174,"lodash/object/merge":329,path:184}],46:[function(e,t){"use strict";function n(e,t,n){I(e,function(e){e.shouldRun||e.ran||e.checkNode(t,n)})}var r=function(e){return e&&e.__esModule?e:{"default":e}},l=function(e){return e&&e.__esModule?e["default"]:e},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=l(e("convert-source-map")),s=r(e("./option-parsers")),o=l(e("shebang-regex")),u=l(e("../../traversal/path")),p=l(e("lodash/lang/isFunction")),c=l(e("path-is-absolute")),d=l(e("../../tools/resolve-rc")),f=l(e("source-map")),h=l(e("./../index")),m=l(e("../../generation")),g=l(e("lodash/object/defaults")),y=l(e("lodash/collection/includes")),b=(l(e("../../traversal")),l(e("lodash/object/assign"))),v=l(e("./logger")),x=l(e("../../helpers/parse")),E=(l(e("../../traversal/scope")),l(e("slash"))),_=r(e("../../util")),S=l(e("path")),I=l(e("lodash/collection/each")),w=r(e("../../types")),k={enter:function(e,t,r,l){n(l.stack,e,r)}},A=function(){function t(){var e=void 0===arguments[0]?{}:arguments[0];i(this,t),this.dynamicImportedNoDefault=[],this.dynamicImportIds={},this.dynamicImported=[],this.dynamicImports=[],this.usedHelpers={},this.dynamicData={},this.data={},this.lastStatements=[],this.log=new v(this,e.filename||"unknown"),this.opts=this.normalizeOptions(e),this.ast={},this.buildTransformers()}return t.helpers=["inherits","defaults","create-class","create-decorated-class","tagged-template-literal","tagged-template-literal-loose","interop-require","to-array","to-consumable-array","sliced-to-array","sliced-to-array-loose","object-without-properties","has-own","slice","bind","define-property","async-to-generator","interop-require-wildcard","typeof","extends","get","set","class-call-check","object-destructuring-empty","temporal-undefined","temporal-assert-defined","self-global","default-props"],t.options=e("./options"),t.prototype.normalizeOptions=function(e){e=b({},e),e.filename&&c(e.filename)&&(e=d(e.filename,e));for(var n in e)if("_"!==n[0]){var r=t.options[n];r||this.log.error("Unknown option: "+n,ReferenceError)}for(var n in t.options){var r=t.options[n],l=e[n];if(l||!r.optional){if(l&&r.deprecated)throw new Error("Deprecated option "+n+": "+r.deprecated);null==l&&(l=r["default"]||l);var i=s[r.type];if(i&&(l=i(n,l)),r.alias){var a=e,o=r.alias;a[o]||(a[o]=l)}else e[n]=l}}return e.inputSourceMap&&(e.sourceMaps=!0),e.filename=E(e.filename),e.sourceRoot&&(e.sourceRoot=E(e.sourceRoot)),e.moduleId&&(e.moduleIds=!0),e.basename=S.basename(e.filename,S.extname(e.filename)),e.ignore=_.arrayify(e.ignore,_.regexify),e.only=_.arrayify(e.only,_.regexify),g(e,{moduleRoot:e.sourceRoot}),g(e,{sourceRoot:e.moduleRoot}),g(e,{filenameRelative:e.filename}),g(e,{sourceFileName:e.filenameRelative,sourceMapName:e.filenameRelative}),e.externalHelpers&&this.set("helpersNamespace",w.identifier("babelHelpers")),e},t.prototype.isLoose=function(e){return y(this.opts.loose,e)},t.prototype.buildPlugins=function(){},t.prototype.buildTransformers=function(){var e=this,t={},n=[],r=[];this.buildPlugins(r),I(h.transformers,function(l,i){var a=t[i]=l.buildPass(e);a.canTransform()&&(r.push(a),l.metadata.secondPass&&n.push(a),l.manipulateOptions&&l.manipulateOptions(e.opts,e))}),this.transformerStack=r.concat(n),this.transformers=t},t.prototype.getModuleFormatter=function(t){var n=p(t)?t:h.moduleFormatters[t];if(!n){var r=_.resolve(t);r&&(n=e(r))}if(!n)throw new ReferenceError("Unknown module formatter type "+JSON.stringify(t));return new n(this)},t.prototype.parseInputSourceMap=function(e){var t=this.opts;if(t.inputSourceMap!==!1){var n=a.fromSource(e);n&&(t.inputSourceMap=n.toObject(),e=a.removeComments(e))}return e},t.prototype.parseShebang=function(e){var t=o.exec(e);return t&&(this.shebang=t[0],e=e.replace(o,"")),e},t.prototype.set=function(e,t){return this.data[e]=t},t.prototype.setDynamic=function(e,t){this.dynamicData[e]=t},t.prototype.get=function(e){var t=this.data[e];if(t)return t;var n=this.dynamicData[e];return n?this.set(e,n()):void 0},t.prototype.resolveModuleSource=function(e){var t=function(){return e.apply(this,arguments)};return t.toString=function(){return e.toString()},t}(function(e){var t=this.opts.resolveModuleSource;return t&&(e=t(e,this.opts.filename)),e}),t.prototype.addImport=function(e,t,n){t||(t=e);var r=this.dynamicImportIds[t];if(!r){e=this.resolveModuleSource(e),r=this.dynamicImportIds[t]=this.scope.generateUidIdentifier(t);var l=[w.importDefaultSpecifier(r)],i=w.importDeclaration(l,w.literal(e));i._blockHoist=3,this.dynamicImported.push(i),n&&this.dynamicImportedNoDefault.push(i),this.transformers["es6.modules"].canTransform()?this.moduleFormatter.importSpecifier(l[0],i,this.dynamicImports):this.dynamicImports.push(i)}return r},t.prototype.isConsequenceExpressionStatement=function(e){return w.isExpressionStatement(e)&&this.lastStatements.indexOf(e)>=0},t.prototype.attachAuxiliaryComment=function(e){var t=this.opts.auxiliaryComment;if(t){var n=e;n.leadingComments||(n.leadingComments=[]),e.leadingComments.push({type:"Line",value:" "+t})}return e},t.prototype.addHelper=function(e){if(!y(t.helpers,e))throw new ReferenceError("Unknown helper "+e);var n=this.ast.program,r=n._declarations&&n._declarations[e];if(r)return r.id;this.usedHelpers[e]=!0;var l=this.get("helperGenerator"),i=this.get("helpersNamespace");if(l)return l(e);if(i){var a=w.identifier(w.toIdentifier(e));return w.memberExpression(i,a)}var s=_.template("helper-"+e);s._compact=!0;var o=this.scope.generateUidIdentifier(e);return this.scope.push({key:e,id:o,init:s}),o},t.prototype.errorWithNode=function(e,t){var n=void 0===arguments[2]?SyntaxError:arguments[2],r=e.loc.start,l=new n("Line "+r.line+": "+t);return l.loc=r,l},t.prototype.addCode=function(e){return e=(e||"")+"",e=this.parseInputSourceMap(e),this.code=e,this.parseShebang(e)},t.prototype.shouldIgnore=function(){var e=this.opts,t=e.filename,n=e.ignore,r=e.only;if(r.length){for(var l=0;l<r.length;l++)if(r[l].test(t))return!1;return!0}if(n.length)for(var l=0;l<n.length;l++)if(n[l].test(t))return!0;return!1},t.prototype.parse=function(e){var t=function(){return e.apply(this,arguments)};return t.toString=function(){return e.toString()},t}(function(e){var t=this;if(this.shouldIgnore())return{code:e,map:null,ast:null};e=this.addCode(e);var n=this.opts,r={highlightCode:n.highlightCode,nonStandard:n.nonStandard,filename:n.filename,plugins:{}},l=r.features={};for(var i in this.transformers){var a=this.transformers[i];l[i]=a.canTransform()}return r.looseModules=this.isLoose("es6.modules"),r.strictMode=l.strict,r.sourceType="module",x(r,e,function(e){return t.transform(e),t.generate()})}),t.prototype.setAst=function(e){this.path=u.get(null,null,e,e,"program",this),this.scope=this.path.scope,this.ast=e,this.path.traverse({enter:function(e,t,n){if(this.isScope())for(var r in n.bindings)n.bindings[r].setTypeAnnotation()}})},t.prototype.transform=function(e){this.log.debug(),this.setAst(e),this.lastStatements=w.getLastStatements(e.program);var t=this.moduleFormatter=this.getModuleFormatter(this.opts.modules);t.init&&this.transformers["es6.modules"].canTransform()&&t.init(),this.checkNode(e),this.call("pre"),I(this.transformerStack,function(e){e.transform()}),this.call("post")},t.prototype.call=function(e){for(var t=this.transformerStack,n=0;n<t.length;n++){var r=t[n].transformer,l=r[e];l&&l(this)}},t.prototype.checkNode=function(e){var t=function(){return e.apply(this,arguments)};return t.toString=function(){return e.toString()},t}(function(e,t){if(Array.isArray(e))for(var r=0;r<e.length;r++)this.checkNode(e[r],t);else{var l=this.transformerStack;t||(t=this.scope),n(l,e,t),t.traverse(e,k,{stack:l})}}),t.prototype.mergeSourceMap=function(e){var t=this.opts,n=t.inputSourceMap;if(n){e.sources[0]=n.file;var r=new f.SourceMapConsumer(n),l=new f.SourceMapConsumer(e),i=f.SourceMapGenerator.fromSourceMap(l);i.applySourceMap(r);var a=i.toJSON();return a.sources=n.sources,a.file=n.file,a}return e},t.prototype.generate=function(e){var t=function(){return e.apply(this,arguments)};return t.toString=function(){return e.toString()},t}(function(){var e=this.opts,t=this.ast,n={code:"",map:null,ast:null};if(this.opts.returnUsedHelpers&&(n.usedHelpers=Object.keys(this.usedHelpers)),e.ast&&(n.ast=t),!e.code)return n;var r=m(t,e,this.code);return n.code=r.code,n.map=r.map,this.shebang&&(n.code=""+this.shebang+"\n"+n.code),n.map&&(n.map=this.mergeSourceMap(n.map)),("inline"===e.sourceMaps||"both"===e.sourceMaps)&&(n.code+="\n"+a.fromObject(n.map).toComment()),"inline"===e.sourceMaps&&(n.map=null),n}),t}();t.exports=A},{"../../generation":32,"../../helpers/parse":42,"../../tools/resolve-rc":45,"../../traversal":146,"../../traversal/path":150,"../../traversal/scope":151,"../../types":155,"../../util":159,"./../index":64,"./logger":47,"./option-parsers":48,"./options":49,"convert-source-map":210,"lodash/collection/each":237,"lodash/collection/includes":240,"lodash/lang/isFunction":314,"lodash/object/assign":323,"lodash/object/defaults":324,path:184,"path-is-absolute":339,"shebang-regex":358,slash:359,"source-map":360}],47:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},l=n(e("../../util")),i=function(){function e(t,n){r(this,e),this.filename=n,this.file=t}return e.prototype._buildMessage=function(e){var t=this.filename;return e&&(t+=": "+e),t},e.prototype.error=function(e){var t=void 0===arguments[1]?Error:arguments[1];throw new t(this._buildMessage(e))},e.prototype.deprecate=function(e){this.file.opts.suppressDeprecationMessages||console.error(e)},e.prototype.debug=function(e){l.debug(this._buildMessage(e))},e.prototype.deopt=function(e,t){l.debug(this._buildMessage(t))},e}();t.exports=i},{"../../util":159}],48:[function(e,t,n){"use strict";function r(e,t){return t=c.arrayify(t),(t.indexOf("all")>=0||t.indexOf(!0)>=0)&&(t=Object.keys(p.transformers)),p._ensureTransformerNames(e,t)}function l(e,t){return+t}function i(e,t){return!!t}function a(e,t){return c.booleanify(t)}function s(e,t){return c.list(t)}var o=function(e){return e&&e.__esModule?e:{"default":e}},u=function(e){return e&&e.__esModule?e["default"]:e};n.transformerList=r,n.number=l,n.boolean=i,n.booleanString=a,n.list=s,n.__esModule=!0;var p=u(e("./../index")),c=o(e("../../util"))},{"../../util":159,"./../index":64}],49:[function(e,t){t.exports={filename:{type:"string",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc","default":"unknown",shorthand:"f"},filenameRelative:{hidden:!0,type:"string"},inputSourceMap:{hidden:!0},moduleId:{description:"specify a custom name for module ids",type:"string"},nonStandard:{type:"boolean","default":!0,description:"enable support for JSX and Flow"},experimental:{deprecated:"use `--stage 0`/`{ stage: 0 }` instead"},highlightCode:{description:"ANSI syntax highlight code frames",type:"boolean","default":!0},suppressDeprecationMessages:{type:"boolean","default":!1,hidden:!0},resolveModuleSource:{hidden:!0},stage:{description:"ECMAScript proposal stage version to allow [0-4]",shorthand:"e",type:"number","default":2},blacklist:{type:"transformerList",description:"blacklist of transformers to NOT use",shorthand:"b"},whitelist:{type:"transformerList",optional:!0,description:"whitelist of transformers to ONLY use",shorthand:"l"},optional:{type:"transformerList",description:"list of optional transformers to enable"},modules:{type:"string",description:"module formatter type to use [common]","default":"common",shorthand:"m"},moduleIds:{type:"boolean","default":!1,shorthand:"M",description:"insert an explicit id for modules"},loose:{type:"transformerList",description:"list of transformers to enable loose mode ON",shorthand:"L"},jsxPragma:{type:"string",description:"custom pragma to use with JSX (same functionality as @jsx comments)","default":"React.createElement",shorthand:"P"},ignore:{type:"list",description:"list of glob paths to **not** compile"},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:!0,"default":!0,type:"boolean"},ast:{hidden:!0,"default":!0,type:"boolean"},comments:{type:"boolean","default":!0,description:"output comments in generated output"},compact:{type:"booleanstring","default":"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},keepModuleIdExtensions:{type:"boolean",description:"keep extensions when generating module ids","default":!1,shorthand:"k"},auxiliaryComment:{type:"string","default":"",shorthand:"a",description:"attach a comment before all helper declarations and auxiliary code"},externalHelpers:{type:"string","default":!1,shorthand:"r",description:"uses a reference to `babelHelpers` instead of placing helpers at the top of your code."},returnUsedHelpers:{type:"boolean","default":!1,hidden:!0},sourceMap:{alias:"sourceMaps",hidden:!0},sourceMaps:{type:"booleanString",description:"[true|false|inline]","default":!1,shorthand:"s"},sourceMapName:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"string",description:"the root from which all sources are relative"},moduleRoot:{type:"string",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"}}},{}],50:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e){return e&&e.__esModule?e["default"]:e},l=r(e("./explode-assignable-expression")),i=n(e("../../types"));t.exports=function(e,t){var n=function(e){return e.operator===t.operator+"="},r=function(e,t){return i.assignmentExpression("=",e,t)};e.ExpressionStatement=function(e,a,s,o){if(!o.isConsequenceExpressionStatement(e)){var u=e.expression;if(n(u)){var p=[],c=l(u.left,p,o,s,!0);return p.push(i.expressionStatement(r(c.ref,t.build(c.uid,u.right)))),p}}},e.AssignmentExpression=function(e,i,a,s){if(n(e)){var o=[],u=l(e.left,o,s,a);return o.push(r(u.ref,t.build(u.uid,e.right))),o}},e.BinaryExpression=function(e){return e.operator===t.operator?t.build(e.left,e.right):void 0}}},{"../../types":155,"./explode-assignable-expression":56}],51:[function(e,t){"use strict";function n(e,t){var r=e.blocks.shift();if(r){var i=n(e,t);return i||(i=t(),e.filter&&(i=l.ifStatement(e.filter,l.blockStatement([i])))),l.forOfStatement(l.variableDeclaration("let",[l.variableDeclarator(r.left)]),r.right,l.blockStatement([i]))}}var r=function(e){return e&&e.__esModule?e:{"default":e}};t.exports=n;var l=r(e("../../types"))},{"../../types":155}],52:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e){return e&&e.__esModule?e["default"]:e},l=r(e("lodash/lang/isString")),i=n(e("../../messages")),a=r(e("esutils")),s=n(e("./react")),o=n(e("../../types"));t.exports=function(e,t){e.check=function(e){return o.isJSX(e)?!0:s.isCreateClass(e)?!0:!1},e.JSXIdentifier=function(e,t){return"this"===e.name&&o.isReferenced(e,t)?o.thisExpression():a.keyword.isIdentifierName(e.name)?void(e.type="Identifier"):o.literal(e.name)},e.JSXNamespacedName=function(){throw this.errorWithNode(i.get("JSXNamespacedTags"))},e.JSXMemberExpression={exit:function(e){e.computed=o.isLiteral(e.property),e.type="MemberExpression"}},e.JSXExpressionContainer=function(e){return e.expression},e.JSXAttribute={enter:function(e){var t=e.value;o.isLiteral(t)&&l(t.value)&&(t.value=t.value.replace(/\n\s+/g," "))},exit:function(e){var t=e.value||o.literal(!0);return o.inherits(o.property("init",e.name,t),e)}},e.JSXOpeningElement={exit:function(e,r,l,i){var a,s=e.name,u=[];o.isIdentifier(s)?a=s.name:o.isLiteral(s)&&(a=s.value);var p={tagExpr:s,tagName:a,args:u};t.pre&&t.pre(p,i);var c=e.attributes;return c=c.length?n(c,i):o.literal(null),u.push(c),t.post&&t.post(p,i),p.call||o.callExpression(p.callee,u)}};var n=function(e,t){for(var n=[],r=[],l=function(){n.length&&(r.push(o.objectExpression(n)),n=[])};e.length;){var i=e.shift();o.isJSXSpreadAttribute(i)?(l(),r.push(i.argument)):n.push(i)}return l(),1===r.length?e=r[0]:(o.isObjectExpression(r[0])||r.unshift(o.objectExpression([])),e=o.callExpression(t.addHelper("extends"),r)),e};e.JSXElement={exit:function(e){var t=e.openingElement;return t.arguments=t.arguments.concat(s.buildChildren(e)),t.arguments.length>=3&&(t._prettyCall=!0),o.inherits(t,e)}};var r=function(e,t){for(var n=t.arguments[0].properties,r=!0,l=0;l<n.length;l++){var i=n[l];if(o.isIdentifier(i.key,{name:"displayName"})){r=!1;break}}r&&n.unshift(o.property("init",o.identifier("displayName"),o.literal(e)))};e.ExportDefaultDeclaration=function(e,t,n,l){s.isCreateClass(e.declaration)&&r(l.opts.basename,e.declaration)},e.AssignmentExpression=e.Property=e.VariableDeclarator=function(e){var t,n;o.isAssignmentExpression(e)?(t=e.left,n=e.right):o.isProperty(e)?(t=e.key,n=e.value):o.isVariableDeclarator(e)&&(t=e.id,n=e.init),o.isMemberExpression(t)&&(t=t.property),o.isIdentifier(t)&&s.isCreateClass(n)&&r(t.name,n)}}},{"../../messages":43,"../../types":155,"./react":59,esutils:221,"lodash/lang/isString":320}],53:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e){return e&&e.__esModule?e["default"]:e},l=r(e("lodash/collection/includes")),i=n(e("../../util")),a=r(e("lodash/object/has")),s=n(e("../../types")),o=s.buildMatchMemberExpression("Symbol.iterator"),u=["Symbol","Promise","Map","WeakMap","Set","WeakSet"];t.exports=function(e,t,n){function r(e){return"_"!==e.name&&a(t,e.name)}var p="babel-runtime/"+n,c={enter:function(e,n,p,c){var d;if(this.isMemberExpression()&&this.isReferenced()){var f=e.object;if(d=e.property,!s.isReferenced(f,e))return;if(!e.computed&&r(f)&&a(t[f.name],d.name)&&!p.getBindingIdentifier(f.name))return this.skip(),s.prependToMemberExpression(e,c.get("coreIdentifier"))}else{if(this.isReferencedIdentifier()&&!s.isMemberExpression(n)&&l(u,e.name)&&!p.getBindingIdentifier(e.name))return s.memberExpression(c.get("coreIdentifier"),e);if(this.isCallExpression()){var h=e.callee;return e.arguments.length?!1:s.isMemberExpression(h)&&h.computed?(d=h.property,o(d)?i.template("corejs-iterator",{CORE_ID:c.get("coreIdentifier"),VALUE:h.object}):!1):!1}if(this.isBinaryExpression()){if("in"!==e.operator)return;var m=e.left;if(!o(m))return;return i.template("corejs-is-iterator",{CORE_ID:c.get("coreIdentifier"),VALUE:e.right})}}}};e.metadata={optional:!0},e.Program=function(e,t,n,r){this.traverse(c,r)},e.pre=function(e){e.set("helperGenerator",function(t){return e.addImport(""+p+"/helpers/"+t,t)}),e.setDynamic("coreIdentifier",function(){return e.addImport(""+p+"/core-js","core")}),e.setDynamic("regeneratorIdentifier",function(){return e.addImport(""+p+"/regenerator","regeneratorRuntime")})},e.Identifier=function(e,t,n,r){return this.isReferencedIdentifier({name:"regeneratorRuntime"})?r.get("regeneratorIdentifier"):void 0}}},{"../../types":155,"../../util":159,"lodash/collection/includes":240,"lodash/object/has":326}],54:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=n(e("../../types"));t.exports=function(e){var t=r.functionExpression(null,[],e.body,e.generator,e.async);t.shadow=!0;var n=r.callExpression(t,[]);return e.generator&&(n=r.yieldExpression(n,!0)),r.returnStatement(n)}},{"../../types":155}],55:[function(e,t,n){"use strict";function r(e,t,n,r,l){var i=d.toKeyAlias({computed:r},t),a={};c(e,i)&&(a=e[i]),e[i]=a,a._key=t,r&&(a._computed=!0),a[n]=l}function l(e){for(var t in e)if(e[t]._computed)return!0;return!1}function i(e){for(var t=d.arrayExpression([]),n=0;n<e.properties.length;n++){var r=e.properties[n],l=r.value;l.properties.unshift(d.property("init",d.identifier("key"),d.toComputedKey(r))),t.elements.push(l)}return t}function a(e){var t=d.objectExpression([]);return p(e,function(e){var n=d.objectExpression([]),r=d.property("init",e._key,n,e._computed);p(e,function(e,t){if("_"!==t[0]){var r=e;(d.isMethodDefinition(e)||d.isClassProperty(e))&&(e=e.value);var l=d.property("init",d.identifier(t),e);d.inheritsComments(l,r),d.removeComments(r),n.properties.push(l)}}),t.properties.push(r)}),t}function s(e){return p(e,function(e){e.value&&(e.writable=d.literal(!0)),e.configurable=d.literal(!0),e.enumerable=d.literal(!0)}),a(e)}var o=function(e){return e&&e.__esModule?e:{"default":e}},u=function(e){return e&&e.__esModule?e["default"]:e};n.push=r,n.hasComputed=l,n.toComputedObjectFromClass=i,n.toClassObject=a,n.toDefineObject=s,n.__esModule=!0;var p=(u(e("lodash/lang/cloneDeep")),u(e("../../traversal")),u(e("lodash/collection/each"))),c=u(e("lodash/object/has")),d=o(e("../../types"))},{"../../traversal":146,"../../types":155,"lodash/collection/each":237,"lodash/lang/cloneDeep":309,"lodash/object/has":326}],56:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=n(e("../../types")),l=function(e,t,n,l){var i;if(r.isIdentifier(e)){if(l.hasBinding(e.name))return e;i=e}else{if(!r.isMemberExpression(e))throw new Error("We can't explode this node type "+e.type);if(i=e.object,r.isIdentifier(i)&&l.hasGlobal(i.name))return i}var a=l.generateUidBasedOnNode(i);return t.push(r.variableDeclaration("var",[r.variableDeclarator(a,i)])),a},i=function(e,t,n,l){var i=e.property,a=r.toComputedKey(e,i);if(r.isLiteral(a))return a;var s=l.generateUidBasedOnNode(i);return t.push(r.variableDeclaration("var",[r.variableDeclarator(s,i)])),s};t.exports=function(e,t,n,a,s){var o;o=r.isIdentifier(e)&&s?e:l(e,t,n,a);var u,p;if(r.isIdentifier(e))u=e,p=o;else{var c=i(e,t,n,a),d=e.computed||r.isLiteral(c);p=u=r.memberExpression(o,c,d)}return{uid:p,ref:u}}},{"../../types":155}],57:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=n(e("../../types"));t.exports=function(e){for(var t=0,n=0;n<e.params.length;n++)r.isAssignmentPattern(e.params[n])||(t=n+1);return t}},{"../../types":155}],58:[function(e,t,n){"use strict";function r(e,t,n){var r=f(e,t.name,n);return d(r,e,t,n)}function l(e,t,n){var r=p.toComputedKey(e,e.key);if(!p.isLiteral(r))return e;var l=p.toIdentifier(r.value),i=p.identifier(l),a=e.value,s=f(a,l,n);e.value=d(s,a,i,n)}function i(e,t,n){if(e.id)return e;var r;if(!p.isProperty(t)||"init"!==t.kind||t.computed&&!p.isLiteral(t.key)){if(!p.isVariableDeclarator(t))return e;r=t.id}else r=t.key;var l;if(p.isLiteral(r))l=r.value;else{if(!p.isIdentifier(r))return;l=r.name}l=p.toIdentifier(l),r=p.identifier(l);var i=f(e,l,n);return d(i,e,r,n)}var a=function(e){return e&&e.__esModule?e:{"default":e}},s=function(e){return e&&e.__esModule?e["default"]:e};n.custom=r,n.property=l,n.bare=i,n.__esModule=!0;var o=s(e("./get-function-arity")),u=a(e("../../util")),p=a(e("../../types")),c={enter:function(e,t,n,r){if(this.isReferencedIdentifier({name:r.name})){var l=n.getBindingIdentifier(r.name);l===r.outerDeclar&&(r.selfReference=!0,this.stop())}}},d=function(e,t,n,r){if(e.selfReference){var l="property-method-assignment-wrapper";t.generator&&(l+="-generator");for(var i=u.template(l,{FUNCTION:t,FUNCTION_ID:n,FUNCTION_KEY:r.generateUidIdentifier(n.name),WRAPPER_KEY:r.generateUidIdentifier(n.name+"Wrapper")}),a=i.callee.body.body[0].declarations[0].init.params,s=0,p=o(t);p>s;s++)a.push(r.generateUidIdentifier("x"));return i}return t.id=n,t},f=function(e,t,n){var r={selfAssignment:!1,selfReference:!1,outerDeclar:n.getBindingIdentifier(t),references:[],name:t},l=n.getOwnBindingInfo(t);return l?"param"===l.kind&&(r.selfReference=!0):n.traverse(e,c,r),r}},{"../../types":155,"../../util":159,"./get-function-arity":57}],59:[function(e,t,n){"use strict";function r(e){if(!e||!u.isCallExpression(e))return!1;if(!p(e.callee))return!1;var t=e.arguments;if(1!==t.length)return!1;var n=t[0];return u.isObjectExpression(n)?!0:!1}function l(e){return e&&/^[a-z]|\-/.test(e)}function i(e,t){var n,r=e.value.split(/\r\n|\n|\r/),l=0;for(n=0;n<r.length;n++)r[n].match(/[^ \t]/)&&(l=n);var i="";for(n=0;n<r.length;n++){var a=r[n],s=0===n,o=n===r.length-1,p=n===l,c=a.replace(/\t/g," ");s||(c=c.replace(/^[ ]+/,"")),o||(c=c.replace(/[ ]+$/,"")),c&&(p||(c+=" "),i+=c)}i&&t.push(u.literal(i))}function a(e){for(var t=[],n=0;n<e.children.length;n++){var r=e.children[n];u.isJSXExpressionContainer(r)&&(r=r.expression),u.isLiteral(r)&&"string"==typeof r.value?i(r,t):u.isJSXEmptyExpression(r)||t.push(r)}return t}var s=function(e){return e&&e.__esModule?e:{"default":e}},o=function(e){return e&&e.__esModule?e["default"]:e};n.isCreateClass=r,n.isCompatTag=l,n.buildChildren=a,n.__esModule=!0;var u=(o(e("lodash/lang/isString")),s(e("../../types"))),p=u.buildMatchMemberExpression("React.createClass"),c=u.buildMatchMemberExpression("React.Component");n.isReactComponent=c},{"../../types":155,"lodash/lang/isString":320}],60:[function(e,t,n){"use strict";function r(e,t){return o.isLiteral(e)&&e.regex&&e.regex.flags.indexOf(t)>=0}function l(e,t){var n=e.regex.flags.split("");e.regex.flags.indexOf(t)<0||(s(n,t),e.regex.flags=n.join(""))}var i=function(e){return e&&e.__esModule?e:{"default":e}},a=function(e){return e&&e.__esModule?e["default"]:e};n.is=r,n.pullFlag=l,n.__esModule=!0;var s=a(e("lodash/array/pull")),o=i(e("../../types"))},{"../../types":155,"lodash/array/pull":234}],61:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=n(e("../../types")),l={enter:function(e){r.isFunction(e)&&this.skip(),r.isAwaitExpression(e)&&(e.type="YieldExpression",e.all&&(e.all=!1,e.argument=r.callExpression(r.memberExpression(r.identifier("Promise"),r.identifier("all")),[e.argument])))}},i={enter:function(e,t,n,l){var i=l.id.name;if(r.isReferencedIdentifier(e,t,{name:i})&&n.bindingIdentifierEquals(i,l.id)){var a;return a=l,!a.ref&&(a.ref=n.generateUidIdentifier(i)),a.ref}}};t.exports=function(e,t,n){e.async=!1,e.generator=!0,n.traverse(e,l,u);var a=r.callExpression(t,[e]),s=e.id;if(e.id=null,r.isFunctionDeclaration(e)){var o=r.variableDeclaration("let",[r.variableDeclarator(s,a)]);return o._blockHoist=!0,o}if(s){var u={id:s};if(n.traverse(e,i,u),u.ref)return n.parent.push({id:u.ref}),r.assignmentExpression("=",u.ref,a)}return a}},{"../../types":155}],62:[function(e,t){"use strict";function n(e,t){return s.isSuper(e)?s.isMemberExpression(t,{computed:!1})?!1:s.isCallExpression(t,{callee:e})?!1:!0:!1}var r=function(e){return e&&e.__esModule?e:{"default":e}},l=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};t.exports=u;var a=r(e("../../messages")),s=r(e("../../types")),o={enter:function(e,t,n,r){var l=r.topLevel,i=r.self;if(s.isFunction(e)&&!s.isArrowFunctionExpression(e))return i.traverseLevel(e,!1),this.skip();if(s.isProperty(e,{method:!0})||s.isMethodDefinition(e))return this.skip();var a=l?s.thisExpression:i.getThisReference.bind(i),o=i.specHandle;return i.isLoose&&(o=i.looseHandle),o.call(i,this,a)}},u=function(){function e(t){var n=void 0===arguments[1]?!1:arguments[1];i(this,e),this.topLevelThisReference=t.topLevelThisReference,this.methodNode=t.methodNode,this.superRef=t.superRef,this.isStatic=t.isStatic,this.hasSuper=!1,this.inClass=n,this.isLoose=t.isLoose,this.scope=t.scope,this.file=t.file,this.opts=t}return e.prototype.getObjectRef=function(){return this.opts.objectRef||this.opts.getObjectRef()},e.prototype.setSuperProperty=function(e,t,n,r){return s.callExpression(this.file.addHelper("set"),[s.callExpression(s.memberExpression(s.identifier("Object"),s.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():s.memberExpression(this.getObjectRef(),s.identifier("prototype"))]),n?e:s.literal(e.name),t,r])},e.prototype.getSuperProperty=function(e,t,n){return s.callExpression(this.file.addHelper("get"),[s.callExpression(s.memberExpression(s.identifier("Object"),s.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():s.memberExpression(this.getObjectRef(),s.identifier("prototype"))]),t?e:s.literal(e.name),n])},e.prototype.replace=function(){this.traverseLevel(this.methodNode.value,!0)},e.prototype.traverseLevel=function(e,t){var n={self:this,topLevel:t};this.scope.traverse(e,o,n)},e.prototype.getThisReference=function(){if(this.topLevelThisReference)return this.topLevelThisReference;var e=this.topLevelThisReference=this.scope.generateUidIdentifier("this");return this.methodNode.value.body.body.unshift(s.variableDeclaration("var",[s.variableDeclarator(this.topLevelThisReference,s.thisExpression())])),e},e.prototype.getLooseSuperProperty=function(e,t){var n=this.methodNode,r=n.key,l=this.superRef||s.identifier("Function");return t.property===e?void 0:s.isCallExpression(t,{callee:e})?(t.arguments.unshift(s.thisExpression()),"constructor"===r.name?s.memberExpression(l,s.identifier("call")):(e=l,n["static"]||(e=s.memberExpression(e,s.identifier("prototype"))),e=s.memberExpression(e,r,n.computed),s.memberExpression(e,s.identifier("call")))):s.isMemberExpression(t)&&!n["static"]?s.memberExpression(l,s.identifier("prototype")):l},e.prototype.looseHandle=function(e,t){var n=e.node;if(e.isSuper())return this.hasSuper=!0,this.getLooseSuperProperty(n,e.parent);if(e.isCallExpression()){var r=n.callee;if(!s.isMemberExpression(r))return;if(!s.isSuper(r.object))return;this.hasSuper=!0,s.appendToMemberExpression(r,s.identifier("call")),n.arguments.unshift(t())}},e.prototype.specHandle=function(e,t){var r,i,o,u,p=this.methodNode,c=e.parent,d=e.node;if(n(d,c))throw e.errorWithNode(a.get("classesIllegalBareSuper"));if(s.isCallExpression(d)){var f=d.callee;if(s.isSuper(f)){if(r=p.key,i=p.computed,o=d.arguments,"constructor"!==p.key.name||!this.inClass){var h=p.key.name||"METHOD_NAME";throw this.file.errorWithNode(d,a.get("classesIllegalSuperCall",h))}}else s.isMemberExpression(f)&&s.isSuper(f.object)&&(r=f.property,i=f.computed,o=d.arguments)}else if(s.isMemberExpression(d)&&s.isSuper(d.object))r=d.property,i=d.computed;else if(s.isAssignmentExpression(d)&&s.isSuper(d.left.object)&&"set"===p.kind)return this.hasSuper=!0,this.setSuperProperty(d.left.property,d.right,d.left.computed,t());if(r){this.hasSuper=!0,u=t(); var m=this.getSuperProperty(r,i,u);return o?1===o.length&&s.isSpreadElement(o[0])?s.callExpression(s.memberExpression(m,s.identifier("apply")),[u,o[0].argument]):s.callExpression(s.memberExpression(m,s.identifier("call")),[u].concat(l(o))):m}},e}();t.exports=u},{"../../messages":43,"../../types":155}],63:[function(e,t,n){"use strict";function r(e){var t=e.body[0];return a.isExpressionStatement(t)&&a.isLiteral(t.expression,{value:"use strict"})}function l(e,t){var n;r(e)&&(n=e.body.shift()),t(),n&&e.body.unshift(n)}var i=function(e){return e&&e.__esModule?e:{"default":e}};n.has=r,n.wrap=l,n.__esModule=!0;var a=i(e("../../types"))},{"../../types":155}],64:[function(e,t){"use strict";function n(e,t){var n=new s(t);return n.parse(e)}var r=function(e){return e&&e.__esModule?e["default"]:e};t.exports=n;var l=r(e("../helpers/normalize-ast")),i=r(e("./transformer")),a=r(e("../helpers/object")),s=r(e("./file")),o=r(e("lodash/collection/each"));n.fromAst=function(e,t,n){e=l(e);var r=new s(n);return r.addCode(t),r.transform(e),r.generate()},n._ensureTransformerNames=function(e,t){for(var r=[],l=0;l<t.length;l++){var i=t[l],a=n.deprecatedTransformerMap[i],s=n.aliasTransformerMap[i];if(s)r.push(s);else if(a)console.error("The transformer "+i+" has been renamed to "+a),t.push(a);else if(n.transformers[i])r.push(i);else{if(!n.namespaces[i])throw new ReferenceError("Unknown transformer "+i+" specified in "+e);r=r.concat(n.namespaces[i])}}return r},n.transformerNamespaces=a(),n.transformers=a(),n.namespaces=a(),n.deprecatedTransformerMap=e("./transformers/deprecated"),n.aliasTransformerMap=e("./transformers/aliases"),n.moduleFormatters=e("./modules");var u=r(e("./transformers"));o(u,function(e,t){var r=t.split(".")[0],l=n.namespaces,a=r;l[a]||(l[a]=[]),n.namespaces[r].push(t),n.transformerNamespaces[t]=r,n.transformers[t]=new i(t,e)})},{"../helpers/normalize-ast":40,"../helpers/object":41,"./file":46,"./modules":72,"./transformer":77,"./transformers":113,"./transformers/aliases":78,"./transformers/deprecated":79,"lodash/collection/each":237}],65:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e["default"]:e},r=function(e){return e&&e.__esModule?e:{"default":e}},l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=r(e("../../messages")),a=n(e("../../traversal")),s=n(e("lodash/object/extend")),o=n(e("../../helpers/object")),u=r(e("../../util")),p=r(e("../../types")),c={enter:function(e,t,n,r){if(p.isUpdateExpression(e)&&r.isLocalReference(e.argument,n)){this.skip();var l=p.assignmentExpression(e.operator[0]+"=",e.argument,p.literal(1)),i=r.remapExportAssignment(l);if(p.isExpressionStatement(t)||e.prefix)return i;var a=[];a.push(i);var s;return s="--"===e.operator?"+":"-",a.push(p.binaryExpression(s,e.argument,p.literal(1))),p.sequenceExpression(a)}return p.isAssignmentExpression(e)&&r.isLocalReference(e.left,n)?(this.skip(),r.remapExportAssignment(e)):void 0}},d={ImportDeclaration:{enter:function(e,t,n,r){r.hasLocalImports=!0,s(r.localImports,this.getBindingIdentifiers()),r.bumpImportOccurences(e)}}},f=a.explode({ExportDeclaration:{enter:function(e,t,n,r){r.hasLocalImports=!0;var l=this.get("declaration");if(l.isStatement()&&s(r.localExports,l.getBindingIdentifiers()),!p.isExportDefaultDeclaration(e)){var i=e.specifiers&&1===e.specifiers.length&&p.isSpecifierDefault(e.specifiers[0]);i||(r.hasNonDefaultExports=!0)}e.source&&r.bumpImportOccurences(e)}}}),h=function(){function e(t){l(this,e),this.scope=t.scope,this.file=t,this.ids=o(),this.hasNonDefaultExports=!1,this.hasLocalExports=!1,this.hasLocalImports=!1,this.localImportOccurences=o(),this.localExports=o(),this.localImports=o(),this.getLocalExports(),this.getLocalImports()}return e.prototype.init=function(){this.remapAssignments()},e.prototype.doDefaultExportInterop=function(e){return(p.isExportDefaultDeclaration(e)||p.isSpecifierDefault(e))&&!this.noInteropRequireExport&&!this.hasNonDefaultExports},e.prototype.bumpImportOccurences=function(e){var t=e.source.value,n=this.localImportOccurences,r=n,l=t;r[l]||(r[l]=0),e.specifiers&&(n[t]+=e.specifiers.length)},e.prototype.getLocalExports=function(){this.file.path.traverse(f,this)},e.prototype.getLocalImports=function(){this.file.path.traverse(d,this)},e.prototype.remapAssignments=function(){this.hasLocalImports&&this.file.path.traverse(c,this)},e.prototype.isLocalReference=function(e){var t=this.localImports;return p.isIdentifier(e)&&t[e.name]&&t[e.name]!==e},e.prototype.remapExportAssignment=function(e){return p.assignmentExpression("=",e.left,p.assignmentExpression(e.operator,p.memberExpression(p.identifier("exports"),e.left),e.right))},e.prototype.isLocalReference=function(e,t){var n=this.localExports,r=e.name;return p.isIdentifier(e)&&n[r]&&n[r]===t.getBindingIdentifier(r)},e.prototype.getModuleName=function(){var e=this.file.opts;if(e.moduleId)return e.moduleId;var t=e.filenameRelative,n="";if(e.moduleRoot&&(n=e.moduleRoot+"/"),!e.filenameRelative)return n+e.filename.replace(/^\//,"");if(e.sourceRoot){var r=new RegExp("^"+e.sourceRoot+"/?");t=t.replace(r,"")}return e.keepModuleIdExtensions||(t=t.replace(/\.(\w*?)$/,"")),n+=t,n=n.replace(/\\/g,"/")},e.prototype._pushStatement=function(e,t){return(p.isClass(e)||p.isFunction(e))&&e.id&&(t.push(p.toStatement(e)),e=e.id),e},e.prototype._hoistExport=function(e,t,n){return p.isFunctionDeclaration(e)&&(t._blockHoist=n||2),t},e.prototype.getExternalReference=function(e,t){var n=this.ids,r=e.source.value;return n[r]?n[r]:this.ids[r]=this._getExternalReference(e,t)},e.prototype.checkExportIdentifier=function(e){if(p.isIdentifier(e,{name:"__esModule"}))throw this.file.errorWithNode(e,i.get("modulesIllegalExportName",e.name))},e.prototype.exportAllDeclaration=function(e,t){var n=this.getExternalReference(e,t);t.push(this.buildExportsWildcard(n,e))},e.prototype.exportSpecifier=function(e,t,n){if(t.source){var r=this.getExternalReference(t,n);r="default"!==e.local.name||this.noInteropRequireExport?p.memberExpression(r,e.local):p.callExpression(this.file.addHelper("interop-require"),[r]),n.push(this.buildExportsAssignment(e.exported,r,t))}else n.push(this.buildExportsAssignment(e.exported,e.local,t))},e.prototype.buildExportsWildcard=function(e){return p.expressionStatement(p.callExpression(this.file.addHelper("defaults"),[p.identifier("exports"),p.callExpression(this.file.addHelper("interop-require-wildcard"),[e])]))},e.prototype.buildExportsAssignment=function(e,t){return this.checkExportIdentifier(e),u.template("exports-assign",{VALUE:t,KEY:e},!0)},e.prototype.exportDeclaration=function(e,t){var n=e.declaration,r=n.id;p.isExportDefaultDeclaration(e)&&(r=p.identifier("default"));var l;if(p.isVariableDeclaration(n))for(var i=0;i<n.declarations.length;i++){var a=n.declarations[i];a.init=this.buildExportsAssignment(a.id,a.init,e).expression;var s=p.variableDeclaration(n.kind,[a]);0===i&&p.inherits(s,n),t.push(s)}else{var o=n;(p.isFunctionDeclaration(n)||p.isClassDeclaration(n))&&(o=n.id,t.push(n)),l=this.buildExportsAssignment(r,o,e),t.push(l),this._hoistExport(n,l)}},e}();t.exports=h},{"../../helpers/object":41,"../../messages":43,"../../traversal":146,"../../types":155,"../../util":159,"lodash/object/extend":325}],66:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=n(e("../../util"));t.exports=function(e){var t=function(){this.noInteropRequireImport=!0,this.noInteropRequireExport=!0,e.apply(this,arguments)};return r.inherits(t,e),t}},{"../../util":159}],67:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e["default"]:e},r=n(e("./amd")),l=n(e("./_strict"));t.exports=l(r)},{"./_strict":66,"./amd":68}],68:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e){return e&&e.__esModule?e["default"]:e},l=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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=r(e("./_default")),s=r(e("./common")),o=r(e("lodash/collection/includes")),u=r(e("lodash/object/values")),p=(n(e("../../util")),n(e("../../types"))),c=function(e){function t(){this.init=s.prototype.init,i(this,t),null!=e&&e.apply(this,arguments)}return l(t,e),t.prototype.buildDependencyLiterals=function(){var e=[];for(var t in this.ids)e.push(p.literal(t));return e},t.prototype.transform=function(e){var t=e.body,n=[p.literal("exports")];this.passModuleArg&&n.push(p.literal("module")),n=n.concat(this.buildDependencyLiterals()),n=p.arrayExpression(n);var r=u(this.ids);this.passModuleArg&&r.unshift(p.identifier("module")),r.unshift(p.identifier("exports"));var l=p.functionExpression(null,r,p.blockStatement(t)),i=[n,l],a=this.getModuleName();a&&i.unshift(p.literal(a));var s=p.callExpression(p.identifier("define"),i);e.body=[p.expressionStatement(s)]},t.prototype.getModuleName=function(){return this.file.opts.moduleIds?a.prototype.getModuleName.apply(this,arguments):null},t.prototype._getExternalReference=function(e){return this.scope.generateUidIdentifier(e.source.value)},t.prototype.importDeclaration=function(e){this.getExternalReference(e)},t.prototype.importSpecifier=function(e,t,n){var r=this.getExternalReference(t);if(o(this.file.dynamicImportedNoDefault,t))this.ids[t.source.value]=r;else if(p.isImportNamespaceSpecifier(e));else if(o(this.file.dynamicImported,t)||!p.isSpecifierDefault(e)||this.noInteropRequireImport){var l=e.imported;p.isSpecifierDefault(e)&&(l=p.identifier("default")),r=p.memberExpression(r,l)}else r=p.callExpression(this.file.addHelper("interop-require"),[r]);n.push(p.variableDeclaration("var",[p.variableDeclarator(e.local,r)]))},t.prototype.exportSpecifier=function(){s.prototype.exportSpecifier.apply(this,arguments)},t.prototype.exportDeclaration=function(e){this.doDefaultExportInterop(e)&&(this.passModuleArg=!0),s.prototype.exportDeclaration.apply(this,arguments)},t}(a);t.exports=c},{"../../types":155,"../../util":159,"./_default":65,"./common":70,"lodash/collection/includes":240,"lodash/object/values":330}],69:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e["default"]:e},r=n(e("./common")),l=n(e("./_strict"));t.exports=l(r)},{"./_strict":66,"./common":70}],70:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e){return e&&e.__esModule?e["default"]:e},l=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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=r(e("./_default")),s=r(e("lodash/collection/includes")),o=n(e("../../util")),u=n(e("../../types")),p=function(e){function t(){i(this,t),null!=e&&e.apply(this,arguments)}return l(t,e),t.prototype.init=function(){var e=this.file,t=e.scope;if(t.rename("module"),!this.noInteropRequireImport&&this.hasNonDefaultExports){var n="exports-module-declaration";this.file.isLoose("es6.modules")&&(n+="-loose"),e.ast.program.body.unshift(o.template(n,!0))}a.prototype.init.call(this)},t.prototype.importSpecifier=function(e,t,n){var r=e.local,l=this.getExternalReference(t,n);u.isSpecifierDefault(e)?(s(this.file.dynamicImportedNoDefault,t)||(l=this.noInteropRequireImport||s(this.file.dynamicImported,t)?u.memberExpression(l,u.identifier("default")):u.callExpression(this.file.addHelper("interop-require"),[l])),n.push(u.variableDeclaration("var",[u.variableDeclarator(r,l)]))):u.isImportNamespaceSpecifier(e)?(this.noInteropRequireImport||(l=u.callExpression(this.file.addHelper("interop-require-wildcard"),[l])),n.push(u.variableDeclaration("var",[u.variableDeclarator(r,l)]))):n.push(u.variableDeclaration("var",[u.variableDeclarator(r,u.memberExpression(l,e.imported))]))},t.prototype.importDeclaration=function(e,t){t.push(o.template("require",{MODULE_NAME:e.source},!0))},t.prototype.exportSpecifier=function(e,t,n){return this.doDefaultExportInterop(e)?void n.push(o.template("exports-default-assign",{VALUE:e.local},!0)):void a.prototype.exportSpecifier.apply(this,arguments)},t.prototype.exportDeclaration=function(e,t){if(this.doDefaultExportInterop(e)){var n=e.declaration,r=o.template("exports-default-assign",{VALUE:this._pushStatement(n,t)},!0);return u.isFunctionDeclaration(n)&&(r._blockHoist=3),void t.push(r)}a.prototype.exportDeclaration.apply(this,arguments)},t.prototype._getExternalReference=function(e,t){var n=e.source.value,r=u.callExpression(u.identifier("require"),[e.source]);if(this.localImportOccurences[n]>1){var l=this.scope.generateUidIdentifier(n);return t.push(u.variableDeclaration("var",[u.variableDeclarator(l,r)])),l}return r},t}(a);t.exports=p},{"../../types":155,"../../util":159,"./_default":65,"lodash/collection/includes":240}],71:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},l=n(e("../../types")),i=function(){function e(){r(this,e)}return e.prototype.exportDeclaration=function(e,t){var n=l.toStatement(e.declaration,!0);n&&t.push(l.inherits(n,e))},e.prototype.exportAllDeclaration=function(){},e.prototype.importDeclaration=function(){},e.prototype.importSpecifier=function(){},e.prototype.exportSpecifier=function(){},e}();t.exports=i},{"../../types":155}],72:[function(e,t){"use strict";t.exports={commonStrict:e("./common-strict"),amdStrict:e("./amd-strict"),umdStrict:e("./umd-strict"),common:e("./common"),system:e("./system"),ignore:e("./ignore"),amd:e("./amd"),umd:e("./umd")}},{"./amd":68,"./amd-strict":67,"./common":70,"./common-strict":69,"./ignore":71,"./system":73,"./umd":75,"./umd-strict":74}],73:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e){return e&&e.__esModule?e["default"]:e},l=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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=r(e("./_default")),s=r(e("./amd")),o=n(e("../../util")),u=r(e("lodash/array/last")),p=r(e("lodash/collection/each")),c=r(e("lodash/collection/map")),d=n(e("../../types")),f=function(e,t){return e._blockHoist&&!t.transformers.runtime.canTransform()},h={enter:function(e,t,n,r){if(d.isFunction(e))return this.skip();if(d.isVariableDeclaration(e)){if("var"!==e.kind&&!d.isProgram(t))return;if(f(e,n.file))return;for(var l=[],i=0;i<e.declarations.length;i++){var a=e.declarations[i];if(r.push(d.variableDeclarator(a.id)),a.init){var s=d.expressionStatement(d.assignmentExpression("=",a.id,a.init));l.push(s)}}if(d.isFor(t)){if(t.left===e)return e.declarations[0].id;if(t.init===e)return l}return l}}},m={enter:function(e,t,n,r){d.isFunction(e)&&this.skip(),(d.isFunctionDeclaration(e)||f(e,n.file))&&(r.push(e),this.remove())}},g={enter:function(e,t,n,r){e._importSource===r.source&&(d.isVariableDeclaration(e)?p(e.declarations,function(e){r.hoistDeclarators.push(d.variableDeclarator(e.id)),r.nodes.push(d.expressionStatement(d.assignmentExpression("=",e.id,e.init)))}):r.nodes.push(e),this.remove())}},y=function(e){function t(e){i(this,t),this.exportIdentifier=e.scope.generateUidIdentifier("export"),this.noInteropRequireExport=!0,this.noInteropRequireImport=!0,a.apply(this,arguments)}return l(t,e),t.prototype.init=function(){a.prototype.init.call(this)},t.prototype._addImportSource=function(e,t){return e._importSource=t.source&&t.source.value,e},t.prototype.buildExportsWildcard=function(e,t){var n=this.scope.generateUidIdentifier("key"),r=d.memberExpression(e,n,!0),l=d.variableDeclaration("var",[d.variableDeclarator(n)]),i=e,a=d.blockStatement([d.expressionStatement(this.buildExportCall(n,r))]);return this._addImportSource(d.forInStatement(l,i,a),t)},t.prototype.buildExportsAssignment=function(e,t,n){var r=this.buildExportCall(d.literal(e.name),t,!0);return this._addImportSource(r,n)},t.prototype.remapExportAssignment=function(e){return this.buildExportCall(d.literal(e.left.name),e)},t.prototype.buildExportCall=function(e,t,n){var r=d.callExpression(this.exportIdentifier,[e,t]);return n?d.expressionStatement(r):r},t.prototype.importSpecifier=function(e,t,n){s.prototype.importSpecifier.apply(this,arguments),this._addImportSource(u(n),t)},t.prototype.buildRunnerSetters=function(e,t){var n=this.file.scope;return d.arrayExpression(c(this.ids,function(r,l){var i={hoistDeclarators:t,source:l,nodes:[]};return n.traverse(e,g,i),d.functionExpression(null,[r],d.blockStatement(i.nodes))}))},t.prototype.transform=function(e){var t=[],n=this.getModuleName(),r=d.literal(n),l=d.blockStatement(e.body),i=o.template("system",{MODULE_DEPENDENCIES:d.arrayExpression(this.buildDependencyLiterals()),EXPORT_IDENTIFIER:this.exportIdentifier,MODULE_NAME:r,SETTERS:this.buildRunnerSetters(l,t),EXECUTE:d.functionExpression(null,[],l)},!0),a=i.expression.arguments[2].body.body;n||i.expression.arguments.shift();var s=a.pop();if(this.file.scope.traverse(l,h,t),t.length){var u=d.variableDeclaration("var",t);u._blockHoist=!0,a.unshift(u)}this.file.scope.traverse(l,m,a),a.push(s),e.body=[i]},t}(s);t.exports=y},{"../../types":155,"../../util":159,"./_default":65,"./amd":68,"lodash/array/last":233,"lodash/collection/each":237,"lodash/collection/map":241}],74:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e["default"]:e},r=n(e("./umd")),l=n(e("./_strict"));t.exports=l(r)},{"./_strict":66,"./umd":75}],75:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e){return e&&e.__esModule?e["default"]:e},l=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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=r(e("./amd")),s=r(e("lodash/object/values")),o=n(e("../../util")),u=n(e("../../types")),p=function(e){function t(){i(this,t),null!=e&&e.apply(this,arguments)}return l(t,e),t.prototype.transform=function(e){var t=e.body,n=[];for(var r in this.ids)n.push(u.literal(r));var l=s(this.ids),i=[u.identifier("exports")];this.passModuleArg&&i.push(u.identifier("module")),i=i.concat(l);var a=u.functionExpression(null,i,u.blockStatement(t)),p=[u.literal("exports")];this.passModuleArg&&p.push(u.literal("module")),p=p.concat(n),p=[u.arrayExpression(p)];var c=o.template("test-exports"),d=o.template("test-module"),f=this.passModuleArg?u.logicalExpression("&&",c,d):c,h=[u.identifier("exports")];this.passModuleArg&&h.push(u.identifier("module")),h=h.concat(n.map(function(e){return u.callExpression(u.identifier("require"),[e])}));var m=this.getModuleName();m&&p.unshift(u.literal(m));var g=o.template("umd-runner-body",{AMD_ARGUMENTS:p,COMMON_TEST:f,COMMON_ARGUMENTS:h}),y=u.callExpression(g,[a]);e.body=[u.expressionStatement(y)]},t}(a);t.exports=p},{"../../types":155,"../../util":159,"./amd":68,"lodash/object/values":330}],76:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e["default"]:e},r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},l=n(e("lodash/collection/includes")),i=n(e("../traversal")),a=function(){function e(t,n){r(this,e),this.transformer=n,this.shouldRun=!n.check,this.handlers=n.handlers,this.file=t,this.ran=!1}return e.prototype.canTransform=function(){var e=this.transformer,t=this.file.opts,n=e.key;if("_"===n[0])return!0;var r=t.blacklist;if(r.length&&l(r,n))return!1;var i=t.whitelist;if(i)return l(i,n);var a=e.metadata.stage;return null!=a&&a>=t.stage?!0:e.metadata.optional&&!l(t.optional,n)?!1:!0},e.prototype.checkNode=function(e){var t=this.transformer.check;return t?this.shouldRun=t(e):!0},e.prototype.transform=function(){if(this.shouldRun){var e=this.file;e.log.debug("Running transformer "+this.transformer.key),i(e.ast,this.handlers,e.scope,e),this.ran=!0}},e}();t.exports=a},{"../traversal":146,"lodash/collection/includes":240}],77:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e){return e&&e.__esModule?e["default"]:e},l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=r(e("./transformer-pass")),a=r(e("lodash/lang/isFunction")),s=r(e("../traversal")),o=r(e("lodash/lang/isObject")),u=r(e("lodash/object/assign")),p=(n(e("../../acorn")),r(e("./file")),r(e("lodash/collection/each"))),c=function(){function e(t,n){l(this,e),n=u({},n);var r=function(e){var t=n[e];return delete n[e],t};this.manipulateOptions=r("manipulateOptions"),this.metadata=r("metadata")||{},this.parser=r("parser"),this.check=r("check"),this.post=r("post"),this.pre=r("pre"),null!=this.metadata.stage&&(this.metadata.optional=!0),this.handlers=this.normalize(n);var i=this;i.opts||(i.opts={}),this.key=t}return e.prototype.normalize=function(e){var t=this;return a(e)&&(e={ast:e}),s.explode(e),p(e,function(n,r){return"_"===r[0]?void(t[r]=n):void("enter"!==r&&"exit"!==r&&(a(n)&&(n={enter:n}),o(n)&&(n.enter||(n.enter=function(){}),n.exit||(n.exit=function(){}),e[r]=n)))}),e},e.prototype.buildPass=function(e){return new i(e,this)},e}();t.exports=c},{"../../acorn":5,"../traversal":146,"./file":46,"./transformer-pass":76,"lodash/collection/each":237,"lodash/lang/isFunction":314,"lodash/lang/isObject":317,"lodash/object/assign":323}],78:[function(e,t){t.exports={useStrict:"strict","es5.runtime":"runtime","es6.runtime":"runtime"}},{}],79:[function(e,t){t.exports={selfContained:"runtime","unicode-regex":"regex.unicode","spec.typeofSymbol":"es6.spec.symbols","es6.symbols":"es6.spec.symbols","es6.blockScopingTDZ":"es6.spec.blockScoping","minification.deadCodeElimination":"utility.deadCodeElimination","minification.removeConsoleCalls":"utility.removeConsole","minification.removeDebugger":"utility.removeDebugger"}},{}],80:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{"default":e}};n.__esModule=!0;var l=(r(e("../../../types")),{optional:!0});n.metadata=l},{"../../../types":155}],81:[function(e,t,n){"use strict";function r(e){var t=e.property;e.computed&&i.isLiteral(t)&&i.isValidIdentifier(t.value)?(e.property=i.identifier(t.value),e.computed=!1):e.computed||!i.isIdentifier(t)||i.isValidIdentifier(t.name)||(e.property=i.literal(t.name),e.computed=!0)}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.MemberExpression=r,n.__esModule=!0;var i=l(e("../../../types"))},{"../../../types":155}],82:[function(e,t,n){"use strict";function r(e){var t=e.key;i.isLiteral(t)&&i.isValidIdentifier(t.value)?(e.key=i.identifier(t.value),e.computed=!1):e.computed||!i.isIdentifier(t)||i.isValidIdentifier(t.name)||(e.key=i.literal(t.name))}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.Property=r,n.__esModule=!0;var i=l(e("../../../types"))},{"../../../types":155}],83:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},l=r(e("core-js/client/library")),i=r(e("../../helpers/build-runtime-transformer"));i(n,l,"es3")},{"../../helpers/build-runtime-transformer":53,"core-js/client/library":211}],84:[function(e,t,n){"use strict";function r(e){return s.isProperty(e)&&("get"===e.kind||"set"===e.kind)}function l(e){var t={},n=!1;return e.properties=e.properties.filter(function(e){return"get"===e.kind||"set"===e.kind?(n=!0,a.push(t,e.key,e.kind,e.computed,e.value),!1):!0}),n?s.callExpression(s.memberExpression(s.identifier("Object"),s.identifier("defineProperties")),[e,a.toDefineObject(t)]):void 0}var i=function(e){return e&&e.__esModule?e:{"default":e}};n.check=r,n.ObjectExpression=l,n.__esModule=!0;var a=i(e("../../helpers/define-map")),s=i(e("../../../types"))},{"../../../types":155,"../../helpers/define-map":55}],85:[function(e,t,n){"use strict";function r(e){return i.ensureBlock(e),e.expression=!1,e.type="FunctionExpression",e.shadow=!0,e}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.ArrowFunctionExpression=r,n.__esModule=!0;var i=l(e("../../../types")),a=i.isArrowFunctionExpression;n.check=a},{"../../../types":155}],86:[function(e,t,n){"use strict";function r(e,t){if(!v.isVariableDeclaration(e))return!1;if(e._let)return!0;if("let"!==e.kind)return!1;if(l(e,t))for(var n=0;n<e.declarations.length;n++){var r=e.declarations[n],i=r;i.init||(i.init=v.identifier("undefined"))}return e._let=!0,e.kind="var",!0}function l(e,t){return!v.isFor(t)||!v.isFor(t,{left:e})}function i(e,t){return v.isVariableDeclaration(e,{kind:"var"})&&!r(e,t)}function a(e){for(var t=0;t<e.length;t++)delete e[t]._let}function s(e){return v.isVariableDeclaration(e)&&("let"===e.kind||"const"===e.kind)}function o(e,t,n,i){if(r(e,t)&&l(e)&&i.transformers["es6.spec.blockScoping"].canTransform()){for(var a=[e],s=0;s<e.declarations.length;s++){var o=e.declarations[s];if(o.init){var u=v.assignmentExpression("=",o.id,o.init);u._ignoreBlockScopingTDZ=!0,a.push(v.expressionStatement(u))}o.init=i.addHelper("temporal-undefined")}return e._blockHoist=2,a}}function u(e,t,n,l){var i=e.left||e.init;r(i,e)&&(v.ensureBlock(e),e.body._letDeclarators=[i]);var a=new M(this,e.body,t,n,l);return a.run()}function p(e,t,n,r){if(!v.isLoop(t)){var l=new M(null,e,t,n,r);l.run()}}function c(e,t,n,r){if(v.isReferencedIdentifier(e,t)){var l=r[e.name];if(l){var i=n.getBindingIdentifier(e.name);i===l.binding?e.name=l.uid:this&&this.skip()}}}function d(e,t,n,r){c(e,t,n,r),n.traverse(e,_,r)}var f=function(e){return e&&e.__esModule?e:{"default":e}},h=function(e){return e&&e.__esModule?e["default"]:e},m=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};n.check=s,n.VariableDeclaration=o,n.Loop=u,n.BlockStatement=p,n.__esModule=!0;var g=h(e("../../../traversal")),y=h(e("../../../helpers/object")),b=f(e("../../../util")),v=f(e("../../../types")),x=h(e("lodash/object/values")),E=h(e("lodash/object/extend"));n.Program=p;var _={enter:c},S={enter:function(e,t,n,r){return this.isFunction()?(this.traverse(I,r),this.skip()):void 0}},I={enter:function(e,t,n,r){this.isReferencedIdentifier()&&r.letReferences[e.name]&&(n.hasOwnBinding(e.name)||(r.closurify=!0))}},w={enter:function(e,t,n,r){if(this.isForStatement())i(e.init,e)&&(e.init=v.sequenceExpression(r.pushDeclar(e.init)));else if(this.isFor())i(e.left,e)&&(e.left=e.left.declarations[0].id);else{if(i(e,t))return r.pushDeclar(e).map(v.expressionStatement);if(this.isFunction())return this.skip()}}},k={enter:function(e,t,n,r){this.isLabeledStatement()&&r.innerLabels.push(e.label.name)}},A={enter:function(e,t,n,r){if(this.isAssignmentExpression()||this.isUpdateExpression()){var l=this.getBindingIdentifiers();for(var i in l)r.outsideReferences[i]===n.getBindingIdentifier(i)&&(r.reassignments[i]=!0)}}},C=function(e){return v.isBreakStatement(e)?"break":v.isContinueStatement(e)?"continue":void 0},T={enter:function(e,t,n,r){var l;if(this.isLoop()&&(r.ignoreLabeless=!0,this.traverse(T,r),r.ignoreLabeless=!1),this.isFunction()||this.isLoop())return this.skip();var i=C(e);if(i){if(e.label){if(r.innerLabels.indexOf(e.label.name)>=0)return;i=""+i+"|"+e.label.name}else{if(r.ignoreLabeless)return;if(v.isBreakStatement(e)&&v.isSwitchCase(t))return}r.hasBreakContinue=!0,r.map[i]=e,l=v.literal(i)}return this.isReturnStatement()&&(r.hasReturn=!0,l=v.objectExpression([v.property("init",v.identifier("v"),e.argument||v.identifier("undefined"))])),l?(l=v.returnStatement(l),v.inherits(l,e)):void 0}},M=function(){function e(t,n,r,l,i){m(this,e),this.parent=r,this.scope=l,this.block=n,this.file=i,this.outsideLetReferences=y(),this.hasLetReferences=!1,this.letReferences=n._letReferences=y(),this.body=[],t&&(this.loopParent=t.parent,this.loopLabel=v.isLabeledStatement(this.loopParent)&&this.loopParent.label,this.loop=t.node)}return e.prototype.run=function(){var e=this.block;if(!e._letDone){e._letDone=!0;var t=this.getLetReferences();if(!v.isFunction(this.parent)&&!v.isProgram(this.block)&&this.hasLetReferences)return t?this.wrapClosure():this.remap(),this.loopLabel&&!v.isLabeledStatement(this.loopParent)?v.labeledStatement(this.loopLabel,this.loop):void 0}},e.prototype.remap=function(){var e=!1,t=this.letReferences,n=this.scope,r=y();for(var l in t){var i=t[l];if(n.parentHasBinding(l)||n.hasGlobal(l)){var a=n.generateUidIdentifier(i.name).name;i.name=a,e=!0,r[l]=r[a]={binding:i,uid:a}}}if(e){var s=this.loop;s&&(d(s.right,s,n,r),d(s.test,s,n,r),d(s.update,s,n,r)),n.traverse(this.block,_,r)}},e.prototype.wrapClosure=function(){var e=this.block,t=this.outsideLetReferences;if(this.loop)for(var n in t){var r=t[n];(this.scope.hasGlobal(r.name)||this.scope.parentHasBinding(r.name))&&(delete t[r.name],delete this.letReferences[r.name],this.scope.rename(r.name),this.letReferences[r.name]=r,t[r.name]=r)}this.has=this.checkLoop(),this.hoistVarDeclarations();var l=x(t),i=x(t),a=v.functionExpression(null,l,v.blockStatement(e.body));a.shadow=!0,this.addContinuations(a),e.body=this.body;var s=v.callExpression(a,i),o=this.scope.generateUidIdentifier("ret"),u=g.hasType(a.body,this.scope,"YieldExpression",v.FUNCTION_TYPES);u&&(a.generator=!0,s=v.yieldExpression(s,!0));var p=g.hasType(a.body,this.scope,"AwaitExpression",v.FUNCTION_TYPES);p&&(a.async=!0,s=v.awaitExpression(s)),this.build(o,s)},e.prototype.addContinuations=function(e){var t={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(e,A,t);for(var n=0;n<e.params.length;n++){var r=e.params[n];if(t.reassignments[r.name]){var l=this.scope.generateUidIdentifier(r.name);e.params[n]=l,this.scope.rename(r.name,l.name,e),e.body.body.push(v.expressionStatement(v.assignmentExpression("=",r,l)))}}},e.prototype.getLetReferences=function(){for(var e,t=this.block,n=t._letDeclarators||[],l=0;l<n.length;l++)e=n[l],E(this.outsideLetReferences,v.getBindingIdentifiers(e));if(t.body)for(l=0;l<t.body.length;l++)e=t.body[l],r(e,t)&&(n=n.concat(e.declarations));for(l=0;l<n.length;l++){e=n[l];var i=v.getBindingIdentifiers(e);E(this.letReferences,i),this.hasLetReferences=!0}if(this.hasLetReferences){a(n);var s={letReferences:this.letReferences,closurify:!1};return this.scope.traverse(this.block,S,s),s.closurify}},e.prototype.checkLoop=function(){var e={hasBreakContinue:!1,ignoreLabeless:!1,innerLabels:[],hasReturn:!1,isLoop:!!this.loop,map:{}};return this.scope.traverse(this.block,k,e),this.scope.traverse(this.block,T,e),e},e.prototype.hoistVarDeclarations=function(){g(this.block,w,this.scope,this)},e.prototype.pushDeclar=function(e){this.body.push(v.variableDeclaration(e.kind,e.declarations.map(function(e){return v.variableDeclarator(e.id)})));for(var t=[],n=0;n<e.declarations.length;n++){var r=e.declarations[n];if(r.init){var l=v.assignmentExpression("=",r.id,r.init);t.push(v.inherits(l,r))}}return t},e.prototype.build=function(e,t){var n=this.has;n.hasReturn||n.hasBreakContinue?this.buildHas(e,t):this.body.push(v.expressionStatement(t))},e.prototype.buildHas=function(e,t){var n=this.body;n.push(v.variableDeclaration("var",[v.variableDeclarator(e,t)]));var r,l=(this.loop,this.has),i=[];if(l.hasReturn&&(r=b.template("let-scoping-return",{RETURN:e})),l.hasBreakContinue){for(var a in l.map)i.push(v.switchCase(v.literal(a),[l.map[a]]));if(l.hasReturn&&i.push(v.switchCase(null,[r])),1===i.length){var s=i[0];n.push(this.file.attachAuxiliaryComment(v.ifStatement(v.binaryExpression("===",e,s.test),s.consequent[0])))}else{for(var o=0;o<i.length;o++){var u=i[o].consequent[0];if(v.isBreakStatement(u)&&!u.label){var p; u.label=(p=this,!p.loopLabel&&(p.loopLabel=this.file.scope.generateUidIdentifier("loop")),p.loopLabel)}}n.push(this.file.attachAuxiliaryComment(v.switchStatement(e,i)))}}else l.hasReturn&&n.push(this.file.attachAuxiliaryComment(r))},e}()},{"../../../helpers/object":41,"../../../traversal":146,"../../../types":155,"../../../util":159,"lodash/object/extend":325,"lodash/object/values":330}],87:[function(e,t,n){"use strict";function r(e){return m.variableDeclaration("let",[m.variableDeclarator(e.id,m.toExpression(e))])}function l(e,t,n,r){return new x(this,r).run()}var i=function(e){return e&&e.__esModule?e:{"default":e}},a=function(e){return e&&e.__esModule?e["default"]:e},s=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};n.ClassDeclaration=r,n.ClassExpression=l,n.__esModule=!0;var o=a(e("../../helpers/replace-supers")),u=i(e("../../helpers/name-method")),p=i(e("../../helpers/define-map")),c=i(e("../../../messages")),d=i(e("../../../util")),f=a(e("../../../traversal")),h=(a(e("lodash/collection/each")),a(e("lodash/object/has"))),m=i(e("../../../types")),g="__initializeProperties",y=m.isClass;n.check=y;var b={Identifier:{enter:function(e,t,n,r){this.parentPath.isClassProperty({key:e})||this.isReferenced()&&n.getBinding(e.name)===r.scope.getBinding(e.name)&&(r.references[e.name]=!0)}}},v=f.explode({MethodDefinition:{enter:function(){this.skip()}},Property:{enter:function(e){e.method&&this.skip()}},CallExpression:{enter:function(e,t,n,r){if(this.get("callee").isSuper()&&(r.hasBareSuper=!0,r.bareSuper=this,!r.hasSuper))throw this.errorWithNode("super call is only allowed in derived constructor")}},ThisExpression:{enter:function(e,t,n,r){if(r.hasSuper&&!r.hasBareSuper)throw this.errorWithNode("'this' is not allowed before super()")}}}),x=function(){function e(t,n){s(this,e),this.parent=t.parent,this.scope=t.scope,this.node=t.node,this.path=t,this.file=n,this.hasInstanceDescriptors=!1,this.hasStaticDescriptors=!1,this.instanceMutatorMap={},this.staticMutatorMap={},this.instancePropBody=[],this.instancePropRefs={},this.staticPropBody=[],this.body=[],this.hasConstructor=!1,this.hasDecorators=!1,this.className=this.node.id,this.classRef=this.node.id||this.scope.generateUidIdentifier("class"),this.superName=this.node.superClass||m.identifier("Function"),this.hasSuper=!!this.node.superClass,this.isLoose=n.isLoose("es6.classes")}return e.prototype.run=function(){var e,t=this.superName,n=(this.className,this.node.body.body,this.classRef),r=this.file,l=this.body,i=this.constructorBody=m.blockStatement([]);this.className?(e=m.functionDeclaration(this.className,[],i),l.push(e)):e=m.functionExpression(null,[],i),this.constructor=e;var a=[],s=[];this.hasSuper&&(s.push(t),t=this.scope.generateUidBasedOnNode(t,this.file),a.push(t),this.superName=t,l.push(m.expressionStatement(m.callExpression(r.addHelper("inherits"),[n,t])))),this.buildBody(),i.body.unshift(m.expressionStatement(m.callExpression(r.addHelper("class-call-check"),[m.thisExpression(),n])));var o=this.node.decorators;if(o)for(var p=0;p<o.length;p++){var c=o[p];l.push(d.template("class-decorator",{DECORATOR:c.expression,CLASS_REF:n},!0))}if(this.className){if(1===l.length)return m.toExpression(l[0])}else e=u.bare(e,this.parent,this.scope),l.unshift(m.variableDeclaration("var",[m.variableDeclarator(n,e)])),m.inheritsComments(l[0],this.node);return l=l.concat(this.staticPropBody),l.push(m.returnStatement(n)),m.callExpression(m.functionExpression(null,a,m.blockStatement(l)),s)},e.prototype.pushToMap=function(e,t){var n,r=void 0===arguments[2]?"value":arguments[2];e["static"]?(this.hasStaticDescriptors=!0,n=this.staticMutatorMap):(this.hasInstanceDescriptors=!0,n=this.instanceMutatorMap);var l=m.toKeyAlias(e),i={};h(n,l)&&(i=n[l]),n[l]=i;var a=i;if(a._inherits||(a._inherits=[]),i._inherits.push(e),i._key=e.key,t&&(i.enumerable=m.literal(!0)),e.computed&&(i._computed=!0),e.decorators){var s;this.hasDecorators=!0;var o=(s=i,!s.decorators&&(s.decorators=m.arrayExpression([])),s.decorators);o.elements=o.elements.concat(e.decorators.map(function(e){return e.expression}))}if(i.value||i.initializer)throw this.file.errorWithNode(e,"Key conflict with sibling node");"get"===e.kind&&(r="get"),"set"===e.kind&&(r="set"),m.inheritsComments(e.value,e),i[r]=e.value},e.prototype.buildBody=function(){for(var e=this.constructorBody,t=(this.constructor,this.className),n=(this.superName,this.node.body.body),r=this.body,l=this.path.get("body").get("body"),i=0;i<n.length;i++){var a=n[i],s=l[i];if(m.isMethodDefinition(a)){var u="constructor"===a.kind;u&&this.verifyConstructor(s);var c=new o({methodNode:a,objectRef:this.classRef,superRef:this.superName,isStatic:a["static"],isLoose:this.isLoose,scope:this.scope,file:this.file},!0);c.replace(),u?this.pushConstructor(a,s):this.pushMethod(a)}else m.isClassProperty(a)&&this.pushProperty(a)}if(!this.hasConstructor&&this.hasSuper){var f="class-super-constructor-call";this.isLoose&&(f+="-loose"),e.body.push(d.template(f,{CLASS_NAME:t,SUPER_NAME:this.superName},!0))}this.placePropertyInitializers(),this.userConstructor&&(e.body=e.body.concat(this.userConstructor.body.body),m.inherits(this.constructor,this.userConstructor),m.inherits(this.constructorBody,this.userConstructor.body));var h,g,y="create-class";if(this.hasDecorators&&(y="create-decorated-class"),this.hasInstanceDescriptors&&(h=p.toClassObject(this.instanceMutatorMap)),this.hasStaticDescriptors&&(g=p.toClassObject(this.staticMutatorMap)),h||g){h&&(h=p.toComputedObjectFromClass(h)),g&&(g=p.toComputedObjectFromClass(g));var b=m.literal(null),v=[this.classRef,b,b,b,b];h&&(v[1]=h),g&&(v[2]=g),this.instanceInitializersId&&(v[3]=this.instanceInitializersId,r.unshift(this.buildObjectAssignment(this.instanceInitializersId))),this.staticInitializersId&&(v[4]=this.staticInitializersId,r.unshift(this.buildObjectAssignment(this.staticInitializersId)));for(var x=0,i=0;i<v.length;i++)v[i]!==b&&(x=i);v=v.slice(0,x+1),r.push(m.expressionStatement(m.callExpression(this.file.addHelper(y),v)))}},e.prototype.buildObjectAssignment=function(e){return m.variableDeclaration("var",[m.variableDeclarator(e,m.objectExpression([]))])},e.prototype.placePropertyInitializers=function(){var e=this.instancePropBody;if(e.length)if(this.hasPropertyCollision()){var t=m.expressionStatement(m.callExpression(m.memberExpression(m.thisExpression(),m.identifier(g)),[]));this.pushMethod(m.methodDefinition(m.identifier(g),m.functionExpression(null,[],m.blockStatement(e))),!0),this.hasSuper?this.bareSuper.insertAfter(t):this.constructorBody.body.unshift(t)}else this.hasSuper?this.hasConstructor?this.bareSuper.insertAfter(e):this.constructorBody.body=this.constructorBody.body.concat(e):this.constructorBody.body=e.concat(this.constructorBody.body)},e.prototype.hasPropertyCollision=function(){if(this.userConstructorPath)for(var e in this.instancePropRefs)if(this.userConstructorPath.scope.hasOwnBinding(e))return!0;return!1},e.prototype.verifyConstructor=function(e){var t={hasBareSuper:!1,bareSuper:null,hasSuper:this.hasSuper,file:this.file};if(e.traverse(v,t),this.bareSuper=t.bareSuper,!t.hasBareSuper&&this.hasSuper)throw e.errorWithNode("Derived constructor must call super()")},e.prototype.pushMethod=function(e,t){if(!t&&m.isLiteral(m.toComputedKey(e),{value:g}))throw this.file.errorWithNode(e,c.get("illegalMethodName",g));if("method"===e.kind&&(u.property(e,this.file,this.scope),this.isLoose)){var n=this.classRef;e["static"]||(n=m.memberExpression(n,m.identifier("prototype")));var r=m.memberExpression(n,e.key,e.computed),l=m.expressionStatement(m.assignmentExpression("=",r,e.value));return m.inheritsComments(l,e),void this.body.push(l)}this.pushToMap(e)},e.prototype.pushProperty=function(e){if(e.value||e.decorators){if(this.scope.traverse(e,b,{references:this.instancePropRefs,scope:this.scope}),e.decorators){var t=[];if(e.value&&t.push(m.returnStatement(e.value)),e.value=m.functionExpression(null,[],m.blockStatement(t)),this.pushToMap(e,!0,"initializer"),e["static"]){var n;this.staticPropBody.push(d.template("call-static-decorator",{INITIALIZERS:(n=this,!n.staticInitializersId&&(n.staticInitializersId=this.scope.generateUidIdentifier("staticInitializers")),n.staticInitializersId),CONSTRUCTOR:this.classRef,KEY:e.key},!0))}else{var r;this.instancePropBody.push(d.template("call-instance-decorator",{INITIALIZERS:(r=this,!r.instanceInitializersId&&(r.instanceInitializersId=this.scope.generateUidIdentifier("instanceInitializers")),r.instanceInitializersId),KEY:e.key},!0))}}else e["static"]?this.pushToMap(e,!0):this.instancePropBody.push(m.expressionStatement(m.assignmentExpression("=",m.memberExpression(m.thisExpression(),e.key),e.value)))}},e.prototype.pushConstructor=function(e,t){var n=t.get("value");n.scope.hasOwnBinding(this.classRef.name)&&n.scope.rename(this.classRef.name);var r=this.constructor,l=e.value;this.userConstructorPath=n,this.userConstructor=l,this.hasConstructor=!0,m.inheritsComments(r,e),r._ignoreUserWhitespace=!0,r.params=l.params,m.inherits(r.body,l.body)},e}()},{"../../../messages":43,"../../../traversal":146,"../../../types":155,"../../../util":159,"../../helpers/define-map":55,"../../helpers/name-method":58,"../../helpers/replace-supers":62,"lodash/collection/each":237,"lodash/object/has":326}],88:[function(e,t,n){"use strict";function r(e){return o.isVariableDeclaration(e,{kind:"const"})||o.isImportDeclaration(e)}function l(e,t,n,r){this.traverse(u,{constants:n.getAllBindingsOfKind("const","module"),file:r})}function i(e){"const"===e.kind&&(e.kind="let")}var a=function(e){return e&&e.__esModule?e:{"default":e}};n.check=r,n.Scopable=l,n.VariableDeclaration=i,n.__esModule=!0;var s=a(e("../../../messages")),o=a(e("../../../types")),u={enter:function(e,t,n,r){if(this.isAssignmentExpression()||this.isUpdateExpression()){var l=this.getBindingIdentifiers();for(var i in l){var a=l[i],o=r.constants[i];if(o){var u=o.identifier;if(a!==u&&n.bindingIdentifierEquals(i,u))throw r.file.errorWithNode(a,s.get("readOnly",i))}}}else this.isScope()&&this.skip()}}},{"../../../messages":43,"../../../types":155}],89:[function(e,t,n){"use strict";function r(e,t,n,r){var l=e.left;if(f.isPattern(l)){var i=n.generateUidIdentifier("ref");return e.left=f.variableDeclaration("var",[f.variableDeclarator(i)]),f.ensureBlock(e),void e.body.body.unshift(f.variableDeclaration("var",[f.variableDeclarator(l,i)]))}if(f.isVariableDeclaration(l)){var a=l.declarations[0].id;if(f.isPattern(a)){var s=n.generateUidIdentifier("ref");e.left=f.variableDeclaration(l.kind,[f.variableDeclarator(s,null)]);var o=[],u=new g({kind:l.kind,file:r,scope:n,nodes:o});u.init(a,s),f.ensureBlock(e);var p=e.body;p.body=o.concat(p.body)}}}function l(e,t,n,r){var l=e.param;if(f.isPattern(l)){var i=n.generateUidIdentifier("ref");e.param=i;var a=[],s=new g({kind:"let",file:r,scope:n,nodes:a});return s.init(l,i),e.body.body=a.concat(e.body.body),e}}function i(e,t,n,r){var l=e.expression;if("AssignmentExpression"===l.type&&f.isPattern(l.left)&&!r.isConsequenceExpressionStatement(e)){var i=new g({operator:l.operator,scope:n,file:r});return i.init(l.left,l.right)}}function a(e,t,n,r){if(f.isPattern(e.left)){var l=n.generateUidIdentifier("temp");n.push({id:l});var i=[];i.push(f.expressionStatement(f.assignmentExpression("=",l,e.right)));var a=new g({operator:e.operator,file:r,scope:n,nodes:i});return a.init(e.left,l),i.push(f.expressionStatement(l)),i}}function s(e){for(var t=0;t<e.declarations.length;t++)if(f.isPattern(e.declarations[t].id))return!0;return!1}function o(e,t,n,r){if(!f.isForInStatement(t)&&!f.isForOfStatement(t)&&s(e)){for(var l,i=[],a=0;a<e.declarations.length;a++){l=e.declarations[a];var o=l.init,u=l.id,p=new g({nodes:i,scope:n,kind:e.kind,file:r});f.isPattern(u)&&o?(p.init(u,o),+a!==e.declarations.length-1&&f.inherits(i[i.length-1],l)):i.push(f.inherits(p.buildVariableAssignment(l.id,l.init),l))}if(!f.isProgram(t)&&!f.isBlockStatement(t)){for(l=null,a=0;a<i.length;a++){if(e=i[a],l||(l=f.variableDeclaration(e.kind,[])),!f.isVariableDeclaration(e)&&l.kind!==e.kind)throw r.errorWithNode(e,d.get("invalidParentForThisNode"));l.declarations=l.declarations.concat(e.declarations)}return l}return i}}function u(e){for(var t=0;t<e.elements.length;t++)if(f.isRestElement(e.elements[t]))return!0;return!1}var p=function(e){return e&&e.__esModule?e:{"default":e}},c=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};n.ForOfStatement=r,n.CatchClause=l,n.ExpressionStatement=i,n.AssignmentExpression=a,n.VariableDeclaration=o,n.__esModule=!0;var d=p(e("../../../messages")),f=p(e("../../../types")),h=f.isPattern;n.check=h,n.ForInStatement=r,n.Function=function(e,t,n,r){var l=[],i=!1;if(e.params=e.params.map(function(t,a){if(!f.isPattern(t))return t;i=!0;var s=n.generateUidIdentifier("ref"),o=new g({blockHoist:e.params.length-a,nodes:l,scope:n,file:r,kind:"let"});return o.init(t,s),s}),i){r.checkNode(l),f.ensureBlock(e);var a=e.body;a.body=l.concat(a.body)}};var m={enter:function(e,t,n,r){this.isReferencedIdentifier()&&r.bindings[e.name]&&(r.deopt=!0,this.stop())}},g=function(){function e(t){c(this,e),this.blockHoist=t.blockHoist,this.operator=t.operator,this.arrays={},this.nodes=t.nodes||[],this.scope=t.scope,this.file=t.file,this.kind=t.kind}return e.prototype.buildVariableAssignment=function(e,t){var n=this.operator;f.isMemberExpression(e)&&(n="=");var r;return r=n?f.expressionStatement(f.assignmentExpression(n,e,t)):f.variableDeclaration(this.kind,[f.variableDeclarator(e,t)]),r._blockHoist=this.blockHoist,r},e.prototype.buildVariableDeclaration=function(e,t){var n=f.variableDeclaration("var",[f.variableDeclarator(e,t)]);return n._blockHoist=this.blockHoist,n},e.prototype.push=function(e,t){f.isObjectPattern(e)?this.pushObjectPattern(e,t):f.isArrayPattern(e)?this.pushArrayPattern(e,t):f.isAssignmentPattern(e)?this.pushAssignmentPattern(e,t):this.nodes.push(this.buildVariableAssignment(e,t))},e.prototype.toArray=function(e,t){return this.file.isLoose("es6.destructuring")||f.isIdentifier(e)&&this.arrays[e.name]?e:this.scope.toArray(e,t)},e.prototype.pushAssignmentPattern=function(e,t){var n=this.scope.generateUidBasedOnNode(t),r=f.variableDeclaration("var",[f.variableDeclarator(n,t)]);r._blockHoist=this.blockHoist,this.nodes.push(r);var l=f.conditionalExpression(f.binaryExpression("===",n,f.identifier("undefined")),e.right,n),i=e.left;f.isPattern(i)?(this.nodes.push(f.expressionStatement(f.assignmentExpression("=",n,l))),this.push(i,n)):this.nodes.push(this.buildVariableAssignment(i,l))},e.prototype.pushObjectSpread=function(e,t,n,r){for(var l=[],i=0;i<e.properties.length;i++){var a=e.properties[i];if(i>=r)break;if(!f.isSpreadProperty(a)){var s=a.key;f.isIdentifier(s)&&(s=f.literal(a.key.name)),l.push(s)}}l=f.arrayExpression(l);var o=f.callExpression(this.file.addHelper("object-without-properties"),[t,l]);this.nodes.push(this.buildVariableAssignment(n.argument,o))},e.prototype.pushObjectProperty=function(e,t){f.isLiteral(e.key)&&(e.computed=!0);var n=e.value,r=f.memberExpression(t,e.key,e.computed);f.isPattern(n)?this.push(n,r):this.nodes.push(this.buildVariableAssignment(n,r))},e.prototype.pushObjectPattern=function(e,t){if(e.properties.length||this.nodes.push(f.expressionStatement(f.callExpression(this.file.addHelper("object-destructuring-empty"),[t]))),e.properties.length>1&&f.isMemberExpression(t)){var n=this.scope.generateUidBasedOnNode(t,this.file);this.nodes.push(this.buildVariableDeclaration(n,t)),t=n}for(var r=0;r<e.properties.length;r++){var l=e.properties[r];f.isSpreadProperty(l)?this.pushObjectSpread(e,t,l,r):this.pushObjectProperty(l,t)}},e.prototype.canUnpackArrayPattern=function(e,t){if(!f.isArrayExpression(t))return!1;if(!(e.elements.length>t.elements.length)){if(e.elements.length<t.elements.length&&!u(e))return!1;for(var n=0;n<e.elements.length;n++)if(!e.elements[n])return!1;var r=f.getBindingIdentifiers(e),l={deopt:!1,bindings:r};return this.scope.traverse(t,m,l),!l.deopt}},e.prototype.pushUnpackedArrayPattern=function(e,t){for(var n=0;n<e.elements.length;n++){var r=e.elements[n];f.isRestElement(r)?this.push(r.argument,f.arrayExpression(t.elements.slice(n))):this.push(r,t.elements[n])}},e.prototype.pushArrayPattern=function(e,t){if(e.elements){if(this.canUnpackArrayPattern(e,t))return this.pushUnpackedArrayPattern(e,t);var n=!u(e)&&e.elements.length,r=this.toArray(t,n);f.isIdentifier(r)?t=r:(t=this.scope.generateUidBasedOnNode(t),this.arrays[t.name]=!0,this.nodes.push(this.buildVariableDeclaration(t,r)));for(var l=0;l<e.elements.length;l++){var i=e.elements[l];if(i){var a;f.isRestElement(i)?(a=this.toArray(t),l>0&&(a=f.callExpression(f.memberExpression(a,f.identifier("slice")),[f.literal(l)])),i=i.argument):a=f.memberExpression(t,f.literal(l),!0),this.push(i,a)}}}},e.prototype.init=function(e,t){if(!f.isArrayExpression(t)&&!f.isMemberExpression(t)){var n=this.scope.generateMemoisedReference(t,!0);n&&(this.nodes.push(this.buildVariableDeclaration(n,t)),t=n)}return this.push(e,t),this.nodes},e}()},{"../../../messages":43,"../../../types":155}],90:[function(e,t,n){"use strict";function r(e,t,n,r){if(this.get("right").isArrayExpression())return l.call(this,e,n,r);var i=c;r.isLoose("es6.forOf")&&(i=p);var a=i(e,t,n,r),s=a.declar,u=a.loop,d=u.body;return o.inheritsComments(u,e),o.ensureBlock(e),s&&d.body.push(s),d.body=d.body.concat(e.body.body),o.inherits(u,e),a.replaceParent&&this.parentPath.replaceWithMultiple(a.node),a.node}function l(e,t){var n=[],r=e.right;if(!o.isIdentifier(r)||!t.hasBinding(r.name)){var l=t.generateUidIdentifier("arr");n.push(o.variableDeclaration("var",[o.variableDeclarator(l,r)])),r=l}var i=t.generateUidIdentifier("i"),a=s.template("for-of-array",{BODY:e.body,KEY:i,ARR:r});o.inherits(a,e),o.ensureBlock(a);var u=o.memberExpression(r,i,!0),p=e.left;return o.isVariableDeclaration(p)?(p.declarations[0].init=u,a.body.body.unshift(p)):a.body.body.unshift(o.expressionStatement(o.assignmentExpression("=",p,u))),n.push(a),n}var i=function(e){return e&&e.__esModule?e:{"default":e}};n.ForOfStatement=r,n._ForOfStatementArray=l,n.__esModule=!0;var a=i(e("../../../messages")),s=i(e("../../../util")),o=i(e("../../../types")),u=o.isForOfStatement;n.check=u;var p=function(e,t,n,r){var l,i,u=e.left;if(o.isIdentifier(u)||o.isPattern(u)||o.isMemberExpression(u))i=u;else{if(!o.isVariableDeclaration(u))throw r.errorWithNode(u,a.get("unknownForHead",u.type));i=n.generateUidIdentifier("ref"),l=o.variableDeclaration(u.kind,[o.variableDeclarator(u.declarations[0].id,i)])}var p=n.generateUidIdentifier("iterator"),c=n.generateUidIdentifier("isArray"),d=s.template("for-of-loose",{LOOP_OBJECT:p,IS_ARRAY:c,OBJECT:e.right,INDEX:n.generateUidIdentifier("i"),ID:i});return l||d.body.body.shift(),{declar:l,node:d,loop:d}},c=function(e,t,n,r){var l,i=e.left,u=n.generateUidIdentifier("step"),p=o.memberExpression(u,o.identifier("value"));if(o.isIdentifier(i)||o.isPattern(i)||o.isMemberExpression(i))l=o.expressionStatement(o.assignmentExpression("=",i,p));else{if(!o.isVariableDeclaration(i))throw r.errorWithNode(i,a.get("unknownForHead",i.type));l=o.variableDeclaration(i.kind,[o.variableDeclarator(i.declarations[0].id,p)])}var c=n.generateUidIdentifier("iterator"),d=s.template("for-of",{ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:n.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:c,STEP_KEY:u,OBJECT:e.right,BODY:null}),f=o.isLabeledStatement(t),h=d[3].block.body,m=h[0];return f&&(h[0]=o.labeledStatement(t.label,m)),{replaceParent:f,declar:l,loop:m,node:d}}},{"../../../messages":43,"../../../types":155,"../../../util":159}],91:[function(e,t,n){"use strict";function r(e,t){if(e._blockHoist)for(var n=0;n<t.length;n++)t[n]._blockHoist=e._blockHoist}function l(e,t,n,r){if(!e.isType){var l=[];if(e.specifiers.length)for(var i=0;i<e.specifiers.length;i++)r.moduleFormatter.importSpecifier(e.specifiers[i],e,l,t);else r.moduleFormatter.importDeclaration(e,l,t);return 1===l.length&&(l[0]._blockHoist=e._blockHoist),l}}function i(e,t,n,l){var i=[];return l.moduleFormatter.exportAllDeclaration(e,i,t),r(e,i),i}function a(e,t,n,l){var i=[];return l.moduleFormatter.exportDeclaration(e,i,t),r(e,i),i}function s(e,t,n,l){if(!this.get("declaration").isTypeAlias()){var i=[];if(e.declaration){if(u.isVariableDeclaration(e.declaration)){var a=e.declaration.declarations[0];a.init=a.init||u.identifier("undefined")}l.moduleFormatter.exportDeclaration(e,i,t)}else if(e.specifiers)for(var s=0;s<e.specifiers.length;s++)l.moduleFormatter.exportSpecifier(e.specifiers[s],e,i,t);return r(e,i),i}}var o=function(e){return e&&e.__esModule?e:{"default":e}};n.ImportDeclaration=l,n.ExportAllDeclaration=i,n.ExportDefaultDeclaration=a,n.ExportNamedDeclaration=s,n.__esModule=!0;var u=o(e("../../../types"));n.check=e("../internal/modules").check},{"../../../types":155,"../internal/modules":118}],92:[function(e,t,n){"use strict";function r(e,t,n,r){if(e.method){var l=e.value,i=t.generateUidIdentifier("this"),a=new s({topLevelThisReference:i,getObjectRef:n,methodNode:e,isStatic:!0,scope:t,file:r});a.replace(),a.hasSuper&&l.body.body.unshift(o.variableDeclaration("var",[o.variableDeclarator(i,o.thisExpression())]))}}function l(e,t,n,l){for(var i,a=function(){return!i&&(i=n.generateUidIdentifier("obj")),i},s=0;s<e.properties.length;s++)r(e.properties[s],n,a,l);return i?(n.push({id:i}),o.assignmentExpression("=",i,e)):void 0}var i=function(e){return e&&e.__esModule?e:{"default":e}},a=function(e){return e&&e.__esModule?e["default"]:e};n.ObjectExpression=l,n.__esModule=!0;var s=a(e("../../helpers/replace-supers")),o=i(e("../../../types")),u=o.isSuper;n.check=u},{"../../../types":155,"../../helpers/replace-supers":62}],93:[function(e,t,n){"use strict";function r(e){return o.isFunction(e)&&u(e)}var l=function(e){return e&&e.__esModule?e:{"default":e}},i=function(e){return e&&e.__esModule?e["default"]:e};n.check=r,n.__esModule=!0;var a=i(e("../../helpers/call-delegate")),s=l(e("../../../util")),o=l(e("../../../types")),u=function(e){for(var t=0;t<e.params.length;t++)if(!o.isIdentifier(e.params[t]))return!0;return!1},p={enter:function(e,t,n,r){this.isReferencedIdentifier()&&r.scope.hasOwnBinding(e.name)&&(r.scope.bindingIdentifierEquals(e.name,e)||(r.iife=!0,this.stop()))}};n.Function=function(e,t,n,r){if(u(e)){o.ensureBlock(e);var l=[],i=o.identifier("arguments");i._shadowedFunctionLiteral=!0;for(var c=0,d={iife:!1,scope:n},f=function(t,n,a){var u=s.template("default-parameter",{VARIABLE_NAME:t,DEFAULT_VALUE:n,ARGUMENT_KEY:o.literal(a),ARGUMENTS:i},!0);r.checkNode(u),u._blockHoist=e.params.length-a,l.push(u)},h=this.get("params"),m=0;m<h.length;m++){var g=h[m];if(g.isAssignmentPattern()){var y=g.get("left"),b=g.get("right"),v=n.generateUidIdentifier("x");v._isDefaultPlaceholder=!0,e.params[m]=v,d.iife||(b.isIdentifier()&&n.hasOwnBinding(b.node.name)?d.iife=!0:b.traverse(p,d)),f(y.node,b.node,m)}else g.isRestElement()||(c=m+1),g.isIdentifier()||g.traverse(p,d),r.transformers["es6.spec.blockScoping"].canTransform()&&g.isIdentifier()&&f(g.node,o.identifier("undefined"),m)}e.params=e.params.slice(0,c),d.iife?(l.push(a(e)),e.body=o.blockStatement(l)):e.body.body=l.concat(e.body.body)}}},{"../../../types":155,"../../../util":159,"../../helpers/call-delegate":54}],94:[function(e,t,n){"use strict";function r(e,t){var n,r=e.property;o.isLiteral(r)?(r.value+=t,r.raw=String(r.value)):(n=o.binaryExpression("+",r,o.literal(t)),e.property=n)}var l=function(e){return e&&e.__esModule?e:{"default":e}},i=function(e){return e&&e.__esModule?e["default"]:e};n.__esModule=!0;var a=i(e("lodash/lang/isNumber")),s=l(e("../../../util")),o=l(e("../../../types")),u=o.isRestElement;n.check=u;var p={enter:function(e,t,n,r){if(this.isScope()&&!n.bindingIdentifierEquals(r.name,r.outerBinding))return this.skip();if(this.isFunctionDeclaration()||this.isFunctionExpression())return r.noOptimise=!0,this.traverse(p,r),r.noOptimise=!1,this.skip();if(this.isReferencedIdentifier({name:r.name})){if(!r.noOptimise&&o.isMemberExpression(t)&&t.computed){var l=t.property;if(a(l.value)||o.isUnaryExpression(l)||o.isBinaryExpression(l))return void r.candidates.push(this)}r.canOptimise=!1,this.stop()}}},c=function(e){return o.isRestElement(e.params[e.params.length-1])};n.Function=function(e,t,n,l){if(c(e)){var i=e.params.pop().argument,a=o.identifier("arguments");if(a._shadowedFunctionLiteral=!0,o.isPattern(i)){var u=i;i=n.generateUidIdentifier("ref");var d=o.variableDeclaration("let",u.elements.map(function(e,t){var n=o.memberExpression(i,o.literal(t),!0);return o.variableDeclarator(e,n)}));l.checkNode(d),e.body.body.unshift(d)}var f={outerBinding:n.getBindingIdentifier(i.name),canOptimise:!0,candidates:[],method:e,name:i.name};if(this.traverse(p,f),f.canOptimise&&f.candidates.length)for(var h=0;h<f.candidates.length;h++){var m=f.candidates[h];m.replaceWith(a),r(m.parent,e.params.length)}else{var g=o.literal(e.params.length),y=n.generateUidIdentifier("key"),b=n.generateUidIdentifier("len"),v=y,x=b;e.params.length&&(v=o.binaryExpression("-",y,g),x=o.conditionalExpression(o.binaryExpression(">",b,g),o.binaryExpression("-",b,g),o.literal(0)));var E=s.template("rest",{ARGUMENTS:a,ARRAY_KEY:v,ARRAY_LEN:x,START:g,ARRAY:i,KEY:y,LEN:b});E._blockHoist=e.params.length+1,e.body.body.unshift(E)}}}},{"../../../types":155,"../../../util":159,"lodash/lang/isNumber":316}],95:[function(e,t,n){"use strict";function r(e,t,n){for(var r=0;r<e.properties.length;r++){var l=e.properties[r];t.push(o.expressionStatement(o.assignmentExpression("=",o.memberExpression(n,l.key,l.computed||o.isLiteral(l.key)),l.value)))}}function l(e,t,n,r,l){for(var i,a,s=e.properties,u=0;u<s.length;u++)i=s[u],"init"===i.kind&&(a=i.key,!i.computed&&o.isIdentifier(a)&&(i.key=o.literal(a.name)));var p=!1;for(u=0;u<s.length;u++)i=s[u],i.computed&&(p=!0),("init"!==i.kind||!p||o.isLiteral(o.toComputedKey(i,i.key),{value:"__proto__"}))&&(r.push(i),s[u]=null);for(u=0;u<s.length;u++)if(i=s[u]){a=i.key;var c;c=i.computed&&o.isMemberExpression(a)&&o.isIdentifier(a.object,{name:"Symbol"})?o.assignmentExpression("=",o.memberExpression(n,a,!0),i.value):o.callExpression(l.addHelper("define-property"),[n,a,i.value]),t.push(o.expressionStatement(c))}if(1===t.length){var d=t[0].expression;if(o.isCallExpression(d))return d.arguments[0]=o.objectExpression(r),d}}function i(e){return o.isProperty(e)&&e.computed}function a(e,t,n,i){for(var a=!1,s=0;s<e.properties.length&&!(a=o.isProperty(e.properties[s],{computed:!0,kind:"init"}));s++);if(a){var u=[],p=n.generateUidBasedOnNode(t),c=[],d=l;i.isLoose("es6.properties.computed")&&(d=r);var f=d(e,c,p,u,i);return f?f:(c.unshift(o.variableDeclaration("var",[o.variableDeclarator(p,o.objectExpression(u))])),c.push(o.expressionStatement(p)),c)}}var s=function(e){return e&&e.__esModule?e:{"default":e}};n.check=i,n.ObjectExpression=a,n.__esModule=!0;var o=s(e("../../../types"))},{"../../../types":155}],96:[function(e,t,n){"use strict";function r(e){return a.isProperty(e)&&(e.method||e.shorthand)}function l(e){e.method&&(e.method=!1),e.shorthand&&(e.shorthand=!1,e.key=a.removeComments(a.clone(e.key)))}var i=function(e){return e&&e.__esModule?e:{"default":e}};n.check=r,n.Property=l,n.__esModule=!0;var a=i(e("../../../types"))},{"../../../types":155}],97:[function(e,t,n){"use strict";function r(e){return a.is(e,"y")}function l(e){return a.is(e,"y")?s.newExpression(s.identifier("RegExp"),[s.literal(e.regex.pattern),s.literal(e.regex.flags)]):void 0}var i=function(e){return e&&e.__esModule?e:{"default":e}};n.check=r,n.Literal=l,n.__esModule=!0;var a=i(e("../../helpers/regex")),s=i(e("../../../types"))},{"../../../types":155,"../../helpers/regex":60}],98:[function(e,t,n){"use strict";function r(e){return o.is(e,"u")}function l(e){o.is(e,"u")&&(e.regex.pattern=s(e.regex.pattern,e.regex.flags),o.pullFlag(e,"u"))}var i=function(e){return e&&e.__esModule?e:{"default":e}},a=function(e){return e&&e.__esModule?e["default"]:e};n.check=r,n.Literal=l,n.__esModule=!0;var s=a(e("regexpu/rewrite-pattern")),o=i(e("../../helpers/regex"))},{"../../helpers/regex":60,"regexpu/rewrite-pattern":355}],99:[function(e,t,n){"use strict";function r(e,t,n,r){var l=e._letReferences;l&&this.traverse(a,{letRefs:l,file:r})}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.BlockStatement=r,n.__esModule=!0;var i=l(e("../../../types")),a={enter:function(e,t,n,r){if(this.isReferencedIdentifier()&&(!i.isFor(t)||t.left!==e)){var l=r.letRefs[e.name];if(l&&n.getBindingIdentifier(e.name)===l){var a=i.callExpression(r.file.addHelper("temporal-assert-defined"),[e,i.literal(e.name),r.file.addHelper("temporal-undefined")]);return this.skip(),i.isAssignmentExpression(t)||i.isUpdateExpression(t)?void(t._ignoreBlockScopingTDZ||this.parentPath.replaceWith(i.sequenceExpression([a,t]))):i.logicalExpression("&&",a,e)}}}},s={optional:!0};n.metadata=s,n.Program=r,n.Loop=r},{"../../../types":155}],100:[function(e,t,n){"use strict";function r(e,t,n,r){if(this.skip(),"typeof"===e.operator){var l=i.callExpression(r.addHelper("typeof"),[e.argument]);if(this.get("argument").isIdentifier()){var a=i.literal("undefined");return i.conditionalExpression(i.binaryExpression("===",i.unaryExpression("typeof",e.argument),a),a,l)}return l}}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.UnaryExpression=r,n.__esModule=!0;var i=l(e("../../../types")),a={optional:!0};n.metadata=a},{"../../../types":155}],101:[function(e,t,n){"use strict";function r(e){for(var t=0;t<e.expressions.length;t++)e.expressions[t]=i.callExpression(i.identifier("String"),[e.expressions[t]])}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.TemplateLiteral=r,n.__esModule=!0;var i=l(e("../../../types")),a={optional:!0};n.metadata=a},{"../../../types":155}],102:[function(e,t,n){"use strict";function r(e,t){return t.file.isLoose("es6.spread")?e.argument:t.toArray(e.argument,!0)}function l(e){for(var t=0;t<e.length;t++)if(c.isSpreadElement(e[t]))return!0;return!1}function i(e,t){for(var n=[],l=[],i=function(){l.length&&(n.push(c.arrayExpression(l)),l=[])},a=0;a<e.length;a++){var s=e[a];c.isSpreadElement(s)?(i(),n.push(r(s,t))):l.push(s)}return i(),n}function a(e,t,n){var r=e.elements;if(l(r)){var a=i(r,n),s=a.shift();return c.isArrayExpression(s)||(a.unshift(s),s=c.arrayExpression([])),c.callExpression(c.memberExpression(s,c.identifier("concat")),a)}}function s(e,t,n){var r=e.arguments;if(l(r)){var a=c.identifier("undefined");e.arguments=[];var s;s=1===r.length&&"arguments"===r[0].argument.name?[r[0].argument]:i(r,n);var o=s.shift();e.arguments.push(s.length?c.callExpression(c.memberExpression(o,c.identifier("concat")),s):o);var u=e.callee;if(this.get("callee").isMemberExpression()){var p=n.generateMemoisedReference(u.object);p?(u.object=c.assignmentExpression("=",p,u.object),a=p):a=u.object,c.appendToMemberExpression(u,c.identifier("apply"))}else e.callee=c.memberExpression(e.callee,c.identifier("apply"));e.arguments.unshift(a)}}function o(e,t,n,r){var a=e.arguments;if(l(a)){var s=i(a,n),o=c.arrayExpression([c.literal(null)]);return a=c.callExpression(c.memberExpression(o,c.identifier("concat")),s),c.newExpression(c.callExpression(c.memberExpression(r.addHelper("bind"),c.identifier("apply")),[e.callee,a]),[])}}var u=function(e){return e&&e.__esModule?e:{"default":e}},p=function(e){return e&&e.__esModule?e["default"]:e};n.ArrayExpression=a,n.CallExpression=s,n.NewExpression=o,n.__esModule=!0;var c=(p(e("lodash/collection/includes")),u(e("../../../types"))),d=c.isSpreadElement;n.check=d},{"../../../types":155,"lodash/collection/includes":240}],103:[function(e,t,n){"use strict";function r(e){return d.blockStatement([d.returnStatement(e)])}var l=function(e){return e&&e.__esModule?e:{"default":e}},i=function(e){return e&&e.__esModule?e["default"]:e},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},s=i(e("lodash/collection/reduceRight")),o=l(e("../../../messages")),u=i(e("lodash/array/flatten")),p=l(e("../../../util")),c=i(e("lodash/collection/map")),d=l(e("../../../types")); n.Function=function(e,t,n,r){var l=new g(this,n,r);l.run()};var f={enter:function(e,t,n,r){if(this.isIfStatement())this.get("alternate").isReturnStatement()&&d.ensureBlock(e,"alternate"),this.get("consequent").isReturnStatement()&&d.ensureBlock(e,"consequent");else{if(this.isReturnStatement())return this.skip(),r.subTransform(e.argument);d.isTryStatement(t)?e===t.block?this.skip():t.finalizer&&e!==t.finalizer&&this.skip():this.isFunction()?this.skip():this.isVariableDeclaration()&&(this.skip(),r.vars.push(e))}}},h={enter:function(e,t,n,r){return this.isThisExpression()?(r.needsThis=!0,r.getThisId()):this.isReferencedIdentifier({name:"arguments"})?(r.needsArguments=!0,r.getArgumentsId()):this.isFunction()&&(this.skip(),this.isFunctionDeclaration())?(e=d.variableDeclaration("var",[d.variableDeclarator(e.id,d.toExpression(e))]),e._blockHoist=2,e):void 0}},m={enter:function(e,t,n,r){if(this.isExpressionStatement()){var l=e.expression;if(d.isAssignmentExpression(l))if(r.needsThis||l.left!==r.getThisId()){if(!r.needsArguments&&l.left===r.getArgumentsId()&&d.isArrayExpression(l.right))return c(l.right.elements,function(e){return d.expressionStatement(e)})}else this.remove()}}},g=function(){function e(t,n,r){a(this,e),this.hasTailRecursion=!1,this.needsArguments=!1,this.setsArguments=!1,this.needsThis=!1,this.ownerId=t.node.id,this.vars=[],this.scope=n,this.path=t,this.file=r,this.node=t.node}return e.prototype.getArgumentsId=function(){var e;return e=this,!e.argumentsId&&(e.argumentsId=this.scope.generateUidIdentifier("arguments")),e.argumentsId},e.prototype.getThisId=function(){var e;return e=this,!e.thisId&&(e.thisId=this.scope.generateUidIdentifier("this")),e.thisId},e.prototype.getLeftId=function(){var e;return e=this,!e.leftId&&(e.leftId=this.scope.generateUidIdentifier("left")),e.leftId},e.prototype.getFunctionId=function(){var e;return e=this,!e.functionId&&(e.functionId=this.scope.generateUidIdentifier("function")),e.functionId},e.prototype.getAgainId=function(){var e;return e=this,!e.againId&&(e.againId=this.scope.generateUidIdentifier("again")),e.againId},e.prototype.getParams=function(){var e=this.params;if(!e){e=this.node.params,this.paramDecls=[];for(var t=0;t<e.length;t++){var n=e[t];n._isDefaultPlaceholder||this.paramDecls.push(d.variableDeclarator(n,e[t]=this.scope.generateUidIdentifier("x")))}}return this.params=e},e.prototype.hasDeopt=function(){var e=this.scope.getBinding(this.ownerId.name);return e&&!e.constant},e.prototype.run=function(){var e=(this.scope,this.node),t=this.ownerId;if(t&&(this.path.traverse(f,this),this.hasTailRecursion)){if(this.hasDeopt())return void this.file.log.deopt(e,o.get("tailCallReassignmentDeopt"));this.path.traverse(h,this),this.needsThis&&this.needsArguments||this.path.traverse(m,this);var n=d.ensureBlock(e).body;if(this.vars.length>0){var r=u(c(this.vars,function(e){return e.declarations},this)),l=s(r,function(e,t){return d.assignmentExpression("=",t.id,e)},d.identifier("undefined")),i=d.expressionStatement(l);i._blockHoist=1/0,n.unshift(i)}var a=this.paramDecls;a.length>0&&n.unshift(d.variableDeclaration("var",a)),n.unshift(d.expressionStatement(d.assignmentExpression("=",this.getAgainId(),d.literal(!1)))),e.body=p.template("tail-call-body",{AGAIN_ID:this.getAgainId(),THIS_ID:this.thisId,ARGUMENTS_ID:this.argumentsId,FUNCTION_ID:this.getFunctionId(),BLOCK:e.body});var g=[];if(this.needsThis&&g.push(d.variableDeclarator(this.getThisId(),d.thisExpression())),this.needsArguments||this.setsArguments){var y=d.variableDeclarator(this.getArgumentsId());this.needsArguments&&(y.init=d.identifier("arguments")),g.push(y)}var b=this.leftId;b&&g.push(d.variableDeclarator(b)),g.length>0&&e.body.body.unshift(d.variableDeclaration("var",g))}},e.prototype.subTransform=function(e){if(e){var t=this["subTransform"+e.type];return t?t.call(this,e):void 0}},e.prototype.subTransformConditionalExpression=function(e){var t=this.subTransform(e.consequent),n=this.subTransform(e.alternate);return t||n?(e.type="IfStatement",e.consequent=t?d.toBlock(t):r(e.consequent),e.alternate=n?d.isIfStatement(n)?n:d.toBlock(n):r(e.alternate),[e]):void 0},e.prototype.subTransformLogicalExpression=function(e){var t=this.subTransform(e.right);if(t){var n=this.getLeftId(),l=d.assignmentExpression("=",n,e.left);return"&&"===e.operator&&(l=d.unaryExpression("!",l)),[d.ifStatement(l,r(n))].concat(t)}},e.prototype.subTransformSequenceExpression=function(e){var t=e.expressions,n=this.subTransform(t[t.length-1]);return n?(1===--t.length&&(e=t[0]),[d.expressionStatement(e)].concat(n)):void 0},e.prototype.subTransformCallExpression=function(e){var t,n,r=e.callee;if(d.isMemberExpression(r,{computed:!1})&&d.isIdentifier(r.property)){switch(r.property.name){case"call":n=d.arrayExpression(e.arguments.slice(1));break;case"apply":n=e.arguments[1]||d.identifier("undefined");break;default:return}t=e.arguments[0],r=r.object}if(d.isIdentifier(r)&&this.scope.bindingIdentifierEquals(r.name,this.ownerId)&&(this.hasTailRecursion=!0,!this.hasDeopt())){var l=[];d.isThisExpression(t)||l.push(d.expressionStatement(d.assignmentExpression("=",this.getThisId(),t||d.identifier("undefined")))),n||(n=d.arrayExpression(e.arguments));var i=this.getArgumentsId(),a=this.getParams();l.push(d.expressionStatement(d.assignmentExpression("=",i,n)));var s,o;if(d.isArrayExpression(n)){var u=n.elements;for(s=0;s<u.length&&s<a.length;s++){o=a[s];var p=u[s]||(u[s]=d.identifier("undefined"));o._isDefaultPlaceholder||(u[s]=d.assignmentExpression("=",o,p))}}else for(this.setsArguments=!0,s=0;s<a.length;s++)o=a[s],o._isDefaultPlaceholder||l.push(d.expressionStatement(d.assignmentExpression("=",o,d.memberExpression(i,d.literal(s),!0))));return l.push(d.expressionStatement(d.assignmentExpression("=",this.getAgainId(),d.literal(!0)))),l.push(d.continueStatement(this.getFunctionId())),l}},e}()},{"../../../messages":43,"../../../types":155,"../../../util":159,"lodash/array/flatten":232,"lodash/collection/map":241,"lodash/collection/reduceRight":242}],104:[function(e,t,n){"use strict";function r(e){return s.isTemplateLiteral(e)||s.isTaggedTemplateExpression(e)}function l(e,t,n,r){for(var l=e.quasi,i=[],a=[],o=[],u=0;u<l.quasis.length;u++){var p=l.quasis[u];a.push(s.literal(p.value.cooked)),o.push(s.literal(p.value.raw))}a=s.arrayExpression(a),o=s.arrayExpression(o);var c="tagged-template-literal";return r.isLoose("es6.templateLiterals")&&(c+="-loose"),i.push(s.callExpression(r.addHelper(c),[a,o])),i=i.concat(l.expressions),s.callExpression(e.tag,i)}function i(e){var t,n=[];for(t=0;t<e.quasis.length;t++){var r=e.quasis[t];n.push(s.literal(r.value.cooked));var l=e.expressions.shift();l&&n.push(l)}if(n.length>1){var i=n[n.length-1];s.isLiteral(i,{value:""})&&n.pop();var a=o(n.shift(),n.shift());for(t=0;t<n.length;t++)a=o(a,n[t]);return a}return n[0]}var a=function(e){return e&&e.__esModule?e:{"default":e}};n.check=r,n.TaggedTemplateExpression=l,n.TemplateLiteral=i,n.__esModule=!0;var s=a(e("../../../types")),o=function(e,t){return s.binaryExpression("+",e,t)}},{"../../../types":155}],105:[function(e,t,n){"use strict";function r(){return!1}n.check=r,n.__esModule=!0;var l={stage:1};n.metadata=l},{}],106:[function(e,t,n){"use strict";function r(){return!1}n.check=r,n.__esModule=!0;var l={stage:0};n.metadata=l},{}],107:[function(e,t,n){"use strict";function r(e,t,n,r){var a=i;return e.generator&&(a=l),a(e,t,n,r)}function l(e){var t=[],n=c.functionExpression(null,[],c.blockStatement(t),!0);return n.shadow=!0,t.push(o(e,function(){return c.expressionStatement(c.yieldExpression(e.body))})),c.callExpression(n,[])}function i(e,t,n,r){var l=n.generateUidBasedOnNode(t,r),i=p.template("array-comprehension-container",{KEY:l});i.callee.shadow=!0;var a=i.callee.body,s=a.body;u.hasType(e,n,"YieldExpression",c.FUNCTION_TYPES)&&(i.callee.generator=!0,i=c.yieldExpression(i,!0));var d=s.pop();return s.push(o(e,function(){return p.template("array-push",{STATEMENT:e.body,KEY:l},!0)})),s.push(d),i}var a=function(e){return e&&e.__esModule?e:{"default":e}},s=function(e){return e&&e.__esModule?e["default"]:e};n.ComprehensionExpression=r,n.__esModule=!0;var o=s(e("../../helpers/build-comprehension")),u=s(e("../../../traversal")),p=a(e("../../../util")),c=a(e("../../../types")),d={stage:0};n.metadata=d},{"../../../traversal":146,"../../../types":155,"../../../util":159,"../../helpers/build-comprehension":51}],108:[function(e,t,n){"use strict";n.__esModule=!0;var r={optional:!0,stage:1};n.metadata=r},{}],109:[function(e,t,n){"use strict";function r(e){var t=e.body.body;return t.length?t:i.identifier("undefined")}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.DoExpression=r,n.__esModule=!0;var i=l(e("../../../types")),a={optional:!0,stage:0};n.metadata=a;var s=i.isDoExpression;n.check=s},{"../../../types":155}],110:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{"default":e}},l=function(e){return e&&e.__esModule?e["default"]:e};n.__esModule=!0;var i=l(e("../../helpers/build-binary-assignment-operator-transformer")),a=r(e("../../../types")),s={stage:2};n.metadata=s;var o=a.memberExpression(a.identifier("Math"),a.identifier("pow"));i(n,{operator:"**",build:function(e,t){return a.callExpression(o,[e,t])}})},{"../../../types":155,"../../helpers/build-binary-assignment-operator-transformer":50}],111:[function(e,t,n){"use strict";function r(e){return a.isExportDefaultSpecifier(e)||a.isExportNamespaceSpecifier(e)}function l(e,t,n){var r=[];if(a.isExportNamespaceSpecifier(e.specifiers[0])){var l=e.specifiers.shift(),i=n.generateUidIdentifier(l.exported.name);r.push(a.importDeclaration([a.importNamespaceSpecifier(i)],e.source),a.exportNamedDeclaration(null,[a.exportSpecifier(i,l.exported)]))}else if(a.isExportDefaultSpecifier(e.specifiers[0])){var l=e.specifiers.shift(),i=n.generateUidIdentifier(l.exported.name);r.push(a.importDeclaration([a.importSpecifier(i,l.exported)],e.source),a.exportNamedDeclaration(null,[a.exportSpecifier(i,a.identifier("default"))]))}if(r.length)return e.specifiers.length>1&&r.push(e),r}var i=function(e){return e&&e.__esModule?e:{"default":e}};n.check=r,n.ExportNamedDeclaration=l,n.__esModule=!0;var a=i(e("../../../types")),s={stage:1};n.metadata=s},{"../../../types":155}],112:[function(e,t,n){"use strict";function r(e){e.whitelist&&e.whitelist.push("es6.destructuring")}function l(e,t,n,r){if(o(e)){for(var l=[],i=[],s=function(){i.length&&(l.push(a.objectExpression(i)),i=[])},u=0;u<e.properties.length;u++){var p=e.properties[u];a.isSpreadProperty(p)?(s(),l.push(p.argument)):i.push(p)}return s(),a.isObjectExpression(l[0])||l.unshift(a.objectExpression([])),a.callExpression(r.addHelper("extends"),l)}}var i=function(e){return e&&e.__esModule?e:{"default":e}};n.manipulateOptions=r,n.ObjectExpression=l,n.__esModule=!0;var a=i(e("../../../types")),s={stage:1};n.metadata=s;var o=function(e){for(var t=0;t<e.properties.length;t++)if(a.isSpreadProperty(e.properties[t]))return!0;return!1}},{"../../../types":155}],113:[function(e,t){"use strict";t.exports={"es7.classProperties":e("./es7/class-properties"),"es7.asyncFunctions":e("./es7/async-functions"),"es7.decorators":e("./es7/decorators"),strict:e("./other/strict"),_validation:e("./internal/validation"),"validation.undeclaredVariableCheck":e("./validation/undeclared-variable-check"),"validation.react":e("./validation/react"),"spec.functionName":e("./spec/function-name"),"es6.arrowFunctions":e("./es6/arrow-functions"),"spec.blockScopedFunctions":e("./spec/block-scoped-functions"),"optimisation.react.constantElements":e("./optimisation/react.constant-elements"),"optimisation.react.inlineElements":e("./optimisation/react.inline-elements"),reactCompat:e("./other/react-compat"),react:e("./other/react"),_modules:e("./internal/modules"),"es7.comprehensions":e("./es7/comprehensions"),"es6.classes":e("./es6/classes"),asyncToGenerator:e("./other/async-to-generator"),bluebirdCoroutines:e("./other/bluebird-coroutines"),"es6.objectSuper":e("./es6/object-super"),"es7.objectRestSpread":e("./es7/object-rest-spread"),"es7.exponentiationOperator":e("./es7/exponentiation-operator"),"es6.spec.templateLiterals":e("./es6/spec.template-literals"),"es6.templateLiterals":e("./es6/template-literals"),"es5.properties.mutators":e("./es5/properties.mutators"),"es6.properties.shorthand":e("./es6/properties.shorthand"),"es6.properties.computed":e("./es6/properties.computed"),"optimisation.flow.forOf":e("./optimisation/flow.for-of"),"es6.forOf":e("./es6/for-of"),"es6.regex.sticky":e("./es6/regex.sticky"),"es6.regex.unicode":e("./es6/regex.unicode"),"es6.constants":e("./es6/constants"),"es6.parameters.rest":e("./es6/parameters.rest"),"es6.spread":e("./es6/spread"),"es6.parameters.default":e("./es6/parameters.default"),"es6.destructuring":e("./es6/destructuring"),"es6.blockScoping":e("./es6/block-scoping"),"es6.spec.blockScoping":e("./es6/spec.block-scoping"),"es6.tailCall":e("./es6/tail-call"),regenerator:e("./other/regenerator"),"es3.runtime":e("./es3/runtime"),runtime:e("./other/runtime"),"es7.exportExtensions":e("./es7/export-extensions"),"es6.modules":e("./es6/modules"),_blockHoist:e("./internal/block-hoist"),"spec.protoToAssign":e("./spec/proto-to-assign"),_declarations:e("./internal/declarations"),_shadowFunctions:e("./internal/shadow-functions"),"es7.doExpressions":e("./es7/do-expressions"),"es6.spec.symbols":e("./es6/spec.symbols"),"spec.undefinedToVoid":e("./spec/undefined-to-void"),"es1.ludicrous":e("./es1/ludicrous"),_strict:e("./internal/strict"),_moduleFormatter:e("./internal/module-formatter"),"es3.propertyLiterals":e("./es3/property-literals"),"es3.memberExpressionLiterals":e("./es3/member-expression-literals"),"utility.removeDebugger":e("./utility/remove-debugger"),"utility.removeConsole":e("./utility/remove-console"),"utility.inlineEnvironmentVariables":e("./utility/inline-environment-variables"),"utility.inlineExpressions":e("./utility/inline-expressions"),"utility.deadCodeElimination":e("./utility/dead-code-elimination"),flow:e("./other/flow"),_cleanUp:e("./internal/cleanup")}},{"./es1/ludicrous":80,"./es3/member-expression-literals":81,"./es3/property-literals":82,"./es3/runtime":83,"./es5/properties.mutators":84,"./es6/arrow-functions":85,"./es6/block-scoping":86,"./es6/classes":87,"./es6/constants":88,"./es6/destructuring":89,"./es6/for-of":90,"./es6/modules":91,"./es6/object-super":92,"./es6/parameters.default":93,"./es6/parameters.rest":94,"./es6/properties.computed":95,"./es6/properties.shorthand":96,"./es6/regex.sticky":97,"./es6/regex.unicode":98,"./es6/spec.block-scoping":99,"./es6/spec.symbols":100,"./es6/spec.template-literals":101,"./es6/spread":102,"./es6/tail-call":103,"./es6/template-literals":104,"./es7/async-functions":105,"./es7/class-properties":106,"./es7/comprehensions":107,"./es7/decorators":108,"./es7/do-expressions":109,"./es7/exponentiation-operator":110,"./es7/export-extensions":111,"./es7/object-rest-spread":112,"./internal/block-hoist":114,"./internal/cleanup":115,"./internal/declarations":116,"./internal/module-formatter":117,"./internal/modules":118,"./internal/shadow-functions":119,"./internal/strict":120,"./internal/validation":121,"./optimisation/flow.for-of":122,"./optimisation/react.constant-elements":123,"./optimisation/react.inline-elements":124,"./other/async-to-generator":125,"./other/bluebird-coroutines":126,"./other/flow":127,"./other/react":129,"./other/react-compat":128,"./other/regenerator":130,"./other/runtime":131,"./other/strict":132,"./spec/block-scoped-functions":133,"./spec/function-name":134,"./spec/proto-to-assign":135,"./spec/undefined-to-void":136,"./utility/dead-code-elimination":137,"./utility/inline-environment-variables":138,"./utility/inline-expressions":139,"./utility/remove-console":140,"./utility/remove-debugger":141,"./validation/react":142,"./validation/undeclared-variable-check":143}],114:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e};n.__esModule=!0;var l=r(e("lodash/collection/groupBy")),i=r(e("lodash/array/flatten")),a=r(e("lodash/object/values")),s={exit:function(e){for(var t=!1,n=0;n<e.body.length;n++){var r=e.body[n];r&&null!=r._blockHoist&&(t=!0)}if(t){var s=l(e.body,function(e){var t=e&&e._blockHoist;return null==t&&(t=1),t===!0&&(t=2),t});e.body=i(a(s).reverse())}}};n.BlockStatement=s,n.Program=s},{"lodash/array/flatten":232,"lodash/collection/groupBy":239,"lodash/object/values":330}],115:[function(e,t,n){"use strict";n.__esModule=!0;var r={exit:function(e){return 1===e.expressions.length?e.expressions[0]:void(e.expressions.length||this.remove())}};n.SequenceExpression=r;var l={exit:function(e){e.expression||this.remove()}};n.ExpressionStatement=l;var i={exit:function(e){var t=e.right,n=e.left;if(n||t){if(!n)return t;if(!t)return n}else this.remove()}};n.Binary=i},{}],116:[function(e,t,n){"use strict";function r(e,t,n,r){e._declarations&&i.wrap(e,function(){var t,n={};for(var l in e._declarations){var i=e._declarations[l];t=i.kind||"var";var s=a.variableDeclarator(i.id,i.init);if(i.init)e.body.unshift(r.attachAuxiliaryComment(a.variableDeclaration(t,[s])));else{var o=n,u=t;o[u]||(o[u]=[]),n[t].push(s)}}for(t in n)e.body.unshift(r.attachAuxiliaryComment(a.variableDeclaration(t,n[t])));e._declarations=null})}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.BlockStatement=r,n.__esModule=!0;var i=l(e("../../helpers/strict")),a=l(e("../../../types")),s={secondPass:!0};n.metadata=s,n.Program=r},{"../../../types":155,"../../helpers/strict":63}],117:[function(e,t,n){"use strict";function r(e,t,n,r){i.wrap(e,function(){e.body=r.dynamicImports.concat(e.body)}),r.transformers["es6.modules"].canTransform()&&r.moduleFormatter.transform&&r.moduleFormatter.transform(e)}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.Program=r,n.__esModule=!0;var i=l(e("../../helpers/strict"))},{"../../helpers/strict":63}],118:[function(e,t,n){"use strict";function r(e){return o.isImportDeclaration(e)||o.isExportDeclaration(e)}function l(e,t,n,r){e.source&&(e.source.value=r.resolveModuleSource(e.source.value))}function i(e,t,n){l.apply(this,arguments);var r=e.declaration,i=function(){return r._ignoreUserWhitespace=!0,r};if(o.isClassDeclaration(r))return e.declaration=r.id,[i(),e];if(o.isClassExpression(r)){var a=n.generateUidIdentifier("default");return r=o.variableDeclaration("var",[o.variableDeclarator(a,r)]),e.declaration=a,[i(),e]}return o.isFunctionDeclaration(r)?(e._blockHoist=2,e.declaration=r.id,[i(),e]):void 0}function a(e){l.apply(this,arguments);var t=e.declaration,n=function(){return t._ignoreUserWhitespace=!0,t};if(o.isClassDeclaration(t))return e.specifiers=[o.exportSpecifier(t.id,t.id)],e.declaration=null,[n(),e];if(o.isFunctionDeclaration(t))return e.specifiers=[o.exportSpecifier(t.id,t.id)],e.declaration=null,e._blockHoist=2,[n(),e];if(o.isVariableDeclaration(t)){var r=[],i=this.get("declaration").getBindingIdentifiers();for(var a in i){var s=i[a];r.push(o.exportSpecifier(s,s))}return[t,o.exportNamedDeclaration(null,r)]}}var s=function(e){return e&&e.__esModule?e:{"default":e}};n.check=r,n.ImportDeclaration=l,n.ExportDefaultDeclaration=i,n.ExportNamedDeclaration=a,n.__esModule=!0;var o=s(e("../../../types"))},{"../../../types":155}],119:[function(e,t,n){"use strict";function r(e,t,n){var r,l,i={getArgumentsId:function(){return!r&&(r=n.generateUidIdentifier("arguments")),r},getThisId:function(){return!l&&(l=n.generateUidIdentifier("this")),l}};t.traverse(u,i);var a,o=function(t,n){a||(a=e()),a.unshift(s.variableDeclaration("var",[s.variableDeclarator(t,n)]))};r&&o(r,s.identifier("arguments")),l&&o(l,s.thisExpression())}function l(e,t,n){r(function(){return e.body},this,n)}function i(e,t,n){r(function(){return s.ensureBlock(e),e.body.body},this,n)}var a=function(e){return e&&e.__esModule?e:{"default":e}};n.Program=l,n.FunctionDeclaration=i,n.__esModule=!0;var s=a(e("../../../types")),o={enter:function(e,t,n,r){if(this.isClass(e))return this.skip();if(this.isFunction()&&!e.shadow)return this.skip();if(e._shadowedFunctionLiteral)return this.skip();var l;if(this.isIdentifier()&&"arguments"===e.name)l=r.getArgumentsId;else{if(!this.isThisExpression())return;l=r.getThisId}return this.isReferenced()?l():void 0}},u={enter:function(e,t,n,r){return e.shadow?(this.traverse(o,r),e.shadow=!1,this.skip()):this.isFunction()?this.skip():void 0}};n.FunctionExpression=i},{"../../../types":155}],120:[function(e,t,n){"use strict";function r(e,t,n,r){if(r.transformers.strict.canTransform()){var l=r.get("existingStrictDirective");if(!l){l=i.expressionStatement(i.literal("use strict"));var a=e.body[0];a&&(l.leadingComments=a.leadingComments,a.leadingComments=[])}e.body.unshift(l)}}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.Program=r,n.__esModule=!0;var i=l(e("../../../types"))},{"../../../types":155}],121:[function(e,t,n){"use strict";function r(e,t,n,r){var l=e.left;if(u.isVariableDeclaration(l)){var i=l.declarations[0];if(i.init)throw r.errorWithNode(i,o.get("noAssignmentsInForHead"))}}function l(e){if("constructor"!==e.kind){var t=!e.computed&&u.isIdentifier(e.key,{name:"constructor"});if(t||(t=u.isLiteral(e.key,{value:"constructor"})),t)throw this.errorWithNode(o.get("classesIllegalConstructorKind"))}i.apply(this,arguments)}function i(e,t,n,r){if("set"===e.kind){if(1!==e.value.params.length)throw r.errorWithNode(e.value,o.get("settersInvalidParamLength"));var l=e.value.params[0];if(u.isRestElement(l))throw r.errorWithNode(l,o.get("settersNoRest"))}}function a(e){for(var t=0;t<e.body.length;t++){var n=e.body[t];if(!u.isExpressionStatement(n)||!u.isLiteral(n.expression))return;n._blockHoist=1/0}}var s=function(e){return e&&e.__esModule?e:{"default":e}};n.ForOfStatement=r,n.MethodDefinition=l,n.Property=i,n.BlockStatement=a,n.__esModule=!0;var o=s(e("../../../messages")),u=s(e("../../../types")),p={readOnly:!0};n.metadata=p,n.ForInStatement=r,n.Program=a},{"../../../messages":43,"../../../types":155}],122:[function(e,t,n){"use strict";function r(e,t,n,r){return this.get("right").isTypeGeneric("Array")?i.call(this,e,n,r):void 0}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.ForOfStatement=r,n.__esModule=!0;var i=e("../es6/for-of")._ForOfStatementArray,a=l(e("../../../types")),s=a.isForOfStatement;n.check=s;var o=!0;n.optional=o},{"../../../types":155,"../es6/for-of":90}],123:[function(e,t,n){"use strict";function r(e){if(!e._ignoreConstant){var t={isImmutable:!0};this.traverse(a,t),this.skip(),t.isImmutable&&(this.hoist(),e._ignoreConstant=!0)}}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.JSXElement=r,n.__esModule=!0;var i=(l(e("../../helpers/react")),{optional:!0});n.metadata=i;var a={enter:function(e,t,n,r){var l=this,i=function(){r.isImmutable=!1,l.stop()};return this.isJSXClosingElement()?void this.skip():this.isJSXIdentifier({name:"ref"})&&this.parentPath.isJSXAttribute({name:e})?i():void(this.isJSXIdentifier()||this.isIdentifier()||this.isJSXMemberExpression()||this.isImmutable()||i())}}},{"../../helpers/react":59}],124:[function(e,t,n){"use strict";function r(e){for(var t=0;t<e.length;t++){var n=e[t];if(o.isJSXSpreadAttribute(n))return!0;if(l(n,"ref"))return!0}return!1}function l(e,t){return o.isJSXAttribute(e)&&o.isJSXIdentifier(e.name,{name:t})}function i(e,t,n,i){function a(e,t){u(f.properties,o.identifier(e),t)}function u(e,t,n){e.push(o.property("init",t,n))}var p=e.openingElement;if(!r(p.attributes)){var c=!0,d=o.objectExpression([]),f=o.objectExpression([]),h=o.literal(null),m=p.name;o.isJSXIdentifier(m)&&s.isCompatTag(m.name)&&(m=o.literal(m.name),c=!1),a("type",m),a("ref",o.literal(null)),e.children.length&&u(d.properties,o.identifier("children"),o.arrayExpression(s.buildChildren(e)));for(var g=0;g<p.attributes.length;g++){var y=p.attributes[g];l(y,"key")?h=y.value:u(d.properties,y.name,y.value)}return c&&(d=o.callExpression(i.addHelper("default-props"),[o.memberExpression(m,o.identifier("defaultProps")),d])),a("props",d),a("key",h),f}}var a=function(e){return e&&e.__esModule?e:{"default":e}};n.JSXElement=i,n.__esModule=!0;var s=a(e("../../helpers/react")),o=a(e("../../../types")),u={optional:!0};n.metadata=u},{"../../../types":155,"../../helpers/react":59}],125:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e};n.__esModule=!0;var l=r(e("../../helpers/remap-async-to-generator"));n.manipulateOptions=e("./bluebird-coroutines").manipulateOptions;var i={optional:!0};n.metadata=i,n.Function=function(e,t,n,r){return e.async&&!e.generator?l(e,r.addHelper("async-to-generator"),n):void 0}},{"../../helpers/remap-async-to-generator":61,"./bluebird-coroutines":126}],126:[function(e,t,n){"use strict";function r(e){e.optional.push("es7.asyncFunctions"),e.blacklist.push("regenerator")}var l=function(e){return e&&e.__esModule?e:{"default":e}},i=function(e){return e&&e.__esModule?e["default"]:e};n.manipulateOptions=r,n.__esModule=!0;var a=i(e("../../helpers/remap-async-to-generator")),s=l(e("../../../types")),o={optional:!0};n.metadata=o,n.Function=function(e,t,n,r){return e.async&&!e.generator?a(e,s.memberExpression(r.addImport("bluebird",null,!0),s.identifier("coroutine")),n):void 0}},{"../../../types":155,"../../helpers/remap-async-to-generator":61}],127:[function(e,t,n){"use strict";function r(){this.remove()}function l(e){e.typeAnnotation=null,e.value||this.remove()}function i(e){e["implements"]=null}function a(e){return e.expression}function s(e){e.isType&&this.remove()}function o(){this.get("declaration").isTypeAlias()&&this.remove()}var u=function(e){return e&&e.__esModule?e:{"default":e}};n.Flow=r,n.ClassProperty=l,n.Class=i,n.TypeCastExpression=a,n.ImportDeclaration=s,n.ExportDeclaration=o,n.__esModule=!0;u(e("../../../types"));n.Function=function(e){for(var t=0;t<e.params.length;t++){var n=e.params[t];n.optional=!1}}},{"../../../types":155}],128:[function(e,t,n){"use strict";function r(e){e.blacklist.push("react")}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.manipulateOptions=r,n.__esModule=!0;var i=l(e("../../helpers/react")),a=l(e("../../../types")),s={optional:!0};n.metadata=s,e("../../helpers/build-react-transformer")(n,{pre:function(e){e.callee=e.tagExpr},post:function(e){i.isCompatTag(e.tagName)&&(e.call=a.callExpression(a.memberExpression(a.memberExpression(a.identifier("React"),a.identifier("DOM")),e.tagExpr,a.isLiteral(e.tagExpr)),e.args))}})},{"../../../types":155,"../../helpers/build-react-transformer":52,"../../helpers/react":59}],129:[function(e,t,n){"use strict";function r(e,t,n,r){for(var l=r.opts.jsxPragma,i=0;i<r.ast.comments.length;i++){var o=r.ast.comments[i],u=s.exec(o.value);if(u){if(l=u[1],"React.DOM"===l)throw r.errorWithNode(o,"The @jsx React.DOM pragma has been deprecated as of React 0.12");break}}r.set("jsxIdentifier",l.split(".").map(a.identifier).reduce(function(e,t){return a.memberExpression(e,t)}))}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.Program=r,n.__esModule=!0;var i=l(e("../../helpers/react")),a=l(e("../../../types")),s=/^\*\s*@jsx\s+([^\s]+)/;e("../../helpers/build-react-transformer")(n,{pre:function(e){var t=e.tagName,n=e.args;n.push(i.isCompatTag(t)?a.literal(t):e.tagExpr)},post:function(e,t){e.callee=t.get("jsxIdentifier")}})},{"../../../types":155,"../../helpers/build-react-transformer":52,"../../helpers/react":59}],130:[function(e,t,n){"use strict";function r(e){return s.isFunction(e)&&(e.async||e.generator)}var l=function(e){return e&&e.__esModule?e:{"default":e}},i=function(e){return e&&e.__esModule?e["default"]:e};n.check=r,n.__esModule=!0;var a=i(e("regenerator-babel")),s=l(e("../../../types")),o={enter:function(e){a.transform(e),this.stop()}};n.Program=o},{"../../../types":155,"regenerator-babel":347}],131:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},l=r(e("core-js/library")),i=r(e("../../helpers/build-runtime-transformer"));i(n,l,"es5")},{"../../helpers/build-runtime-transformer":53,"core-js/library":212}],132:[function(e,t,n){"use strict";function r(e,t,n,r){var l=e.body[0];u.isExpressionStatement(l)&&u.isLiteral(l.expression,{value:"use strict"})&&r.set("existingStrictDirective",e.body.shift())}function l(){this.skip()}function i(){return u.identifier("undefined")}function a(e,t,n,r){if(u.isIdentifier(e.callee,{name:"eval"}))throw r.errorWithNode(e,o.get("evalInStrictMode"))}var s=function(e){return e&&e.__esModule?e:{"default":e}};n.Program=r,n.FunctionExpression=l,n.ThisExpression=i,n.CallExpression=a,n.__esModule=!0;var o=s(e("../../../messages")),u=s(e("../../../types"));n.FunctionDeclaration=l,n.Class=l},{"../../../messages":43,"../../../types":155}],133:[function(e,t,n){"use strict";function r(e,t,n,r){if(!(i.isFunction(t)&&t.body===e||i.isExportDeclaration(t)))for(var l=0;l<e.body.length;l++){var a=e.body[l];if(i.isFunctionDeclaration(a)){var s=i.variableDeclaration("let",[i.variableDeclarator(a.id,i.toExpression(a))]);s._blockHoist=2,a.id=null,e.body[l]=s,r.checkNode(s)}}}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.BlockStatement=r,n.__esModule=!0;var i=l(e("../../../types"))},{"../../../types":155}],134:[function(e,t,n){"use strict";n.__esModule=!0;var r=e("../../helpers/name-method");n.FunctionExpression=r.bare,n.ArrowFunctionExpression=r.bare},{"../../helpers/name-method":58}],135:[function(e,t,n){"use strict";function r(e){return c.isLiteral(c.toComputedKey(e,e.key),{value:"__proto__"})}function l(e){var t=e.left;return c.isMemberExpression(t)&&c.isLiteral(c.toComputedKey(t,t.property),{value:"__proto__"})}function i(e,t,n){return c.expressionStatement(c.callExpression(n.addHelper("defaults"),[t,e.right]))}function a(e,t,n,r){if(l(e)){var a=[],s=e.left.object,o=n.generateMemoisedReference(s);return a.push(c.expressionStatement(c.assignmentExpression("=",o,s))),a.push(i(e,o,r)),o&&a.push(o),a}}function s(e,t,n,r){var a=e.expression;if(c.isAssignmentExpression(a,{operator:"="}))return l(a)?i(a,a.left.object,r):void 0}function o(e,t,n,l){for(var i,a=0;a<e.properties.length;a++){var s=e.properties[a];r(s)&&(i=s.value,d(e.properties,s))}if(i){var o=[c.objectExpression([]),i];return e.properties.length&&o.push(e),c.callExpression(l.addHelper("extends"),o)}}var u=function(e){return e&&e.__esModule?e["default"]:e},p=function(e){return e&&e.__esModule?e:{"default":e}};n.AssignmentExpression=a,n.ExpressionStatement=s,n.ObjectExpression=o,n.__esModule=!0;var c=p(e("../../../types")),d=u(e("lodash/array/pull")),f={secondPass:!0,optional:!0};n.metadata=f},{"../../../types":155,"lodash/array/pull":234}],136:[function(e,t,n){"use strict";function r(e){return"undefined"===e.name&&this.isReferenced()?i.unaryExpression("void",i.literal(0),!0):void 0}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.Identifier=r,n.__esModule=!0;var i=l(e("../../../types")),a={optional:!0,react:!0};n.metadata=a},{"../../../types":155}],137:[function(e,t,n){"use strict";function r(e){if(a.isBlockStatement(e)){for(var t=!1,n=0;n<e.body.length;n++){var r=e.body[n];a.isBlockScoped(r)&&(t=!0)}if(!t)return e.body}return e}function l(e){var t=this.get("test").evaluateTruthy();return t===!0?e.consequent:t===!1?e.alternate:void 0}var i=function(e){return e&&e.__esModule?e:{"default":e}};n.ConditionalExpression=l,n.__esModule=!0;var a=i(e("../../../types")),s={optional:!0};n.metadata=s;var o={exit:function(e){var t=e.consequent,n=e.alternate,l=this.get("test").evaluateTruthy();return l===!0?r(t):l===!1?n?r(n):this.remove():(a.isBlockStatement(n)&&!n.body.length&&(n=e.alternate=null),void(a.isBlockStatement(t)&&!t.body.length&&a.isBlockStatement(n)&&n.body.length&&(e.consequent=e.alternate,e.alternate=null,e.test=a.unaryExpression("!",test,!0))))}};n.IfStatement=o},{"../../../types":155}],138:[function(e,t,n){(function(t){"use strict";function r(e){if(s(e.object)){var n=this.toComputedKey();if(i.isLiteral(n))return i.valueToNode(t.env[n.value])}}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.MemberExpression=r,n.__esModule=!0;var i=l(e("../../../types")),a={optional:!0};n.metadata=a; var s=i.buildMatchMemberExpression("process.env")}).call(this,e("_process"))},{"../../../types":155,_process:185}],139:[function(e,t,n){"use strict";function r(){var e=this.evaluate();return e.confident?a.valueToNode(e.value):void 0}function l(){}var i=function(e){return e&&e.__esModule?e:{"default":e}};n.Expression=r,n.Identifier=l,n.__esModule=!0;var a=i(e("../../../types")),s={optional:!0};n.metadata=s},{"../../../types":155}],140:[function(e,t,n){"use strict";function r(e,t){this.get("callee").matchesPattern("console",!0)&&(i.isExpressionStatement(t)?this.parentPath.remove():this.remove())}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.CallExpression=r,n.__esModule=!0;var i=l(e("../../../types")),a={optional:!0};n.metadata=a},{"../../../types":155}],141:[function(e,t,n){"use strict";function r(){this.get("expression").isIdentifier({name:"debugger"})&&this.remove()}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.ExpressionStatement=r,n.__esModule=!0;var i=(l(e("../../../types")),{optional:!0});n.metadata=i},{"../../../types":155}],142:[function(e,t,n){"use strict";function r(e,t){if(o.isLiteral(e)){var n=e.value,r=n.toLowerCase();if("react"===r&&n!==r)throw t.errorWithNode(e,s.get("didYouMean","react"))}}function l(e,t,n,l){this.get("callee").isIdentifier({name:"require"})&&1===e.arguments.length&&r(e.arguments[0],l)}function i(e,t,n,l){r(e.source,l)}var a=function(e){return e&&e.__esModule?e:{"default":e}};n.CallExpression=l,n.ModuleDeclaration=i,n.__esModule=!0;var s=a(e("../../../messages")),o=a(e("../../../types"))},{"../../../messages":43,"../../../types":155}],143:[function(e,t,n){"use strict";function r(e,t,n,r){if(this.isReferenced()&&!n.hasBinding(e.name)){var l,i=n.getAllBindings(),o=-1;for(var u in i){var p=a(e.name,u);0>=p||p>3||o>=p||(l=u,o=p)}var c;throw c=l?s.get("undeclaredVariableSuggestion",e.name,l):s.get("undeclaredVariable",e.name),r.errorWithNode(e,c,ReferenceError)}}var l=function(e){return e&&e.__esModule?e:{"default":e}},i=function(e){return e&&e.__esModule?e["default"]:e};n.Identifier=r,n.__esModule=!0;var a=i(e("leven")),s=l(e("../../../messages")),o={optional:!0};n.metadata=o},{"../../../messages":43,leven:228}],144:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},l=n(e("../types")),i=function(){function e(t){var n=t.identifier,l=t.scope,i=t.path,a=t.kind;r(this,e),this.identifier=n,this.constant=!0,this.scope=l,this.path=i,this.kind=a}return e.prototype.setTypeAnnotation=function(){var e=this.path.getTypeAnnotation();this.typeAnnotationInferred=e.inferred,this.typeAnnotation=e.annotation},e.prototype.isTypeGeneric=function(){var e;return(e=this.path).isTypeGeneric.apply(e,arguments)},e.prototype.assignTypeGeneric=function(e,t){var n=null;t&&(t=l.typeParameterInstantiation(t)),this.assignType(l.genericTypeAnnotation(l.identifier(e),n))},e.prototype.assignType=function(e){this.typeAnnotation=e},e.prototype.reassign=function(){this.constant=!1,this.typeAnnotationInferred&&(this.typeAnnotation=null)},e.prototype.isCompatibleWithType=function(){return!1},e}();t.exports=i},{"../types":155}],145:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e){return e&&e.__esModule?e["default"]:e},l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=r(e("./path")),a=(r(e("lodash/array/compact")),n(e("../types")),function(){function e(t,n,r,i){l(this,e),this.parentPath=i,this.scope=t,this.state=r,this.opts=n}return e.prototype.create=function(e,t,n){return i.get(this.parentPath,this,e,t,n)},e.prototype.visitMultiple=function(e,t){if(0===e.length)return!1;for(var n=[],r=this.queue=[],l=!1,i=0;i<e.length;i++)e[i]&&r.push(this.create(t,e,i));for(var i=0;i<r.length;i++){var a=r[i];if(!(n.indexOf(a.node)>=0)&&(n.push(a.node),a.visit())){l=!0;break}}for(var i=0;i<r.length;i++);return l},e.prototype.visitSingle=function(e,t){return this.create(e,e,t).visit()},e.prototype.visit=function(e,t){var n=e[t];if(n)return Array.isArray(n)?this.visitMultiple(n,e,t):this.visitSingle(e,t)},e}());t.exports=a},{"../types":155,"./path":150,"lodash/array/compact":231}],146:[function(e,t){"use strict";function n(e,t,r,l,i){if(e){if(!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error("Must pass a scope unless traversing a Program/File got a "+e.type+" node");if(t||(t={}),t.enter||(t.enter=function(){}),t.exit||(t.exit=function(){}),Array.isArray(e))for(var a=0;a<e.length;a++)n.node(e[a],t,r,l,i);else n.node(e,t,r,l,i)}}function r(e){for(var t=0;t<p.length;t++){var n=p[t];null!=e[n]&&(e[n]=null)}for(var n in e){var r=e[n];Array.isArray(r)&&delete r._paths}}function l(e,t,n,r){e.type===r.type&&(r.has=!0,this.skip())}var i=function(e){return e&&e.__esModule?e:{"default":e}},a=function(e){return e&&e.__esModule?e["default"]:e};t.exports=n;var s=a(e("./context")),o=a(e("lodash/collection/includes")),u=i(e("../types"));n.node=function(e,t,n,r,l){var i=u.VISITOR_KEYS[e.type];if(i)for(var a=new s(n,t,r,l),o=0;o<i.length;o++)if(a.visit(e,i[o]))return};var p=["trailingComments","leadingComments","extendedRange","_declarations","_scopeInfo","_paths","tokens","range","start","end","loc","raw"],c={noScope:!0,exit:r};n.removeProperties=function(e){return n(e,c),r(e),e},n.explode=function(e){for(var t in e){var n=e[t],r=u.FLIPPED_ALIAS_KEYS[t];if(r)for(var l=0;l<r.length;l++){var i=e,a=r[l];i[a]||(i[a]=n)}}return e},n.hasType=function(e,t,r,i){if(o(i,e.type))return!1;if(e.type===r)return!0;var a={has:!1,type:r};return n(e,{blacklist:i,enter:l},t,a),a.has}},{"../types":155,"./context":145,"lodash/collection/includes":240}],147:[function(e,t,n){"use strict";function r(){var e,t=this.node;if(this.isMemberExpression())e=t.property;else{if(!this.isProperty())throw new ReferenceError("todo");e=t.key}return t.computed||i.isIdentifier(e)&&(e=i.literal(e.name)),e}var l=function(e){return e&&e.__esModule?e:{"default":e}};n.toComputedKey=r,n.__esModule=!0;var i=l(e("../../types"))},{"../../types":155}],148:[function(e,t,n){"use strict";function r(){var e=this.evaluate();return e.confident?!!e.value:void 0}function l(){function e(n){if(t){var r=n.node;if(n.isSequenceExpression()){var l=n.get("expressions");return e(l[l.length-1])}if(n.isLiteral()&&(!r.regex||null!==r.value))return r.value;if(n.isConditionalExpression())return e(e(n.get("test"))?n.get("consequent"):n.get("alternate"));if(n.isIdentifier({name:"undefined"}))return void 0;if(n.isIdentifier()||n.isMemberExpression())return n=n.resolve(),n?e(n):t=!1;if(n.isUnaryExpression({prefix:!0})){var i=e(n.get("argument"));switch(r.operator){case"void":return void 0;case"!":return!i;case"+":return+i;case"-":return-i}}if(n.isArrayExpression()||n.isObjectExpression(),n.isLogicalExpression()){var a=e(n.get("left")),s=e(n.get("right"));switch(r.operator){case"||":return a||s;case"&&":return a&&s}}if(n.isBinaryExpression()){var a=e(n.get("left")),s=e(n.get("right"));switch(r.operator){case"-":return a-s;case"+":return a+s;case"/":return a/s;case"*":return a*s;case"%":return a%s;case"<":return s>a;case">":return a>s;case"<=":return s>=a;case">=":return a>=s;case"==":return a==s;case"!=":return a!=s;case"===":return a===s;case"!==":return a!==s}}t=!1}}var t=!0,n=e(this);return t||(n=void 0),{confident:t,value:n}}n.evaluateTruthy=r,n.evaluate=l,n.__esModule=!0},{}],149:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},l=n(e("../../transformation/helpers/react")),i=n(e("../../types")),a={enter:function(e,t,n,r){if((!this.isJSXIdentifier()||!l.isCompatTag(e.name))&&(this.isJSXIdentifier()||this.isIdentifier())&&this.isReferenced()){var i=n.getBinding(e.name);if(i!==r.scope.getBinding(e.name))return;i&&i.constant?r.bindings[e.name]=i:(n.dump(),r.foundIncompatible=!0,this.stop())}}},s=function(){function e(t,n){r(this,e),this.foundIncompatible=!1,this.bindings={},this.scope=n,this.scopes=[],this.path=t}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var n=this.bindings[t];if(!e.bindingIdentifierEquals(t,n.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;this.scopes.push(e)}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this.scopes,t=e.pop();return t.path.isFunction()?this.hasNonParamBindings()?this.getNextScopeStatementParent():t.path.get("body").get("body")[0]:t.path.isProgram()?this.getNextScopeStatementParent():void 0},e.prototype.getNextScopeStatementParent=function(){var e=this.scopes.pop();return e?e.path.getStatementParent():void 0},e.prototype.hasNonParamBindings=function(){for(var e in this.bindings){var t=this.bindings[e];if("param"!==t.kind)return!0}return!1},e.prototype.run=function(){if(this.path.traverse(a,this),!this.foundIncompatible){this.getCompatibleScopes();var e=this.getAttachmentPath();if(e){var t=e.scope.generateUidIdentifier("ref");e.insertBefore([i.variableDeclaration("var",[i.variableDeclarator(t,this.path.node)])]),this.path.replaceWith(t)}}},e}();t.exports=s},{"../../transformation/helpers/react":59,"../../types":155}],150:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e){return e&&e.__esModule?e["default"]:e},l=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=r(e("./hoister")),s=r(e("lodash/lang/isBoolean")),o=r(e("lodash/lang/isNumber")),u=(r(e("lodash/lang/isRegExp")),r(e("lodash/lang/isString"))),p=r(e("../index")),c=r(e("lodash/collection/includes")),d=r(e("lodash/object/assign")),f=(r(e("lodash/object/extend")),r(e("../scope"))),h=n(e("../../types")),m={enter:function(e,t,n){if(this.isFunction())return this.skip();if(this.isVariableDeclaration()&&"var"===e.kind){var r=this.getBindingIdentifiers();for(var l in r)n.push({id:r[l]});for(var i=[],a=0;a<e.declarations.length;a++){var s=e.declarations[a];s.init&&i.push(h.expressionStatement(h.assignmentExpression("=",s.id,s.init)))}return i}}},g=function(){function e(t,n){i(this,e),this.container=n,this.parent=t,this.data={}}return e.get=function(t,n,r,l,i,a){for(var s,o,u=l[i],p=(s=l,!s._paths&&(s._paths=[]),s._paths),c=0;c<p.length;c++){var d=p[c];if(d.node===u){o=d;break}}return o||(o=new e(r,l),p.push(o)),o.setContext(t,n,i,a),o},e.getScope=function(e,t,n){var r=t;return e.isScope()&&(r=new f(e,t,n)),r},e.prototype.queueNode=function(e){this.context&&this.context.queue.push(e)},e.prototype.insertBefore=function(e){if(this.checkNodes(e),this.parentPath.isExpressionStatement())return this.parentPath.insertBefore(e);if(this.isPreviousType("Statement"))if(Array.isArray(this.container))this._containerInsertBefore(e);else{if(!this.isStatementOrBlock())throw new Error("no idea what to do with this");this.node&&e.push(this.node),this.container[this.key]=h.blockStatement(e)}else{if(!this.isPreviousType("Expression"))throw new Error("no idea what to do with this ");this.node&&e.push(this.node),this.replaceExpressionWithStatements(e)}},e.prototype._containerInsert=function(e,t){this.updateSiblingKeys(e,t.length);for(var n=0;n<t.length;n++){var r=e+n;this.container.splice(r,0,t[n]),this.context&&this.queueNode(this.context.create(this.parent,this.container,r))}},e.prototype._containerInsertBefore=function(e){this._containerInsert(this.key,e)},e.prototype._containerInsertAfter=function(e){this._containerInsert(this.key+1,e)},e.prototype.isStatementOrBlock=function(){return c(h.STATEMENT_OR_BLOCK_KEYS,this.key)&&!h.isBlockStatement(this.container)},e.prototype.insertAfter=function(e){if(this.checkNodes(e),this.parentPath.isExpressionStatement())return this.parentPath.insertAfter(e);if(this.isPreviousType("Statement"))if(Array.isArray(this.container))this._containerInsertAfter(e);else{if(!this.isStatementOrBlock())throw new Error("no idea what to do with this");this.node&&e.unshift(this.node),this.container[this.key]=h.blockStatement(e)}else{if(!this.isPreviousType("Expression"))throw new Error("no idea what to do with this");if(this.node){var t=this.scope.generateTemp();e.unshift(h.expressionStatement(h.assignmentExpression("=",t,this.node))),e.push(h.expressionStatement(t))}this.replaceExpressionWithStatements(e)}},e.prototype.updateSiblingKeys=function(e,t){for(var n=this.container._paths,r=0;r<n.length;r++){var l=n[r];l.key>=e&&(l.key+=t)}},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e,t){var n=this.data[e];return!n&&t&&(n=this.data[e]=t),n},e.prototype.setScope=function(t){this.scope=e.getScope(this,this.context&&this.context.scope,t)},e.prototype.clearContext=function(){this.context=null},e.prototype.setContext=function(e,t,n,r){this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.parentPath=e||this.parentPath,this.key=n,t&&(this.context=t,this.state=t.state,this.opts=t.opts),this.setScope(r),this.type=this.node&&this.node.type},e.prototype._remove=function(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this.container[this.key]=null},e.prototype.remove=function(){this._remove(),this.removed=!0},e.prototype.skip=function(){this.shouldSkip=!0},e.prototype.stop=function(){this.shouldStop=!0,this.shouldSkip=!0},e.prototype.errorWithNode=function(e){var t=void 0===arguments[1]?SyntaxError:arguments[1],n=this.node.loc.start,r=new t("Line "+n.line+": "+e);return r.loc=n,r},e.prototype.replaceInline=function(e){return Array.isArray(e)?Array.isArray(this.container)?(this._verifyNodeList(e),this._containerInsertAfter(e),this.remove()):this.replaceWithMultiple(e):this.replaceWith(e)},e.prototype._verifyNodeList=function(e){"object"==typeof e&&(e=[e]);for(var t=0;t<e.length;t++){var n=e[t];if(!n)throw new Error("Node list has falsy node with the index of "+t)}return e},e.prototype.replaceWithMultiple=function(e){this._verifyNodeList(e),h.inheritsComments(e[0],this.node),this.container[this.key]=null,this.insertAfter(e),this.node||this.remove()},e.prototype.replaceWith=function(e,t){if(this.removed)throw new Error("You can't replace this node, we've already removed it");if(!e)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(Array.isArray(e)){if(t)return this.replaceWithMultiple(e);throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`")}if(this.isPreviousType("Expression")&&h.isStatement(e))return this.replaceExpressionWithStatements([e]);var n=this.node;n&&h.inheritsComments(e,n),this.container[this.key]=e,this.type=e.type,this.setScope(),this.checkNodes([e])},e.prototype.checkNodes=function(e){var t=this.scope,n=t&&t.file;if(n)for(var r=0;r<e.length;r++)n.checkNode(e[r],t)},e.prototype.getStatementParent=function(){var e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e},e.prototype.getLastStatements=function(){var e=[],t=function(t){t&&(e=e.concat(t.getLastStatements()))};return this.isIfStatement()?(t(this.get("consequent")),t(this.get("alternate"))):this.isDoExpression()?t(this.get("body")):this.isProgram()||this.isBlockStatement()?t(this.get("body").pop()):e.push(this),e},e.prototype.replaceExpressionWithStatements=function(e){var t=h.toSequenceExpression(e,this.scope);if(t)return this.replaceWith(t);var n=h.functionExpression(null,[],h.blockStatement(e));n.shadow=!0;for(var r=this.getLastStatements(),l=0;l<r.length;l++){var i=r[l];i.isExpressionStatement()&&i.replaceWith(h.returnStatement(i.node.expression))}return this.replaceWith(h.callExpression(n,[])),this.traverse(m),this.node},e.prototype.call=function(e){var t=this.node;if(t){var n=this.opts,r=n[e]||n;n[t.type]&&(r=n[t.type][e]||r);var l=r.call(this,t,this.parent,this.scope,this.state);l&&this.replaceWith(l,!0)}},e.prototype.isBlacklisted=function(){var e=this.opts.blacklist;return e&&e.indexOf(this.node.type)>-1},e.prototype.visit=function(){if(this.isBlacklisted())return!1;if(this.call("enter"),this.shouldSkip)return this.shouldStop;var e=this.node,t=this.opts;if(e)if(Array.isArray(e))for(var n=0;n<e.length;n++)p.node(e[n],t,this.scope,this.state,this);else p.node(e,t,this.scope,this.state,this),this.call("exit");return this.shouldStop},e.prototype.getSibling=function(t){return e.get(this.parentPath,null,this.parent,this.container,t,this.file)},e.prototype.get=function(t){var n=this,r=t.split(".");if(1===r.length){var l=this.node,i=l[t];return Array.isArray(i)?i.map(function(t,r){return e.get(n,null,l,i,r)}):e.get(this,null,l,l,t)}for(var a=this,s=0;s>r.length;s++){var o=r[s];a="."===o?a.parentPath:a.get(r[s])}return a},e.prototype.has=function(e){return!!this.node[e]},e.prototype.is=function(e){return this.has(e)},e.prototype.isnt=function(e){return!this.has(e)},e.prototype.getTypeAnnotation=function(){if(this.typeInfo)return this.typeInfo;var e=this.typeInfo={inferred:!1,annotation:null},t=this.node.typeAnnotation;return t||(e.inferred=!0,t=this.inferType(this)),t&&(h.isTypeAnnotation(t)&&(t=t.typeAnnotation),e.annotation=t),e},e.prototype.resolve=function(){if(this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve()}else{if(this.isIdentifier()){var e=this.scope.getBinding(this.node.name);if(!e||!e.constant)return;return e.path===this?this:e.path.resolve()}if(!this.isMemberExpression())return this;var t=this.toComputedKey();if(!h.isLiteral(t))return;var n=t.value,r=this.get("object").resolve();if(!r||!r.isObjectExpression())return;for(var l=r.get("properties"),i=0;i<l.length;i++){var a=l[i];if(a.isProperty()){var s=a.get("key"),o=a.isnt("computed")&&s.isIdentifier({name:n});if(o||(o=s.isLiteral({value:n})),o)return a.get("value")}}}},e.prototype.inferType=function(e){if(e=e.resolve()){if(e.isRestElement()||e.parentPath.isRestElement()||e.isArrayExpression())return h.genericTypeAnnotation(h.identifier("Array"));if(e.parentPath.isTypeCastExpression())return e.parentPath.node.typeAnnotation;if(e.isTypeCastExpression())return e.node.typeAnnotation;if(e.isObjectExpression())return h.genericTypeAnnotation(h.identifier("Object"));if(e.isFunction())return h.identifier("Function");if(e.isLiteral()){var t=e.node.value;if(u(t))return h.stringTypeAnnotation();if(o(t))return h.numberTypeAnnotation();if(s(t))return h.booleanTypeAnnotation()}if(e.isCallExpression()){var n=e.get("callee").resolve();if(n&&n.isFunction())return n.node.returnType}}},e.prototype.isScope=function(){return h.isScope(this.node,this.parent)},e.prototype.isReferencedIdentifier=function(e){return h.isReferencedIdentifier(this.node,this.parent,e)},e.prototype.isReferenced=function(){return h.isReferenced(this.node,this.parent)},e.prototype.isBlockScoped=function(){return h.isBlockScoped(this.node)},e.prototype.isVar=function(){return h.isVar(this.node)},e.prototype.isPreviousType=function(e){return h.isType(this.type,e)},e.prototype.isTypeGeneric=function(e){var t=void 0===arguments[1]?{}:arguments[1],n=this.getTypeAnnotation(),r=n.annotation;return r?r.inferred&&t.inference===!1?!1:h.isGenericTypeAnnotation(r)&&h.isIdentifier(r.id,{name:e})?t.requireTypeParameters&&!r.typeParameters?!1:!0:!1:!1},e.prototype.getBindingIdentifiers=function(){return h.getBindingIdentifiers(this.node)},e.prototype.traverse=function(e){var t=function(){return e.apply(this,arguments)};return t.toString=function(){return e.toString()},t}(function(e,t){p(this.node,e,this.scope,t,this)}),e.prototype.hoist=function(){var e=void 0===arguments[0]?this.scope:arguments[0],t=new a(this,e);return t.run()},e.prototype.matchesPattern=function(e,t){var n=e.split(".");if(!this.isMemberExpression())return!1;for(var r=[this.node],l=0;r.length;){var i=r.shift();if(t&&l===n.length)return!0;if(h.isIdentifier(i)){if(n[l]!==i.name)return!1}else{if(!h.isLiteral(i)){if(h.isMemberExpression(i)){if(i.computed&&!h.isLiteral(i.property))return!1;r.push(i.object),r.push(i.property);continue}return!1}if(n[l]!==i.value)return!1}if(++l>n.length)return!1}return!0},l(e,{node:{get:function(){return this.removed?null:this.container[this.key]},set:function(){throw new Error("Don't use `path.node = newNode;`, use `path.replaceWith(newNode)` or `path.replaceWithMultiple([newNode])`")}}}),e}();t.exports=g,d(g.prototype,e("./evaluation")),d(g.prototype,e("./conversion"));for(var y=0;y<h.TYPES.length;y++)!function(){var e=h.TYPES[y],t="is"+e;g.prototype[t]=function(e){return h[t](this.node,e)}}()},{"../../types":155,"../index":146,"../scope":151,"./conversion":147,"./evaluation":148,"./hoister":149,"lodash/collection/includes":240,"lodash/lang/isBoolean":312,"lodash/lang/isNumber":316,"lodash/lang/isRegExp":319,"lodash/lang/isString":320,"lodash/object/assign":323,"lodash/object/extend":325}],151:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{"default":e}},r=function(e){return e&&e.__esModule?e["default"]:e},l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=r(e("lodash/collection/includes")),a=r(e("./index")),s=r(e("lodash/object/defaults")),o=n(e("../messages")),u=r(e("./binding")),p=r(e("globals")),c=r(e("lodash/array/flatten")),d=r(e("lodash/object/extend")),f=r(e("../helpers/object")),h=r(e("lodash/collection/each")),m=n(e("../types")),g={enter:function(e,t,n,r){var l=this;return m.isFor(e)&&h(m.FOR_INIT_KEYS,function(e){var t=l.get(e);t.isVar()&&r.scope.registerBinding("var",t)}),this.isFunction()?this.skip():void(r.blockId&&e===r.blockId||this.isBlockScoped()||this.isExportDeclaration()&&m.isDeclaration(e.declaration)||this.isDeclaration()&&r.scope.registerDeclaration(this))}},y={enter:function(e,t,n,r){m.isReferencedIdentifier(e,t)&&!n.hasBinding(e.name)?r.addGlobal(e):m.isLabeledStatement(e)?r.addGlobal(e):m.isAssignmentExpression(e)?n.registerConstantViolation(this.get("left"),this.get("right")):m.isUpdateExpression(e)?n.registerConstantViolation(this.get("argument"),null):m.isUnaryExpression(e)&&"delete"===e.operator&&n.registerConstantViolation(this.get("left"),null)}},b={enter:function(e,t,n,r){this.isFunctionDeclaration()||this.isBlockScoped()?r.registerDeclaration(this):this.isScope()&&this.skip()}},v=function(){function e(t,n,r){if(l(this,e),n&&n.block===t.node)return n;var i=t.getData("scope");return i&&i.parent===n?i:(t.setData("scope",this),this.parent=n,this.file=n?n.file:r,this.parentBlock=t.parent,this.block=t.node,this.path=t,void this.crawl())}return e.globals=c([p.builtin,p.browser,p.node].map(Object.keys)),e.contextVariables=["this","arguments","super"],e.prototype.traverse=function(e){var t=function(){return e.apply(this,arguments)};return t.toString=function(){return e.toString()},t}(function(e,t,n){a(e,t,this,n)}),e.prototype.generateTemp=function(){var e=void 0===arguments[0]?"temp":arguments[0],t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(e){return m.identifier(this.generateUid(e))},e.prototype.generateUid=function(e){e=m.toIdentifier(e).replace(/^_+/,"");var t,n=0;do t=this._generateUid(e,n),n++;while(this.hasBinding(t)||this.hasGlobal(t)||this.hasUid(t));return this.getFunctionParent().uids[t]=!0,t},e.prototype._generateUid=function(e,t){var n=e;return t>1&&(n+=t),"_"+n},e.prototype.hasUid=function(e){var t=this;do{if(t.uids[e])return!0;t=t.parent}while(t);return!1},e.prototype.generateUidBasedOnNode=function(e){var t=e;m.isAssignmentExpression(e)?t=e.left:m.isVariableDeclarator(e)?t=e.id:m.isProperty(t)&&(t=t.key);var n=[],r=function(e){var t=function(){return e.apply(this,arguments)};return t.toString=function(){return e.toString()},t}(function(e){if(m.isMemberExpression(e))r(e.object),r(e.property);else if(m.isIdentifier(e))n.push(e.name);else if(m.isLiteral(e))n.push(e.value);else if(m.isCallExpression(e))r(e.callee);else if(m.isObjectExpression(e)||m.isObjectPattern(e))for(var t=0;t<e.properties.length;t++){var l=e.properties[t];r(l.key||l.argument)}});r(t);var l=n.join("$");return l=l.replace(/^_/,"")||"ref",this.generateUidIdentifier(l)},e.prototype.generateMemoisedReference=function(e,t){if(m.isThisExpression(e)||m.isSuper(e))return null;if(m.isIdentifier(e)&&this.hasBinding(e.name))return null;var n=this.generateUidBasedOnNode(e);return t||this.push({id:n}),n},e.prototype.checkBlockScopedCollisions=function(e,t,n){var r=this.getOwnBindingInfo(t);if(r&&"param"!==e&&!("hoisted"===e&&"let"===r.kind||"let"!==r.kind&&"const"!==r.kind&&"module"!==r.kind&&"param"!==r.kind))throw this.file.errorWithNode(n,o.get("scopeDuplicateDeclaration",t),TypeError)},e.prototype.rename=function(e,t,n){t||(t=this.generateUidIdentifier(e).name);var r=this.getBinding(e);if(r){var l=r.identifier,i=r.scope;i.traverse(n||i.block,{enter:function(n,r,i){if(m.isReferencedIdentifier(n,r)&&n.name===e)n.name=t;else if(m.isDeclaration(n)){var a=this.getBindingIdentifiers();for(var s in a)s===e&&(a[s].name=t)}else this.isScope()&&(i.bindingIdentifierEquals(e,l)||this.skip())}}),n||(i.removeOwnBinding(e),i.bindings[t]=r,l.name=t)}},e.prototype.dump=function(){var e=this;do console.log(e.block.type,"Bindings:",Object.keys(e.bindings));while(e=e.parent);console.log("-------------")},e.prototype.toArray=function(e,t){var n=this.file;if(m.isIdentifier(e)){var r=this.getBinding(e.name);if(r&&r.isTypeGeneric("Array",{inference:!1}))return e}if(m.isArrayExpression(e))return e;if(m.isIdentifier(e,{name:"arguments"}))return m.callExpression(m.memberExpression(n.addHelper("slice"),m.identifier("call")),[e]);var l="to-array",i=[e];return t===!0?l="to-consumable-array":t&&(i.push(m.literal(t)),l="sliced-to-array",this.file.isLoose("es6.forOf")&&(l+="-loose")),m.callExpression(n.addHelper(l),i)},e.prototype.registerDeclaration=function(e){var t=e.node;if(m.isFunctionDeclaration(t))this.registerBinding("hoisted",e);else if(m.isVariableDeclaration(t))for(var n=e.get("declarations"),r=0;r<n.length;r++)this.registerBinding(t.kind,n[r]);else m.isClassDeclaration(t)?this.registerBinding("let",e):m.isImportDeclaration(t)||m.isExportDeclaration(t)?this.registerBinding("module",e):this.registerBinding("unknown",e)},e.prototype.registerConstantViolation=function(e,t){var n=e.getBindingIdentifiers();for(var r in n){var l=this.getBinding(r);if(l){if(t){var i=t.typeAnnotation;if(i&&l.isCompatibleWithType(i))continue}l.reassign()}}},e.prototype.registerBinding=function(e,t){if(!e)throw new ReferenceError("no `kind`");var n=t.getBindingIdentifiers();for(var r in n){var l=n[r];this.checkBlockScopedCollisions(e,r,l),this.bindings[r]=new u({identifier:l,scope:this,path:t,kind:e})}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasGlobal=function(e){var t=this;do if(t.globals[e])return!0;while(t=t.parent);return!1},e.prototype.recrawl=function(){this.path.setData("scopeInfo",null),this.crawl()},e.prototype.crawl=function(){var e=this.path,t=this.block._scopeInfo;if(t)return d(this,t);if(t=this.block._scopeInfo={bindings:f(),globals:f(),uids:f()},d(this,t),e.isLoop()){for(var n=0;n<m.FOR_INIT_KEYS.length;n++){var r=e.get(m.FOR_INIT_KEYS[n]);r.isBlockScoped()&&this.registerBinding("let",r)}var l=e.get("body");l.isBlockStatement()&&(e=e.get("body"))}if(e.isFunctionExpression()&&e.has("id")&&(m.isProperty(e.parent,{method:!0})||this.registerBinding("var",e.get("id"))),e.isClass()&&e.has("id")&&this.registerBinding("var",e.get("id")),e.isFunction()){for(var i=e.get("params"),n=0;n<i.length;n++)this.registerBinding("param",i[n]);this.traverse(e.get("body").node,b,this)}(e.isBlockStatement()||e.isProgram())&&this.traverse(e.node,b,this),e.isCatchClause()&&this.registerBinding("let",e.get("param")),e.isComprehensionExpression()&&this.registerBinding("let",e),(e.isProgram()||e.isFunction())&&this.traverse(e.node,g,{blockId:e.get("id").node,scope:this}),e.isProgram()&&this.traverse(e.node,y,this)},e.prototype.push=function(e){var t=this.block;(m.isLoop(t)||m.isCatchClause(t)||m.isFunction(t))&&(m.ensureBlock(t),t=t.body),m.isBlockStatement(t)||m.isProgram(t)||(t=this.getBlockParent().block);var n=t;n._declarations||(n._declarations={}),t._declarations[e.key||e.id.name]={kind:e.kind||"var",id:e.id,init:e.init}},e.prototype.getFunctionParent=function(){for(var e=this;e.parent&&!m.isFunction(e.block);)e=e.parent;return e},e.prototype.getBlockParent=function(){for(var e=this;e.parent&&!m.isFunction(e.block)&&!m.isLoop(e.block)&&!m.isFunction(e.block);)e=e.parent;return e},e.prototype.getAllBindings=function(){var e=f(),t=this;do s(e,t.bindings),t=t.parent;while(t);return e},e.prototype.getAllBindingsOfKind=function(){for(var e=f(),t=0;t<arguments.length;t++){var n=arguments[t],r=this;do{for(var l in r.bindings){var i=r.bindings[l];i.kind===n&&(e[l]=i)}r=r.parent}while(r)}return e},e.prototype.bindingIdentifierEquals=function(e,t){return this.getBindingIdentifier(e)===t},e.prototype.getBinding=function(e){var t=this;do{var n=t.getOwnBindingInfo(e);if(n)return n}while(t=t.parent)},e.prototype.getOwnBindingInfo=function(e){return this.bindings[e]},e.prototype.getBindingIdentifier=function(e){var t=this.getBinding(e);return t&&t.identifier},e.prototype.getOwnBindingIdentifier=function(e){var t=this.bindings[e];return t&&t.identifier},e.prototype.hasOwnBinding=function(e){return!!this.getOwnBindingInfo(e)},e.prototype.hasBinding=function(t){return t?this.hasOwnBinding(t)?!0:this.parentHasBinding(t)?!0:this.uids[t]?!0:i(e.globals,t)?!0:i(e.contextVariables,t)?!0:!1:!1},e.prototype.parentHasBinding=function(e){return this.parent&&this.parent.hasBinding(e)},e.prototype.removeOwnBinding=function(e){this.bindings[e]=null},e.prototype.removeBinding=function(e){var t=this.getBinding(e);t&&t.scope.removeOwnBinding(e)},e}();t.exports=v},{"../helpers/object":41,"../messages":43,"../types":155,"./binding":144,"./index":146,globals:223,"lodash/array/flatten":232,"lodash/collection/each":237,"lodash/collection/includes":240,"lodash/object/defaults":324,"lodash/object/extend":325}],152:[function(e,t){t.exports={ExpressionStatement:["Statement"],BreakStatement:["Statement"],ContinueStatement:["Statement"],DebuggerStatement:["Statement"],DoWhileStatement:["Statement","Loop","While","Scopable"],IfStatement:["Statement"],ReturnStatement:["Statement"],SwitchStatement:["Statement"],ThrowStatement:["Statement"],TryStatement:["Statement"],WhileStatement:["Statement","Loop","While","Scopable"],WithStatement:["Statement"],EmptyStatement:["Statement"],LabeledStatement:["Statement"],VariableDeclaration:["Statement","Declaration"],ExportDefaultSpecifier:["ModuleSpecifier"],ExportNamespaceSpecifier:["ModuleSpecifier"],ExportDefaultFromSpecifier:["ModuleSpecifier"],ExportAllDeclaration:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],ExportDefaultDeclaration:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],ExportNamedDeclaration:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],ImportDeclaration:["Statement","Declaration","ModuleDeclaration"],ArrowFunctionExpression:["Scopable","Function","Expression"],FunctionDeclaration:["Scopable","Function","Statement","Declaration"],FunctionExpression:["Scopable","Function","Expression"],ImportSpecifier:["ModuleSpecifier"],ExportSpecifier:["ModuleSpecifier"],BlockStatement:["Scopable","Statement"],Program:["Scopable"],CatchClause:["Scopable"],LogicalExpression:["Binary","Expression"],BinaryExpression:["Binary","Expression"],UnaryExpression:["UnaryLike","Expression"],SpreadProperty:["UnaryLike"],SpreadElement:["UnaryLike"],ClassDeclaration:["Scopable","Class","Statement","Declaration"],ClassExpression:["Scopable","Class","Expression"],ForOfStatement:["Scopable","Statement","For","Loop"],ForInStatement:["Scopable","Statement","For","Loop"],ForStatement:["Scopable","Statement","For","Loop"],ObjectPattern:["Pattern"],ArrayPattern:["Pattern"],AssignmentPattern:["Pattern"],Property:["UserWhitespacable"],ArrayExpression:["Expression"],AssignmentExpression:["Expression"],AwaitExpression:["Expression"],CallExpression:["Expression"],ComprehensionExpression:["Expression","Scopable"],ConditionalExpression:["Expression"],DoExpression:["Expression"],Identifier:["Expression"],Literal:["Expression"],MemberExpression:["Expression"],MetaProperty:["Expression"],NewExpression:["Expression"],ObjectExpression:["Expression"],SequenceExpression:["Expression"],TaggedTemplateExpression:["Expression"],ThisExpression:["Expression"],Super:["Expression"],UpdateExpression:["Expression"],JSXEmptyExpression:["Expression"],JSXMemberExpression:["Expression"],YieldExpression:["Expression"],AnyTypeAnnotation:["Flow"],ArrayTypeAnnotation:["Flow"],BooleanTypeAnnotation:["Flow"],ClassImplements:["Flow"],DeclareClass:["Flow"],DeclareFunction:["Flow"],DeclareModule:["Flow"],DeclareVariable:["Flow"],FunctionTypeAnnotation:["Flow"],FunctionTypeParam:["Flow"],GenericTypeAnnotation:["Flow"],InterfaceExtends:["Flow"],InterfaceDeclaration:["Flow"],IntersectionTypeAnnotation:["Flow"],NullableTypeAnnotation:["Flow"],NumberTypeAnnotation:["Flow"],StringLiteralTypeAnnotation:["Flow"],StringTypeAnnotation:["Flow"],TupleTypeAnnotation:["Flow"],TypeofTypeAnnotation:["Flow"],TypeAlias:["Flow"],TypeAnnotation:["Flow"],TypeCastExpression:["Flow"],TypeParameterDeclaration:["Flow"],TypeParameterInstantiation:["Flow"],ObjectTypeAnnotation:["Flow"],ObjectTypeCallProperty:["Flow","UserWhitespacable"],ObjectTypeIndexer:["Flow","UserWhitespacable"],ObjectTypeProperty:["Flow","UserWhitespacable"],QualifiedTypeIdentifier:["Flow"],UnionTypeAnnotation:["Flow"],VoidTypeAnnotation:["Flow"],JSXAttribute:["JSX","Immutable"],JSXClosingElement:["JSX","Immutable"],JSXElement:["JSX","Immutable","Expression"],JSXEmptyExpression:["JSX","Immutable"],JSXExpressionContainer:["JSX","Immutable"],JSXIdentifier:["JSX"],JSXMemberExpression:["JSX"],JSXNamespacedName:["JSX"],JSXOpeningElement:["JSX","Immutable"],JSXSpreadAttribute:["JSX"]} },{}],153:[function(e,t){t.exports={ArrayExpression:{elements:null},ArrowFunctionExpression:{params:null,body:null},AssignmentExpression:{operator:null,left:null,right:null},BinaryExpression:{operator:null,left:null,right:null},BlockStatement:{body:null},CallExpression:{callee:null,arguments:null},ConditionalExpression:{test:null,consequent:null,alternate:null},ExpressionStatement:{expression:null},File:{program:null,comments:null,tokens:null},FunctionExpression:{id:null,params:null,body:null,generator:!1,async:!1},FunctionDeclaration:{id:null,params:null,body:null,generator:!1},GenericTypeAnnotation:{id:null,typeParameters:null},Identifier:{name:null},IfStatement:{test:null,consequent:null,alternate:null},ImportDeclaration:{specifiers:null,source:null},ImportSpecifier:{local:null,imported:null},LabeledStatement:{label:null,body:null},Literal:{value:null},LogicalExpression:{operator:null,left:null,right:null},MemberExpression:{object:null,property:null,computed:!1},MethodDefinition:{key:null,value:null,kind:"method",computed:!1,"static":!1},NewExpression:{callee:null,arguments:null},ObjectExpression:{properties:null},Program:{body:null},Property:{kind:null,key:null,value:null,computed:!1},ReturnStatement:{argument:null},SequenceExpression:{expressions:null},TemplateLiteral:{quasis:null,expressions:null},ThrowExpression:{argument:null},UnaryExpression:{operator:null,argument:null,prefix:null},VariableDeclaration:{kind:null,declarations:null},VariableDeclarator:{id:null,init:null},WithStatement:{object:null,body:null},YieldExpression:{argument:null,delegate:null}}},{}],154:[function(e,t,n){"use strict";function r(e){var t=void 0===arguments[1]?e.key||e.property:arguments[1];return function(){return e.computed||v.isIdentifier(t)&&(t=v.literal(t.name)),t}()}function l(e,t){function n(e){for(var t=!1,i=[],a=0;a<e.length;a++){var s=e[a];if(v.isExpression(s))i.push(s);else if(v.isExpressionStatement(s))i.push(s.expression);else{if(v.isVariableDeclaration(s)){if("var"!==s.kind)return l=!0;b(s.declarations,function(e){var t=v.getBindingIdentifiers(e);for(var n in t)r.push({kind:s.kind,id:t[n]});e.init&&i.push(v.assignmentExpression("=",e.id,e.init))}),t=!0;continue}if(v.isIfStatement(s)){var o=s.consequent?n([s.consequent]):v.identifier("undefined"),u=s.alternate?n([s.alternate]):v.identifier("undefined");if(!o||!u)return l=!0;i.push(v.conditionalExpression(s.test,o,u))}else{if(!v.isBlockStatement(s))return l=!0;i.push(n(s.body))}}t=!1}return t&&i.push(v.identifier("undefined")),1===i.length?i[0]:v.sequenceExpression(i)}var r=[],l=!1,i=n(e);if(!l){for(var a=0;a<r.length;a++)t.push(r[a]);return i}}function i(e){var t=void 0===arguments[1]?e.key:arguments[1];return function(){var n;return n=v.isIdentifier(t)?t.name:JSON.stringify(v.isLiteral(t)?t.value:y.removeProperties(v.cloneDeep(t))),e.computed&&(n="["+n+"]"),n}()}function a(e){return v.isIdentifier(e)?e.name:(e+="",e=e.replace(/[^a-zA-Z0-9$_]/g,"-"),e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""}),v.isValidIdentifier(e)||(e="_"+e),e||"_")}function s(e,t){if(v.isStatement(e))return e;var n,r=!1;if(v.isClass(e))r=!0,n="ClassDeclaration";else if(v.isFunction(e))r=!0,n="FunctionDeclaration";else if(v.isAssignmentExpression(e))return v.expressionStatement(e);if(r&&!e.id&&(n=!1),!n){if(t)return!1;throw new Error("cannot turn "+e.type+" to a statement")}return e.type=n,e}function o(e){if(v.isExpressionStatement(e)&&(e=e.expression),v.isClass(e)?e.type="ClassExpression":v.isFunction(e)&&(e.type="FunctionExpression"),v.isExpression(e))return e;throw new Error("cannot turn "+e.type+" to an expression")}function u(e,t){return v.isBlockStatement(e)?e:(v.isEmptyStatement(e)&&(e=[]),Array.isArray(e)||(v.isStatement(e)||(e=v.isFunction(t)?v.returnStatement(e):v.expressionStatement(e)),e=[e]),v.blockStatement(e))}function p(e){if(void 0===e)return v.identifier("undefined");if(e===!0||e===!1||null===e||g(e)||h(e)||m(e))return v.literal(e);if(Array.isArray(e))return v.arrayExpression(e.map(v.valueToNode));if(f(e)){var t=[];for(var n in e){var r;r=v.isValidIdentifier(n)?v.identifier(n):v.literal(n),t.push(v.property("init",r,v.valueToNode(e[n])))}return v.objectExpression(t)}throw new Error("don't know how to turn this value into a node")}var c=function(e){return e&&e.__esModule?e:{"default":e}},d=function(e){return e&&e.__esModule?e["default"]:e};n.toComputedKey=r,n.toSequenceExpression=l,n.toKeyAlias=i,n.toIdentifier=a,n.toStatement=s,n.toExpression=o,n.toBlock=u,n.valueToNode=p,n.__esModule=!0;var f=d(e("lodash/lang/isPlainObject")),h=d(e("lodash/lang/isNumber")),m=d(e("lodash/lang/isRegExp")),g=d(e("lodash/lang/isString")),y=d(e("../traversal")),b=d(e("lodash/collection/each")),v=c(e("./index"))},{"../traversal":146,"./index":155,"lodash/collection/each":237,"lodash/lang/isNumber":316,"lodash/lang/isPlainObject":318,"lodash/lang/isRegExp":319,"lodash/lang/isString":320}],155:[function(e,t,n){"use strict";function r(e,t){var n=_["is"+e]=function(n,r){return _.is(e,n,r,t)};_["assert"+e]=function(t,r){if(r||(r={}),!n(t,r))throw new Error("Expected type "+JSON.stringify(e)+" with option "+JSON.stringify(r))}}function l(e,t,n){if(!t)return!1;var r=i(t.type,e);return r?"undefined"==typeof n?!0:_.shallowEqual(t,n):!1}function i(e,t){if(e===t)return!0;var n=_.FLIPPED_ALIAS_KEYS[t];return n?n.indexOf(e)>-1:!1}function a(e,t){for(var n=Object.keys(t),r=0;r<n.length;r++){var l=n[r];if(e[l]!==t[l])return!1}return!0}function s(e,t,n){return e.object=_.memberExpression(e.object,e.property,e.computed),e.property=t,e.computed=!!n,e}function o(e,t){return e.object=_.memberExpression(t,e.object),e}function u(e){var t=void 0===arguments[1]?"body":arguments[1];return e[t]=_.toBlock(e[t],e)}function p(e){var t={};for(var n in e)"_"!==n[0]&&(t[n]=e[n]);return t}function c(e){var t={};for(var n in e)if("_"!==n[0]){var r=e[n];r&&(r.type?r=_.cloneDeep(r):Array.isArray(r)&&(r=r.map(_.cloneDeep))),t[n]=r}return t}function d(e,t){var n=e.split(".");return function(e){if(!_.isMemberExpression(e))return!1;for(var r=[e],l=0;r.length;){var i=r.shift();if(t&&l===n.length)return!0;if(_.isIdentifier(i)){if(n[l]!==i.name)return!1}else{if(!_.isLiteral(i)){if(_.isMemberExpression(i)){if(i.computed&&!_.isLiteral(i.property))return!1;r.push(i.object),r.push(i.property);continue}return!1}if(n[l]!==i.value)return!1}if(++l>n.length)return!1}return!0}}function f(e){return x(A,function(t){delete e[t]}),e}function h(e,t){return e&&t&&x(A,function(n){e[n]=E(b([].concat(e[n],t[n])))}),e}function m(e,t){return e&&t?(e._declarations=t._declarations,e._scopeInfo=t._scopeInfo,e.range=t.range,e.start=t.start,e.loc=t.loc,e.end=t.end,e.typeAnnotation=t.typeAnnotation,e.returnType=t.returnType,_.inheritsComments(e,t),e):e}var g=function(e){return e&&e.__esModule?e["default"]:e};n.is=l,n.isType=i,n.shallowEqual=a,n.appendToMemberExpression=s,n.prependToMemberExpression=o,n.ensureBlock=u,n.clone=p,n.cloneDeep=c,n.buildMatchMemberExpression=d,n.removeComments=f,n.inheritsComments=h,n.inherits=m,n.__esModule=!0;var y=g(e("to-fast-properties")),b=g(e("lodash/array/compact")),v=g(e("lodash/object/assign")),x=g(e("lodash/collection/each")),E=g(e("lodash/array/uniq")),_=n,S=["consequent","body","alternate"];n.STATEMENT_OR_BLOCK_KEYS=S;var I=["Array","Object","Number","Boolean","Date","Array","String","Promise","Set","Map","WeakMap","WeakSet","Uint16Array","ArrayBuffer","DataView","Int8Array","Uint8Array","Uint8ClampedArray","Uint32Array","Int32Array","Float32Array","Int16Array","Float64Array"];n.NATIVE_TYPE_NAMES=I;var w=["body","expressions"];n.FLATTENABLE_KEYS=w;var k=["left","init"];n.FOR_INIT_KEYS=k;var A=["leadingComments","trailingComments"];n.COMMENT_KEYS=A;var C=e("./visitor-keys");n.VISITOR_KEYS=C;var T=e("./builder-keys");n.BUILDER_KEYS=T;var M=e("./alias-keys");n.ALIAS_KEYS=M,_.FLIPPED_ALIAS_KEYS={},x(_.VISITOR_KEYS,function(e,t){r(t,!0)}),x(_.ALIAS_KEYS,function(e,t){x(e,function(e){var n,r,l=(n=_.FLIPPED_ALIAS_KEYS,r=e,!n[r]&&(n[r]=[]),n[r]);l.push(t)})}),x(_.FLIPPED_ALIAS_KEYS,function(e,t){_[t.toUpperCase()+"_TYPES"]=e,r(t,!1)});var j=Object.keys(_.VISITOR_KEYS).concat(Object.keys(_.FLIPPED_ALIAS_KEYS));n.TYPES=j,x(_.VISITOR_KEYS,function(e,t){if(!_.BUILDER_KEYS[t]){var n={};x(e,function(e){n[e]=null}),_.BUILDER_KEYS[t]=n}}),x(_.BUILDER_KEYS,function(e,t){_[t[0].toLowerCase()+t.slice(1)]=function(){var n={};n.start=null,n.type=t;var r=0;for(var l in e){var i=arguments[r++];void 0===i&&(i=e[l]),n[l]=i}return n}}),y(_),y(_.VISITOR_KEYS),n.__esModule=!0,v(_,e("./retrievers")),v(_,e("./validators")),v(_,e("./converters"))},{"./alias-keys":152,"./builder-keys":153,"./converters":154,"./retrievers":156,"./validators":157,"./visitor-keys":158,"lodash/array/compact":231,"lodash/array/uniq":235,"lodash/collection/each":237,"lodash/object/assign":323,"to-fast-properties":371}],156:[function(e,t,n){"use strict";function r(e){for(var t=[].concat(e),n=s();t.length;){var r=t.shift();if(r){var l=o.getBindingIdentifiers.keys[r.type];if(o.isIdentifier(r))n[r.name]=r;else if(o.isExportDeclaration(r))o.isDeclaration(e.declaration)&&t.push(e.declaration);else if(l)for(var i=0;i<l.length;i++){var a=l[i];t=t.concat(r[a]||[])}}}return n}function l(e){var t=[],n=function(e){t=t.concat(l(e))};return o.isIfStatement(e)?(n(e.consequent),n(e.alternate)):o.isFor(e)||o.isWhile(e)?n(e.body):o.isProgram(e)||o.isBlockStatement(e)?n(e.body[e.body.length-1]):o.isLoop()||e&&t.push(e),t}var i=function(e){return e&&e.__esModule?e:{"default":e}},a=function(e){return e&&e.__esModule?e["default"]:e};n.getBindingIdentifiers=r,n.getLastStatements=l,n.__esModule=!0;var s=a(e("../helpers/object")),o=i(e("./index"));r.keys={UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],VariableDeclarator:["id"],FunctionDeclaration:["id"],FunctionExpression:["id"],ClassDeclaration:["id"],ClassExpression:["id"],SpreadElement:["argument"],RestElement:["argument"],UpdateExpression:["argument"],SpreadProperty:["argument"],Property:["value"],ComprehensionBlock:["left"],AssignmentPattern:["left"],ComprehensionExpression:["blocks"],ImportDeclaration:["specifiers"],VariableDeclaration:["declarations"],ArrayPattern:["elements"],ObjectPattern:["properties"]}},{"../helpers/object":41,"./index":155}],157:[function(e,t,n){"use strict";function r(e,t){switch(t.type){case"MemberExpression":return t.property===e&&t.computed?!0:t.object===e?!0:!1;case"MetaProperty":return!1;case"Property":if(t.key===e)return t.computed;case"VariableDeclarator":return t.id!==e;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":for(var n=0;n<t.params.length;n++){var r=t.params[n];if(r===e)return!1}return t.id!==e;case"ExportSpecifier":return t.exported!==e;case"ImportSpecifier":return t.imported!==e;case"ClassDeclaration":case"ClassExpression":return t.id!==e;case"MethodDefinition":return t.key===e&&t.computed;case"LabeledStatement":return!1;case"CatchClause":return t.param!==e;case"RestElement":return!1;case"AssignmentPattern":return t.right===e;case"ObjectPattern":case"ArrayPattern":return!1;case"ImportSpecifier":return!1;case"ImportNamespaceSpecifier":return!1}return!0}function l(e,t,n){return g.isIdentifier(e,n)&&g.isReferenced(e,t)}function i(e){return h(e)&&m.keyword.isIdentifierName(e)&&!m.keyword.isReservedWordES6(e,!0)}function a(e){return g.isVariableDeclaration(e)&&("var"!==e.kind||e._let)}function s(e){return g.isFunctionDeclaration(e)||g.isClassDeclaration(e)||g.isLet(e)}function o(e){return g.isVariableDeclaration(e,{kind:"var"})&&!e._let}function u(e){return g.isImportDefaultSpecifier(e)||g.isExportDefaultSpecifier(e)||g.isIdentifier(e.imported||e.exported,{name:"default"})}function p(e,t){if(g.isBlockStatement(e)){if(g.isLoop(t,{body:e}))return!1;if(g.isFunction(t,{body:e}))return!1}return g.isScopable(e)}function c(e){return g.isType(e.type,"Immutable")?!0:g.isLiteral(e)?e.regex?!1:!0:g.isIdentifier(e)&&"undefined"===e.name?!0:!1}var d=function(e){return e&&e.__esModule?e:{"default":e}},f=function(e){return e&&e.__esModule?e["default"]:e};n.isReferenced=r,n.isReferencedIdentifier=l,n.isValidIdentifier=i,n.isLet=a,n.isBlockScoped=s,n.isVar=o,n.isSpecifierDefault=u,n.isScope=p,n.isImmutable=c,n.__esModule=!0;var h=f(e("lodash/lang/isString")),m=f(e("esutils")),g=d(e("./index"))},{"./index":155,esutils:221,"lodash/lang/isString":320}],158:[function(e,t){t.exports={ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation"],ArrowFunctionExpression:["params","body","returnType"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass","typeParameters","superTypeParameters","implements"],ClassExpression:["id","body","superClass","typeParameters","superTypeParameters","implements"],ComprehensionBlock:["left","right","body"],ComprehensionExpression:["filter","blocks","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],Decorator:["expression"],DebuggerStatement:[],DoWhileStatement:["body","test"],DoExpression:["body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation"],IfStatement:["test","consequent","alternate"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDeclaration:["specifiers","source"],ImportSpecifier:["imported","local"],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties","typeAnnotation"],Program:["body"],Property:["key","value"],RestElement:["argument","typeAnnotation"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SpreadProperty:["argument"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"],ExportAllDeclaration:["source","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportDefaultSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportSpecifier:["local","exported"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],ClassImplements:["id","typeParameters"],ClassProperty:["key","value","typeAnnotation"],DeclareClass:["id","typeParameters","extends","body"],DeclareFunction:["id"],DeclareModule:["id","body"],DeclareVariable:["id"],FunctionTypeAnnotation:["typeParameters","params","rest","returnType"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],IntersectionTypeAnnotation:["types"],NullableTypeAnnotation:["typeAnnotation"],NumberTypeAnnotation:[],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],TupleTypeAnnotation:["types"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],ObjectTypeAnnotation:["properties","indexers","callProperties"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value"],ObjectTypeProperty:["key","value"],QualifiedTypeIdentifier:["id","qualification"],UnionTypeAnnotation:["types"],VoidTypeAnnotation:[],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","closingElement","children"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXSpreadAttribute:["argument"]}},{}],159:[function(e,t,n){(function(t){"use strict";function r(e,t){var n=t||r.EXTENSIONS,l=k.extname(e);return x(n,l)}function l(t){try{return e.resolve(t)}catch(n){return null}}function i(e){return e?e.split(","):[]}function a(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(h).join("|"),"i")),_(e))return v.makeRe(e,{nocase:!0});if(S(e))return e;throw new TypeError("illegal type for regexify")}function s(e,t){if(!e)return[];if(y(e))return s([e],t);if(_(e))return s(i(e),t);if(Array.isArray(e))return t&&(e=e.map(t)),e;throw new TypeError("illegal type for arrayify")}function o(e){return"true"===e?!0:"false"===e?!1:e}function u(e,t,r){var l=n.templates[e];if(!l)throw new ReferenceError("unknown template "+e);if(t===!0&&(r=!0,t=null),l=g(l),I(t)||E(l,L,null,t),l.body.length>1)return l.body;var i=l.body[0];return!r&&M.isExpressionStatement(i)?i.expression:i}function p(e,t){var n=w({filename:e,looseModules:!0},t).program;return n=E.removeProperties(n)}function c(){var e={},n=k.join(t,"transformation/templates");if(!T.existsSync(n))throw new ReferenceError(b.get("missingTemplatesDirectory"));return A(T.readdirSync(n),function(t){if("."!==t[0]){var r=k.basename(t,k.extname(t)),l=k.join(n,t),i=T.readFileSync(l,"utf8");e[r]=p(l,i)}}),e}var d=function(e){return e&&e.__esModule?e:{"default":e}},f=function(e){return e&&e.__esModule?e["default"]:e};n.canCompile=r,n.resolve=l,n.list=i,n.regexify=a,n.arrayify=s,n.booleanify=o,n.template=u,n.parseTemplate=p,n.__esModule=!0,e("./patch");var h=f(e("lodash/string/escapeRegExp")),m=f(e("debug/node")),g=f(e("lodash/lang/cloneDeep")),y=f(e("lodash/lang/isBoolean")),b=d(e("./messages")),v=f(e("minimatch")),x=f(e("lodash/collection/contains")),E=f(e("./traversal")),_=f(e("lodash/lang/isString")),S=f(e("lodash/lang/isRegExp")),I=f(e("lodash/lang/isEmpty")),w=f(e("./helpers/parse")),k=f(e("path")),A=f(e("lodash/collection/each")),C=f(e("lodash/object/has")),T=f(e("fs")),M=d(e("./types")),j=e("util");n.inherits=j.inherits,n.inspect=j.inspect;var P=m("babel");n.debug=P,r.EXTENSIONS=[".js",".jsx",".es6",".es"];var L={enter:function(e,t,n,r){M.isExpressionStatement(e)&&(e=e.expression),M.isIdentifier(e)&&C(r,e.name)&&(this.skip(),this.replaceInline(r[e.name]))}};try{n.templates=e("../../templates.json")}catch(O){if("MODULE_NOT_FOUND"!==O.code)throw O;n.templates=c()}}).call(this,"/lib/babel")},{"../../templates.json":374,"./helpers/parse":42,"./messages":43,"./patch":44,"./traversal":146,"./types":155,"debug/node":214,fs:174,"lodash/collection/contains":236,"lodash/collection/each":237,"lodash/lang/cloneDeep":309,"lodash/lang/isBoolean":312,"lodash/lang/isEmpty":313,"lodash/lang/isRegExp":319,"lodash/lang/isString":320,"lodash/object/has":326,"lodash/string/escapeRegExp":331,minimatch:335,path:184,util:201}],160:[function(e){var t=e("../lib/types"),n=t.Type,r=n.def,l=n.or,i=t.builtInTypes,a=i.string,s=i.number,o=i.boolean,u=i.RegExp,p=e("../lib/shared"),c=p.defaults,d=p.geq;r("Printable").field("loc",l(r("SourceLocation"),null),c["null"],!0),r("Node").bases("Printable").field("type",a).field("comments",l([r("Comment")],null),c["null"],!0),r("SourceLocation").build("start","end","source").field("start",r("Position")).field("end",r("Position")).field("source",l(a,null),c["null"]),r("Position").build("line","column").field("line",d(1)).field("column",d(0)),r("Program").bases("Node").build("body").field("body",[r("Statement")]),r("Function").bases("Node").field("id",l(r("Identifier"),null),c["null"]).field("params",[r("Pattern")]).field("body",l(r("BlockStatement"),r("Expression"))),r("Statement").bases("Node"),r("EmptyStatement").bases("Statement").build(),r("BlockStatement").bases("Statement").build("body").field("body",[r("Statement")]),r("ExpressionStatement").bases("Statement").build("expression").field("expression",r("Expression")),r("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",r("Expression")).field("consequent",r("Statement")).field("alternate",l(r("Statement"),null),c["null"]),r("LabeledStatement").bases("Statement").build("label","body").field("label",r("Identifier")).field("body",r("Statement")),r("BreakStatement").bases("Statement").build("label").field("label",l(r("Identifier"),null),c["null"]),r("ContinueStatement").bases("Statement").build("label").field("label",l(r("Identifier"),null),c["null"]),r("WithStatement").bases("Statement").build("object","body").field("object",r("Expression")).field("body",r("Statement")),r("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",r("Expression")).field("cases",[r("SwitchCase")]).field("lexical",o,c["false"]),r("ReturnStatement").bases("Statement").build("argument").field("argument",l(r("Expression"),null)),r("ThrowStatement").bases("Statement").build("argument").field("argument",r("Expression")),r("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",r("BlockStatement")).field("handler",l(r("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[r("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[r("CatchClause")],c.emptyArray).field("finalizer",l(r("BlockStatement"),null),c["null"]),r("CatchClause").bases("Node").build("param","guard","body").field("param",r("Pattern")).field("guard",l(r("Expression"),null),c["null"]).field("body",r("BlockStatement")),r("WhileStatement").bases("Statement").build("test","body").field("test",r("Expression")).field("body",r("Statement")),r("DoWhileStatement").bases("Statement").build("body","test").field("body",r("Statement")).field("test",r("Expression")),r("ForStatement").bases("Statement").build("init","test","update","body").field("init",l(r("VariableDeclaration"),r("Expression"),null)).field("test",l(r("Expression"),null)).field("update",l(r("Expression"),null)).field("body",r("Statement")),r("ForInStatement").bases("Statement").build("left","right","body","each").field("left",l(r("VariableDeclaration"),r("Expression"))).field("right",r("Expression")).field("body",r("Statement")).field("each",o),r("DebuggerStatement").bases("Statement").build(),r("Declaration").bases("Statement"),r("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",r("Identifier")),r("FunctionExpression").bases("Function","Expression").build("id","params","body"),r("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",l("var","let","const")).field("declarations",[l(r("VariableDeclarator"),r("Identifier"))]),r("VariableDeclarator").bases("Node").build("id","init").field("id",r("Pattern")).field("init",l(r("Expression"),null)),r("Expression").bases("Node","Pattern"),r("ThisExpression").bases("Expression").build(),r("ArrayExpression").bases("Expression").build("elements").field("elements",[l(r("Expression"),null)]),r("ObjectExpression").bases("Expression").build("properties").field("properties",[r("Property")]),r("Property").bases("Node").build("kind","key","value").field("kind",l("init","get","set")).field("key",l(r("Literal"),r("Identifier"))).field("value",l(r("Expression"),r("Pattern"))),r("SequenceExpression").bases("Expression").build("expressions").field("expressions",[r("Expression")]);var f=l("-","+","!","~","typeof","void","delete");r("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",f).field("argument",r("Expression")).field("prefix",o,c["true"]);var h=l("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");r("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",r("Expression")).field("right",r("Expression"));var m=l("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");r("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",m).field("left",r("Pattern")).field("right",r("Expression"));var g=l("++","--");r("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",g).field("argument",r("Expression")).field("prefix",o);var y=l("||","&&");r("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",y).field("left",r("Expression")).field("right",r("Expression")),r("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",r("Expression")).field("consequent",r("Expression")).field("alternate",r("Expression")),r("NewExpression").bases("Expression").build("callee","arguments").field("callee",r("Expression")).field("arguments",[r("Expression")]),r("CallExpression").bases("Expression").build("callee","arguments").field("callee",r("Expression")).field("arguments",[r("Expression")]),r("MemberExpression").bases("Expression").build("object","property","computed").field("object",r("Expression")).field("property",l(r("Identifier"),r("Expression"))).field("computed",o),r("Pattern").bases("Node"),r("ObjectPattern").bases("Pattern").build("properties").field("properties",[l(r("PropertyPattern"),r("Property"))]),r("PropertyPattern").bases("Pattern").build("key","pattern").field("key",l(r("Literal"),r("Identifier"))).field("pattern",r("Pattern")),r("ArrayPattern").bases("Pattern").build("elements").field("elements",[l(r("Pattern"),null)]),r("SwitchCase").bases("Node").build("test","consequent").field("test",l(r("Expression"),null)).field("consequent",[r("Statement")]),r("Identifier").bases("Node","Expression","Pattern").build("name").field("name",a),r("Literal").bases("Node","Expression").build("value").field("value",l(a,o,null,s,u)),r("Comment").bases("Printable").field("value",a).field("leading",o,c["true"]).field("trailing",o,c["false"]),r("Block").bases("Comment").build("value","leading","trailing"),r("Line").bases("Comment").build("value","leading","trailing")},{"../lib/shared":171,"../lib/types":172}],161:[function(e){e("./core");var t=e("../lib/types"),n=t.Type.def,r=t.Type.or,l=t.builtInTypes,i=l.string,a=l.boolean;n("XMLDefaultDeclaration").bases("Declaration").field("namespace",n("Expression")),n("XMLAnyName").bases("Expression"),n("XMLQualifiedIdentifier").bases("Expression").field("left",r(n("Identifier"),n("XMLAnyName"))).field("right",r(n("Identifier"),n("Expression"))).field("computed",a),n("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",r(n("Identifier"),n("Expression"))).field("computed",a),n("XMLAttributeSelector").bases("Expression").field("attribute",n("Expression")),n("XMLFilterExpression").bases("Expression").field("left",n("Expression")).field("right",n("Expression")),n("XMLElement").bases("XML","Expression").field("contents",[n("XML")]),n("XMLList").bases("XML","Expression").field("contents",[n("XML")]),n("XML").bases("Node"),n("XMLEscape").bases("XML").field("expression",n("Expression")),n("XMLText").bases("XML").field("text",i),n("XMLStartTag").bases("XML").field("contents",[n("XML")]),n("XMLEndTag").bases("XML").field("contents",[n("XML")]),n("XMLPointTag").bases("XML").field("contents",[n("XML")]),n("XMLName").bases("XML").field("contents",r(i,[n("XML")])),n("XMLAttribute").bases("XML").field("value",i),n("XMLCdata").bases("XML").field("contents",i),n("XMLComment").bases("XML").field("contents",i),n("XMLProcessingInstruction").bases("XML").field("target",i).field("contents",r(i,null))},{"../lib/types":172,"./core":160}],162:[function(e){e("./core");var t=e("../lib/types"),n=t.Type.def,r=t.Type.or,l=t.builtInTypes,i=l.boolean,a=(l.object,l.string),s=e("../lib/shared").defaults;n("Function").field("generator",i,s["false"]).field("expression",i,s["false"]).field("defaults",[r(n("Expression"),null)],s.emptyArray).field("rest",r(n("Identifier"),null),s["null"]),n("FunctionDeclaration").build("id","params","body","generator","expression"),n("FunctionExpression").build("id","params","body","generator","expression"),n("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,s["null"]).field("generator",!1,s["false"]),n("YieldExpression").bases("Expression").build("argument","delegate").field("argument",r(n("Expression"),null)).field("delegate",i,s["false"]),n("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",r(n("Expression"),null)),n("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",r(n("Expression"),null)),n("ComprehensionBlock").bases("Node").build("left","right","each").field("left",n("Pattern")).field("right",n("Expression")).field("each",i),n("ModuleSpecifier").bases("Literal").build("value").field("value",a),n("Property").field("key",r(n("Literal"),n("Identifier"),n("Expression"))).field("method",i,s["false"]).field("shorthand",i,s["false"]).field("computed",i,s["false"]),n("PropertyPattern").field("key",r(n("Literal"),n("Identifier"),n("Expression"))).field("computed",i,s["false"]),n("MethodDefinition").bases("Declaration").build("kind","key","value").field("kind",r("init","get","set","")).field("key",r(n("Literal"),n("Identifier"),n("Expression"))).field("value",n("Function")).field("computed",i,s["false"]),n("SpreadElement").bases("Node").build("argument").field("argument",n("Expression")),n("ArrayExpression").field("elements",[r(n("Expression"),n("SpreadElement"),null)]),n("NewExpression").field("arguments",[r(n("Expression"),n("SpreadElement"))]),n("CallExpression").field("arguments",[r(n("Expression"),n("SpreadElement"))]),n("SpreadElementPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("ArrayPattern").field("elements",[r(n("Pattern"),null,n("SpreadElement"))]);var o=r(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"));n("ClassProperty").bases("Declaration").build("key").field("key",r(n("Literal"),n("Identifier"),n("Expression"))).field("computed",i,s["false"]),n("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",o),n("ClassBody").bases("Declaration").build("body").field("body",[o]),n("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",n("Identifier")).field("body",n("ClassBody")).field("superClass",r(n("Expression"),null),s["null"]),n("ClassExpression").bases("Expression").build("id","body","superClass").field("id",r(n("Identifier"),null),s["null"]).field("body",n("ClassBody")).field("superClass",r(n("Expression"),null),s["null"]).field("implements",[n("ClassImplements")],s.emptyArray),n("ClassImplements").bases("Node").build("id").field("id",n("Identifier")).field("superClass",r(n("Expression"),null),s["null"]),n("Specifier").bases("Node"),n("NamedSpecifier").bases("Specifier").field("id",n("Identifier")).field("name",r(n("Identifier"),null),s["null"]),n("ExportSpecifier").bases("NamedSpecifier").build("id","name"),n("ExportBatchSpecifier").bases("Specifier").build(),n("ImportSpecifier").bases("NamedSpecifier").build("id","name"),n("ImportNamespaceSpecifier").bases("Specifier").build("id").field("id",n("Identifier")),n("ImportDefaultSpecifier").bases("Specifier").build("id").field("id",n("Identifier")),n("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",i).field("declaration",r(n("Declaration"),n("Expression"),null)).field("specifiers",[r(n("ExportSpecifier"),n("ExportBatchSpecifier"))],s.emptyArray).field("source",r(n("ModuleSpecifier"),null),s["null"]),n("ImportDeclaration").bases("Declaration").build("specifiers","source").field("specifiers",[r(n("ImportSpecifier"),n("ImportNamespaceSpecifier"),n("ImportDefaultSpecifier"))],s.emptyArray).field("source",n("ModuleSpecifier")),n("TaggedTemplateExpression").bases("Expression").field("tag",n("Expression")).field("quasi",n("TemplateLiteral")),n("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[n("TemplateElement")]).field("expressions",[n("Expression")]),n("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:a,raw:a}).field("tail",i) },{"../lib/shared":171,"../lib/types":172,"./core":160}],163:[function(e){e("./core");var t=e("../lib/types"),n=t.Type.def,r=t.Type.or,l=t.builtInTypes,i=l.boolean,a=e("../lib/shared").defaults;n("Function").field("async",i,a["false"]),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ObjectExpression").field("properties",[r(n("Property"),n("SpreadProperty"))]),n("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("ObjectPattern").field("properties",[r(n("PropertyPattern"),n("SpreadPropertyPattern"),n("Property"),n("SpreadProperty"))]),n("AwaitExpression").bases("Expression").build("argument","all").field("argument",r(n("Expression"),null)).field("all",i,a["false"])},{"../lib/shared":171,"../lib/types":172,"./core":160}],164:[function(e){e("./core");var t=e("../lib/types"),n=t.Type.def,r=t.Type.or,l=t.builtInTypes,i=l.string,a=l.boolean,s=e("../lib/shared").defaults;n("JSXAttribute").bases("Node").build("name","value").field("name",r(n("JSXIdentifier"),n("JSXNamespacedName"))).field("value",r(n("Literal"),n("JSXExpressionContainer"),null),s["null"]),n("JSXIdentifier").bases("Node").build("name").field("name",i),n("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",n("JSXIdentifier")).field("name",n("JSXIdentifier")),n("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",r(n("JSXIdentifier"),n("JSXMemberExpression"))).field("property",n("JSXIdentifier")).field("computed",a,s.false);var o=r(n("JSXIdentifier"),n("JSXNamespacedName"),n("JSXMemberExpression"));n("JSXSpreadAttribute").bases("Node").build("argument").field("argument",n("Expression"));var u=[r(n("JSXAttribute"),n("JSXSpreadAttribute"))];n("JSXExpressionContainer").bases("Expression").build("expression").field("expression",n("Expression")),n("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",n("JSXOpeningElement")).field("closingElement",r(n("JSXClosingElement"),null),s["null"]).field("children",[r(n("JSXElement"),n("JSXExpressionContainer"),n("JSXText"),n("Literal"))],s.emptyArray).field("name",o,function(){return this.openingElement.name}).field("selfClosing",a,function(){return this.openingElement.selfClosing}).field("attributes",u,function(){return this.openingElement.attributes}),n("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",o).field("attributes",u,s.emptyArray).field("selfClosing",a,s["false"]),n("JSXClosingElement").bases("Node").build("name").field("name",o),n("JSXText").bases("Literal").build("value").field("value",i),n("JSXEmptyExpression").bases("Expression").build(),n("Type").bases("Node"),n("AnyTypeAnnotation").bases("Type"),n("VoidTypeAnnotation").bases("Type"),n("NumberTypeAnnotation").bases("Type"),n("StringTypeAnnotation").bases("Type"),n("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",i).field("raw",i),n("BooleanTypeAnnotation").bases("Type"),n("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",n("Type")),n("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[n("FunctionTypeParam")]).field("returnType",n("Type")).field("rest",r(n("FunctionTypeParam"),null)).field("typeParameters",r(n("TypeParameterDeclaration"),null)),n("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",n("Identifier")).field("typeAnnotation",n("Type")).field("optional",a),n("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",n("Type")),n("ObjectTypeAnnotation").bases("Type").build("properties").field("properties",[n("ObjectTypeProperty")]).field("indexers",[n("ObjectTypeIndexer")],s.emptyArray).field("callProperties",[n("ObjectTypeCallProperty")],s.emptyArray),n("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",r(n("Literal"),n("Identifier"))).field("value",n("Type")).field("optional",a),n("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",n("Identifier")).field("key",n("Type")).field("value",n("Type")),n("ObjectTypeCallProperty").bases("Node").build("value").field("value",n("FunctionTypeAnnotation")).field("static",a,!1),n("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",r(n("Identifier"),n("QualifiedTypeIdentifier"))).field("id",n("Identifier")),n("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",r(n("Identifier"),n("QualifiedTypeIdentifier"))).field("typeParameters",r(n("TypeParameterInstantiation"),null)),n("MemberTypeAnnotation").bases("Type").build("object","property").field("object",n("Identifier")).field("property",r(n("MemberTypeAnnotation"),n("GenericTypeAnnotation"))),n("UnionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",n("Type")),n("Identifier").field("typeAnnotation",r(n("TypeAnnotation"),null),s["null"]),n("TypeParameterDeclaration").bases("Node").build("params").field("params",[n("Identifier")]),n("TypeParameterInstantiation").bases("Node").build("params").field("params",[n("Type")]),n("Function").field("returnType",r(n("TypeAnnotation"),null),s["null"]).field("typeParameters",r(n("TypeParameterDeclaration"),null),s["null"]),n("ClassProperty").build("key","typeAnnotation").field("typeAnnotation",n("TypeAnnotation")).field("static",a,!1),n("ClassImplements").field("typeParameters",r(n("TypeParameterInstantiation"),null),s["null"]),n("InterfaceDeclaration").bases("Statement").build("id","body","extends").field("id",n("Identifier")).field("typeParameters",r(n("TypeParameterDeclaration"),null),s["null"]).field("body",n("ObjectTypeAnnotation")).field("extends",[n("InterfaceExtends")]),n("InterfaceExtends").bases("Node").build("id").field("id",n("Identifier")).field("typeParameters",r(n("TypeParameterInstantiation"),null)),n("TypeAlias").bases("Statement").build("id","typeParameters","right").field("id",n("Identifier")).field("typeParameters",r(n("TypeParameterDeclaration"),null)).field("right",n("Type")),n("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TypeAnnotation")),n("TupleTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("DeclareVariable").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareFunction").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareClass").bases("InterfaceDeclaration").build("id"),n("DeclareModule").bases("Statement").build("id","body").field("id",r(n("Identifier"),n("Literal"))).field("body",n("BlockStatement"))},{"../lib/shared":171,"../lib/types":172,"./core":160}],165:[function(e){e("./core");var t=e("../lib/types"),n=t.Type.def,r=t.Type.or,l=e("../lib/shared").geq;n("ForOfStatement").bases("Statement").build("left","right","body").field("left",r(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("LetStatement").bases("Statement").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Statement")),n("LetExpression").bases("Expression").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Expression")),n("GraphExpression").bases("Expression").build("index","expression").field("index",l(0)).field("expression",n("Literal")),n("GraphIndexExpression").bases("Expression").build("index").field("index",l(0))},{"../lib/shared":171,"../lib/types":172,"./core":160}],166:[function(e,t){function n(e,t,n){return c.check(n)?n.length=0:n=null,l(e,t,n)}function r(e){return/[_$a-z][_$a-z0-9]*/i.test(e)?"."+e:"["+JSON.stringify(e)+"]"}function l(e,t,n){return e===t?!0:c.check(e)?i(e,t,n):d.check(e)?a(e,t,n):f.check(e)?f.check(t)&&+e===+t:h.check(e)?h.check(t)&&e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.ignoreCase===t.ignoreCase:e==t}function i(e,t,n){c.assert(e);var r=e.length;if(!c.check(t)||t.length!==r)return n&&n.push("length"),!1;for(var i=0;r>i;++i){if(n&&n.push(i),i in e!=i in t)return!1;if(!l(e[i],t[i],n))return!1;n&&s.strictEqual(n.pop(),i)}return!0}function a(e,t,n){if(d.assert(e),!d.check(t))return!1;if(e.type!==t.type)return n&&n.push("type"),!1;var r=u(e),i=r.length,a=u(t),o=a.length;if(i===o){for(var c=0;i>c;++c){var f=r[c],h=p(e,f),g=p(t,f);if(n&&n.push(f),!l(h,g,n))return!1;n&&s.strictEqual(n.pop(),f)}return!0}if(!n)return!1;var y=Object.create(null);for(c=0;i>c;++c)y[r[c]]=!0;for(c=0;o>c;++c){if(f=a[c],!m.call(y,f))return n.push(f),!1;delete y[f]}for(f in y){n.push(f);break}return!1}var s=e("assert"),o=e("../main"),u=o.getFieldNames,p=o.getFieldValue,c=o.builtInTypes.array,d=o.builtInTypes.object,f=o.builtInTypes.Date,h=o.builtInTypes.RegExp,m=Object.prototype.hasOwnProperty;n.assert=function(e,t){var l=[];n(e,t,l)||(0===l.length?s.strictEqual(e,t):s.ok(!1,"Nodes differ in the following path: "+l.map(r).join("")))},t.exports=n},{"../main":173,assert:175}],167:[function(e,t){function n(e,t,r){o.ok(this instanceof n),h.call(this,e,t,r)}function r(e){return p.BinaryExpression.check(e)||p.LogicalExpression.check(e)}function l(e){return p.CallExpression.check(e)?!0:f.check(e)?e.some(l):p.Node.check(e)?u.someField(e,function(e,t){return l(t)}):!1}function i(e){for(var t,n;e.parent;e=e.parent){if(t=e.node,n=e.parent.node,p.BlockStatement.check(n)&&"body"===e.parent.name&&0===e.name)return o.strictEqual(n.body[0],t),!0;if(p.ExpressionStatement.check(n)&&"expression"===e.name)return o.strictEqual(n.expression,t),!0;if(p.SequenceExpression.check(n)&&"expressions"===e.parent.name&&0===e.name)o.strictEqual(n.expressions[0],t);else if(p.CallExpression.check(n)&&"callee"===e.name)o.strictEqual(n.callee,t);else if(p.MemberExpression.check(n)&&"object"===e.name)o.strictEqual(n.object,t);else if(p.ConditionalExpression.check(n)&&"test"===e.name)o.strictEqual(n.test,t);else if(r(n)&&"left"===e.name)o.strictEqual(n.left,t);else{if(!p.UnaryExpression.check(n)||n.prefix||"argument"!==e.name)return!1;o.strictEqual(n.argument,t)}}return!0}function a(e){if(p.VariableDeclaration.check(e.node)){var t=e.get("declarations").value;if(!t||0===t.length)return e.prune()}else if(p.ExpressionStatement.check(e.node)){if(!e.get("expression").value)return e.prune()}else p.IfStatement.check(e.node)&&s(e);return e}function s(e){var t=e.get("test").value,n=e.get("alternate").value,r=e.get("consequent").value;if(r||n){if(!r&&n){var l=c.unaryExpression("!",t,!0);p.UnaryExpression.check(t)&&"!"===t.operator&&(l=t.argument),e.get("test").replace(l),e.get("consequent").replace(n),e.get("alternate").replace()}}else{var i=c.expressionStatement(t);e.replace(i)}}var o=e("assert"),u=e("./types"),p=u.namedTypes,c=u.builders,d=u.builtInTypes.number,f=u.builtInTypes.array,h=e("./path"),m=e("./scope");e("util").inherits(n,h);var g=n.prototype;Object.defineProperties(g,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),g.replace=function(){return delete this.node,delete this.parent,delete this.scope,h.prototype.replace.apply(this,arguments)},g.prune=function(){var e=this.parent;return this.replace(),a(e)},g._computeNode=function(){var e=this.value;if(p.Node.check(e))return e;var t=this.parentPath;return t&&t.node||null},g._computeParent=function(){var e=this.value,t=this.parentPath;if(!p.Node.check(e)){for(;t&&!p.Node.check(t.value);)t=t.parentPath;t&&(t=t.parentPath)}for(;t&&!p.Node.check(t.value);)t=t.parentPath;return t||null},g._computeScope=function(){var e=this.value,t=this.parentPath,n=t&&t.scope;return p.Node.check(e)&&m.isEstablishedBy(e)&&(n=new m(this,n)),n||null},g.getValueProperty=function(e){return u.getFieldValue(this.value,e)},g.needsParens=function(e){var t=this.parentPath;if(!t)return!1;var n=this.value;if(!p.Expression.check(n))return!1;if("Identifier"===n.type)return!1;for(;!p.Node.check(t.value);)if(t=t.parentPath,!t)return!1;var r=t.value;switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===r.type&&"object"===this.name&&r.object===n;case"BinaryExpression":case"LogicalExpression":switch(r.type){case"CallExpression":return"callee"===this.name&&r.callee===n;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===this.name&&r.object===n;case"BinaryExpression":case"LogicalExpression":var i=r.operator,t=y[i],a=n.operator,s=y[a];if(t>s)return!0;if(t===s&&"right"===this.name)return o.strictEqual(r.right,n),!0;default:return!1}case"SequenceExpression":switch(r.type){case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==this.name;default:return!0}case"YieldExpression":switch(r.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return"MemberExpression"===r.type&&d.check(n.value)&&"object"===this.name&&r.object===n;case"AssignmentExpression":case"ConditionalExpression":switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===this.name&&r.callee===n;case"ConditionalExpression":return"test"===this.name&&r.test===n;case"MemberExpression":return"object"===this.name&&r.object===n;default:return!1}default:if("NewExpression"===r.type&&"callee"===this.name&&r.callee===n)return l(n)}return e!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement()?!0:!1};var y={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,t){e.forEach(function(e){y[e]=t})}),g.canBeFirstInStatement=function(){var e=this.node;return!p.FunctionExpression.check(e)&&!p.ObjectExpression.check(e)},g.firstInStatement=function(){return i(this)},t.exports=n},{"./path":169,"./scope":170,"./types":172,assert:175,util:201}],168:[function(e,t){function n(){o.ok(this instanceof n),this._reusableContextStack=[],this._methodNameTable=r(this),this._shouldVisitComments=m.call(this._methodNameTable,"Block")||m.call(this._methodNameTable,"Line"),this.Context=a(this),this._visiting=!1,this._changeReported=!1}function r(e){var t=Object.create(null);for(var n in e)/^visit[A-Z]/.test(n)&&(t[n.slice("visit".length)]=!0);for(var r=u.computeSupertypeLookupTable(t),l=Object.create(null),t=Object.keys(r),i=t.length,a=0;i>a;++a){var s=t[a];n="visit"+r[s],h.check(e[n])&&(l[s]=n)}return l}function l(e,t){for(var n in t)m.call(t,n)&&(e[n]=t[n]);return e}function i(e,t){o.ok(e instanceof p),o.ok(t instanceof n);var r=e.value;if(d.check(r))e.each(t.visitWithoutReset,t);else if(f.check(r)){var l=u.getFieldNames(r);t._shouldVisitComments&&r.comments&&l.indexOf("comments")<0&&l.push("comments");for(var i=l.length,a=[],s=0;i>s;++s){var c=l[s];m.call(r,c)||(r[c]=u.getFieldValue(r,c)),a.push(e.get(c))}for(var s=0;i>s;++s)t.visitWithoutReset(a[s])}else;return e.value}function a(e){function t(r){o.ok(this instanceof t),o.ok(this instanceof n),o.ok(r instanceof p),Object.defineProperty(this,"visitor",{value:e,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=r,this.needToCallTraverse=!0,Object.seal(this)}o.ok(e instanceof n);var r=t.prototype=Object.create(e);return r.constructor=t,l(r,b),t}var s,o=e("assert"),u=e("./types"),p=e("./node-path"),c=u.namedTypes.Printable,d=u.builtInTypes.array,f=u.builtInTypes.object,h=u.builtInTypes.function,m=Object.prototype.hasOwnProperty;n.fromMethodsObject=function(e){function t(){o.ok(this instanceof t),n.call(this)}if(e instanceof n)return e;if(!f.check(e))return new n;var r=t.prototype=Object.create(g);return r.constructor=t,l(r,e),l(t,n),h.assert(t.fromMethodsObject),h.assert(t.visit),new t},n.visit=function(e,t){return n.fromMethodsObject(t).visit(e)};var g=n.prototype,y=["Recursively calling visitor.visit(path) resets visitor state.","Try this.visit(path) or this.traverse(path) instead."].join(" ");g.visit=function(){o.ok(!this._visiting,y),this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var e=arguments.length,t=new Array(e),n=0;e>n;++n)t[n]=arguments[n];t[0]instanceof p||(t[0]=new p({root:t[0]}).get("root")),this.reset.apply(this,t);try{var r=this.visitWithoutReset(t[0]),l=!0}finally{if(this._visiting=!1,!l&&this._abortRequested)return t[0].value}return r},g.AbortRequest=function(){},g.abort=function(){var e=this;e._abortRequested=!0;var t=new e.AbortRequest;throw t.cancel=function(){e._abortRequested=!1},t},g.reset=function(){},g.visitWithoutReset=function(e){if(this instanceof this.Context)return this.visitor.visitWithoutReset(e);o.ok(e instanceof p);var t=e.value,n=c.check(t)&&this._methodNameTable[t.type];if(!n)return i(e,this);var r=this.acquireContext(e);try{return r.invokeVisitorMethod(n)}finally{this.releaseContext(r)}},g.acquireContext=function(e){return 0===this._reusableContextStack.length?new this.Context(e):this._reusableContextStack.pop().reset(e)},g.releaseContext=function(e){o.ok(e instanceof this.Context),this._reusableContextStack.push(e),e.currentPath=null},g.reportChanged=function(){this._changeReported=!0},g.wasChangeReported=function(){return this._changeReported};var b=Object.create(null);b.reset=function(e){return o.ok(this instanceof this.Context),o.ok(e instanceof p),this.currentPath=e,this.needToCallTraverse=!0,this},b.invokeVisitorMethod=function(e){o.ok(this instanceof this.Context),o.ok(this.currentPath instanceof p);var t=this.visitor[e].call(this,this.currentPath);t===!1?this.needToCallTraverse=!1:t!==s&&(this.currentPath=this.currentPath.replace(t)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),o.strictEqual(this.needToCallTraverse,!1,"Must either call this.traverse or return false in "+e);var n=this.currentPath;return n&&n.value},b.traverse=function(e,t){return o.ok(this instanceof this.Context),o.ok(e instanceof p),o.ok(this.currentPath instanceof p),this.needToCallTraverse=!1,i(e,n.fromMethodsObject(t||this.visitor))},b.visit=function(e,t){return o.ok(this instanceof this.Context),o.ok(e instanceof p),o.ok(this.currentPath instanceof p),this.needToCallTraverse=!1,n.fromMethodsObject(t||this.visitor).visitWithoutReset(e)},b.reportChanged=function(){this.visitor.reportChanged()},b.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},t.exports=n},{"./node-path":167,"./types":172,assert:175}],169:[function(e,t){function n(e,t,r){o.ok(this instanceof n),t?o.ok(t instanceof n):(t=null,r=null),this.value=e,this.parentPath=t,this.name=r,this.__childCache=null}function r(e){return e.__childCache||(e.__childCache=Object.create(null))}function l(e,t){var n=r(e),l=e.getValueProperty(t),i=n[t];return p.call(n,t)&&i.value===l||(i=n[t]=new e.constructor(l,e,t)),i}function i(){}function a(e,t,n,l){if(d.assert(e.value),0===t)return i;var a=e.value.length;if(1>a)return i;var s=arguments.length;2===s?(n=0,l=a):3===s?(n=Math.max(n,0),l=a):(n=Math.max(n,0),l=Math.min(l,a)),f.assert(n),f.assert(l);for(var u=Object.create(null),c=r(e),h=n;l>h;++h)if(p.call(e.value,h)){var m=e.get(h);o.strictEqual(m.name,h);var g=h+t;m.name=g,u[g]=m,delete c[h]}return delete c.length,function(){for(var t in u){var n=u[t];o.strictEqual(n.name,+t),c[t]=n,e.value[t]=n.value}}}function s(e){o.ok(e instanceof n);var t=e.parentPath;if(!t)return e;var l=t.value,i=r(t);if(l[e.name]===e.value)i[e.name]=e;else if(d.check(l)){var a=l.indexOf(e.value);a>=0&&(i[e.name=a]=e)}else l[e.name]=e.value,i[e.name]=e;return o.strictEqual(l[e.name],e.value),o.strictEqual(e.parentPath.get(e.name),e),e}var o=e("assert"),u=Object.prototype,p=u.hasOwnProperty,c=e("./types"),d=c.builtInTypes.array,f=c.builtInTypes.number,h=Array.prototype,m=(h.slice,h.map,n.prototype);m.getValueProperty=function(e){return this.value[e]},m.get=function(){for(var e=this,t=arguments,n=t.length,r=0;n>r;++r)e=l(e,t[r]);return e},m.each=function(e,t){for(var n=[],r=this.value.length,l=0,l=0;r>l;++l)p.call(this.value,l)&&(n[l]=this.get(l));for(t=t||this,l=0;r>l;++l)p.call(n,l)&&e.call(t,n[l])},m.map=function(e,t){var n=[];return this.each(function(t){n.push(e.call(this,t))},t),n},m.filter=function(e,t){var n=[];return this.each(function(t){e.call(this,t)&&n.push(t)},t),n},m.shift=function(){var e=a(this,-1),t=this.value.shift();return e(),t},m.unshift=function(){var e=a(this,arguments.length),t=this.value.unshift.apply(this.value,arguments);return e(),t},m.push=function(){return d.assert(this.value),delete r(this).length,this.value.push.apply(this.value,arguments)},m.pop=function(){d.assert(this.value);var e=r(this);return delete e[this.value.length-1],delete e.length,this.value.pop()},m.insertAt=function(e){var t=arguments.length,n=a(this,t-1,e);if(n===i)return this;e=Math.max(e,0);for(var r=1;t>r;++r)this.value[e+r-1]=arguments[r];return n(),this},m.insertBefore=function(){for(var e=this.parentPath,t=arguments.length,n=[this.name],r=0;t>r;++r)n.push(arguments[r]);return e.insertAt.apply(e,n)},m.insertAfter=function(){for(var e=this.parentPath,t=arguments.length,n=[this.name+1],r=0;t>r;++r)n.push(arguments[r]);return e.insertAt.apply(e,n)},m.replace=function(e){var t=[],n=this.parentPath.value,l=r(this.parentPath),i=arguments.length;if(s(this),d.check(n)){for(var u=n.length,p=a(this.parentPath,i-1,this.name+1),c=[this.name,1],f=0;i>f;++f)c.push(arguments[f]);var h=n.splice.apply(n,c);if(o.strictEqual(h[0],this.value),o.strictEqual(n.length,u-1+i),p(),0===i)delete this.value,delete l[this.name],this.__childCache=null;else{for(o.strictEqual(n[this.name],e),this.value!==e&&(this.value=e,this.__childCache=null),f=0;i>f;++f)t.push(this.parentPath.get(this.name+f));o.strictEqual(t[0],this)}}else 1===i?(this.value!==e&&(this.__childCache=null),this.value=n[this.name]=e,t.push(this)):0===i?(delete n[this.name],delete this.value,this.__childCache=null):o.ok(!1,"Could not replace path");return t},t.exports=n},{"./types":172,assert:175}],170:[function(e,t){function n(t,r){s.ok(this instanceof n),s.ok(t instanceof e("./node-path")),y.assert(t.value);var l;r?(s.ok(r instanceof n),l=r.depth+1):(r=null,l=0),Object.defineProperties(this,{path:{value:t},node:{value:t.value},isGlobal:{value:!r,enumerable:!0},depth:{value:l},parent:{value:r},bindings:{value:{}}})}function r(e,t){var n=e.value;y.assert(n),p.CatchClause.check(n)?a(e.get("param"),t):l(e,t)}function l(e,t){var n=e.value;e.parent&&p.FunctionExpression.check(e.parent.node)&&e.parent.node.id&&a(e.parent.get("id"),t),n&&(f.check(n)?e.each(function(e){i(e,t)}):p.Function.check(n)?(e.get("params").each(function(e){a(e,t)}),i(e.get("body"),t)):p.VariableDeclarator.check(n)?(a(e.get("id"),t),i(e.get("init"),t)):"ImportSpecifier"===n.type||"ImportNamespaceSpecifier"===n.type||"ImportDefaultSpecifier"===n.type?a(e.get(n.name?"name":"id"),t):c.check(n)&&!d.check(n)&&o.eachField(n,function(n,r){var l=e.get(n);s.strictEqual(l.value,r),i(l,t)}))}function i(e,t){var n=e.value;if(!n||d.check(n));else if(p.FunctionDeclaration.check(n))a(e.get("id"),t);else if(p.ClassDeclaration&&p.ClassDeclaration.check(n))a(e.get("id"),t);else if(y.check(n)){if(p.CatchClause.check(n)){var r=n.param.name,i=h.call(t,r);l(e.get("body"),t),i||delete t[r]}}else l(e,t)}function a(e,t){var n=e.value;p.Pattern.assert(n),p.Identifier.check(n)?h.call(t,n.name)?t[n.name].push(e):t[n.name]=[e]:p.ObjectPattern&&p.ObjectPattern.check(n)?e.get("properties").each(function(e){var n=e.value;p.Pattern.check(n)?a(e,t):p.Property.check(n)?a(e.get("value"),t):p.SpreadProperty&&p.SpreadProperty.check(n)&&a(e.get("argument"),t)}):p.ArrayPattern&&p.ArrayPattern.check(n)?e.get("elements").each(function(e){var n=e.value;p.Pattern.check(n)?a(e,t):p.SpreadElement&&p.SpreadElement.check(n)&&a(e.get("argument"),t)}):p.PropertyPattern&&p.PropertyPattern.check(n)?a(e.get("pattern"),t):(p.SpreadElementPattern&&p.SpreadElementPattern.check(n)||p.SpreadPropertyPattern&&p.SpreadPropertyPattern.check(n))&&a(e.get("argument"),t)}var s=e("assert"),o=e("./types"),u=o.Type,p=o.namedTypes,c=p.Node,d=p.Expression,f=o.builtInTypes.array,h=Object.prototype.hasOwnProperty,m=o.builders,g=[p.Program,p.Function,p.CatchClause],y=u.or.apply(u,g);n.isEstablishedBy=function(e){return y.check(e)};var b=n.prototype;b.didScan=!1,b.declares=function(e){return this.scan(),h.call(this.bindings,e)},b.declareTemporary=function(e){e?s.ok(/^[a-z$_]/i.test(e),e):e="t$",e+=this.depth.toString(36)+"$",this.scan();for(var t=0;this.declares(e+t);)++t;var n=e+t;return this.bindings[n]=o.builders.identifier(n)},b.injectTemporary=function(e,t){e||(e=this.declareTemporary());var n=this.path.get("body");return p.BlockStatement.check(n.value)&&(n=n.get("body")),n.unshift(m.variableDeclaration("var",[m.variableDeclarator(e,t||null)])),e},b.scan=function(e){if(e||!this.didScan){for(var t in this.bindings)delete this.bindings[t];r(this.path,this.bindings),this.didScan=!0}},b.getBindings=function(){return this.scan(),this.bindings},b.lookup=function(e){for(var t=this;t&&!t.declares(e);t=t.parent);return t},b.getGlobalScope=function(){for(var e=this;!e.isGlobal;)e=e.parent;return e},t.exports=n},{"./node-path":167,"./types":172,assert:175}],171:[function(e,t,n){var r=e("../lib/types"),l=r.Type,i=r.builtInTypes,a=i.number;n.geq=function(e){return new l(function(t){return a.check(t)&&t>=e},a+" >= "+e)},n.defaults={"null":function(){return null},emptyArray:function(){return[]},"false":function(){return!1},"true":function(){return!0},undefined:function(){}};var s=l.or(i.string,i.number,i.boolean,i.null,i.undefined);n.isPrimitive=new l(function(e){if(null===e)return!0;var t=typeof e;return!("object"===t||"function"===t)},s.toString())},{"../lib/types":172}],172:[function(e,t,n){function r(e,t){var n=this;h.ok(n instanceof r,n),h.strictEqual(v.call(e),x,e+" is not a function");var l=v.call(t);h.ok(l===x||l===E,t+" is neither a function nor a string"),Object.defineProperties(n,{name:{value:t},check:{value:function(t,r){var l=e.call(n,t,r);return!l&&r&&v.call(r)===x&&r(n,t),l}}})}function l(e){return C.check(e)?"{"+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+"}":A.check(e)?"["+e.map(l).join(", ")+"]":JSON.stringify(e)}function i(e,t){var n=v.call(e);return Object.defineProperty(I,t,{enumerable:!0,value:new r(function(e){return v.call(e)===n},t)}),I[t]}function a(e,t){return e instanceof r?e:e instanceof o?e.type:A.check(e)?r.fromArray(e):C.check(e)?r.fromObject(e):k.check(e)?new r(e,t):new r(function(t){return t===e},M.check(t)?function(){return e+""}:t)}function s(e,t,n,r){var l=this;h.ok(l instanceof s),w.assert(e),t=a(t);var i={name:{value:e},type:{value:t},hidden:{value:!!r}};k.check(n)&&(i.defaultFn={value:n}),Object.defineProperties(l,i)}function o(e){var t=this;h.ok(t instanceof o),Object.defineProperties(t,{typeName:{value:e},baseNames:{value:[]},ownFields:{value:Object.create(null)},allSupertypes:{value:Object.create(null)},supertypeList:{value:[]},allFields:{value:Object.create(null)},fieldNames:{value:[]},type:{value:new r(function(e,n){return t.check(e,n)},e)}})}function u(e){return e.replace(/^[A-Z]+/,function(e){var t=e.length;switch(t){case 0:return"";case 1:return e.toLowerCase();default:return e.slice(0,t-1).toLowerCase()+e.charAt(t-1)}})}function p(e){var t=o.fromValue(e);return t?t.fieldNames.slice(0):("type"in e&&h.ok(!1,"did not recognize object of type "+JSON.stringify(e.type)),Object.keys(e))}function c(e,t){var n=o.fromValue(e);if(n){var r=n.allFields[t];if(r)return r.getValue(e)}return e[t]}function d(e,t){t.length=0,t.push(e);for(var n=Object.create(null),r=0;r<t.length;++r){e=t[r];var l=P[e];h.strictEqual(l.finalized,!0),_.call(n,e)&&delete t[n[e]],n[e]=r,t.push.apply(t,l.baseNames)}for(var i=0,a=i,s=t.length;s>a;++a)_.call(t,a)&&(t[i++]=t[a]);t.length=i}function f(e,t){return Object.keys(t).forEach(function(n){e[n]=t[n]}),e}var h=e("assert"),m=Array.prototype,g=m.slice,y=(m.map,m.forEach),b=Object.prototype,v=b.toString,x=v.call(function(){}),E=v.call(""),_=b.hasOwnProperty,S=r.prototype;n.Type=r,S.assert=function(e,t){if(!this.check(e,t)){var n=l(e);return h.ok(!1,n+" does not match type "+this),!1}return!0},S.toString=function(){var e=this.name;return w.check(e)?e:k.check(e)?e.call(this)+"":e+" type"};var I={};n.builtInTypes=I;var w=i("","string"),k=i(function(){},"function"),A=i([],"array"),C=i({},"object"),T=(i(/./,"RegExp"),i(new Date,"Date"),i(3,"number")),M=(i(!0,"boolean"),i(null,"null"),i(void 0,"undefined"));r.or=function(){for(var e=[],t=arguments.length,n=0;t>n;++n)e.push(a(arguments[n]));return new r(function(n,r){for(var l=0;t>l;++l)if(e[l].check(n,r))return!0;return!1},function(){return e.join(" | ")})},r.fromArray=function(e){return h.ok(A.check(e)),h.strictEqual(e.length,1,"only one element type is permitted for typed arrays"),a(e[0]).arrayOf()},S.arrayOf=function(){var e=this;return new r(function(t,n){return A.check(t)&&t.every(function(t){return e.check(t,n)})},function(){return"["+e+"]"})},r.fromObject=function(e){var t=Object.keys(e).map(function(t){return new s(t,e[t])});return new r(function(e,n){return C.check(e)&&t.every(function(t){return t.type.check(e[t.name],n)})},function(){return"{ "+t.join(", ")+" }"})};var j=s.prototype;j.toString=function(){return JSON.stringify(this.name)+": "+this.type},j.getValue=function(e){var t=e[this.name];return M.check(t)?(this.defaultFn&&(t=this.defaultFn.call(e)),t):t},r.def=function(e){return w.assert(e),_.call(P,e)?P[e]:P[e]=new o(e)};var P=Object.create(null);o.fromValue=function(e){if(e&&"object"==typeof e){var t=e.type;if("string"==typeof t&&_.call(P,t)){var n=P[t];if(n.finalized)return n}}return null};var L=o.prototype;L.isSupertypeOf=function(e){return e instanceof o?(h.strictEqual(this.finalized,!0),h.strictEqual(e.finalized,!0),_.call(e.allSupertypes,this.typeName)):void h.ok(!1,e+" is not a Def")},n.getSupertypeNames=function(e){h.ok(_.call(P,e));var t=P[e];return h.strictEqual(t.finalized,!0),t.supertypeList.slice(1)},n.computeSupertypeLookupTable=function(e){for(var t={},n=Object.keys(P),r=n.length,l=0;r>l;++l){var i=n[l],a=P[i];h.strictEqual(a.finalized,!0);for(var s=0;s<a.supertypeList.length;++s){var o=a.supertypeList[s];if(_.call(e,o)){t[i]=o;break}}}return t},L.checkAllFields=function(e,t){function n(n){var l=r[n],i=l.type,a=l.getValue(e);return i.check(a,t)}var r=this.allFields;return h.strictEqual(this.finalized,!0),C.check(e)&&Object.keys(r).every(n)},L.check=function(e,t){if(h.strictEqual(this.finalized,!0,"prematurely checking unfinalized type "+this.typeName),!C.check(e))return!1;var n=o.fromValue(e);return n?t&&n===this?this.checkAllFields(e,t):this.isSupertypeOf(n)?t?n.checkAllFields(e,t)&&this.checkAllFields(e,!1):!0:!1:"SourceLocation"===this.typeName||"Position"===this.typeName?this.checkAllFields(e,t):!1},L.bases=function(){var e=this.baseNames;return h.strictEqual(this.finalized,!1),y.call(arguments,function(t){w.assert(t),e.indexOf(t)<0&&e.push(t)}),this},Object.defineProperty(L,"buildable",{value:!1});var O={};n.builders=O;var R={};n.defineMethod=function(e,t){var n=R[e];return M.check(t)?delete R[e]:(k.assert(t),Object.defineProperty(R,e,{enumerable:!0,configurable:!0,value:t})),n},L.build=function(){var e=this;return Object.defineProperty(e,"buildParams",{value:g.call(arguments),writable:!1,enumerable:!1,configurable:!0}),h.strictEqual(e.finalized,!1),w.arrayOf().assert(e.buildParams),e.buildable?e:(e.field("type",e.typeName,function(){return e.typeName }),Object.defineProperty(e,"buildable",{value:!0}),Object.defineProperty(O,u(e.typeName),{enumerable:!0,value:function(){function t(t,a){if(!_.call(i,t)){var s=e.allFields;h.ok(_.call(s,t),t);var o,u=s[t],p=u.type;if(T.check(a)&&r>a)o=n[a];else if(u.defaultFn)o=u.defaultFn.call(i);else{var c="no value or default function given for field "+JSON.stringify(t)+" of "+e.typeName+"("+e.buildParams.map(function(e){return s[e]}).join(", ")+")";h.ok(!1,c)}p.check(o)||h.ok(!1,l(o)+" does not match field "+u+" of type "+e.typeName),i[t]=o}}var n=arguments,r=n.length,i=Object.create(R);return h.ok(e.finalized,"attempting to instantiate unfinalized type "+e.typeName),e.buildParams.forEach(function(e,n){t(e,n)}),Object.keys(e.allFields).forEach(function(e){t(e)}),h.strictEqual(i.type,e.typeName),i}}),e)},L.field=function(e,t,n,r){return h.strictEqual(this.finalized,!1),this.ownFields[e]=new s(e,t,n,r),this};var D={};n.namedTypes=D,n.getFieldNames=p,n.getFieldValue=c,n.eachField=function(e,t,n){p(e).forEach(function(n){t.call(this,n,c(e,n))},n)},n.someField=function(e,t,n){return p(e).some(function(n){return t.call(this,n,c(e,n))},n)},Object.defineProperty(L,"finalized",{value:!1}),L.finalize=function(){if(!this.finalized){var e=this.allFields,t=this.allSupertypes;this.baseNames.forEach(function(n){var r=P[n];r.finalize(),f(e,r.allFields),f(t,r.allSupertypes)}),f(e,this.ownFields),t[this.typeName]=this,this.fieldNames.length=0;for(var n in e)_.call(e,n)&&!e[n].hidden&&this.fieldNames.push(n);Object.defineProperty(D,this.typeName,{enumerable:!0,value:this.type}),Object.defineProperty(this,"finalized",{value:!0}),d(this.typeName,this.supertypeList)}},n.finalize=function(){Object.keys(P).forEach(function(e){P[e].finalize()})}},{assert:175}],173:[function(e,t,n){var r=e("./lib/types");e("./def/core"),e("./def/es6"),e("./def/es7"),e("./def/mozilla"),e("./def/e4x"),e("./def/fb-harmony"),r.finalize(),n.Type=r.Type,n.builtInTypes=r.builtInTypes,n.namedTypes=r.namedTypes,n.builders=r.builders,n.defineMethod=r.defineMethod,n.getFieldNames=r.getFieldNames,n.getFieldValue=r.getFieldValue,n.eachField=r.eachField,n.someField=r.someField,n.getSupertypeNames=r.getSupertypeNames,n.astNodesAreEquivalent=e("./lib/equiv"),n.finalize=r.finalize,n.NodePath=e("./lib/node-path"),n.PathVisitor=e("./lib/path-visitor"),n.visit=n.PathVisitor.visit},{"./def/core":160,"./def/e4x":161,"./def/es6":162,"./def/es7":163,"./def/fb-harmony":164,"./def/mozilla":165,"./lib/equiv":166,"./lib/node-path":167,"./lib/path-visitor":168,"./lib/types":172}],174:[function(){},{}],175:[function(e,t){function n(e,t){return d.isUndefined(t)?""+t:d.isNumber(t)&&!isFinite(t)?t.toString():d.isFunction(t)||d.isRegExp(t)?t.toString():t}function r(e,t){return d.isString(e)?e.length<t?e:e.slice(0,t):e}function l(e){return r(JSON.stringify(e.actual,n),128)+" "+e.operator+" "+r(JSON.stringify(e.expected,n),128)}function i(e,t,n,r,l){throw new m.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:l})}function a(e,t){e||i(e,!0,t,"==",m.ok)}function s(e,t){if(e===t)return!0;if(d.isBuffer(e)&&d.isBuffer(t)){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return d.isDate(e)&&d.isDate(t)?e.getTime()===t.getTime():d.isRegExp(e)&&d.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:d.isObject(e)||d.isObject(t)?u(e,t):e==t}function o(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function u(e,t){if(d.isNullOrUndefined(e)||d.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1;if(d.isPrimitive(e)||d.isPrimitive(t))return e===t;var n=o(e),r=o(t);if(n&&!r||!n&&r)return!1;if(n)return e=f.call(e),t=f.call(t),s(e,t);var l,i,a=g(e),u=g(t);if(a.length!=u.length)return!1;for(a.sort(),u.sort(),i=a.length-1;i>=0;i--)if(a[i]!=u[i])return!1;for(i=a.length-1;i>=0;i--)if(l=a[i],!s(e[l],t[l]))return!1;return!0}function p(e,t){return e&&t?"[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t?!0:t.call({},e)===!0?!0:!1:!1}function c(e,t,n,r){var l;d.isString(n)&&(r=n,n=null);try{t()}catch(a){l=a}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!l&&i(l,n,"Missing expected exception"+r),!e&&p(l,n)&&i(l,n,"Got unwanted exception"+r),e&&l&&n&&!p(l,n)||!e&&l)throw l}var d=e("util/"),f=Array.prototype.slice,h=Object.prototype.hasOwnProperty,m=t.exports=a;m.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=l(this),this.generatedMessage=!0);var t=e.stackStartFunction||i;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,a=t.name,s=r.indexOf("\n"+a);if(s>=0){var o=r.indexOf("\n",s+1);r=r.substring(o+1)}this.stack=r}}},d.inherits(m.AssertionError,Error),m.fail=i,m.ok=a,m.equal=function(e,t,n){e!=t&&i(e,t,n,"==",m.equal)},m.notEqual=function(e,t,n){e==t&&i(e,t,n,"!=",m.notEqual)},m.deepEqual=function(e,t,n){s(e,t)||i(e,t,n,"deepEqual",m.deepEqual)},m.notDeepEqual=function(e,t,n){s(e,t)&&i(e,t,n,"notDeepEqual",m.notDeepEqual)},m.strictEqual=function(e,t,n){e!==t&&i(e,t,n,"===",m.strictEqual)},m.notStrictEqual=function(e,t,n){e===t&&i(e,t,n,"!==",m.notStrictEqual)},m.throws=function(){c.apply(this,[!0].concat(f.call(arguments)))},m.doesNotThrow=function(){c.apply(this,[!1].concat(f.call(arguments)))},m.ifError=function(e){if(e)throw e};var g=Object.keys||function(e){var t=[];for(var n in e)h.call(e,n)&&t.push(n);return t}},{"util/":201}],176:[function(e,t,n){arguments[4][174][0].apply(n,arguments)},{dup:174}],177:[function(e,t,n){function r(e,t,n){if(!(this instanceof r))return new r(e,t,n);var l,i=typeof e;if("number"===i)l=+e;else if("string"===i)l=r.byteLength(e,t);else{if("object"!==i||null===e)throw new TypeError("must start with number, buffer, array or string");"Buffer"===e.type&&D(e.data)&&(e=e.data),l=+e.length}if(l>N)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+N.toString(16)+" bytes");0>l?l=0:l>>>=0;var a=this;r.TYPED_ARRAY_SUPPORT?a=r._augment(new Uint8Array(l)):(a.length=l,a._isBuffer=!0);var s;if(r.TYPED_ARRAY_SUPPORT&&"number"==typeof e.byteLength)a._set(e);else if(k(e))if(r.isBuffer(e))for(s=0;l>s;s++)a[s]=e.readUInt8(s);else for(s=0;l>s;s++)a[s]=(e[s]%256+256)%256;else if("string"===i)a.write(e,0,t);else if("number"===i&&!r.TYPED_ARRAY_SUPPORT&&!n)for(s=0;l>s;s++)a[s]=0;return l>0&&l<=r.poolSize&&(a.parent=F),a}function l(e,t,n){if(!(this instanceof l))return new l(e,t,n);var i=new r(e,t,n);return delete i.parent,i}function i(e,t,n,r){n=Number(n)||0;var l=e.length-n;r?(r=Number(r),r>l&&(r=l)):r=l;var i=t.length;if(i%2!==0)throw new Error("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;r>a;a++){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[n+a]=s}return a}function a(e,t,n,r){var l=P(C(t,e.length-n),e,n,r);return l}function s(e,t,n,r){var l=P(T(t),e,n,r);return l}function o(e,t,n,r){return s(e,t,n,r)}function u(e,t,n,r){var l=P(j(t),e,n,r);return l}function p(e,t,n,r){var l=P(M(t,e.length-n),e,n,r);return l}function c(e,t,n){return O.fromByteArray(0===t&&n===e.length?e:e.slice(t,n))}function d(e,t,n){var r="",l="";n=Math.min(e.length,n);for(var i=t;n>i;i++)e[i]<=127?(r+=L(l)+String.fromCharCode(e[i]),l=""):l+="%"+e[i].toString(16);return r+L(l)}function f(e,t,n){var r="";n=Math.min(e.length,n);for(var l=t;n>l;l++)r+=String.fromCharCode(127&e[l]);return r}function h(e,t,n){var r="";n=Math.min(e.length,n);for(var l=t;n>l;l++)r+=String.fromCharCode(e[l]);return r}function m(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var l="",i=t;n>i;i++)l+=A(e[i]);return l}function g(e,t,n){for(var r=e.slice(t,n),l="",i=0;i<r.length;i+=2)l+=String.fromCharCode(r[i]+256*r[i+1]);return l}function y(e,t,n){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function b(e,t,n,l,i,a){if(!r.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>i||a>t)throw new RangeError("value is out of bounds");if(n+l>e.length)throw new RangeError("index out of range")}function v(e,t,n,r){0>t&&(t=65535+t+1);for(var l=0,i=Math.min(e.length-n,2);i>l;l++)e[n+l]=(t&255<<8*(r?l:1-l))>>>8*(r?l:1-l)}function x(e,t,n,r){0>t&&(t=4294967295+t+1);for(var l=0,i=Math.min(e.length-n,4);i>l;l++)e[n+l]=t>>>8*(r?l:3-l)&255}function E(e,t,n,r,l,i){if(t>l||i>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function _(e,t,n,r,l){return l||E(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),R.write(e,t,n,r,23,4),n+4}function S(e,t,n,r,l){return l||E(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),R.write(e,t,n,r,52,8),n+8}function I(e){if(e=w(e).replace(V,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function w(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function k(e){return D(e)||r.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function A(e){return 16>e?"0"+e.toString(16):e.toString(16)}function C(e,t){t=t||1/0;for(var n,r=e.length,l=null,i=[],a=0;r>a;a++){if(n=e.charCodeAt(a),n>55295&&57344>n){if(!l){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}l=n;continue}if(56320>n){(t-=3)>-1&&i.push(239,191,189),l=n;continue}n=l-55296<<10|n-56320|65536,l=null}else l&&((t-=3)>-1&&i.push(239,191,189),l=null);if(128>n){if((t-=1)<0)break;i.push(n)}else if(2048>n){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(2097152>n))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function T(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}function M(e,t){for(var n,r,l,i=[],a=0;a<e.length&&!((t-=2)<0);a++)n=e.charCodeAt(a),r=n>>8,l=n%256,i.push(l),i.push(r);return i}function j(e){return O.toByteArray(I(e))}function P(e,t,n,r){for(var l=0;r>l&&!(l+n>=t.length||l>=e.length);l++)t[l+n]=e[l];return l}function L(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}var O=e("base64-js"),R=e("ieee754"),D=e("is-array");n.Buffer=r,n.SlowBuffer=l,n.INSPECT_MAX_BYTES=50,r.poolSize=8192;var N=1073741823,F={};r.TYPED_ARRAY_SUPPORT=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(n){return!1}}(),r.isBuffer=function(e){return!(null==e||!e._isBuffer)},r.compare=function(e,t){if(!r.isBuffer(e)||!r.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,l=t.length,i=0,a=Math.min(n,l);a>i&&e[i]===t[i];i++);return i!==a&&(n=e[i],l=t[i]),l>n?-1:n>l?1:0},r.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(e,t){if(!D(e))throw new TypeError("Usage: Buffer.concat(list[, length])");if(0===e.length)return new r(0);if(1===e.length)return e[0];var n;if(void 0===t)for(t=0,n=0;n<e.length;n++)t+=e[n].length;var l=new r(t),i=0;for(n=0;n<e.length;n++){var a=e[n];a.copy(l,i),i+=a.length}return l},r.byteLength=function(e,t){var n;switch(e+="",t||"utf8"){case"ascii":case"binary":case"raw":n=e.length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*e.length;break;case"hex":n=e.length>>>1;break;case"utf8":case"utf-8":n=C(e).length;break;case"base64":n=j(e).length;break;default:n=e.length}return n},r.prototype.length=void 0,r.prototype.parent=void 0,r.prototype.toString=function(e,t,n){var r=!1;if(t>>>=0,n=void 0===n||1/0===n?this.length:n>>>0,e||(e="utf8"),0>t&&(t=0),n>this.length&&(n=this.length),t>=n)return"";for(;;)switch(e){case"hex":return m(this,t,n);case"utf8":case"utf-8":return d(this,t,n);case"ascii":return f(this,t,n);case"binary":return h(this,t,n);case"base64":return c(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}},r.prototype.equals=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===r.compare(this,e)},r.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},r.prototype.compare=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:r.compare(this,e)},r.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},r.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},r.prototype.write=function(e,t,n,r){if(isFinite(t))isFinite(n)||(r=n,n=void 0);else{var l=r;r=t,t=n,n=l}if(t=Number(t)||0,0>n||0>t||t>this.length)throw new RangeError("attempt to write outside buffer bounds");var c=this.length-t;n?(n=Number(n),n>c&&(n=c)):n=c,r=String(r||"utf8").toLowerCase();var d;switch(r){case"hex":d=i(this,e,t,n);break;case"utf8":case"utf-8":d=a(this,e,t,n);break;case"ascii":d=s(this,e,t,n);break;case"binary":d=o(this,e,t,n);break;case"base64":d=u(this,e,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":d=p(this,e,t,n);break;default:throw new TypeError("Unknown encoding: "+r)}return d},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},r.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);var l;if(r.TYPED_ARRAY_SUPPORT)l=r._augment(this.subarray(e,t));else{var i=t-e;l=new r(i,void 0,!0);for(var a=0;i>a;a++)l[a]=this[a+e]}return l.length&&(l.parent=this.parent||this),l},r.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||y(e,t,this.length);for(var r=this[e],l=1,i=0;++i<t&&(l*=256);)r+=this[e+i]*l;return r},r.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||y(e,t,this.length);for(var r=this[e+--t],l=1;t>0&&(l*=256);)r+=this[e+--t]*l;return r},r.prototype.readUInt8=function(e,t){return t||y(e,1,this.length),this[e]},r.prototype.readUInt16LE=function(e,t){return t||y(e,2,this.length),this[e]|this[e+1]<<8},r.prototype.readUInt16BE=function(e,t){return t||y(e,2,this.length),this[e]<<8|this[e+1]},r.prototype.readUInt32LE=function(e,t){return t||y(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},r.prototype.readUInt32BE=function(e,t){return t||y(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},r.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||y(e,t,this.length);for(var r=this[e],l=1,i=0;++i<t&&(l*=256);)r+=this[e+i]*l;return l*=128,r>=l&&(r-=Math.pow(2,8*t)),r},r.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||y(e,t,this.length);for(var r=t,l=1,i=this[e+--r];r>0&&(l*=256);)i+=this[e+--r]*l;return l*=128,i>=l&&(i-=Math.pow(2,8*t)),i},r.prototype.readInt8=function(e,t){return t||y(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},r.prototype.readInt16LE=function(e,t){t||y(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt16BE=function(e,t){t||y(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt32LE=function(e,t){return t||y(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},r.prototype.readInt32BE=function(e,t){return t||y(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},r.prototype.readFloatLE=function(e,t){return t||y(e,4,this.length),R.read(this,e,!0,23,4)},r.prototype.readFloatBE=function(e,t){return t||y(e,4,this.length),R.read(this,e,!1,23,4)},r.prototype.readDoubleLE=function(e,t){return t||y(e,8,this.length),R.read(this,e,!0,52,8)},r.prototype.readDoubleBE=function(e,t){return t||y(e,8,this.length),R.read(this,e,!1,52,8)},r.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||b(this,e,t,n,Math.pow(2,8*n),0);var l=1,i=0;for(this[t]=255&e;++i<n&&(l*=256);)this[t+i]=e/l>>>0&255;return t+n},r.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||b(this,e,t,n,Math.pow(2,8*n),0);var l=n-1,i=1;for(this[t+l]=255&e;--l>=0&&(i*=256);)this[t+l]=e/i>>>0&255;return t+n},r.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,1,255,0),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e,t+1},r.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):v(this,e,t,!0),t+2},r.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):v(this,e,t,!1),t+2},r.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e):x(this,e,t,!0),t+4},r.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):x(this,e,t,!1),t+4},r.prototype.writeIntLE=function(e,t,n,r){e=+e,t>>>=0,r||b(this,e,t,n,Math.pow(2,8*n-1)-1,-Math.pow(2,8*n-1));var l=0,i=1,a=0>e?1:0;for(this[t]=255&e;++l<n&&(i*=256);)this[t+l]=(e/i>>0)-a&255;return t+n},r.prototype.writeIntBE=function(e,t,n,r){e=+e,t>>>=0,r||b(this,e,t,n,Math.pow(2,8*n-1)-1,-Math.pow(2,8*n-1));var l=n-1,i=1,a=0>e?1:0;for(this[t+l]=255&e;--l>=0&&(i*=256);)this[t+l]=(e/i>>0)-a&255;return t+n},r.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,1,127,-128),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=e,t+1},r.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):v(this,e,t,!0),t+2},r.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):v(this,e,t,!1),t+2},r.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,4,2147483647,-2147483648),r.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):x(this,e,t,!0),t+4},r.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):x(this,e,t,!1),t+4},r.prototype.writeFloatLE=function(e,t,n){return _(this,e,t,!0,n)},r.prototype.writeFloatBE=function(e,t,n){return _(this,e,t,!1,n)},r.prototype.writeDoubleLE=function(e,t,n){return S(this,e,t,!0,n)},r.prototype.writeDoubleBE=function(e,t,n){return S(this,e,t,!1,n)},r.prototype.copy=function(e,t,n,l){var i=this;if(n||(n=0),l||0===l||(l=this.length),t>=e.length&&(t=e.length),t||(t=0),l>0&&n>l&&(l=n),l===n)return 0;if(0===e.length||0===i.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=i.length)throw new RangeError("sourceStart out of bounds");if(0>l)throw new RangeError("sourceEnd out of bounds");l>this.length&&(l=this.length),e.length-t<l-n&&(l=e.length-t+n);var a=l-n;if(1e3>a||!r.TYPED_ARRAY_SUPPORT)for(var s=0;a>s;s++)e[s+t]=this[s+n];else e._set(this.subarray(n,n+a),t);return a},r.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),t>n)throw new RangeError("end < start");if(n!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof e)for(r=t;n>r;r++)this[r]=e;else{var l=C(e.toString()),i=l.length;for(r=t;n>r;r++)this[r]=l[r%i]}return this}},r.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(r.TYPED_ARRAY_SUPPORT)return new r(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;n>t;t+=1)e[t]=this[t];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var B=r.prototype;r._augment=function(e){return e.constructor=r,e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=B.get,e.set=B.set,e.write=B.write,e.toString=B.toString,e.toLocaleString=B.toString,e.toJSON=B.toJSON,e.equals=B.equals,e.compare=B.compare,e.copy=B.copy,e.slice=B.slice,e.readUIntLE=B.readUIntLE,e.readUIntBE=B.readUIntBE,e.readUInt8=B.readUInt8,e.readUInt16LE=B.readUInt16LE,e.readUInt16BE=B.readUInt16BE,e.readUInt32LE=B.readUInt32LE,e.readUInt32BE=B.readUInt32BE,e.readIntLE=B.readIntLE,e.readIntBE=B.readIntBE,e.readInt8=B.readInt8,e.readInt16LE=B.readInt16LE,e.readInt16BE=B.readInt16BE,e.readInt32LE=B.readInt32LE,e.readInt32BE=B.readInt32BE,e.readFloatLE=B.readFloatLE,e.readFloatBE=B.readFloatBE,e.readDoubleLE=B.readDoubleLE,e.readDoubleBE=B.readDoubleBE,e.writeUInt8=B.writeUInt8,e.writeUIntLE=B.writeUIntLE,e.writeUIntBE=B.writeUIntBE,e.writeUInt16LE=B.writeUInt16LE,e.writeUInt16BE=B.writeUInt16BE,e.writeUInt32LE=B.writeUInt32LE,e.writeUInt32BE=B.writeUInt32BE,e.writeIntLE=B.writeIntLE,e.writeIntBE=B.writeIntBE,e.writeInt8=B.writeInt8,e.writeInt16LE=B.writeInt16LE,e.writeInt16BE=B.writeInt16BE,e.writeInt32LE=B.writeInt32LE,e.writeInt32BE=B.writeInt32BE,e.writeFloatLE=B.writeFloatLE,e.writeFloatBE=B.writeFloatBE,e.writeDoubleLE=B.writeDoubleLE,e.writeDoubleBE=B.writeDoubleBE,e.fill=B.fill,e.inspect=B.inspect,e.toArrayBuffer=B.toArrayBuffer,e};var V=/[^+\/0-9A-z\-]/g},{"base64-js":178,ieee754:179,"is-array":180}],178:[function(e,t,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===a||t===c?62:t===s||t===d?63:o>t?-1:o+10>t?t-o+26+26:p+26>t?t-p:u+26>t?t-u+26:void 0}function n(e){function n(e){u[c++]=e}var r,l,a,s,o,u;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var p=e.length;o="="===e.charAt(p-2)?2:"="===e.charAt(p-1)?1:0,u=new i(3*e.length/4-o),a=o>0?e.length-4:e.length;var c=0;for(r=0,l=0;a>r;r+=4,l+=3)s=t(e.charAt(r))<<18|t(e.charAt(r+1))<<12|t(e.charAt(r+2))<<6|t(e.charAt(r+3)),n((16711680&s)>>16),n((65280&s)>>8),n(255&s);return 2===o?(s=t(e.charAt(r))<<2|t(e.charAt(r+1))>>4,n(255&s)):1===o&&(s=t(e.charAt(r))<<10|t(e.charAt(r+1))<<4|t(e.charAt(r+2))>>2,n(s>>8&255),n(255&s)),u}function l(e){function t(e){return r.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var l,i,a,s=e.length%3,o="";for(l=0,a=e.length-s;a>l;l+=3)i=(e[l]<<16)+(e[l+1]<<8)+e[l+2],o+=n(i);switch(s){case 1:i=e[e.length-1],o+=t(i>>2),o+=t(i<<4&63),o+="==";break;case 2:i=(e[e.length-2]<<8)+e[e.length-1],o+=t(i>>10),o+=t(i>>4&63),o+=t(i<<2&63),o+="="}return o}var i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),s="/".charCodeAt(0),o="0".charCodeAt(0),u="a".charCodeAt(0),p="A".charCodeAt(0),c="-".charCodeAt(0),d="_".charCodeAt(0);e.toByteArray=n,e.fromByteArray=l}("undefined"==typeof n?this.base64js={}:n)},{}],179:[function(e,t,n){n.read=function(e,t,n,r,l){var i,a,s=8*l-r-1,o=(1<<s)-1,u=o>>1,p=-7,c=n?l-1:0,d=n?-1:1,f=e[t+c];for(c+=d,i=f&(1<<-p)-1,f>>=-p,p+=s;p>0;i=256*i+e[t+c],c+=d,p-=8);for(a=i&(1<<-p)-1,i>>=-p,p+=r;p>0;a=256*a+e[t+c],c+=d,p-=8);if(0===i)i=1-u;else{if(i===o)return a?0/0:1/0*(f?-1:1);a+=Math.pow(2,r),i-=u}return(f?-1:1)*a*Math.pow(2,i-r)},n.write=function(e,t,n,r,l,i){var a,s,o,u=8*i-l-1,p=(1<<u)-1,c=p>>1,d=23===l?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:i-1,h=r?1:-1,m=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||1/0===t?(s=isNaN(t)?1:0,a=p):(a=Math.floor(Math.log(t)/Math.LN2),t*(o=Math.pow(2,-a))<1&&(a--,o*=2),t+=a+c>=1?d/o:d*Math.pow(2,1-c),t*o>=2&&(a++,o/=2),a+c>=p?(s=0,a=p):a+c>=1?(s=(t*o-1)*Math.pow(2,l),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,l),a=0));l>=8;e[n+f]=255&s,f+=h,s/=256,l-=8);for(a=a<<l|s,u+=l;u>0;e[n+f]=255&a,f+=h,a/=256,u-=8);e[n+f-h]|=128*m}},{}],180:[function(e,t){var n=Array.isArray,r=Object.prototype.toString;t.exports=n||function(e){return!!e&&"[object Array]"==r.call(e)}},{}],181:[function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function l(e){return"number"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!l(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,l,s,o,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(l=arguments.length,s=new Array(l-1),o=1;l>o;o++)s[o-1]=arguments[o];n.apply(this,s)}else if(i(n)){for(l=arguments.length,s=new Array(l-1),o=1;l>o;o++)s[o-1]=arguments[o];for(u=n.slice(),l=u.length,o=0;l>o;o++)u[o].apply(this,s)}return!0},n.prototype.addListener=function(e,t){var l;if(!r(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned){var l;l=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,l&&l>0&&this._events[e].length>l&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),l||(l=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var l=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,l,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,l=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(s=a;s-->0;)if(n[s]===t||n[s].listener&&n[s].listener===t){l=s;break}if(0>l)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(l,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.listenerCount=function(e,t){var n;return n=e._events&&e._events[t]?r(e._events[t])?1:e._events[t].length:0}},{}],182:[function(e,t){t.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],183:[function(e,t){t.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},{}],184:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var l=e[r];"."===l?e.splice(r,1):".."===l?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var l=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return l.exec(e).slice(1)};n.resolve=function(){for(var n="",l=!1,i=arguments.length-1;i>=-1&&!l;i--){var a=i>=0?arguments[i]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,l="/"===a.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!l).join("/"),(l?"/":"")+n||"."},n.normalize=function(e){var l=n.isAbsolute(e),i="/"===a(e,-1);return e=t(r(e.split("/"),function(e){return!!e}),!l).join("/"),e||l||(e="."),e&&i&&(e+="/"),(l?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var l=r(e.split("/")),i=r(t.split("/")),a=Math.min(l.length,i.length),s=a,o=0;a>o;o++)if(l[o]!==i[o]){s=o;break}for(var u=[],o=s;o<l.length;o++)u.push("..");return u=u.concat(i.slice(s)),u.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){var t=i(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(e,t){var n=i(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return i(e)[3]};var a="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return 0>t&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:185}],185:[function(e,t){function n(){if(!a){a=!0;for(var e,t=i.length;t;){e=i,i=[];for(var n=-1;++n<t;)e[n]();t=i.length}a=!1}}function r(){}var l=t.exports={},i=[],a=!1;l.nextTick=function(e){i.push(e),a||setTimeout(n,0)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=r,l.addListener=r,l.once=r,l.off=r,l.removeListener=r,l.removeAllListeners=r,l.emit=r,l.binding=function(){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],186:[function(e,t){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":187}],187:[function(e,t){(function(n){function r(e){return this instanceof r?(o.call(this,e),u.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",l)):new r(e)}function l(){this.allowHalfOpen||this._writableState.ended||n.nextTick(this.end.bind(this))}function i(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n],n)}t.exports=r;var a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t},s=e("core-util-is");s.inherits=e("inherits");var o=e("./_stream_readable"),u=e("./_stream_writable");s.inherits(r,o),i(a(u.prototype),function(e){r.prototype[e]||(r.prototype[e]=u.prototype[e])})}).call(this,e("_process"))},{"./_stream_readable":189,"./_stream_writable":191,_process:185,"core-util-is":192,inherits:182}],188:[function(e,t){function n(e){return this instanceof n?void r.call(this,e):new n(e)}t.exports=n;var r=e("./_stream_transform"),l=e("core-util-is");l.inherits=e("inherits"),l.inherits(n,r),n.prototype._transform=function(e,t,n){n(null,e) }},{"./_stream_transform":190,"core-util-is":192,inherits:182}],189:[function(e,t){(function(n){function r(t,n){var r=e("./_stream_duplex");t=t||{};var l=t.highWaterMark,i=t.objectMode?16:16384;this.highWaterMark=l||0===l?l:i,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,n instanceof r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(C||(C=e("string_decoder/").StringDecoder),this.decoder=new C(t.encoding),this.encoding=t.encoding)}function l(t){e("./_stream_duplex");return this instanceof l?(this._readableState=new r(t,this),this.readable=!0,void k.call(this)):new l(t)}function i(e,t,n,r,l){var i=u(t,n);if(i)e.emit("error",i);else if(A.isNullOrUndefined(n))t.reading=!1,t.ended||p(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!l){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&l){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||l||r||(n=t.decoder.write(n)),l||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,l?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&c(e)),f(e,t);else l||(t.reading=!1);return a(t)}function a(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function s(e){if(e>=M)e=M;else{e--;for(var t=1;32>t;t<<=1)e|=e>>t;e++}return e}function o(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||A.isNull(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function u(e,t){var n=null;return A.isBuffer(t)||A.isString(t)||A.isNullOrUndefined(t)||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function p(e,t){if(t.decoder&&!t.ended){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,c(e)}function c(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(T("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(function(){d(e)}):d(e))}function d(e){T("emit readable"),e.emit("readable"),b(e)}function f(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(function(){h(e,t)}))}function h(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(T("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function m(e){return function(){var t=e._readableState;T("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&w.listenerCount(e,"data")&&(t.flowing=!0,b(e))}}function g(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(function(){y(e,t)}))}function y(e,t){t.resumeScheduled=!1,e.emit("resume"),b(e),t.flowing&&!t.reading&&e.read(0)}function b(e){var t=e._readableState;if(T("flow",t.flowing),t.flowing)do var n=e.read();while(null!==n&&t.flowing)}function v(e,t){var n,r=t.buffer,l=t.length,i=!!t.decoder,a=!!t.objectMode;if(0===r.length)return null;if(0===l)n=null;else if(a)n=r.shift();else if(!e||e>=l)n=i?r.join(""):I.concat(r,l),r.length=0;else if(e<r[0].length){var s=r[0];n=s.slice(0,e),r[0]=s.slice(e)}else if(e===r[0].length)n=r.shift();else{n=i?"":new I(e);for(var o=0,u=0,p=r.length;p>u&&e>o;u++){var s=r[0],c=Math.min(e-o,s.length);i?n+=s.slice(0,c):s.copy(n,o,0,c),c<s.length?r[0]=s.slice(c):r.shift(),o+=c}}return n}function x(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,n.nextTick(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function E(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n],n)}function _(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}t.exports=l;var S=e("isarray"),I=e("buffer").Buffer;l.ReadableState=r;var w=e("events").EventEmitter;w.listenerCount||(w.listenerCount=function(e,t){return e.listeners(t).length});var k=e("stream"),A=e("core-util-is");A.inherits=e("inherits");var C,T=e("util");T=T&&T.debuglog?T.debuglog("stream"):function(){},A.inherits(l,k),l.prototype.push=function(e,t){var n=this._readableState;return A.isString(e)&&!n.objectMode&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=new I(e,t),t="")),i(this,n,e,t,!1)},l.prototype.unshift=function(e){var t=this._readableState;return i(this,t,e,"",!0)},l.prototype.setEncoding=function(t){return C||(C=e("string_decoder/").StringDecoder),this._readableState.decoder=new C(t),this._readableState.encoding=t,this};var M=8388608;l.prototype.read=function(e){T("read",e);var t=this._readableState,n=e;if((!A.isNumber(e)||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return T("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?x(this):c(this),null;if(e=o(e,t),0===e&&t.ended)return 0===t.length&&x(this),null;var r=t.needReadable;T("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,T("length less than watermark",r)),(t.ended||t.reading)&&(r=!1,T("reading or ended",r)),r&&(T("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),r&&!t.reading&&(e=o(n,t));var l;return l=e>0?v(e,t):null,A.isNull(l)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),n!==e&&t.ended&&0===t.length&&x(this),A.isNull(l)||this.emit("data",l),l},l.prototype._read=function(){this.emit("error",new Error("not implemented"))},l.prototype.pipe=function(e,t){function r(e){T("onunpipe"),e===c&&i()}function l(){T("onend"),e.end()}function i(){T("cleanup"),e.removeListener("close",o),e.removeListener("finish",u),e.removeListener("drain",g),e.removeListener("error",s),e.removeListener("unpipe",r),c.removeListener("end",l),c.removeListener("end",i),c.removeListener("data",a),!d.awaitDrain||e._writableState&&!e._writableState.needDrain||g()}function a(t){T("ondata");var n=e.write(t);!1===n&&(T("false write response, pause",c._readableState.awaitDrain),c._readableState.awaitDrain++,c.pause())}function s(t){T("onerror",t),p(),e.removeListener("error",s),0===w.listenerCount(e,"error")&&e.emit("error",t)}function o(){e.removeListener("finish",u),p()}function u(){T("onfinish"),e.removeListener("close",o),p()}function p(){T("unpipe"),c.unpipe(e)}var c=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=e;break;case 1:d.pipes=[d.pipes,e];break;default:d.pipes.push(e)}d.pipesCount+=1,T("pipe count=%d opts=%j",d.pipesCount,t);var f=(!t||t.end!==!1)&&e!==n.stdout&&e!==n.stderr,h=f?l:i;d.endEmitted?n.nextTick(h):c.once("end",h),e.on("unpipe",r);var g=m(c);return e.on("drain",g),c.on("data",a),e._events&&e._events.error?S(e._events.error)?e._events.error.unshift(s):e._events.error=[s,e._events.error]:e.on("error",s),e.once("close",o),e.once("finish",u),e.emit("pipe",c),d.flowing||(T("pipe resume"),c.resume()),e},l.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var l=0;r>l;l++)n[l].emit("unpipe",this);return this}var l=_(t.pipes,e);return-1===l?this:(t.pipes.splice(l,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},l.prototype.on=function(e,t){var r=k.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&this.readable){var l=this._readableState;if(!l.readableListening)if(l.readableListening=!0,l.emittedReadable=!1,l.needReadable=!0,l.reading)l.length&&c(this,l);else{var i=this;n.nextTick(function(){T("readable nexttick read 0"),i.read(0)})}}return r},l.prototype.addListener=l.prototype.on,l.prototype.resume=function(){var e=this._readableState;return e.flowing||(T("resume"),e.flowing=!0,e.reading||(T("resume read 0"),this.read(0)),g(this,e)),this},l.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this},l.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(T("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(l){if(T("wrapped data"),t.decoder&&(l=t.decoder.write(l)),l&&(t.objectMode||l.length)){var i=r.push(l);i||(n=!0,e.pause())}});for(var l in e)A.isFunction(e[l])&&A.isUndefined(this[l])&&(this[l]=function(t){return function(){return e[t].apply(e,arguments)}}(l));var i=["error","close","destroy","pause","resume"];return E(i,function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(t){T("wrapped _read",t),n&&(n=!1,e.resume())},r},l._fromList=v}).call(this,e("_process"))},{"./_stream_duplex":187,_process:185,buffer:177,"core-util-is":192,events:181,inherits:182,isarray:183,stream:197,"string_decoder/":198,util:176}],190:[function(e,t){function n(e,t){this.afterTransform=function(e,n){return r(t,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function r(e,t,n){var r=e._transformState;r.transforming=!1;var l=r.writecb;if(!l)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,s.isNullOrUndefined(n)||e.push(n),l&&l(t);var i=e._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&e._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);a.call(this,e),this._transformState=new n(e,this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){s.isFunction(this._flush)?this._flush(function(e){i(t,e)}):i(t)})}function i(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._transformState;if(n.length)throw new Error("calling transform done when ws.length != 0");if(r.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}t.exports=l;var a=e("./_stream_duplex"),s=e("core-util-is");s.inherits=e("inherits"),s.inherits(l,a),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,a.prototype.push.call(this,e,t)},l.prototype._transform=function(){throw new Error("not implemented")},l.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var l=this._readableState;(r.needTransform||l.needReadable||l.length<l.highWaterMark)&&this._read(l.highWaterMark)}},l.prototype._read=function(){var e=this._transformState;s.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},{"./_stream_duplex":187,"core-util-is":192,inherits:182}],191:[function(e,t){(function(n){function r(e,t,n){this.chunk=e,this.encoding=t,this.callback=n}function l(t,n){var r=e("./_stream_duplex");t=t||{};var l=t.highWaterMark,i=t.objectMode?16:16384;this.highWaterMark=l||0===l?l:i,this.objectMode=!!t.objectMode,n instanceof r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){f(n,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function i(t){var n=e("./_stream_duplex");return this instanceof i||this instanceof n?(this._writableState=new l(t,this),this.writable=!0,void S.call(this)):new i(t)}function a(e,t,r){var l=new Error("write after end");e.emit("error",l),n.nextTick(function(){r(l)})}function s(e,t,r,l){var i=!0;if(!(_.isBuffer(r)||_.isString(r)||_.isNullOrUndefined(r)||t.objectMode)){var a=new TypeError("Invalid non-string/buffer chunk");e.emit("error",a),n.nextTick(function(){l(a)}),i=!1}return i}function o(e,t,n){return!e.objectMode&&e.decodeStrings!==!1&&_.isString(t)&&(t=new E(t,n)),t}function u(e,t,n,l,i){n=o(t,n,l),_.isBuffer(n)&&(l="buffer");var a=t.objectMode?1:n.length;t.length+=a;var s=t.length<t.highWaterMark;return s||(t.needDrain=!0),t.writing||t.corked?t.buffer.push(new r(n,l,i)):p(e,t,!1,a,n,l,i),s}function p(e,t,n,r,l,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(l,t.onwrite):e._write(l,i,t.onwrite),t.sync=!1}function c(e,t,r,l,i){r?n.nextTick(function(){t.pendingcb--,i(l)}):(t.pendingcb--,i(l)),e._writableState.errorEmitted=!0,e.emit("error",l)}function d(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function f(e,t){var r=e._writableState,l=r.sync,i=r.writecb;if(d(r),t)c(e,r,l,t,i);else{var a=y(e,r);a||r.corked||r.bufferProcessing||!r.buffer.length||g(e,r),l?n.nextTick(function(){h(e,r,a,i)}):h(e,r,a,i)}}function h(e,t,n,r){n||m(e,t),t.pendingcb--,r(),v(e,t)}function m(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function g(e,t){if(t.bufferProcessing=!0,e._writev&&t.buffer.length>1){for(var n=[],r=0;r<t.buffer.length;r++)n.push(t.buffer[r].callback);t.pendingcb++,p(e,t,!0,t.length,t.buffer,"",function(e){for(var r=0;r<n.length;r++)t.pendingcb--,n[r](e)}),t.buffer=[]}else{for(var r=0;r<t.buffer.length;r++){var l=t.buffer[r],i=l.chunk,a=l.encoding,s=l.callback,o=t.objectMode?1:i.length;if(p(e,t,!1,o,i,a,s),t.writing){r++;break}}r<t.buffer.length?t.buffer=t.buffer.slice(r):t.buffer.length=0}t.bufferProcessing=!1}function y(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function b(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function v(e,t){var n=y(e,t);return n&&(0===t.pendingcb?(b(e,t),t.finished=!0,e.emit("finish")):b(e,t)),n}function x(e,t,r){t.ending=!0,v(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r)),t.ended=!0}t.exports=i;var E=e("buffer").Buffer;i.WritableState=l;var _=e("core-util-is");_.inherits=e("inherits");var S=e("stream");_.inherits(i,S),i.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},i.prototype.write=function(e,t,n){var r=this._writableState,l=!1;return _.isFunction(t)&&(n=t,t=null),_.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),_.isFunction(n)||(n=function(){}),r.ended?a(this,r,n):s(this,r,e,n)&&(r.pendingcb++,l=u(this,r,e,t,n)),l},i.prototype.cork=function(){var e=this._writableState;e.corked++},i.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.buffer.length||g(this,e))},i.prototype._write=function(e,t,n){n(new Error("not implemented"))},i.prototype._writev=null,i.prototype.end=function(e,t,n){var r=this._writableState;_.isFunction(e)?(n=e,e=null,t=null):_.isFunction(t)&&(n=t,t=null),_.isNullOrUndefined(e)||this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||x(this,r,n)}}).call(this,e("_process"))},{"./_stream_duplex":187,_process:185,buffer:177,"core-util-is":192,inherits:182,stream:197}],192:[function(e,t,n){(function(e){function t(e){return Array.isArray(e)}function r(e){return"boolean"==typeof e}function l(e){return null===e}function i(e){return null==e}function a(e){return"number"==typeof e}function s(e){return"string"==typeof e}function o(e){return"symbol"==typeof e}function u(e){return void 0===e}function p(e){return c(e)&&"[object RegExp]"===y(e)}function c(e){return"object"==typeof e&&null!==e}function d(e){return c(e)&&"[object Date]"===y(e)}function f(e){return c(e)&&("[object Error]"===y(e)||e instanceof Error)}function h(e){return"function"==typeof e}function m(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function g(t){return e.isBuffer(t)}function y(e){return Object.prototype.toString.call(e)}n.isArray=t,n.isBoolean=r,n.isNull=l,n.isNullOrUndefined=i,n.isNumber=a,n.isString=s,n.isSymbol=o,n.isUndefined=u,n.isRegExp=p,n.isObject=c,n.isDate=d,n.isError=f,n.isFunction=h,n.isPrimitive=m,n.isBuffer=g}).call(this,e("buffer").Buffer)},{buffer:177}],193:[function(e,t){t.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":188}],194:[function(e,t,n){n=t.exports=e("./lib/_stream_readable.js"),n.Stream=e("stream"),n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":187,"./lib/_stream_passthrough.js":188,"./lib/_stream_readable.js":189,"./lib/_stream_transform.js":190,"./lib/_stream_writable.js":191,stream:197}],195:[function(e,t){t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":190}],196:[function(e,t){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":191}],197:[function(e,t){function n(){r.call(this)}t.exports=n;var r=e("events").EventEmitter,l=e("inherits");l(n,r),n.Readable=e("readable-stream/readable.js"),n.Writable=e("readable-stream/writable.js"),n.Duplex=e("readable-stream/duplex.js"),n.Transform=e("readable-stream/transform.js"),n.PassThrough=e("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&u.pause&&u.pause()}function l(){u.readable&&u.resume&&u.resume()}function i(){p||(p=!0,e.end())}function a(){p||(p=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(o(),0===r.listenerCount(this,"error"))throw e}function o(){u.removeListener("data",n),e.removeListener("drain",l),u.removeListener("end",i),u.removeListener("close",a),u.removeListener("error",s),e.removeListener("error",s),u.removeListener("end",o),u.removeListener("close",o),e.removeListener("close",o)}var u=this;u.on("data",n),e.on("drain",l),e._isStdio||t&&t.end===!1||(u.on("end",i),u.on("close",a));var p=!1;return u.on("error",s),e.on("error",s),u.on("end",o),u.on("close",o),e.on("close",o),e.emit("pipe",u),e}},{events:181,inherits:182,"readable-stream/duplex.js":186,"readable-stream/passthrough.js":193,"readable-stream/readable.js":194,"readable-stream/transform.js":195,"readable-stream/writable.js":196}],198:[function(e,t,n){function r(e){if(e&&!o(e))throw new Error("Unknown encoding: "+e)}function l(e){return e.toString(this.encoding)}function i(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function a(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var s=e("buffer").Buffer,o=s.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=n.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),r(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=i;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=a;break;default:return void(this.write=l)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";e=e.slice(n,e.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var r=t.charCodeAt(t.length-1);if(!(r>=55296&&56319>=r)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var l=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,l),l-=this.charReceived),t+=e.toString(this.encoding,0,l);var l=t.length-1,r=t.charCodeAt(l);if(r>=55296&&56319>=r){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),e.copy(this.charBuffer,0,0,i),t.substring(0,l)}return t},u.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(2>=t&&n>>4==14){this.charLength=3;break}if(3>=t&&n>>3==30){this.charLength=4;break}}this.charReceived=t},u.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,l=this.encoding;t+=r.slice(0,n).toString(l)}return t}},{buffer:177}],199:[function(e,t,n){function r(){throw new Error("tty.ReadStream is not implemented")}function l(){throw new Error("tty.ReadStream is not implemented")}n.isatty=function(){return!1},n.ReadStream=r,n.WriteStream=l},{}],200:[function(e,t){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],201:[function(e,t,n){(function(t,r){function l(e,t){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(t)?r.showHidden=t:t&&n._extend(r,t),E(r.showHidden)&&(r.showHidden=!1),E(r.depth)&&(r.depth=2),E(r.colors)&&(r.colors=!1),E(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=i),o(r,e,r.depth)}function i(e,t){var n=l.styles[t];return n?"["+l.colors[n][0]+"m"+e+"["+l.colors[n][1]+"m":e}function a(e){return e}function s(e){var t={};return e.forEach(function(e){t[e]=!0}),t}function o(e,t,r){if(e.customInspect&&t&&k(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var l=t.inspect(r,e);return v(l)||(l=o(e,l,r)),l}var i=u(e,t);if(i)return i;var a=Object.keys(t),m=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),w(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(t);if(0===a.length){if(k(t)){var g=t.name?": "+t.name:"";return e.stylize("[Function"+g+"]","special")}if(_(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(I(t))return e.stylize(Date.prototype.toString.call(t),"date");if(w(t))return p(t)}var y="",b=!1,x=["{","}"];if(h(t)&&(b=!0,x=["[","]"]),k(t)){var E=t.name?": "+t.name:"";y=" [Function"+E+"]"}if(_(t)&&(y=" "+RegExp.prototype.toString.call(t)),I(t)&&(y=" "+Date.prototype.toUTCString.call(t)),w(t)&&(y=" "+p(t)),0===a.length&&(!b||0==t.length))return x[0]+y+x[1];if(0>r)return _(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var S;return S=b?c(e,t,r,m,a):a.map(function(n){return d(e,t,r,m,n,b)}),e.seen.pop(),f(S,y,x)}function u(e,t){if(E(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return b(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function c(e,t,n,r,l){for(var i=[],a=0,s=t.length;s>a;++a)i.push(j(t,String(a))?d(e,t,n,r,String(a),!0):"");return l.forEach(function(l){l.match(/^\d+$/)||i.push(d(e,t,n,r,l,!0))}),i}function d(e,t,n,r,l,i){var a,s,u;if(u=Object.getOwnPropertyDescriptor(t,l)||{value:t[l]},u.get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),j(r,l)||(a="["+l+"]"),s||(e.seen.indexOf(u.value)<0?(s=g(n)?o(e,u.value,null):o(e,u.value,n-1),s.indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),E(a)){if(i&&l.match(/^\d+$/))return s;a=JSON.stringify(""+l),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function f(e,t,n){var r=0,l=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return l>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function h(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function y(e){return null==e}function b(e){return"number"==typeof e}function v(e){return"string"==typeof e}function x(e){return"symbol"==typeof e}function E(e){return void 0===e}function _(e){return S(e)&&"[object RegExp]"===C(e)}function S(e){return"object"==typeof e&&null!==e}function I(e){return S(e)&&"[object Date]"===C(e)}function w(e){return S(e)&&("[object Error]"===C(e)||e instanceof Error)}function k(e){return"function"==typeof e}function A(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function C(e){return Object.prototype.toString.call(e)}function T(e){return 10>e?"0"+e.toString(10):e.toString(10)}function M(){var e=new Date,t=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":");return[e.getDate(),R[e.getMonth()],t].join(" ")}function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var P=/%[sdj%]/g;n.format=function(e){if(!v(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(l(arguments[n]));return t.join(" ")}for(var n=1,r=arguments,i=r.length,a=String(e).replace(P,function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}}),s=r[n];i>n;s=r[++n])a+=g(s)||!S(s)?" "+s:" "+l(s);return a},n.deprecate=function(e,l){function i(){if(!a){if(t.throwDeprecation)throw new Error(l);t.traceDeprecation?console.trace(l):console.error(l),a=!0}return e.apply(this,arguments)}if(E(r.process))return function(){return n.deprecate(e,l).apply(this,arguments)};if(t.noDeprecation===!0)return e;var a=!1;return i};var L,O={};n.debuglog=function(e){if(E(L)&&(L=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!O[e])if(new RegExp("\\b"+e+"\\b","i").test(L)){var r=t.pid;O[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else O[e]=function(){};return O[e]},n.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=h,n.isBoolean=m,n.isNull=g,n.isNullOrUndefined=y,n.isNumber=b,n.isString=v,n.isSymbol=x,n.isUndefined=E,n.isRegExp=_,n.isObject=S,n.isDate=I,n.isError=w,n.isFunction=k,n.isPrimitive=A,n.isBuffer=e("./support/isBuffer");var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",M(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!S(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":200,_process:185,inherits:182}],202:[function(e,t){(function(n){"use strict";function r(e){this.enabled=e&&void 0!==e.enabled?e.enabled:c}function l(e){var t=function n(){return i.apply(n,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=h,t}function i(){var e=arguments,t=e.length,n=0!==t&&String(arguments[0]);if(t>1)for(var r=1;t>r;r++)n+=" "+e[r];if(!this.enabled||!n)return n;for(var l=this._styles,i=l.length;i--;){var a=o[l[i]];n=a.open+n.replace(a.closeRe,a.open)+a.close}return n}function a(){var e={};return Object.keys(f).forEach(function(t){e[t]={get:function(){return l.call(this,[t])}}}),e}var s=e("escape-string-regexp"),o=e("ansi-styles"),u=e("strip-ansi"),p=e("has-ansi"),c=e("supports-color"),d=Object.defineProperties;"win32"===n.platform&&(o.blue.open="");var f=function(){var e={};return Object.keys(o).forEach(function(t){o[t].closeRe=new RegExp(s(o[t].close),"g"),e[t]={get:function(){return l.call(this,this._styles.concat(t))}}}),e}(),h=d(function(){},f);d(r.prototype,a()),t.exports=new r,t.exports.styles=o,t.exports.hasColor=p,t.exports.stripColor=u,t.exports.supportsColor=c}).call(this,e("_process"))},{_process:185,"ansi-styles":203,"escape-string-regexp":204,"has-ansi":205,"strip-ansi":207,"supports-color":209}],203:[function(e,t){"use strict";var n=t.exports={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};n.colors.grey=n.colors.gray,Object.keys(n).forEach(function(e){var t=n[e];Object.keys(t).forEach(function(e){var r=t[e];n[e]=t[e]={open:"["+r[0]+"m",close:"["+r[1]+"m"}}),Object.defineProperty(n,e,{value:t,enumerable:!1})})},{}],204:[function(e,t){"use strict";var n=/[|\\{}()[\]^$+*?.]/g;t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(n,"\\$&")}},{}],205:[function(e,t){"use strict";var n=e("ansi-regex"),r=new RegExp(n().source);t.exports=r.test.bind(r)},{"ansi-regex":206}],206:[function(e,t){"use strict";t.exports=function(){return/(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/g}},{}],207:[function(e,t){"use strict";var n=e("ansi-regex")();t.exports=function(e){return"string"==typeof e?e.replace(n,""):e}},{"ansi-regex":208}],208:[function(e,t,n){arguments[4][206][0].apply(n,arguments)},{dup:206}],209:[function(e,t){(function(e){"use strict";var n=e.argv;t.exports=function(){return"FORCE_COLOR"in e.env?!0:-1!==n.indexOf("--no-color")||-1!==n.indexOf("--no-colors")||-1!==n.indexOf("--color=false")?!1:-1!==n.indexOf("--color")||-1!==n.indexOf("--colors")||-1!==n.indexOf("--color=true")||-1!==n.indexOf("--color=always")?!0:e.stdout&&!e.stdout.isTTY?!1:"UPSTART_JOB"in e.env?!1:"win32"===e.platform?!0:"COLORTERM"in e.env?!0:"dumb"===e.env.TERM?!1:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(e.env.TERM)?!0:!1}()}).call(this,e("_process"))},{_process:185}],210:[function(e,t,n){(function(t){"use strict";function r(e){return new t(e,"base64").toString()}function l(e){return e.split(",").pop()}function i(e,t){var n=p.exec(e);p.lastIndex=0;var r=n[1]||n[2],l=o.join(t,r);try{return s.readFileSync(l,"utf8")}catch(i){throw new Error("An error occurred while trying to read the map file at "+l+"\n"+i)}}function a(e,t){t=t||{};try{t.isFileComment&&(e=i(e,t.commentFileDir)),t.hasComment&&(e=l(e)),t.isEncoded&&(e=r(e)),(t.isJSON||t.isEncoded)&&(e=JSON.parse(e)),this.sourcemap=e}catch(n){return console.error(n),null}}var s=e("fs"),o=e("path"),u=/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset:\S+;)?base64,(.*)$/gm,p=/(?:\/\/[@#][ \t]+sourceMappingURL=(.+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm;a.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)},a.prototype.toBase64=function(){var e=this.toJSON();return new t(e).toString("base64")},a.prototype.toComment=function(){var e=this.toBase64();return"//# sourceMappingURL=data:application/json;base64,"+e},a.prototype.toObject=function(){return JSON.parse(this.toJSON())},a.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(e,t) },a.prototype.setProperty=function(e,t){return this.sourcemap[e]=t,this},a.prototype.getProperty=function(e){return this.sourcemap[e]},n.fromObject=function(e){return new a(e)},n.fromJSON=function(e){return new a(e,{isJSON:!0})},n.fromBase64=function(e){return new a(e,{isEncoded:!0})},n.fromComment=function(e){return e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),new a(e,{isEncoded:!0,hasComment:!0})},n.fromMapFileComment=function(e,t){return new a(e,{commentFileDir:t,isFileComment:!0,isJSON:!0})},n.fromSource=function(e){var t=e.match(u);return u.lastIndex=0,t?n.fromComment(t.pop()):null},n.fromMapFileSource=function(e,t){var r=e.match(p);return p.lastIndex=0,r?n.fromMapFileComment(r.pop(),t):null},n.removeComments=function(e){return u.lastIndex=0,e.replace(u,"")},n.removeMapFileComments=function(e){return p.lastIndex=0,e.replace(p,"")},n.__defineGetter__("commentRegex",function(){return u.lastIndex=0,u}),n.__defineGetter__("mapFileCommentRegex",function(){return p.lastIndex=0,p})}).call(this,e("buffer").Buffer)},{buffer:177,fs:174,path:184}],211:[function(e,t){!function(e,n,r){"use strict";function l(e){return null!==e&&("object"==typeof e||"function"==typeof e)}function i(e){return"function"==typeof e}function a(e,t,n){e&&!_n(e=n?e:e[vt],Hn)&&Un(e,Hn,t)}function s(e){return un.call(e).slice(8,-1)}function o(e){var t,n;return e==r?e===r?"Undefined":"Null":"string"==typeof(n=(t=jt(e))[Hn])?n:s(t)}function u(){for(var e=j(this),t=arguments.length,n=Pt(t),r=0,l=Kn._,i=!1;t>r;)(n[r]=arguments[r++])===l&&(i=!0);return function(){var r,a=this,s=arguments.length,o=0,u=0;if(!i&&!s)return c(e,n,a);if(r=n.slice(),i)for(;t>o;o++)r[o]===l&&(r[o]=arguments[u++]);for(;s>u;)r.push(arguments[u++]);return c(e,r,a)}}function p(e,t,n){if(j(e),~n&&t===r)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,l){return e.call(t,n,r,l)}}return function(){return e.apply(t,arguments)}}function c(e,t,n){var l=n===r;switch(0|t.length){case 0:return l?e():e.call(n);case 1:return l?e(t[0]):e.call(n,t[0]);case 2:return l?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return l?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return l?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3]);case 5:return l?e(t[0],t[1],t[2],t[3],t[4]):e.call(n,t[0],t[1],t[2],t[3],t[4])}return e.apply(n,t)}function d(e){return Sn(M(e))}function f(e){return e}function h(){return this}function m(e,t){return _n(e,t)?e[t]:void 0}function g(e){return P(e),xn?vn(e).concat(xn(e)):vn(e)}function y(e,t){for(var n,r=d(e),l=bn(r),i=l.length,a=0;i>a;)if(r[n=l[a++]]===t)return n}function b(e){return Lt(e).split(",")}function v(e){var t=1==e,n=2==e,l=3==e,i=4==e,a=6==e,s=5==e||a;return function(o){for(var u,c,d=jt(M(this)),f=arguments[1],h=Sn(d),m=p(o,f,3),g=I(h.length),y=0,b=t?Pt(g):n?[]:r;g>y;y++)if((s||y in h)&&(u=h[y],c=m(u,y,d),e))if(t)b[y]=c;else if(c)switch(e){case 3:return!0;case 5:return u;case 6:return y;case 2:b.push(u)}else if(i)return!1;return a?-1:l||i?i:b}}function x(e){return function(t){var n=d(this),r=I(n.length),l=w(arguments[1],r);if(e&&t!=t){for(;r>l;l++)if(_(n[l]))return e||l}else for(;r>l;l++)if((e||l in n)&&n[l]===t)return e||l;return!e&&-1}}function E(e,t){return"function"==typeof e?e:t}function _(e){return e!=e}function S(e){return isNaN(e)?0:Nn(e)}function I(e){return e>0?Rn(S(e),Tn):0}function w(e,t){var e=S(e);return 0>e?On(e+t,0):Rn(e,t)}function k(e){return e>9?e:"0"+e}function A(e,t,n){var r=l(t)?function(e){return t[e]}:t;return function(t){return Lt(n?t:this).replace(e,r)}}function C(e){return function(t){var n,l,i=Lt(M(this)),a=S(t),s=i.length;return 0>a||a>=s?e?"":r:(n=i.charCodeAt(a),55296>n||n>56319||a+1===s||(l=i.charCodeAt(a+1))<56320||l>57343?e?i.charAt(a):n:e?i.slice(a,a+2):(n-55296<<10)+(l-56320)+65536)}}function T(e,t,n){if(!e)throw qt(n?t+n:t)}function M(e){if(e==r)throw qt("Function called on null or undefined");return e}function j(e){return T(i(e),e," is not a function!"),e}function P(e){return T(l(e),e," is not an object!"),e}function L(e,t,n){T(e instanceof t,n,": use the 'new' operator!")}function O(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function R(e,t,n){return e[t]=n,e}function D(e){return Bn?function(t,n,r){return mn(t,n,O(e,r))}:R}function N(e){return mt+"("+e+")_"+(++Vn+Dn())[Et](36)}function F(e,t){return Vt&&Vt[e]||(t?Vt:Gn)(mt+sn+e)}function B(e,t){for(var n in t)Un(e,n,t[n]);return e}function V(e){!Bn||!n&&on(e)||mn(e,Jn,{configurable:!0,get:h})}function U(t,r,l){var a,s,o,u,c=t&Zn,d=c?e:t&er?e[r]:(e[r]||rn)[vt],f=c?Xn:Xn[r]||(Xn[r]={});c&&(l=r);for(a in l)s=!(t&Qn)&&d&&a in d&&(!i(d[a])||on(d[a])),o=(s?d:l)[a],n||!c||i(d[a])?t&nr&&s?u=p(o,e):t&rr&&!n&&d[a]==o?(u=function(e){return this instanceof o?new o(e):o(e)},u[vt]=o[vt]):u=t&tr&&i(o)?p(pn,o):o:u=l[a],n&&d&&!s&&(c?d[a]=o:delete d[a]&&Un(d,a,o)),f[a]!=o&&Un(f,a,u)}function q(e,t){Un(e,nt,t),At in nn&&Un(e,At,t)}function G(e,t,n,r){e[vt]=dn(r||or,{next:O(1,n)}),a(e,t+" Iterator")}function W(e,t,r,l){var i=e[vt],s=m(i,nt)||m(i,At)||l&&m(i,l)||r;if(n&&(q(i,s),s!==r)){var o=fn(s.call(new e));a(o,t+" Iterator",!0),_n(i,At)&&q(o,h)}return sr[t]=s,sr[t+" Iterator"]=h,s}function z(e,t,n,r,l,i){function a(e){return function(){return new n(this,e)}}G(n,t,r);var s=a(ir+ar),o=a(ar);l==ar?o=W(e,t,o,"values"):s=W(e,t,s,"entries"),l&&U(tr+Qn*ur,t,{entries:s,keys:i?o:a(ir),values:o})}function H(e,t){return{value:t,done:!!e}}function J(t){var n=jt(t),r=e[mt],l=(r&&r[kt]||At)in n;return l||nt in n||_n(sr,o(n))}function Y(t){var n=e[mt],r=t[n&&n[kt]||At],l=r||t[nt]||sr[o(t)];return P(l.call(t))}function X(e,t,n){return n?c(e,t):e(t)}function K(e){var t=!0,n={next:function(){throw 1},"return":function(){t=!1}};n[nt]=h;try{e(n)}catch(r){}return t}function $(e){var t=e["return"];t!==r&&t.call(e)}function Q(e,t){try{e(t)}catch(n){throw $(t),n}}function Z(e,t,n,r){Q(function(e){for(var l,i=p(n,r,t?2:1);!(l=e.next()).done;)if(X(i,l.value,t)===!1)return $(e)},Y(e))}var et,tt,nt,rt,lt="Object",it="Function",at="Array",st="String",ot="Number",ut="RegExp",pt="Date",ct="Map",dt="Set",ft="WeakMap",ht="WeakSet",mt="Symbol",gt="Promise",yt="Math",bt="Arguments",vt="prototype",xt="constructor",Et="toString",_t=Et+"Tag",St="toLocaleString",It="hasOwnProperty",wt="forEach",kt="iterator",At="@@"+kt,Ct="process",Tt="createElement",Mt=e[it],jt=e[lt],Pt=e[at],Lt=e[st],Ot=e[ot],Rt=(e[ut],e[pt]),Dt=e[ct],Nt=e[dt],Ft=e[ft],Bt=e[ht],Vt=e[mt],Ut=e[yt],qt=e.TypeError,Gt=e.RangeError,Wt=e.setTimeout,zt=e.setImmediate,Ht=e.clearImmediate,Jt=e.parseInt,Yt=e.isFinite,Xt=e[Ct],Kt=Xt&&Xt.nextTick,$t=e.document,Qt=$t&&$t.documentElement,Zt=e.navigator,en=e.define,tn=e.console||{},nn=Pt[vt],rn=jt[vt],ln=Mt[vt],an=1/0,sn=".",on=p(/./.test,/\[native code\]\s*\}\s*$/,1),un=rn[Et],pn=ln.call,cn=ln.apply,dn=jt.create,fn=jt.getPrototypeOf,hn=jt.setPrototypeOf,mn=jt.defineProperty,gn=jt.defineProperties,yn=jt.getOwnPropertyDescriptor,bn=jt.keys,vn=jt.getOwnPropertyNames,xn=jt.getOwnPropertySymbols,En=jt.isFrozen,_n=p(pn,rn[It],2),Sn=jt,In=jt.assign||function(e){for(var t=jt(M(e)),n=arguments.length,r=1;n>r;)for(var l,i=Sn(arguments[r++]),a=bn(i),s=a.length,o=0;s>o;)t[l=a[o++]]=i[l];return t},wn=nn.push,kn=(nn.unshift,nn.slice),An=(nn.splice,nn.indexOf),Cn=nn[wt],Tn=9007199254740991,Mn=Ut.pow,jn=Ut.abs,Pn=Ut.ceil,Ln=Ut.floor,On=Ut.max,Rn=Ut.min,Dn=Ut.random,Nn=Ut.trunc||function(e){return(e>0?Ln:Pn)(e)},Fn="Reduce of empty object with no initial value",Bn=!!function(){try{return 2==mn({},"a",{get:function(){return 2}}).a}catch(e){}}(),Vn=0,Un=D(1),qn=Vt?R:Un,Gn=Vt||N,Wn=F("unscopables"),zn=nn[Wn]||{},Hn=F(_t),Jn=F("species"),Yn=s(Xt)==Ct,Xn={},Kn=n?e:Xn,$n=e.core,Qn=1,Zn=2,er=4,tr=8,nr=16,rr=32;"undefined"!=typeof t&&t.exports?t.exports=Xn:i(en)&&en.amd?en(function(){return Xn}):rt=!0,(rt||n)&&(Xn.noConflict=function(){return e.core=$n,Xn},e.core=Xn),nt=F(kt);var lr=Gn("iter"),ir=1,ar=2,sr={},or={},ur="keys"in nn&&!("next"in[].keys());q(or,h),!function(e,t,n,a,u){function p(){var e,t=$t[Tt]("iframe"),n=C;for(t.style.display="none",Qt.appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object</script>"),e.close(),p=e.F;n--;)delete p[vt][_[n]];return p()}function h(e,t){return function(n){var r,l=d(n),i=0,a=[];for(r in l)r!=u&&_n(l,r)&&a.push(r);for(;t>i;)_n(l,r=e[i++])&&(~An.call(a,r)||a.push(r));return a}}function m(e){return!l(e)}function g(e){return function(){return e.apply(Sn(this),arguments)}}function y(e){return function(t,n){j(t);var r=d(this),l=I(r.length),i=e?l-1:0,a=e?-1:1;if(2>arguments.length)for(;;){if(i in r){n=r[i],i+=a;break}i+=a,T(e?i>=0:l>i,Fn)}for(;e?i>=0:l>i;i+=a)i in r&&(n=t(n,r[i],i,this));return n}}if(!Bn){var b=!1;try{b=8==mn($t.createElement("div"),"x",{get:function(){return 8}}).x}catch(E){}mn=function(t,n,r){if(b)try{return e(t,n,r)}catch(l){}if("get"in r||"set"in r)throw qt("Accessors not supported!");return"value"in r&&(P(t)[n]=r.value),t},yn=function(e,n){return _n(e,n)?O(!rn[t].call(e,n),e[n]):void 0},gn=function(e,t){P(e);for(var n,r=bn(t),l=r.length,i=0;l>i;)mn(e,n=r[i++],t[n]);return e}}U(er+Qn*!Bn,lt,{getOwnPropertyDescriptor:yn,defineProperty:mn,defineProperties:gn});var _=[xt,It,"isPrototypeOf",t,St,Et,"valueOf"],w=_.concat("length",vt),C=_.length;U(er,lt,{getPrototypeOf:fn=fn||function(e){return e=jt(M(e)),_n(e,u)?e[u]:i(e[xt])&&e instanceof e[xt]?e[xt][vt]:e instanceof jt?rn:null},getOwnPropertyNames:vn=vn||h(w,w.length,!0),create:dn=dn||function(e,t){var l;return null!==e?(n[vt]=P(e),l=new n,n[vt]=null,l[u]=e):l=p(),t===r?l:gn(l,t)},keys:bn=bn||h(_,C,!1),seal:f,freeze:f,preventExtensions:f,isSealed:m,isFrozen:En=En||m,isExtensible:l}),U(tr,it,{bind:function(e){function t(){var l=r.concat(kn.call(arguments));return c(n,l,this instanceof t?this:e)}var n=j(this),r=kn.call(arguments,1);return t[vt]=n[vt],t}}),0 in jt(sn)&&sn[0]==sn||(Sn=function(e){return s(e)==st?e.split(""):jt(e)},kn=g(kn)),U(tr+Qn*(Sn!=jt),at,{slice:kn,join:g(nn.join)}),U(er,at,{isArray:function(e){return s(e)==at}}),U(tr,at,{forEach:Cn=Cn||v(0),map:v(1),filter:v(2),some:v(3),every:v(4),reduce:y(!1),reduceRight:y(!0),indexOf:An=An||x(!1),lastIndexOf:function(e,t){var n=d(this),r=I(n.length),l=r-1;for(arguments.length>1&&(l=Rn(l,S(t))),0>l&&(l=I(r+l));l>=0;l--)if(l in n&&n[l]===e)return l;return-1}}),U(tr,st,{trim:A(/^\s*([\s\S]*\S)?\s*$/,"$1")}),U(er,pt,{now:function(){return+new Rt}}),U(tr,pt,{toISOString:function(){if(!Yt(this))throw Gt("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=0>t?"-":t>9999?"+":"";return r+("00000"+jn(t)).slice(r?-6:-4)+"-"+k(e.getUTCMonth()+1)+"-"+k(e.getUTCDate())+"T"+k(e.getUTCHours())+":"+k(e.getUTCMinutes())+":"+k(e.getUTCSeconds())+"."+(n>99?n:"0"+k(n))+"Z"}}),a(function(){return arguments}())==lt&&(o=function(e){var t=a(e);return t==lt&&i(e.callee)?bt:t})}(mn,"propertyIsEnumerable",function(){},o,Gn(vt)),!function(t,n,r,l){on(Vt)||(Vt=function(e){T(!(this instanceof Vt),mt+" is not a "+xt);var n=N(e),i=qn(dn(Vt[vt]),t,n);return r[n]=i,Bn&&l&&mn(rn,n,{configurable:!0,set:function(e){Un(this,n,e)}}),i},Un(Vt[vt],Et,function(){return this[t]})),U(Zn+rr,{Symbol:Vt});var i={"for":function(e){return _n(n,e+="")?n[e]:n[e]=Vt(e)},iterator:nt||F(kt),keyFor:u.call(y,n),species:Jn,toStringTag:Hn=F(_t,!0),unscopables:Wn,pure:Gn,set:qn,useSetter:function(){l=!0},useSimple:function(){l=!1}};Cn.call(b("hasInstance,isConcatSpreadable,match,replace,search,split,toPrimitive"),function(e){i[e]=F(e)}),U(er,mt,i),a(Vt,mt),U(er+Qn*!on(Vt),lt,{getOwnPropertyNames:function(e){for(var t,n=vn(d(e)),l=[],i=0;n.length>i;)_n(r,t=n[i++])||l.push(t);return l},getOwnPropertySymbols:function(e){for(var t,n=vn(d(e)),l=[],i=0;n.length>i;)_n(r,t=n[i++])&&l.push(r[t]);return l}}),a(Ut,yt,!0),a(e.JSON,"JSON",!0)}(Gn("tag"),{},{},!0),!function(){var e={assign:In,is:function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}};"__proto__"in rn&&function(t,n){try{n=p(pn,yn(rn,"__proto__").set,2),n({},nn)}catch(r){t=!0}e.setPrototypeOf=hn=hn||function(e,r){return P(e),T(null===r||l(r),r,": can't set as prototype!"),t?e.__proto__=r:n(e,r),e}}(),U(er,lt,e)}(),!function(){function e(e,t){var n=jt[e],r=Xn[lt][e],i=0,a={};if(!r||on(r)){a[e]=1==t?function(e){return l(e)?n(e):e}:2==t?function(e){return l(e)?n(e):!0}:3==t?function(e){return l(e)?n(e):!1}:4==t?function(e,t){return n(d(e),t)}:function(e){return n(d(e))};try{n(sn)}catch(s){i=1}U(er+Qn*i,lt,a)}}e("freeze",1),e("seal",1),e("preventExtensions",1),e("isFrozen",2),e("isSealed",2),e("isExtensible",3),e("getOwnPropertyDescriptor",4),e("getPrototypeOf"),e("keys"),e("getOwnPropertyNames")}(),!function(e){U(er,ot,{EPSILON:Mn(2,-52),isFinite:function(e){return"number"==typeof e&&Yt(e)},isInteger:e,isNaN:_,isSafeInteger:function(t){return e(t)&&jn(t)<=Tn},MAX_SAFE_INTEGER:Tn,MIN_SAFE_INTEGER:-Tn,parseFloat:parseFloat,parseInt:Jt})}(Ot.isInteger||function(e){return!l(e)&&Yt(e)&&Ln(e)===e}),!function(){function e(t){return Yt(t=+t)&&0!=t?0>t?-e(-t):l(t+i(t*t+1)):t}function t(e){return 0==(e=+e)?e:e>-1e-6&&1e-6>e?e+e*e/2:r(e)-1}var n=Ut.E,r=Ut.exp,l=Ut.log,i=Ut.sqrt,a=Ut.sign||function(e){return 0==(e=+e)||e!=e?e:0>e?-1:1};U(er,yt,{acosh:function(e){return(e=+e)<1?0/0:Yt(e)?l(e/n+i(e+1)*i(e-1)/n)+1:e},asinh:e,atanh:function(e){return 0==(e=+e)?e:l((1+e)/(1-e))/2},cbrt:function(e){return a(e=+e)*Mn(jn(e),1/3)},clz32:function(e){return(e>>>=0)?32-e[Et](2).length:32},cosh:function(e){return(r(e=+e)+r(-e))/2},expm1:t,fround:function(e){return new Float32Array([e])[0]},hypot:function(){for(var e,t=0,n=arguments.length,r=n,l=Pt(n),a=-an;n--;){if(e=l[n]=+arguments[n],e==an||e==-an)return an;e>a&&(a=e)}for(a=e||1;r--;)t+=Mn(l[r]/a,2);return a*i(t)},imul:function(e,t){var n=65535,r=+e,l=+t,i=n&r,a=n&l;return 0|i*a+((n&r>>>16)*a+i*(n&l>>>16)<<16>>>0)},log1p:function(e){return(e=+e)>-1e-8&&1e-8>e?e-e*e/2:l(1+e)},log10:function(e){return l(e)/Ut.LN10},log2:function(e){return l(e)/Ut.LN2},sign:a,sinh:function(e){return jn(e=+e)<1?(t(e)-t(-e))/2:(r(e-1)-r(-e-1))*(n/2)},tanh:function(e){var n=t(e=+e),l=t(-e);return n==an?1:l==an?-1:(n-l)/(r(e)+r(-e))},trunc:Nn})}(),!function(e){function t(e){if(s(e)==ut)throw qt()}U(er,st,{fromCodePoint:function(){for(var t,n=[],r=arguments.length,l=0;r>l;){if(t=+arguments[l++],w(t,1114111)!==t)throw Gt(t+" is not a valid code point");n.push(65536>t?e(t):e(((t-=65536)>>10)+55296,t%1024+56320))}return n.join("")},raw:function(e){for(var t=d(e.raw),n=I(t.length),r=arguments.length,l=[],i=0;n>i;)l.push(Lt(t[i++])),r>i&&l.push(Lt(arguments[i]));return l.join("")}}),U(tr,st,{codePointAt:C(!1),endsWith:function(e){t(e);var n=Lt(M(this)),l=arguments[1],i=I(n.length),a=l===r?i:Rn(I(l),i);return e+="",n.slice(a-e.length,a)===e},includes:function(e){return t(e),!!~Lt(M(this)).indexOf(e,arguments[1])},repeat:function(e){var t=Lt(M(this)),n="",r=S(e);if(0>r||r==an)throw Gt("Count can't be negative");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},startsWith:function(e){t(e);var n=Lt(M(this)),r=I(Rn(arguments[1],n.length));return e+="",n.slice(r,r+e.length)===e}})}(Lt.fromCharCode),!function(){U(er+Qn*K(Pt.from),at,{from:function(e){var t,n,l,i=jt(M(e)),a=arguments[1],s=a!==r,o=s?p(a,arguments[2],2):r,u=0;if(J(i))n=new(E(this,Pt)),Q(function(e){for(;!(l=e.next()).done;u++)n[u]=s?o(l.value,u):l.value},Y(i));else for(n=new(E(this,Pt))(t=I(i.length));t>u;u++)n[u]=s?o(i[u],u):i[u];return n.length=u,n}}),U(er,at,{of:function(){for(var e=0,t=arguments.length,n=new(E(this,Pt))(t);t>e;)n[e]=arguments[e++];return n.length=t,n}}),V(Pt)}(),!function(){U(tr,at,{copyWithin:function(e,t){var n=jt(M(this)),l=I(n.length),i=w(e,l),a=w(t,l),s=arguments[2],o=s===r?l:w(s,l),u=Rn(o-a,l-i),p=1;for(i>a&&a+u>i&&(p=-1,a=a+u-1,i=i+u-1);u-->0;)a in n?n[i]=n[a]:delete n[i],i+=p,a+=p;return n},fill:function(e){for(var t=jt(M(this)),n=I(t.length),l=w(arguments[1],n),i=arguments[2],a=i===r?n:w(i,n);a>l;)t[l++]=e;return t},find:v(5),findIndex:v(6)}),n&&(Cn.call(b("find,findIndex,fill,copyWithin,entries,keys,values"),function(e){zn[e]=!0}),Wn in nn||Un(nn,Wn,zn))}(),!function(e){z(Pt,at,function(e,t){qn(this,lr,{o:d(e),i:0,k:t})},function(){var e=this[lr],t=e.o,n=e.k,l=e.i++;return!t||l>=t.length?(e.o=r,H(1)):n==ir?H(0,l):n==ar?H(0,t[l]):H(0,[l,t[l]])},ar),sr[bt]=sr[at],z(Lt,st,function(e){qn(this,lr,{o:Lt(e),i:0})},function(){var t,n=this[lr],r=n.o,l=n.i;return l>=r.length?H(1):(t=e.call(r,l),n.i+=t.length,H(0,t))})}(C(!0)),i(zt)&&i(Ht)||function(t){function n(e){if(_n(m,e)){var t=m[e];delete m[e],t()}}function r(e){n(e.data)}var l,a,s,o=e.postMessage,d=e.addEventListener,f=e.MessageChannel,h=0,m={};zt=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++h]=function(){c(i(e)?e:Mt(e),t)},l(h),h},Ht=function(e){delete m[e]},Yn?l=function(e){Kt(u.call(n,e))}:d&&i(o)&&!e.importScripts?(l=function(e){o(e,"*")},d("message",r,!1)):i(f)?(a=new f,s=a.port2,a.port1.onmessage=r,l=p(s.postMessage,s,1)):l=$t&&t in $t[Tt]("script")?function(e){Qt.appendChild($t[Tt]("script"))[t]=function(){Qt.removeChild(this),n(e)}}:function(e){Wt(n,0,e)}}("onreadystatechange"),U(Zn+nr,{setImmediate:zt,clearImmediate:Ht}),!function(e,t){i(e)&&i(e.resolve)&&e.resolve(t=new e(function(){}))==t||function(t,n){function a(e){var t;return l(e)&&(t=e.then),i(t)?t:!1}function s(e){var t,r=e[n],l=r.c,i=0;if(r.h)return!0;for(;l.length>i;)if(t=l[i++],t.fail||s(t.P))return!0}function o(e,n){var r=e.c;(n||r.length)&&t(function(){var t=e.p,l=e.v,o=1==e.s,u=0;if(n&&!s(t))Wt(function(){s(t)||(Yn?!Xt.emit("unhandledRejection",l,t):i(tn.error)&&tn.error("Unhandled promise rejection",l))},1e3);else for(;r.length>u;)!function(t){var n,r,i=o?t.ok:t.fail;try{i?(o||(e.h=!0),n=i===!0?l:i(l),n===t.P?t.rej(qt(gt+"-chain cycle")):(r=a(n))?r.call(n,t.res,t.rej):t.res(n)):t.rej(l)}catch(s){t.rej(s)}}(r[u++]);r.length=0})}function u(e){var t,n,r=this;if(!r.d){r.d=!0,r=r.r||r;try{(t=a(e))?(n={r:r,d:!1},t.call(e,p(u,n,1),p(c,n,1))):(r.v=e,r.s=1,o(r))}catch(l){c.call(n||{r:r,d:!1},l)}}}function c(e){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=e,t.s=2,o(t,!0))}function d(e){var t=P(e)[Jn];return t!=r?t:e}e=function(t){j(t),L(this,e,gt);var l={p:this,c:[],s:0,d:!1,v:r,h:!1};Un(this,n,l);try{t(p(u,l,1),p(c,l,1))}catch(i){c.call(l,i)}},B(e[vt],{then:function(t,l){var a=P(P(this)[xt])[Jn],s={ok:i(t)?t:!0,fail:i(l)?l:!1},u=s.P=new(a!=r?a:e)(function(e,t){s.res=j(e),s.rej=j(t)}),p=this[n];return p.c.push(s),p.s&&o(p),u},"catch":function(e){return this.then(r,e)}}),B(e,{all:function(e){var t=d(this),n=[];return new t(function(r,l){Z(e,!1,wn,n);var i=n.length,a=Pt(i);i?Cn.call(n,function(e,n){t.resolve(e).then(function(e){a[n]=e,--i||r(a)},l)}):r(a)})},race:function(e){var t=d(this);return new t(function(n,r){Z(e,!1,function(e){t.resolve(e).then(n,r)})})},reject:function(e){return new(d(this))(function(t,n){n(e)})},resolve:function(e){return l(e)&&n in e&&fn(e)===this[vt]?e:new(d(this))(function(t){t(e)})}})}(Kt||zt,Gn("record")),a(e,gt),V(e),U(Zn+Qn*!on(e),{Promise:e})}(e[gt]),!function(){function e(e,t,l,i,s,o){function u(e,t){return t!=r&&Z(t,s,e[f],e),e}function p(e,t){var r=h[e];n&&(h[e]=function(e,n){var l=r.call(this,0===e?0:e,n);return t?this:l})}var f=s?"set":"add",h=e&&e[vt],b={};if(on(e)&&(o||!ur&&_n(h,wt)&&_n(h,"entries"))){var x,E=e,_=new e,S=_[f](o?{}:-0,1);K(function(t){new e(t)})&&(e=function(n){return L(this,e,t),u(new E,n)},e[vt]=h,n&&(h[xt]=e)),o||_[wt](function(e,t){x=1/t===-an}),x&&(p("delete"),p("has"),s&&p("get")),(x||S!==_)&&p(f,!0)}else e=o?function(n){L(this,e,t),qn(this,c,v++),u(this,n)}:function(n){var l=this;L(l,e,t),qn(l,d,dn(null)),qn(l,y,0),qn(l,m,r),qn(l,g,r),u(l,n)},B(B(e[vt],l),i),o||!Bn||mn(e[vt],"size",{get:function(){return M(this[y])}});return a(e,t),V(e),b[t]=e,U(Zn+rr+Qn*!on(e),b),o||z(e,t,function(e,t){qn(this,lr,{o:e,k:t})},function(){for(var e=this[lr],t=e.k,n=e.l;n&&n.r;)n=n.p;return e.o&&(e.l=n=n?n.n:e.o[g])?t==ir?H(0,n.k):t==ar?H(0,n.v):H(0,[n.k,n.v]):(e.o=r,H(1))},s?ir+ar:ar,!s),e}function t(e,t){if(!l(e))return("string"==typeof e?"S":"P")+e;if(En(e))return"F";if(!_n(e,c)){if(!t)return"E";Un(e,c,++v)}return"O"+e[c]}function i(e,n){var r,l=t(n);if("F"!=l)return e[d][l];for(r=e[g];r;r=r.n)if(r.k==n)return r}function s(e,n,l){var a,s,o=i(e,n);return o?o.v=l:(e[m]=o={i:s=t(n,!0),k:n,v:l,p:a=e[m],n:r,r:!1},e[g]||(e[g]=o),a&&(a.n=o),e[y]++,"F"!=s&&(e[d][s]=o)),e}function o(e,t,n){return En(P(t))?u(e).set(t,n):(_n(t,f)||Un(t,f,{}),t[f][e[c]]=n),e}function u(e){return e[h]||Un(e,h,new Dt)[h]}var c=Gn("uid"),d=Gn("O1"),f=Gn("weak"),h=Gn("leak"),m=Gn("last"),g=Gn("first"),y=Bn?Gn("size"):"size",v=0,x={},E={clear:function(){for(var e=this,t=e[d],n=e[g];n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=r),delete t[n.i];e[g]=e[m]=r,e[y]=0},"delete":function(e){var t=this,n=i(t,e);if(n){var r=n.n,l=n.p;delete t[d][n.i],n.r=!0,l&&(l.n=r),r&&(r.p=l),t[g]==n&&(t[g]=r),t[m]==n&&(t[m]=l),t[y]--}return!!n},forEach:function(e){for(var t,n=p(e,arguments[1],3);t=t?t.n:this[g];)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!i(this,e)}};Dt=e(Dt,ct,{get:function(e){var t=i(this,e);return t&&t.v},set:function(e,t){return s(this,0===e?0:e,t)}},E,!0),Nt=e(Nt,dt,{add:function(e){return s(this,e=0===e?0:e,e)}},E);var _={"delete":function(e){return l(e)?En(e)?u(this)["delete"](e):_n(e,f)&&_n(e[f],this[c])&&delete e[f][this[c]]:!1},has:function(e){return l(e)?En(e)?u(this).has(e):_n(e,f)&&_n(e[f],this[c]):!1}};Ft=e(Ft,ft,{get:function(e){if(l(e)){if(En(e))return u(this).get(e);if(_n(e,f))return e[f][this[c]]}},set:function(e,t){return o(this,e,t)}},_,!0,!0),n&&7!=(new Ft).set(jt.freeze(x),7).get(x)&&Cn.call(b("delete,has,get,set"),function(e){var t=Ft[vt][e];Ft[vt][e]=function(n,r){if(l(n)&&En(n)){var i=u(this)[e](n,r);return"set"==e?this:i}return t.call(this,n,r)}}),Bt=e(Bt,ht,{add:function(e){return o(this,e,!0)}},_,!1,!0)}(),!function(){function e(e){var t,n=[];for(t in e)n.push(t);qn(this,lr,{o:e,a:n,i:0})}function t(e){return function(t){P(t);try{return e.apply(r,arguments),!0}catch(n){return!1}}}function n(e,t){var i,a=arguments.length<3?e:arguments[2],s=yn(P(e),t);return s?_n(s,"value")?s.value:s.get===r?r:s.get.call(a):l(i=fn(e))?n(i,t,a):r}function i(e,t,n){var a,s,o=arguments.length<4?e:arguments[3],u=yn(P(e),t);if(!u){if(l(s=fn(e)))return i(s,t,n,o);u=O(0)}return _n(u,"value")?u.writable!==!1&&l(o)?(a=yn(o,t)||O(0),a.value=n,mn(o,t,a),!0):!1:u.set===r?!1:(u.set.call(o,n),!0)}G(e,lt,function(){var e,t=this[lr],n=t.a;do if(t.i>=n.length)return H(1);while(!((e=n[t.i++])in t.o));return H(0,e)});var a=jt.isExtensible||f,s={apply:p(pn,cn,3),construct:function(e,t){var n=j(arguments.length<3?e:arguments[2])[vt],r=dn(l(n)?n:rn),i=cn.call(e,r,t);return l(i)?i:r},defineProperty:t(mn),deleteProperty:function(e,t){var n=yn(P(e),t);return n&&!n.configurable?!1:delete e[t]},enumerate:function(t){return new e(P(t))},get:n,getOwnPropertyDescriptor:function(e,t){return yn(P(e),t)},getPrototypeOf:function(e){return fn(P(e))},has:function(e,t){return t in e},isExtensible:function(e){return!!a(P(e))},ownKeys:g,preventExtensions:t(jt.preventExtensions||f),set:i};hn&&(s.setPrototypeOf=function(e,t){return hn(P(e),t),!0}),U(Zn,{Reflect:{}}),U(er,"Reflect",s)}(),!function(){function e(e){return function(t){var n,r=d(t),l=bn(t),i=l.length,a=0,s=Pt(i);if(e)for(;i>a;)s[a]=[n=l[a++],r[n]];else for(;i>a;)s[a]=r[l[a++]];return s}}U(tr,at,{includes:x(!0)}),U(tr,st,{at:C(!0)}),U(er,lt,{getOwnPropertyDescriptors:function(e){var t=d(e),n={};return Cn.call(g(t),function(e){mn(n,e,O(0,yn(t,e)))}),n},values:e(!1),entries:e(!0)}),U(er,ut,{escape:A(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",!0)})}(),!function(e){function t(e){if(e){var t=e[vt];Un(t,et,t.get),Un(t,n,t.set),Un(t,r,t["delete"])}}et=F(e+"Get",!0);var n=F(e+dt,!0),r=F(e+"Delete",!0);U(er,mt,{referenceGet:et,referenceSet:n,referenceDelete:r}),Un(ln,et,h),t(Dt),t(Ft)}("reference"),!function(e){function t(e,t){qn(this,lr,{o:d(e),a:bn(e),i:0,k:t})}function n(e){return function(n){return new t(n,e)}}function i(e){var t=1==e,n=4==e;return function(l,i,a){var s,o,u,c=p(i,a,3),f=d(l),h=t||7==e||2==e?new(E(this,tt)):r;for(s in f)if(_n(f,s)&&(o=f[s],u=c(o,s,l),e))if(t)h[s]=u;else if(u)switch(e){case 2:h[s]=o;break;case 3:return!0;case 5:return o;case 6:return s;case 7:h[u[0]]=u[1]}else if(n)return!1;return 3==e||n?n:h}}function a(e){return function(t,n,l){j(n);var i,a,s,o=d(t),u=bn(o),p=u.length,c=0;for(e?i=l==r?new(E(this,tt)):jt(l):arguments.length<3?(T(p,Fn),i=o[u[c++]]):i=jt(l);p>c;)if(_n(o,a=u[c++]))if(s=n(i,o[a],a,t),e){if(s===!1)break}else i=s;return i}}function s(e,t){return(t==t?y(e,t):o(e,_))!==r}tt=function(e){var t=dn(null);return e!=r&&(J(e)?Z(e,!0,function(e,n){t[e]=n}):In(t,e)),t},tt[vt]=null,G(t,e,function(){var e,t=this[lr],n=t.o,l=t.a,i=t.k;do if(t.i>=l.length)return t.o=r,H(1);while(!_n(n,e=l[t.i++]));return i==ir?H(0,e):i==ar?H(0,n[e]):H(0,[e,n[e]])});var o=i(6),u={keys:n(ir),values:n(ar),entries:n(ir+ar),forEach:i(0),map:i(1),filter:i(2),some:i(3),every:i(4),find:i(5),findKey:o,mapPairs:i(7),reduce:a(!1),turn:a(!0),keyOf:y,includes:s,has:_n,get:m,set:D(0),isDict:function(e){return l(e)&&fn(e)===tt[vt]}};if(et)for(var f in u)!function(e){function t(){for(var t=[this],n=0;n<arguments.length;)t.push(arguments[n++]);return c(e,t)}e[et]=function(){return t}}(u[f]);U(Zn+Qn,{Dict:B(tt,u)})}("Dict"),!function(e,t){function n(t,r){return this instanceof n?(this[lr]=Y(t),void(this[e]=!!r)):new n(t,r)}function l(n){function r(n,r,l){this[lr]=Y(n),this[e]=n[e],this[t]=p(r,l,n[e]?2:1)}return G(r,"Chain",n,i),q(r[vt],h),r}G(n,"Wrapper",function(){return this[lr].next()});var i=n[vt];q(i,function(){return this[lr]});var a=l(function(){var n=this[lr].next();return n.done?n:H(0,X(this[t],n.value,this[e]))}),s=l(function(){for(;;){var n=this[lr].next();if(n.done||X(this[t],n.value,this[e]))return n}});B(i,{of:function(t,n){Z(this,this[e],t,n)},array:function(e,t){var n=[];return Z(e!=r?this.map(e,t):this,!1,wn,n),n},filter:function(e,t){return new s(this,e,t)},map:function(e,t){return new a(this,e,t)}}),n.isIterable=J,n.getIterator=Y,U(Zn+Qn,{$for:n})}("entries",Gn("fn")),U(Zn+Qn,{delay:function(e){return new Promise(function(t){Wt(t,e,!0)})}}),!function(e,t){function n(n){var l=this,i={};return Un(l,e,function(e){return e!==r&&e in l?_n(i,e)?i[e]:i[e]=p(l[e],l,-1):t.call(l)})[e](n)}Xn._=Kn._=Kn._||{},U(tr+Qn,it,{part:u,only:function(e,t){var n=j(this),r=I(e),l=arguments.length>1;return function(){for(var e=Rn(r,arguments.length),i=Pt(e),a=0;e>a;)i[a]=arguments[a++];return c(n,i,l?t:this)}}}),Un(Kn._,Et,function(){return e}),Un(rn,e,n),Bn||Un(nn,e,n)}(Bn?N("tie"):St,rn[St]),!function(){function e(e,t){for(var n,r=g(d(t)),l=r.length,i=0;l>i;)mn(e,n=r[i++],yn(t,n));return e}U(er+Qn,lt,{isObject:l,classof:o,define:e,make:function(t,n){return e(dn(t),n)}})}(),U(tr+Qn,at,{turn:function(e,t){j(e);for(var n=t==r?[]:jt(t),l=Sn(this),i=I(l.length),a=0;i>a&&e(n,l[a],a++,this)!==!1;);return n}}),n&&(zn.turn=!0),!function(e){function t(e){qn(this,lr,{l:I(e),i:0})}G(t,ot,function(){var e=this[lr],t=e.i++;return t<e.l?H(0,t):H(1)}),W(Ot,ot,function(){return new t(this)}),e.random=function(e){var t=+this,n=e==r?0:+e,l=Rn(t,n);return Dn()*(On(t,n)-l)+l},Cn.call(b("round,floor,ceil,abs,sin,asin,cos,acos,tan,atan,exp,sqrt,max,min,pow,atan2,acosh,asinh,atanh,cbrt,clz32,cosh,expm1,hypot,imul,log1p,log10,log2,sign,sinh,tanh,trunc"),function(t){var n=Ut[t];n&&(e[t]=function(){for(var e=[+this],t=0;arguments.length>t;)e.push(arguments[t++]);return c(n,e)})}),U(tr+Qn,ot,e)}({}),!function(){var e,t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"},n={};for(e in t)n[t[e]]=e;U(tr+Qn,st,{escapeHTML:A(/[&<>"']/g,t),unescapeHTML:A(/&(?:amp|lt|gt|quot|apos);/g,n)})}(),!function(e,t,n,r,l,i,a,s,o){function u(t){return function(u,p){function c(e){return d[t+e]()}var d=this,f=n[_n(n,p)?p:r];return Lt(u).replace(e,function(e){switch(e){case"s":return c(l);case"ss":return k(c(l));case"m":return c(i);case"mm":return k(c(i));case"h":return c(a);case"hh":return k(c(a));case"D":return c(pt);case"DD":return k(c(pt));case"W":return f[0][c("Day")];case"N":return c(s)+1;case"NN":return k(c(s)+1);case"M":return f[2][c(s)];case"MM":return f[1][c(s)];case"Y":return c(o);case"YY":return k(c(o)%100)}return e})}}function p(e,r){function l(e){var n=[];return Cn.call(b(r.months),function(r){n.push(r.replace(t,"$"+e))}),n}return n[e]=[b(r.weekdays),l(1),l(2)],Xn}U(tr+Qn,pt,{format:u("get"),formatUTC:u("getUTC")}),p(r,{weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",months:"January,February,March,April,May,June,July,August,September,October,November,December"}),p("ru",{weekdays:"Воскресенье,Понедельник,Вторник,Среда,Четверг,Пятница,Суббота",months:"Январ:я|ь,Феврал:я|ь,Март:а|,Апрел:я|ь,Ма:я|й,Июн:я|ь,Июл:я|ь,Август:а|,Сентябр:я|ь,Октябр:я|ь,Ноябр:я|ь,Декабр:я|ь"}),Xn.locale=function(e){return _n(n,e)?r=e:r},Xn.addLocale=p}(/\b\w\w?\b/g,/:(.*)\|(.*)$/,{},"en","Seconds","Minutes","Hours","Month","FullYear"),U(Zn+Qn,{global:e}),!function(e){function t(t,n){Cn.call(b(t),function(t){t in nn&&(e[t]=p(pn,nn[t],n))})}t("pop,reverse,shift,keys,values,entries",1),t("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),t("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill,turn"),U(er,at,e)}({}),!function(e){!n||!e||nt in e[vt]||Un(e[vt],nt,sr[at]),sr.NodeList=sr[at]}(e.NodeList),!function(e){function t(t){return e?function(e,n){return t(c(u,kn.call(arguments,2),i(e)?e:Mt(e)),n)}:t}U(Zn+nr+Qn*e,{setTimeout:Wt=t(Wt),setInterval:t(setInterval)})}(!!Zt&&/MSIE .\./.test(Zt.userAgent)),!function(e,t){Cn.call(b("assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,isIndependentlyComposed,log,markTimeline,profile,profileEnd,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn"),function(n){e[n]=function(){return t&&n in tn?cn.call(tn[n],tn,arguments):void 0}}),U(Zn+Qn,{log:In(e.log,e,{enable:function(){t=!0},disable:function(){t=!1}})})}({},!0)}("undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),!1)},{}],212:[function(e,t){!function(e,n,r){"use strict";function l(e){return null!==e&&("object"==typeof e||"function"==typeof e)}function i(e){return"function"==typeof e}function a(e,t,n){e&&!vn(e=n?e:e[vt],Un)&&Dn(e,Un,t)}function s(e){return sn.call(e).slice(8,-1)}function o(e){var t,n;return e==r?e===r?"Undefined":"Null":"string"==typeof(n=(t=jt(e))[Un])?n:s(t)}function u(){for(var e=j(this),t=arguments.length,n=Pt(t),r=0,l=zn._,i=!1;t>r;)(n[r]=arguments[r++])===l&&(i=!0);return function(){var r,a=this,s=arguments.length,o=0,u=0;if(!i&&!s)return c(e,n,a);if(r=n.slice(),i)for(;t>o;o++)r[o]===l&&(r[o]=arguments[u++]);for(;s>u;)r.push(arguments[u++]);return c(e,r,a)}}function p(e,t,n){if(j(e),~n&&t===r)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,l){return e.call(t,n,r,l)}}return function(){return e.apply(t,arguments)}}function c(e,t,n){var l=n===r;switch(0|t.length){case 0:return l?e():e.call(n);case 1:return l?e(t[0]):e.call(n,t[0]);case 2:return l?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return l?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return l?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3]);case 5:return l?e(t[0],t[1],t[2],t[3],t[4]):e.call(n,t[0],t[1],t[2],t[3],t[4])}return e.apply(n,t)}function d(e){return xn(M(e))}function f(e){return e}function h(){return this}function m(e,t){return vn(e,t)?e[t]:void 0}function g(e){return P(e),yn?gn(e).concat(yn(e)):gn(e)}function y(e,t){for(var n,r=d(e),l=mn(r),i=l.length,a=0;i>a;)if(r[n=l[a++]]===t)return n}function b(e){return Lt(e).split(",")}function v(e){var t=1==e,n=2==e,l=3==e,i=4==e,a=6==e,s=5==e||a;return function(o){for(var u,c,d=jt(M(this)),f=arguments[1],h=xn(d),m=p(o,f,3),g=I(h.length),y=0,b=t?Pt(g):n?[]:r;g>y;y++)if((s||y in h)&&(u=h[y],c=m(u,y,d),e))if(t)b[y]=c;else if(c)switch(e){case 3:return!0;case 5:return u;case 6:return y;case 2:b.push(u)}else if(i)return!1;return a?-1:l||i?i:b }}function x(e){return function(t){var n=d(this),r=I(n.length),l=w(arguments[1],r);if(e&&t!=t){for(;r>l;l++)if(_(n[l]))return e||l}else for(;r>l;l++)if((e||l in n)&&n[l]===t)return e||l;return!e&&-1}}function E(e,t){return"function"==typeof e?e:t}function _(e){return e!=e}function S(e){return isNaN(e)?0:Pn(e)}function I(e){return e>0?Mn(S(e),In):0}function w(e,t){var e=S(e);return 0>e?Tn(e+t,0):Mn(e,t)}function k(e){return e>9?e:"0"+e}function A(e,t,n){var r=l(t)?function(e){return t[e]}:t;return function(t){return Lt(n?t:this).replace(e,r)}}function C(e){return function(t){var n,l,i=Lt(M(this)),a=S(t),s=i.length;return 0>a||a>=s?e?"":r:(n=i.charCodeAt(a),55296>n||n>56319||a+1===s||(l=i.charCodeAt(a+1))<56320||l>57343?e?i.charAt(a):n:e?i.slice(a,a+2):(n-55296<<10)+(l-56320)+65536)}}function T(e,t,n){if(!e)throw Ut(n?t+n:t)}function M(e){if(e==r)throw Ut("Function called on null or undefined");return e}function j(e){return T(i(e),e," is not a function!"),e}function P(e){return T(l(e),e," is not an object!"),e}function L(e,t,n){T(e instanceof t,n,": use the 'new' operator!")}function O(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function R(e,t,n){return e[t]=n,e}function D(e){return On?function(t,n,r){return fn(t,n,O(e,r))}:R}function N(e){return mt+"("+e+")_"+(++Rn+jn())[Et](36)}function F(e,t){return Bt&&Bt[e]||(t?Bt:Fn)(mt+ln+e)}function B(e,t){for(var n in t)Dn(e,n,t[n]);return e}function V(e){!On||!n&&an(e)||fn(e,qn,{configurable:!0,get:h})}function U(t,r,l){var a,s,o,u,c=t&Yn,d=c?e:t&Xn?e[r]:(e[r]||tn)[vt],f=c?Wn:Wn[r]||(Wn[r]={});c&&(l=r);for(a in l)s=!(t&Jn)&&d&&a in d&&(!i(d[a])||an(d[a])),o=(s?d:l)[a],n||!c||i(d[a])?t&$n&&s?u=p(o,e):t&Qn&&!n&&d[a]==o?(u=function(e){return this instanceof o?new o(e):o(e)},u[vt]=o[vt]):u=t&Kn&&i(o)?p(on,o):o:u=l[a],n&&d&&!s&&(c?d[a]=o:delete d[a]&&Dn(d,a,o)),f[a]!=o&&Dn(f,a,u)}function q(e,t){Dn(e,nt,t),At in en&&Dn(e,At,t)}function G(e,t,n,r){e[vt]=pn(r||rr,{next:O(1,n)}),a(e,t+" Iterator")}function W(e,t,r,l){var i=e[vt],s=m(i,nt)||m(i,At)||l&&m(i,l)||r;if(n&&(q(i,s),s!==r)){var o=cn(s.call(new e));a(o,t+" Iterator",!0),vn(i,At)&&q(o,h)}return nr[t]=s,nr[t+" Iterator"]=h,s}function z(e,t,n,r,l,i){function a(e){return function(){return new n(this,e)}}G(n,t,r);var s=a(er+tr),o=a(tr);l==tr?o=W(e,t,o,"values"):s=W(e,t,s,"entries"),l&&U(Kn+Jn*lr,t,{entries:s,keys:i?o:a(er),values:o})}function H(e,t){return{value:t,done:!!e}}function J(t){var n=jt(t),r=e[mt],l=(r&&r[kt]||At)in n;return l||nt in n||vn(nr,o(n))}function Y(t){var n=e[mt],r=t[n&&n[kt]||At],l=r||t[nt]||nr[o(t)];return P(l.call(t))}function X(e,t,n){return n?c(e,t):e(t)}function K(e){var t=!0,n={next:function(){throw 1},"return":function(){t=!1}};n[nt]=h;try{e(n)}catch(r){}return t}function $(e){var t=e["return"];t!==r&&t.call(e)}function Q(e,t){try{e(t)}catch(n){throw $(t),n}}function Z(e,t,n,r){Q(function(e){for(var l,i=p(n,r,t?2:1);!(l=e.next()).done;)if(X(i,l.value,t)===!1)return $(e)},Y(e))}var et,tt,nt,rt,lt="Object",it="Function",at="Array",st="String",ot="Number",ut="RegExp",pt="Date",ct="Map",dt="Set",ft="WeakMap",ht="WeakSet",mt="Symbol",gt="Promise",yt="Math",bt="Arguments",vt="prototype",xt="constructor",Et="toString",_t=Et+"Tag",St="toLocaleString",It="hasOwnProperty",wt="forEach",kt="iterator",At="@@"+kt,Ct="process",Tt="createElement",Mt=e[it],jt=e[lt],Pt=e[at],Lt=e[st],Ot=e[ot],Rt=(e[ut],e[pt],e[ct]),Dt=e[dt],Nt=e[ft],Ft=e[ht],Bt=e[mt],Vt=e[yt],Ut=e.TypeError,qt=e.RangeError,Gt=e.setTimeout,Wt=e.setImmediate,zt=e.clearImmediate,Ht=e.parseInt,Jt=e.isFinite,Yt=e[Ct],Xt=Yt&&Yt.nextTick,Kt=e.document,$t=Kt&&Kt.documentElement,Qt=(e.navigator,e.define),Zt=e.console||{},en=Pt[vt],tn=jt[vt],nn=Mt[vt],rn=1/0,ln=".",an=p(/./.test,/\[native code\]\s*\}\s*$/,1),sn=tn[Et],on=nn.call,un=nn.apply,pn=jt.create,cn=jt.getPrototypeOf,dn=jt.setPrototypeOf,fn=jt.defineProperty,hn=(jt.defineProperties,jt.getOwnPropertyDescriptor),mn=jt.keys,gn=jt.getOwnPropertyNames,yn=jt.getOwnPropertySymbols,bn=jt.isFrozen,vn=p(on,tn[It],2),xn=jt,En=jt.assign||function(e){for(var t=jt(M(e)),n=arguments.length,r=1;n>r;)for(var l,i=xn(arguments[r++]),a=mn(i),s=a.length,o=0;s>o;)t[l=a[o++]]=i[l];return t},_n=en.push,Sn=(en.unshift,en.slice,en.splice,en.indexOf,en[wt]),In=9007199254740991,wn=Vt.pow,kn=Vt.abs,An=Vt.ceil,Cn=Vt.floor,Tn=Vt.max,Mn=Vt.min,jn=Vt.random,Pn=Vt.trunc||function(e){return(e>0?Cn:An)(e)},Ln="Reduce of empty object with no initial value",On=!!function(){try{return 2==fn({},"a",{get:function(){return 2}}).a}catch(e){}}(),Rn=0,Dn=D(1),Nn=Bt?R:Dn,Fn=Bt||N,Bn=F("unscopables"),Vn=en[Bn]||{},Un=F(_t),qn=F("species"),Gn=s(Yt)==Ct,Wn={},zn=n?e:Wn,Hn=e.core,Jn=1,Yn=2,Xn=4,Kn=8,$n=16,Qn=32;"undefined"!=typeof t&&t.exports?t.exports=Wn:i(Qt)&&Qt.amd?Qt(function(){return Wn}):rt=!0,(rt||n)&&(Wn.noConflict=function(){return e.core=Hn,Wn},e.core=Wn),nt=F(kt);var Zn=Fn("iter"),er=1,tr=2,nr={},rr={},lr="keys"in en&&!("next"in[].keys());q(rr,h),!function(t,n,r,l){an(Bt)||(Bt=function(e){T(!(this instanceof Bt),mt+" is not a "+xt);var n=N(e),i=Nn(pn(Bt[vt]),t,n);return r[n]=i,On&&l&&fn(tn,n,{configurable:!0,set:function(e){Dn(this,n,e)}}),i},Dn(Bt[vt],Et,function(){return this[t]})),U(Yn+Qn,{Symbol:Bt});var i={"for":function(e){return vn(n,e+="")?n[e]:n[e]=Bt(e)},iterator:nt||F(kt),keyFor:u.call(y,n),species:qn,toStringTag:Un=F(_t,!0),unscopables:Bn,pure:Fn,set:Nn,useSetter:function(){l=!0},useSimple:function(){l=!1}};Sn.call(b("hasInstance,isConcatSpreadable,match,replace,search,split,toPrimitive"),function(e){i[e]=F(e)}),U(Xn,mt,i),a(Bt,mt),U(Xn+Jn*!an(Bt),lt,{getOwnPropertyNames:function(e){for(var t,n=gn(d(e)),l=[],i=0;n.length>i;)vn(r,t=n[i++])||l.push(t);return l},getOwnPropertySymbols:function(e){for(var t,n=gn(d(e)),l=[],i=0;n.length>i;)vn(r,t=n[i++])&&l.push(r[t]);return l}}),a(Vt,yt,!0),a(e.JSON,"JSON",!0)}(Fn("tag"),{},{},!0),!function(){var e={assign:En,is:function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}};"__proto__"in tn&&function(t,n){try{n=p(on,hn(tn,"__proto__").set,2),n({},en)}catch(r){t=!0}e.setPrototypeOf=dn=dn||function(e,r){return P(e),T(null===r||l(r),r,": can't set as prototype!"),t?e.__proto__=r:n(e,r),e}}(),U(Xn,lt,e)}(),!function(){function e(e,t){var n=jt[e],r=Wn[lt][e],i=0,a={};if(!r||an(r)){a[e]=1==t?function(e){return l(e)?n(e):e}:2==t?function(e){return l(e)?n(e):!0}:3==t?function(e){return l(e)?n(e):!1}:4==t?function(e,t){return n(d(e),t)}:function(e){return n(d(e))};try{n(ln)}catch(s){i=1}U(Xn+Jn*i,lt,a)}}e("freeze",1),e("seal",1),e("preventExtensions",1),e("isFrozen",2),e("isSealed",2),e("isExtensible",3),e("getOwnPropertyDescriptor",4),e("getPrototypeOf"),e("keys"),e("getOwnPropertyNames")}(),!function(e){U(Xn,ot,{EPSILON:wn(2,-52),isFinite:function(e){return"number"==typeof e&&Jt(e)},isInteger:e,isNaN:_,isSafeInteger:function(t){return e(t)&&kn(t)<=In},MAX_SAFE_INTEGER:In,MIN_SAFE_INTEGER:-In,parseFloat:parseFloat,parseInt:Ht})}(Ot.isInteger||function(e){return!l(e)&&Jt(e)&&Cn(e)===e}),!function(){function e(t){return Jt(t=+t)&&0!=t?0>t?-e(-t):l(t+i(t*t+1)):t}function t(e){return 0==(e=+e)?e:e>-1e-6&&1e-6>e?e+e*e/2:r(e)-1}var n=Vt.E,r=Vt.exp,l=Vt.log,i=Vt.sqrt,a=Vt.sign||function(e){return 0==(e=+e)||e!=e?e:0>e?-1:1};U(Xn,yt,{acosh:function(e){return(e=+e)<1?0/0:Jt(e)?l(e/n+i(e+1)*i(e-1)/n)+1:e},asinh:e,atanh:function(e){return 0==(e=+e)?e:l((1+e)/(1-e))/2},cbrt:function(e){return a(e=+e)*wn(kn(e),1/3)},clz32:function(e){return(e>>>=0)?32-e[Et](2).length:32},cosh:function(e){return(r(e=+e)+r(-e))/2},expm1:t,fround:function(e){return new Float32Array([e])[0]},hypot:function(){for(var e,t=0,n=arguments.length,r=n,l=Pt(n),a=-rn;n--;){if(e=l[n]=+arguments[n],e==rn||e==-rn)return rn;e>a&&(a=e)}for(a=e||1;r--;)t+=wn(l[r]/a,2);return a*i(t)},imul:function(e,t){var n=65535,r=+e,l=+t,i=n&r,a=n&l;return 0|i*a+((n&r>>>16)*a+i*(n&l>>>16)<<16>>>0)},log1p:function(e){return(e=+e)>-1e-8&&1e-8>e?e-e*e/2:l(1+e)},log10:function(e){return l(e)/Vt.LN10},log2:function(e){return l(e)/Vt.LN2},sign:a,sinh:function(e){return kn(e=+e)<1?(t(e)-t(-e))/2:(r(e-1)-r(-e-1))*(n/2)},tanh:function(e){var n=t(e=+e),l=t(-e);return n==rn?1:l==rn?-1:(n-l)/(r(e)+r(-e))},trunc:Pn})}(),!function(e){function t(e){if(s(e)==ut)throw Ut()}U(Xn,st,{fromCodePoint:function(){for(var t,n=[],r=arguments.length,l=0;r>l;){if(t=+arguments[l++],w(t,1114111)!==t)throw qt(t+" is not a valid code point");n.push(65536>t?e(t):e(((t-=65536)>>10)+55296,t%1024+56320))}return n.join("")},raw:function(e){for(var t=d(e.raw),n=I(t.length),r=arguments.length,l=[],i=0;n>i;)l.push(Lt(t[i++])),r>i&&l.push(Lt(arguments[i]));return l.join("")}}),U(Kn,st,{codePointAt:C(!1),endsWith:function(e){t(e);var n=Lt(M(this)),l=arguments[1],i=I(n.length),a=l===r?i:Mn(I(l),i);return e+="",n.slice(a-e.length,a)===e},includes:function(e){return t(e),!!~Lt(M(this)).indexOf(e,arguments[1])},repeat:function(e){var t=Lt(M(this)),n="",r=S(e);if(0>r||r==rn)throw qt("Count can't be negative");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},startsWith:function(e){t(e);var n=Lt(M(this)),r=I(Mn(arguments[1],n.length));return e+="",n.slice(r,r+e.length)===e}})}(Lt.fromCharCode),!function(){U(Xn+Jn*K(Pt.from),at,{from:function(e){var t,n,l,i=jt(M(e)),a=arguments[1],s=a!==r,o=s?p(a,arguments[2],2):r,u=0;if(J(i))n=new(E(this,Pt)),Q(function(e){for(;!(l=e.next()).done;u++)n[u]=s?o(l.value,u):l.value},Y(i));else for(n=new(E(this,Pt))(t=I(i.length));t>u;u++)n[u]=s?o(i[u],u):i[u];return n.length=u,n}}),U(Xn,at,{of:function(){for(var e=0,t=arguments.length,n=new(E(this,Pt))(t);t>e;)n[e]=arguments[e++];return n.length=t,n}}),V(Pt)}(),!function(){U(Kn,at,{copyWithin:function(e,t){var n=jt(M(this)),l=I(n.length),i=w(e,l),a=w(t,l),s=arguments[2],o=s===r?l:w(s,l),u=Mn(o-a,l-i),p=1;for(i>a&&a+u>i&&(p=-1,a=a+u-1,i=i+u-1);u-->0;)a in n?n[i]=n[a]:delete n[i],i+=p,a+=p;return n},fill:function(e){for(var t=jt(M(this)),n=I(t.length),l=w(arguments[1],n),i=arguments[2],a=i===r?n:w(i,n);a>l;)t[l++]=e;return t},find:v(5),findIndex:v(6)}),n&&(Sn.call(b("find,findIndex,fill,copyWithin,entries,keys,values"),function(e){Vn[e]=!0}),Bn in en||Dn(en,Bn,Vn))}(),!function(e){z(Pt,at,function(e,t){Nn(this,Zn,{o:d(e),i:0,k:t})},function(){var e=this[Zn],t=e.o,n=e.k,l=e.i++;return!t||l>=t.length?(e.o=r,H(1)):n==er?H(0,l):n==tr?H(0,t[l]):H(0,[l,t[l]])},tr),nr[bt]=nr[at],z(Lt,st,function(e){Nn(this,Zn,{o:Lt(e),i:0})},function(){var t,n=this[Zn],r=n.o,l=n.i;return l>=r.length?H(1):(t=e.call(r,l),n.i+=t.length,H(0,t))})}(C(!0)),i(Wt)&&i(zt)||function(t){function n(e){if(vn(m,e)){var t=m[e];delete m[e],t()}}function r(e){n(e.data)}var l,a,s,o=e.postMessage,d=e.addEventListener,f=e.MessageChannel,h=0,m={};Wt=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++h]=function(){c(i(e)?e:Mt(e),t)},l(h),h},zt=function(e){delete m[e]},Gn?l=function(e){Xt(u.call(n,e))}:d&&i(o)&&!e.importScripts?(l=function(e){o(e,"*")},d("message",r,!1)):i(f)?(a=new f,s=a.port2,a.port1.onmessage=r,l=p(s.postMessage,s,1)):l=Kt&&t in Kt[Tt]("script")?function(e){$t.appendChild(Kt[Tt]("script"))[t]=function(){$t.removeChild(this),n(e)}}:function(e){Gt(n,0,e)}}("onreadystatechange"),U(Yn+$n,{setImmediate:Wt,clearImmediate:zt}),!function(e,t){i(e)&&i(e.resolve)&&e.resolve(t=new e(function(){}))==t||function(t,n){function a(e){var t;return l(e)&&(t=e.then),i(t)?t:!1}function s(e){var t,r=e[n],l=r.c,i=0;if(r.h)return!0;for(;l.length>i;)if(t=l[i++],t.fail||s(t.P))return!0}function o(e,n){var r=e.c;(n||r.length)&&t(function(){var t=e.p,l=e.v,o=1==e.s,u=0;if(n&&!s(t))Gt(function(){s(t)||(Gn?!Yt.emit("unhandledRejection",l,t):i(Zt.error)&&Zt.error("Unhandled promise rejection",l))},1e3);else for(;r.length>u;)!function(t){var n,r,i=o?t.ok:t.fail;try{i?(o||(e.h=!0),n=i===!0?l:i(l),n===t.P?t.rej(Ut(gt+"-chain cycle")):(r=a(n))?r.call(n,t.res,t.rej):t.res(n)):t.rej(l)}catch(s){t.rej(s)}}(r[u++]);r.length=0})}function u(e){var t,n,r=this;if(!r.d){r.d=!0,r=r.r||r;try{(t=a(e))?(n={r:r,d:!1},t.call(e,p(u,n,1),p(c,n,1))):(r.v=e,r.s=1,o(r))}catch(l){c.call(n||{r:r,d:!1},l)}}}function c(e){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=e,t.s=2,o(t,!0))}function d(e){var t=P(e)[qn];return t!=r?t:e}e=function(t){j(t),L(this,e,gt);var l={p:this,c:[],s:0,d:!1,v:r,h:!1};Dn(this,n,l);try{t(p(u,l,1),p(c,l,1))}catch(i){c.call(l,i)}},B(e[vt],{then:function(t,l){var a=P(P(this)[xt])[qn],s={ok:i(t)?t:!0,fail:i(l)?l:!1},u=s.P=new(a!=r?a:e)(function(e,t){s.res=j(e),s.rej=j(t)}),p=this[n];return p.c.push(s),p.s&&o(p),u},"catch":function(e){return this.then(r,e)}}),B(e,{all:function(e){var t=d(this),n=[];return new t(function(r,l){Z(e,!1,_n,n);var i=n.length,a=Pt(i);i?Sn.call(n,function(e,n){t.resolve(e).then(function(e){a[n]=e,--i||r(a)},l)}):r(a)})},race:function(e){var t=d(this);return new t(function(n,r){Z(e,!1,function(e){t.resolve(e).then(n,r)})})},reject:function(e){return new(d(this))(function(t,n){n(e)})},resolve:function(e){return l(e)&&n in e&&cn(e)===this[vt]?e:new(d(this))(function(t){t(e)})}})}(Xt||Wt,Fn("record")),a(e,gt),V(e),U(Yn+Jn*!an(e),{Promise:e})}(e[gt]),!function(){function e(e,t,l,i,s,o){function u(e,t){return t!=r&&Z(t,s,e[f],e),e}function p(e,t){var r=h[e];n&&(h[e]=function(e,n){var l=r.call(this,0===e?0:e,n);return t?this:l})}var f=s?"set":"add",h=e&&e[vt],b={};if(an(e)&&(o||!lr&&vn(h,wt)&&vn(h,"entries"))){var x,E=e,_=new e,S=_[f](o?{}:-0,1);K(function(t){new e(t)})&&(e=function(n){return L(this,e,t),u(new E,n)},e[vt]=h,n&&(h[xt]=e)),o||_[wt](function(e,t){x=1/t===-rn}),x&&(p("delete"),p("has"),s&&p("get")),(x||S!==_)&&p(f,!0)}else e=o?function(n){L(this,e,t),Nn(this,c,v++),u(this,n)}:function(n){var l=this;L(l,e,t),Nn(l,d,pn(null)),Nn(l,y,0),Nn(l,m,r),Nn(l,g,r),u(l,n)},B(B(e[vt],l),i),o||!On||fn(e[vt],"size",{get:function(){return M(this[y])}});return a(e,t),V(e),b[t]=e,U(Yn+Qn+Jn*!an(e),b),o||z(e,t,function(e,t){Nn(this,Zn,{o:e,k:t})},function(){for(var e=this[Zn],t=e.k,n=e.l;n&&n.r;)n=n.p;return e.o&&(e.l=n=n?n.n:e.o[g])?t==er?H(0,n.k):t==tr?H(0,n.v):H(0,[n.k,n.v]):(e.o=r,H(1))},s?er+tr:tr,!s),e}function t(e,t){if(!l(e))return("string"==typeof e?"S":"P")+e;if(bn(e))return"F";if(!vn(e,c)){if(!t)return"E";Dn(e,c,++v)}return"O"+e[c]}function i(e,n){var r,l=t(n);if("F"!=l)return e[d][l];for(r=e[g];r;r=r.n)if(r.k==n)return r}function s(e,n,l){var a,s,o=i(e,n);return o?o.v=l:(e[m]=o={i:s=t(n,!0),k:n,v:l,p:a=e[m],n:r,r:!1},e[g]||(e[g]=o),a&&(a.n=o),e[y]++,"F"!=s&&(e[d][s]=o)),e}function o(e,t,n){return bn(P(t))?u(e).set(t,n):(vn(t,f)||Dn(t,f,{}),t[f][e[c]]=n),e}function u(e){return e[h]||Dn(e,h,new Rt)[h]}var c=Fn("uid"),d=Fn("O1"),f=Fn("weak"),h=Fn("leak"),m=Fn("last"),g=Fn("first"),y=On?Fn("size"):"size",v=0,x={},E={clear:function(){for(var e=this,t=e[d],n=e[g];n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=r),delete t[n.i];e[g]=e[m]=r,e[y]=0},"delete":function(e){var t=this,n=i(t,e);if(n){var r=n.n,l=n.p;delete t[d][n.i],n.r=!0,l&&(l.n=r),r&&(r.p=l),t[g]==n&&(t[g]=r),t[m]==n&&(t[m]=l),t[y]--}return!!n},forEach:function(e){for(var t,n=p(e,arguments[1],3);t=t?t.n:this[g];)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!i(this,e)}};Rt=e(Rt,ct,{get:function(e){var t=i(this,e);return t&&t.v},set:function(e,t){return s(this,0===e?0:e,t)}},E,!0),Dt=e(Dt,dt,{add:function(e){return s(this,e=0===e?0:e,e)}},E);var _={"delete":function(e){return l(e)?bn(e)?u(this)["delete"](e):vn(e,f)&&vn(e[f],this[c])&&delete e[f][this[c]]:!1},has:function(e){return l(e)?bn(e)?u(this).has(e):vn(e,f)&&vn(e[f],this[c]):!1}};Nt=e(Nt,ft,{get:function(e){if(l(e)){if(bn(e))return u(this).get(e);if(vn(e,f))return e[f][this[c]]}},set:function(e,t){return o(this,e,t)}},_,!0,!0),n&&7!=(new Nt).set(jt.freeze(x),7).get(x)&&Sn.call(b("delete,has,get,set"),function(e){var t=Nt[vt][e];Nt[vt][e]=function(n,r){if(l(n)&&bn(n)){var i=u(this)[e](n,r);return"set"==e?this:i}return t.call(this,n,r)}}),Ft=e(Ft,ht,{add:function(e){return o(this,e,!0)}},_,!1,!0)}(),!function(){function e(e){var t,n=[];for(t in e)n.push(t);Nn(this,Zn,{o:e,a:n,i:0})}function t(e){return function(t){P(t);try{return e.apply(r,arguments),!0}catch(n){return!1}}}function n(e,t){var i,a=arguments.length<3?e:arguments[2],s=hn(P(e),t);return s?vn(s,"value")?s.value:s.get===r?r:s.get.call(a):l(i=cn(e))?n(i,t,a):r}function i(e,t,n){var a,s,o=arguments.length<4?e:arguments[3],u=hn(P(e),t);if(!u){if(l(s=cn(e)))return i(s,t,n,o);u=O(0)}return vn(u,"value")?u.writable!==!1&&l(o)?(a=hn(o,t)||O(0),a.value=n,fn(o,t,a),!0):!1:u.set===r?!1:(u.set.call(o,n),!0)}G(e,lt,function(){var e,t=this[Zn],n=t.a;do if(t.i>=n.length)return H(1);while(!((e=n[t.i++])in t.o));return H(0,e)});var a=jt.isExtensible||f,s={apply:p(on,un,3),construct:function(e,t){var n=j(arguments.length<3?e:arguments[2])[vt],r=pn(l(n)?n:tn),i=un.call(e,r,t);return l(i)?i:r},defineProperty:t(fn),deleteProperty:function(e,t){var n=hn(P(e),t);return n&&!n.configurable?!1:delete e[t]},enumerate:function(t){return new e(P(t))},get:n,getOwnPropertyDescriptor:function(e,t){return hn(P(e),t)},getPrototypeOf:function(e){return cn(P(e))},has:function(e,t){return t in e},isExtensible:function(e){return!!a(P(e))},ownKeys:g,preventExtensions:t(jt.preventExtensions||f),set:i};dn&&(s.setPrototypeOf=function(e,t){return dn(P(e),t),!0}),U(Yn,{Reflect:{}}),U(Xn,"Reflect",s)}(),!function(){function e(e){return function(t){var n,r=d(t),l=mn(t),i=l.length,a=0,s=Pt(i);if(e)for(;i>a;)s[a]=[n=l[a++],r[n]];else for(;i>a;)s[a]=r[l[a++]];return s}}U(Kn,at,{includes:x(!0)}),U(Kn,st,{at:C(!0)}),U(Xn,lt,{getOwnPropertyDescriptors:function(e){var t=d(e),n={};return Sn.call(g(t),function(e){fn(n,e,O(0,hn(t,e)))}),n},values:e(!1),entries:e(!0)}),U(Xn,ut,{escape:A(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",!0)})}(),!function(e){function t(e){if(e){var t=e[vt];Dn(t,et,t.get),Dn(t,n,t.set),Dn(t,r,t["delete"])}}et=F(e+"Get",!0);var n=F(e+dt,!0),r=F(e+"Delete",!0);U(Xn,mt,{referenceGet:et,referenceSet:n,referenceDelete:r}),Dn(nn,et,h),t(Rt),t(Nt)}("reference"),!function(e){function t(e,t){Nn(this,Zn,{o:d(e),a:mn(e),i:0,k:t})}function n(e){return function(n){return new t(n,e)}}function i(e){var t=1==e,n=4==e;return function(l,i,a){var s,o,u,c=p(i,a,3),f=d(l),h=t||7==e||2==e?new(E(this,tt)):r;for(s in f)if(vn(f,s)&&(o=f[s],u=c(o,s,l),e))if(t)h[s]=u;else if(u)switch(e){case 2:h[s]=o;break;case 3:return!0;case 5:return o;case 6:return s;case 7:h[u[0]]=u[1]}else if(n)return!1;return 3==e||n?n:h}}function a(e){return function(t,n,l){j(n);var i,a,s,o=d(t),u=mn(o),p=u.length,c=0;for(e?i=l==r?new(E(this,tt)):jt(l):arguments.length<3?(T(p,Ln),i=o[u[c++]]):i=jt(l);p>c;)if(vn(o,a=u[c++]))if(s=n(i,o[a],a,t),e){if(s===!1)break}else i=s;return i}}function s(e,t){return(t==t?y(e,t):o(e,_))!==r}tt=function(e){var t=pn(null);return e!=r&&(J(e)?Z(e,!0,function(e,n){t[e]=n}):En(t,e)),t},tt[vt]=null,G(t,e,function(){var e,t=this[Zn],n=t.o,l=t.a,i=t.k;do if(t.i>=l.length)return t.o=r,H(1);while(!vn(n,e=l[t.i++]));return i==er?H(0,e):i==tr?H(0,n[e]):H(0,[e,n[e]])});var o=i(6),u={keys:n(er),values:n(tr),entries:n(er+tr),forEach:i(0),map:i(1),filter:i(2),some:i(3),every:i(4),find:i(5),findKey:o,mapPairs:i(7),reduce:a(!1),turn:a(!0),keyOf:y,includes:s,has:vn,get:m,set:D(0),isDict:function(e){return l(e)&&cn(e)===tt[vt]}};if(et)for(var f in u)!function(e){function t(){for(var t=[this],n=0;n<arguments.length;)t.push(arguments[n++]);return c(e,t)}e[et]=function(){return t}}(u[f]);U(Yn+Jn,{Dict:B(tt,u)})}("Dict"),!function(e,t){function n(t,r){return this instanceof n?(this[Zn]=Y(t),void(this[e]=!!r)):new n(t,r)}function l(n){function r(n,r,l){this[Zn]=Y(n),this[e]=n[e],this[t]=p(r,l,n[e]?2:1)}return G(r,"Chain",n,i),q(r[vt],h),r}G(n,"Wrapper",function(){return this[Zn].next()});var i=n[vt];q(i,function(){return this[Zn]});var a=l(function(){var n=this[Zn].next();return n.done?n:H(0,X(this[t],n.value,this[e]))}),s=l(function(){for(;;){var n=this[Zn].next();if(n.done||X(this[t],n.value,this[e]))return n}});B(i,{of:function(t,n){Z(this,this[e],t,n)},array:function(e,t){var n=[];return Z(e!=r?this.map(e,t):this,!1,_n,n),n},filter:function(e,t){return new s(this,e,t)},map:function(e,t){return new a(this,e,t)}}),n.isIterable=J,n.getIterator=Y,U(Yn+Jn,{$for:n})}("entries",Fn("fn")),U(Yn+Jn,{delay:function(e){return new Promise(function(t){Gt(t,e,!0)})}}),!function(e,t){function n(n){var l=this,i={};return Dn(l,e,function(e){return e!==r&&e in l?vn(i,e)?i[e]:i[e]=p(l[e],l,-1):t.call(l)})[e](n)}Wn._=zn._=zn._||{},U(Kn+Jn,it,{part:u,only:function(e,t){var n=j(this),r=I(e),l=arguments.length>1;return function(){for(var e=Mn(r,arguments.length),i=Pt(e),a=0;e>a;)i[a]=arguments[a++];return c(n,i,l?t:this)}}}),Dn(zn._,Et,function(){return e}),Dn(tn,e,n),On||Dn(en,e,n)}(On?N("tie"):St,tn[St]),!function(){function e(e,t){for(var n,r=g(d(t)),l=r.length,i=0;l>i;)fn(e,n=r[i++],hn(t,n));return e}U(Xn+Jn,lt,{isObject:l,classof:o,define:e,make:function(t,n){return e(pn(t),n)}})}(),U(Kn+Jn,at,{turn:function(e,t){j(e);for(var n=t==r?[]:jt(t),l=xn(this),i=I(l.length),a=0;i>a&&e(n,l[a],a++,this)!==!1;);return n}}),n&&(Vn.turn=!0),!function(e){function t(e){Nn(this,Zn,{l:I(e),i:0})}G(t,ot,function(){var e=this[Zn],t=e.i++;return t<e.l?H(0,t):H(1)}),W(Ot,ot,function(){return new t(this)}),e.random=function(e){var t=+this,n=e==r?0:+e,l=Mn(t,n);return jn()*(Tn(t,n)-l)+l},Sn.call(b("round,floor,ceil,abs,sin,asin,cos,acos,tan,atan,exp,sqrt,max,min,pow,atan2,acosh,asinh,atanh,cbrt,clz32,cosh,expm1,hypot,imul,log1p,log10,log2,sign,sinh,tanh,trunc"),function(t){var n=Vt[t];n&&(e[t]=function(){for(var e=[+this],t=0;arguments.length>t;)e.push(arguments[t++]);return c(n,e)})}),U(Kn+Jn,ot,e)}({}),!function(){var e,t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"},n={};for(e in t)n[t[e]]=e;U(Kn+Jn,st,{escapeHTML:A(/[&<>"']/g,t),unescapeHTML:A(/&(?:amp|lt|gt|quot|apos);/g,n)})}(),!function(e,t,n,r,l,i,a,s,o){function u(t){return function(u,p){function c(e){return d[t+e]()}var d=this,f=n[vn(n,p)?p:r];return Lt(u).replace(e,function(e){switch(e){case"s":return c(l);case"ss":return k(c(l));case"m":return c(i);case"mm":return k(c(i));case"h":return c(a);case"hh":return k(c(a));case"D":return c(pt);case"DD":return k(c(pt));case"W":return f[0][c("Day")];case"N":return c(s)+1;case"NN":return k(c(s)+1);case"M":return f[2][c(s)];case"MM":return f[1][c(s)];case"Y":return c(o);case"YY":return k(c(o)%100)}return e})}}function p(e,r){function l(e){var n=[];return Sn.call(b(r.months),function(r){n.push(r.replace(t,"$"+e))}),n}return n[e]=[b(r.weekdays),l(1),l(2)],Wn}U(Kn+Jn,pt,{format:u("get"),formatUTC:u("getUTC")}),p(r,{weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",months:"January,February,March,April,May,June,July,August,September,October,November,December"}),p("ru",{weekdays:"Воскресенье,Понедельник,Вторник,Среда,Четверг,Пятница,Суббота",months:"Январ:я|ь,Феврал:я|ь,Март:а|,Апрел:я|ь,Ма:я|й,Июн:я|ь,Июл:я|ь,Август:а|,Сентябр:я|ь,Октябр:я|ь,Ноябр:я|ь,Декабр:я|ь"}),Wn.locale=function(e){return vn(n,e)?r=e:r},Wn.addLocale=p}(/\b\w\w?\b/g,/:(.*)\|(.*)$/,{},"en","Seconds","Minutes","Hours","Month","FullYear"),U(Yn+Jn,{global:e}),!function(e){function t(t,n){Sn.call(b(t),function(t){t in en&&(e[t]=p(on,en[t],n))})}t("pop,reverse,shift,keys,values,entries",1),t("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),t("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill,turn"),U(Xn,at,e)}({}),!function(e){!n||!e||nt in e[vt]||Dn(e[vt],nt,nr[at]),nr.NodeList=nr[at]}(e.NodeList),!function(e,t){Sn.call(b("assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,isIndependentlyComposed,log,markTimeline,profile,profileEnd,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn"),function(n){e[n]=function(){return t&&n in Zt?un.call(Zt[n],Zt,arguments):void 0}}),U(Yn+Jn,{log:En(e.log,e,{enable:function(){t=!0},disable:function(){t=!1}})})}({},!0)}("undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),!1)},{}],213:[function(e,t,n){function r(){return n.colors[p++%n.colors.length]}function l(e){function t(){}function l(){var e=l,t=+new Date,i=t-(u||t);e.diff=i,e.prev=u,e.curr=t,u=t,null==e.useColors&&(e.useColors=n.useColors()),null==e.color&&e.useColors&&(e.color=r());var a=Array.prototype.slice.call(arguments);a[0]=n.coerce(a[0]),"string"!=typeof a[0]&&(a=["%o"].concat(a));var s=0;a[0]=a[0].replace(/%([a-z%])/g,function(t,r){if("%%"===t)return t;s++;var l=n.formatters[r];if("function"==typeof l){var i=a[s];t=l.call(e,i),a.splice(s,1),s--}return t}),"function"==typeof n.formatArgs&&(a=n.formatArgs.apply(e,a));var o=l.log||n.log||console.log.bind(console);o.apply(e,a)}t.enabled=!1,l.enabled=!0;var i=n.enabled(e)?l:t;return i.namespace=e,i}function i(e){n.save(e);for(var t=(e||"").split(/[\s,]+/),r=t.length,l=0;r>l;l++)t[l]&&(e=t[l].replace(/\*/g,".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))}function a(){n.enable("")}function s(e){var t,r;for(t=0,r=n.skips.length;r>t;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;r>t;t++)if(n.names[t].test(e))return!0;return!1}function o(e){return e instanceof Error?e.stack||e.message:e}n=t.exports=l,n.coerce=o,n.disable=a,n.enable=i,n.enabled=s,n.humanize=e("ms"),n.names=[],n.skips=[],n.formatters={};var u,p=0},{ms:215}],214:[function(e,t,n){(function(r){function l(){var e=(r.env.DEBUG_COLORS||"").trim().toLowerCase();return 0===e.length?p.isatty(d):"0"!==e&&"no"!==e&&"false"!==e&&"disabled"!==e}function i(){var e=arguments,t=this.useColors,r=this.namespace;if(t){var l=this.color;e[0]=" [9"+l+"m"+r+" "+e[0]+"[3"+l+"m +"+n.humanize(this.diff)+""}else e[0]=(new Date).toUTCString()+" "+r+" "+e[0];return e}function a(){return f.write(c.format.apply(this,arguments)+"\n")}function s(e){null==e?delete r.env.DEBUG:r.env.DEBUG=e}function o(){return r.env.DEBUG}function u(t){var n,l=r.binding("tty_wrap");switch(l.guessHandleType(t)){case"TTY":n=new p.WriteStream(t),n._type="tty",n._handle&&n._handle.unref&&n._handle.unref();break;case"FILE":var i=e("fs");n=new i.SyncWriteStream(t,{autoClose:!1}),n._type="fs";break;case"PIPE":case"TCP":var a=e("net");n=new a.Socket({fd:t,readable:!1,writable:!0}),n.readable=!1,n.read=null,n._type="pipe",n._handle&&n._handle.unref&&n._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return n.fd=t,n._isStdio=!0,n}var p=e("tty"),c=e("util");n=t.exports=e("./debug"),n.log=a,n.formatArgs=i,n.save=s,n.load=o,n.useColors=l,n.colors=[6,2,3,4,5,1];var d=parseInt(r.env.DEBUG_FD,10)||2,f=1===d?r.stdout:2===d?r.stderr:u(d),h=4===c.inspect.length?function(e,t){return c.inspect(e,void 0,void 0,t)}:function(e,t){return c.inspect(e,{colors:t})};n.formatters.o=function(e){return h(e,this.useColors).replace(/\s*\n\s*/g," ")},n.enable(o())}).call(this,e("_process"))},{"./debug":213,_process:185,fs:174,net:174,tty:199,util:201}],215:[function(e,t){function n(e){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*p;case"days":case"day":case"d":return n*u;case"hours":case"hour":case"hrs":case"hr":case"h":return n*o;case"minutes":case"minute":case"mins":case"min":case"m":return n*s;case"seconds":case"second":case"secs":case"sec":case"s":return n*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}function r(e){return e>=u?Math.round(e/u)+"d":e>=o?Math.round(e/o)+"h":e>=s?Math.round(e/s)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function l(e){return i(e,u,"day")||i(e,o,"hour")||i(e,s,"minute")||i(e,a,"second")||e+" ms"}function i(e,t,n){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var a=1e3,s=60*a,o=60*s,u=24*o,p=365.25*u;t.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t.long?l(e):r(e)}},{}],216:[function(e,t){"use strict";function n(e){var t=0,n=0,r=0;for(var l in e){var i=e[l],a=i[0],s=i[1];(a>n||a===n&&s>r)&&(n=a,r=s,t=+l)}return t}var r=e("repeating"),l=/^(?:( )+|\t+)/;t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var t,i,a=0,s=0,o=0,u={};e.split(/\n/g).forEach(function(e){if(e){var n,r=e.match(l);r?(n=r[0].length,r[1]?s++:a++):n=0;var p=n-o;o=n,p?(i=p>0,t=u[i?p:-p],t?t[0]++:t=u[p]=[1,0]):t&&(t[1]+=+i)}});var p,c,d=n(u);return d?s>=a?(p="space",c=r(" ",d)):(p="tab",c=r(" ",d)):(p=null,c=""),{amount:d,type:p,indent:c}}},{repeating:356}],217:[function(t,n,r){!function(t,n){"use strict";"function"==typeof e&&e.amd?e(["exports"],n):n("undefined"!=typeof r?r:t.estraverse={})}(this,function l(e){"use strict";function t(){}function n(e){var t,r,l={};for(t in e)e.hasOwnProperty(t)&&(r=e[t],l[t]="object"==typeof r&&null!==r?n(r):r);return l}function r(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function i(e,t){var n,r,l,i;for(r=e.length,l=0;r;)n=r>>>1,i=l+n,t(e[i])?r=n:(l=i+1,r-=n+1);return l}function a(e,t){var n,r,l,i;for(r=e.length,l=0;r;)n=r>>>1,i=l+n,t(e[i])?(l=i+1,r-=n+1):r=n;return l}function s(e,t){var n,r,l,i=_(t);for(r=0,l=i.length;l>r;r+=1)n=i[r],e[n]=t[n];return e}function o(e,t){this.parent=e,this.key=t}function u(e,t,n,r){this.node=e,this.path=t,this.wrap=n,this.ref=r}function p(){}function c(e){return null==e?!1:"object"==typeof e&&"string"==typeof e.type}function d(e,t){return(e===y.ObjectExpression||e===y.ObjectPattern)&&"properties"===t}function f(e,t){var n=new p;return n.traverse(e,t)}function h(e,t){var n=new p;return n.replace(e,t)}function m(e,t){var n;return n=i(t,function(t){return t.range[0]>e.range[0]}),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),n-=1,n>=0&&(e.extendedRange[0]=t[n].range[1]),e}function g(e,t,r){var l,i,a,s,o=[];if(!e.range)throw new Error("attachComments needs range information");if(!r.length){if(t.length){for(a=0,i=t.length;i>a;a+=1)l=n(t[a]),l.extendedRange=[0,e.range[0]],o.push(l);e.leadingComments=o}return e}for(a=0,i=t.length;i>a;a+=1)o.push(m(n(t[a]),r));return s=0,f(e,{enter:function(e){for(var t;s<o.length&&(t=o[s],!(t.extendedRange[1]>e.range[0]));)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),o.splice(s,1)):s+=1;return s===o.length?v.Break:o[s].extendedRange[0]>e.range[1]?v.Skip:void 0}}),s=0,f(e,{leave:function(e){for(var t;s<o.length&&(t=o[s],!(e.range[1]<t.extendedRange[0]));)e.range[1]===t.extendedRange[0]?(e.trailingComments||(e.trailingComments=[]),e.trailingComments.push(t),o.splice(s,1)):s+=1;return s===o.length?v.Break:o[s].extendedRange[0]>e.range[1]?v.Skip:void 0}}),e}var y,b,v,x,E,_,S,I,w;return b=Array.isArray,b||(b=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),t(r),t(a),E=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}(),_=Object.keys||function(e){var t,n=[];for(t in e)n.push(t);return n},y={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportBatchSpecifier:"ExportBatchSpecifier",ExportDeclaration:"ExportDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},x={AssignmentExpression:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","defaults","rest","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass"],ClassExpression:["id","body","superClass"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportBatchSpecifier:[],ExportDeclaration:["declaration","specifiers","source"],ExportSpecifier:["id","name"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","defaults","rest","body"],FunctionExpression:["id","params","defaults","rest","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["id"],ImportNamespaceSpecifier:["id"],ImportSpecifier:["id","name"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},S={},I={},w={},v={Break:S,Skip:I,Remove:w},o.prototype.replace=function(e){this.parent[this.key]=e },o.prototype.remove=function(){return b(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},p.prototype.path=function(){function e(e,t){if(b(t))for(r=0,l=t.length;l>r;++r)e.push(t[r]);else e.push(t)}var t,n,r,l,i,a;if(!this.__current.path)return null;for(i=[],t=2,n=this.__leavelist.length;n>t;++t)a=this.__leavelist[t],e(i,a.path);return e(i,this.__current.path),i},p.prototype.type=function(){var e=this.current();return e.type||this.__current.wrap},p.prototype.parents=function(){var e,t,n;for(n=[],e=1,t=this.__leavelist.length;t>e;++e)n.push(this.__leavelist[e].node);return n},p.prototype.current=function(){return this.__current.node},p.prototype.__execute=function(e,t){var n,r;return r=void 0,n=this.__current,this.__current=t,this.__state=null,e&&(r=e.call(this,t.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=n,r},p.prototype.notify=function(e){this.__state=e},p.prototype.skip=function(){this.notify(I)},p.prototype["break"]=function(){this.notify(S)},p.prototype.remove=function(){this.notify(w)},p.prototype.__initialize=function(e,t){this.visitor=t,this.root=e,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback="iteration"===t.fallback,this.__keys=x,t.keys&&(this.__keys=s(E(this.__keys),t.keys))},p.prototype.traverse=function(e,t){var n,r,l,i,a,s,o,p,f,h,m,g;for(this.__initialize(e,t),g={},n=this.__worklist,r=this.__leavelist,n.push(new u(e,null,null,null)),r.push(new u(null,null,null,null));n.length;)if(l=n.pop(),l!==g){if(l.node){if(s=this.__execute(t.enter,l),this.__state===S||s===S)return;if(n.push(g),r.push(l),this.__state===I||s===I)continue;if(i=l.node,a=l.wrap||i.type,h=this.__keys[a],!h){if(!this.__fallback)throw new Error("Unknown node type "+a+".");h=_(i)}for(p=h.length;(p-=1)>=0;)if(o=h[p],m=i[o])if(b(m)){for(f=m.length;(f-=1)>=0;)if(m[f]){if(d(a,h[p]))l=new u(m[f],[o,f],"Property",null);else{if(!c(m[f]))continue;l=new u(m[f],[o,f],null,null)}n.push(l)}}else c(m)&&n.push(new u(m,o,null,null))}}else if(l=r.pop(),s=this.__execute(t.leave,l),this.__state===S||s===S)return},p.prototype.replace=function(e,t){function n(e){var t,n,l,i;if(e.ref.remove())for(n=e.ref.key,i=e.ref.parent,t=r.length;t--;)if(l=r[t],l.ref&&l.ref.parent===i){if(l.ref.key<n)break;--l.ref.key}}var r,l,i,a,s,p,f,h,m,g,y,v,x;for(this.__initialize(e,t),y={},r=this.__worklist,l=this.__leavelist,v={root:e},p=new u(e,null,null,new o(v,"root")),r.push(p),l.push(p);r.length;)if(p=r.pop(),p!==y){if(s=this.__execute(t.enter,p),void 0!==s&&s!==S&&s!==I&&s!==w&&(p.ref.replace(s),p.node=s),(this.__state===w||s===w)&&(n(p),p.node=null),this.__state===S||s===S)return v.root;if(i=p.node,i&&(r.push(y),l.push(p),this.__state!==I&&s!==I)){if(a=p.wrap||i.type,m=this.__keys[a],!m){if(!this.__fallback)throw new Error("Unknown node type "+a+".");m=_(i)}for(f=m.length;(f-=1)>=0;)if(x=m[f],g=i[x])if(b(g)){for(h=g.length;(h-=1)>=0;)if(g[h]){if(d(a,m[f]))p=new u(g[h],[x,h],"Property",new o(g,h));else{if(!c(g[h]))continue;p=new u(g[h],[x,h],null,new o(g,h))}r.push(p)}}else c(g)&&r.push(new u(g,x,null,new o(i,x)))}}else if(p=l.pop(),s=this.__execute(t.leave,p),void 0!==s&&s!==S&&s!==I&&s!==w&&p.ref.replace(s),(this.__state===w||s===w)&&n(p),this.__state===S||s===S)return v.root;return v.root},e.version="1.8.1-dev",e.Syntax=y,e.traverse=f,e.replace=h,e.attachComments=g,e.VisitorKeys=x,e.VisitorOption=v,e.Controller=p,e.cloneEnvironment=function(){return l({})},e})},{}],218:[function(e,t){!function(){"use strict";function e(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function n(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function l(e){return r(e)||null!=e&&"FunctionDeclaration"===e.type}function i(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function a(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=i(t)}while(t);return!1}t.exports={isExpression:e,isStatement:r,isIterationStatement:n,isSourceElement:l,isProblematicIfStatement:a,trailingStatement:i}}()},{}],219:[function(e,t){!function(){"use strict";function e(e){return e>=48&&57>=e}function n(t){return e(t)||t>=97&&102>=t||t>=65&&70>=t}function r(e){return e>=48&&55>=e}function l(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&u.indexOf(e)>=0}function i(e){return 10===e||13===e||8232===e||8233===e}function a(e){return e>=97&&122>=e||e>=65&&90>=e||36===e||95===e||92===e||e>=128&&o.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function s(e){return e>=97&&122>=e||e>=65&&90>=e||e>=48&&57>=e||36===e||95===e||92===e||e>=128&&o.NonAsciiIdentifierPart.test(String.fromCharCode(e))}var o,u;o={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},u=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],t.exports={isDecimalDigit:e,isHexDigit:n,isOctalDigit:r,isWhiteSpace:l,isLineTerminator:i,isIdentifierStart:a,isIdentifierPart:s}}()},{}],220:[function(e,t){!function(){"use strict";function n(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function r(e,t){return t||"yield"!==e?l(e,t):!1}function l(e,t){if(t&&n(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function i(e,t){return"null"===e||"true"===e||"false"===e||r(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||l(e,t)}function s(e){return"eval"===e||"arguments"===e}function o(e){var t,n,r;if(0===e.length)return!1;if(r=e.charCodeAt(0),!c.isIdentifierStart(r)||92===r)return!1;for(t=1,n=e.length;n>t;++t)if(r=e.charCodeAt(t),!c.isIdentifierPart(r)||92===r)return!1;return!0}function u(e,t){return o(e)&&!i(e,t)}function p(e,t){return o(e)&&!a(e,t)}var c=e("./code");t.exports={isKeywordES5:r,isKeywordES6:l,isReservedWordES5:i,isReservedWordES6:a,isRestrictedWord:s,isIdentifierName:o,isIdentifierES5:u,isIdentifierES6:p}}()},{"./code":219}],221:[function(e,t,n){!function(){"use strict";n.ast=e("./ast"),n.code=e("./code"),n.keyword=e("./keyword")}()},{"./ast":218,"./code":219,"./keyword":220}],222:[function(e,t){t.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},nonstandard:{escape:!1,unescape:!1},browser:{addEventListener:!1,alert:!1,applicationCache:!1,atob:!1,Audio:!1,AudioProcessingEvent:!1,BeforeUnloadEvent:!1,Blob:!1,blur:!1,btoa:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,crypto:!1,CSS:!1,CustomEvent:!1,DataView:!1,Debug:!1,defaultStatus:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DOMParser:!1,DragEvent:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FormData:!1,frameElement:!1,frames:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,history:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,Intl:!1,KeyboardEvent:!1,length:!1,localStorage:!1,location:!1,matchMedia:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,navigator:!1,Node:!1,NodeFilter:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProgressEvent:!1,prompt:!1,Range:!1,removeEventListener:!1,requestAnimationFrame:!1,resizeBy:!1,resizeTo:!1,screen:!1,screenX:!1,screenY:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,self:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,showModalDialog:!1,status:!1,stop:!1,StorageEvent:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TimeEvent:!1,top:!1,TouchEvent:!1,UIEvent:!1,URL:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},worker:{importScripts:!0,postMessage:!0,self:!0},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,DataView:!1,exports:!0,GLOBAL:!1,global:!1,module:!1,process:!1,require:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,"throws":!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,target:!1,tempdir:!1,test:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,ObjectId:!1,PlanCache:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1}}},{}],223:[function(e,t){t.exports=e("./globals.json")},{"./globals.json":222}],224:[function(e,t){var n=e("is-nan"),r=e("is-finite");t.exports=Number.isInteger||function(e){return"number"==typeof e&&!n(e)&&r(e)&&parseInt(e,10)===e}},{"is-finite":225,"is-nan":226}],225:[function(e,t){"use strict";t.exports=Number.isFinite||function(e){return"number"!=typeof e||e!==e||1/0===e||e===-1/0?!1:!0}},{}],226:[function(e,t){"use strict";t.exports=function(e){return e!==e}},{}],227:[function(e,t){t.exports=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|((?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~]|[;,.[\](){}])|(\s+)|(^$|[\s\S])/g,t.exports.matchToToken=function(e){return token={type:"invalid",value:e[0]},e[1]?(token.type="string",token.closed=!(!e[3]&&!e[4])):e[5]?token.type="comment":e[6]?(token.type="comment",token.closed=!!e[7]):e[8]?token.type="regex":e[9]?token.type="number":e[10]?token.type="name":e[11]?token.type="punctuator":e[12]&&(token.type="whitespace"),token}},{}],228:[function(e,t){var n=[],r=[];t.exports=function(e,t){if(e===t)return 0;var l=e.length,i=t.length;if(0===l)return i;if(0===i)return l;for(var a,s,o,u,p=0,c=0;l>p;)r[p]=e.charCodeAt(p),n[p]=++p;for(;i>c;)for(a=t.charCodeAt(c),o=c++,s=c,p=0;l>p;p++)u=a===r[p]?o:o+1,o=n[p],s=n[p]=o>s?u>s?s+1:u:u>o?o+1:u;return s}},{}],229:[function(e,t){function n(e,t,n){return t in e?e[t]:n}function r(e,t){var r=n.bind(null,t||{}),i=r("transform",Function.prototype),a=r("padding"," "),s=r("before"," "),o=r("after"," | "),u=r("start",1),p=Array.isArray(e),c=p?e:e.split("\n"),d=u+c.length-1,f=String(d).length,h=c.map(function(e,t){var n=u+t,r={before:s,number:n,width:f,after:o,line:e};return i(r),r.before+l(r.number,f,a)+r.after+r.line});return p?h:h.join("\n")}var l=e("left-pad");t.exports=r},{"left-pad":230}],230:[function(e,t){function n(e,t,n){e=String(e);var r=-1;for(n||(n=" "),t-=e.length;++r<t;)e=n+e;return e}t.exports=n},{}],231:[function(e,t){function n(e){for(var t=-1,n=e?e.length:0,r=-1,l=[];++t<n;){var i=e[t];i&&(l[++r]=i)}return l}t.exports=n},{}],232:[function(e,t){function n(e,t,n){var i=e?e.length:0;return n&&l(e,t,n)&&(t=!1),i?r(e,t,!1,0):[]}var r=e("../internal/baseFlatten"),l=e("../internal/isIterateeCall");t.exports=n},{"../internal/baseFlatten":259,"../internal/isIterateeCall":300}],233:[function(e,t){function n(e){var t=e?e.length:0;return t?e[t-1]:void 0}t.exports=n},{}],234:[function(e,t){function n(){var e=arguments,t=e[0];if(!t||!t.length)return t;for(var n=0,l=r,a=e.length;++n<a;)for(var s=0,o=e[n];(s=l(t,o,s))>-1;)i.call(t,s,1);return t}var r=e("../internal/baseIndexOf"),l=Array.prototype,i=l.splice;t.exports=n},{"../internal/baseIndexOf":265}],235:[function(e,t){function n(e,t,n,s){var o=e?e.length:0;return o?(null!=t&&"boolean"!=typeof t&&(s=n,n=i(e,t,s)?null:t,t=!1),n=null==n?n:r(n,s,3),t?a(e,n):l(e,n)):[]}var r=e("../internal/baseCallback"),l=e("../internal/baseUniq"),i=e("../internal/isIterateeCall"),a=e("../internal/sortedUniq");t.exports=n},{"../internal/baseCallback":253,"../internal/baseUniq":281,"../internal/isIterateeCall":300,"../internal/sortedUniq":307}],236:[function(e,t){t.exports=e("./includes")},{"./includes":240}],237:[function(e,t){t.exports=e("./forEach")},{"./forEach":238}],238:[function(e,t){function n(e,t,n){return"function"==typeof t&&"undefined"==typeof n&&a(e)?r(e,t):l(e,i(t,n,3))}var r=e("../internal/arrayEach"),l=e("../internal/baseEach"),i=e("../internal/bindCallback"),a=e("../lang/isArray");t.exports=n},{"../internal/arrayEach":247,"../internal/baseEach":257,"../internal/bindCallback":283,"../lang/isArray":311}],239:[function(e,t){var n=e("../internal/createAggregator"),r=Object.prototype,l=r.hasOwnProperty,i=n(function(e,t,n){l.call(e,n)?e[n].push(t):e[n]=[t]});t.exports=i},{"../internal/createAggregator":288}],240:[function(e,t){function n(e,t,n){var u=e?e.length:0;return i(u)||(e=s(e),u=e.length),u?(n="number"==typeof n?0>n?o(u+n,0):n||0:0,"string"==typeof e||!l(e)&&a(e)?u>n&&e.indexOf(t,n)>-1:r(e,t,n)>-1):!1}var r=e("../internal/baseIndexOf"),l=e("../lang/isArray"),i=e("../internal/isLength"),a=e("../lang/isString"),s=e("../object/values"),o=Math.max;t.exports=n},{"../internal/baseIndexOf":265,"../internal/isLength":301,"../lang/isArray":311,"../lang/isString":320,"../object/values":330}],241:[function(e,t){function n(e,t,n){var s=a(e)?r:i;return t=l(t,n,3),s(e,t)}var r=e("../internal/arrayMap"),l=e("../internal/baseCallback"),i=e("../internal/baseMap"),a=e("../lang/isArray");t.exports=n},{"../internal/arrayMap":248,"../internal/baseCallback":253,"../internal/baseMap":270,"../lang/isArray":311}],242:[function(e,t){function n(e,t,n,o){var u=s(e)?r:a;return u(e,l(t,o,4),n,arguments.length<3,i)}var r=e("../internal/arrayReduceRight"),l=e("../internal/baseCallback"),i=e("../internal/baseEachRight"),a=e("../internal/baseReduce"),s=e("../lang/isArray");t.exports=n},{"../internal/arrayReduceRight":249,"../internal/baseCallback":253,"../internal/baseEachRight":258,"../internal/baseReduce":276,"../lang/isArray":311}],243:[function(e,t){function n(e,t,n){var s=a(e)?r:i;return("function"!=typeof t||"undefined"!=typeof n)&&(t=l(t,n,3)),s(e,t)}var r=e("../internal/arraySome"),l=e("../internal/baseCallback"),i=e("../internal/baseSome"),a=e("../lang/isArray");t.exports=n},{"../internal/arraySome":250,"../internal/baseCallback":253,"../internal/baseSome":278,"../lang/isArray":311}],244:[function(e,t){function n(e,t,n){if(null==e)return[];var u=-1,p=e.length,c=o(p)?Array(p):[];return n&&s(e,t,n)&&(t=null),t=r(t,n,3),l(e,function(e,n,r){c[++u]={criteria:t(e,n,r),index:u,value:e}}),i(c,a)}var r=e("../internal/baseCallback"),l=e("../internal/baseEach"),i=e("../internal/baseSortBy"),a=e("../internal/compareAscending"),s=e("../internal/isIterateeCall"),o=e("../internal/isLength");t.exports=n},{"../internal/baseCallback":253,"../internal/baseEach":257,"../internal/baseSortBy":279,"../internal/compareAscending":287,"../internal/isIterateeCall":300,"../internal/isLength":301}],245:[function(e,t){(function(n){function r(e){var t=e?e.length:0;for(this.data={hash:s(null),set:new a};t--;)this.push(e[t])}var l=e("./cachePush"),i=e("../lang/isNative"),a=i(a=n.Set)&&a,s=i(s=Object.create)&&s;r.prototype.push=l,t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isNative":315,"./cachePush":286}],246:[function(e,t){function n(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}t.exports=n},{}],247:[function(e,t){function n(e,t){for(var n=-1,r=e.length;++n<r&&t(e[n],n,e)!==!1;);return e}t.exports=n},{}],248:[function(e,t){function n(e,t){for(var n=-1,r=e.length,l=Array(r);++n<r;)l[n]=t(e[n],n,e);return l}t.exports=n},{}],249:[function(e,t){function n(e,t,n,r){var l=e.length;for(r&&l&&(n=e[--l]);l--;)n=t(n,e[l],l,e);return n}t.exports=n},{}],250:[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}t.exports=n},{}],251:[function(e,t){function n(e,t){return"undefined"==typeof e?t:e}t.exports=n},{}],252:[function(e,t){function n(e,t,n){var i=l(t);if(!n)return r(t,e,i);for(var a=-1,s=i.length;++a<s;){var o=i[a],u=e[o],p=n(u,t[o],o,e,t);(p===p?p===u:u!==u)&&("undefined"!=typeof u||o in e)||(e[o]=p)}return e}var r=e("./baseCopy"),l=e("../object/keys");t.exports=n},{"../object/keys":327,"./baseCopy":256}],253:[function(e,t){function n(e,t,n){var u=typeof e;return"function"==u?"undefined"!=typeof t&&o(e)?a(e,t,n):e:null==e?s:"object"==u?r(e):"undefined"==typeof t?i(e+""):l(e+"",t)}var r=e("./baseMatches"),l=e("./baseMatchesProperty"),i=e("./baseProperty"),a=e("./bindCallback"),s=e("../utility/identity"),o=e("./isBindable");t.exports=n},{"../utility/identity":334,"./baseMatches":271,"./baseMatchesProperty":272,"./baseProperty":275,"./bindCallback":283,"./isBindable":298}],254:[function(e,t){function n(e,t,h,m,g,y,v){var x;if(h&&(x=g?h(e,m,g):h(e)),"undefined"!=typeof x)return x;if(!c(e))return e;var _=p(e);if(_){if(x=s(e),!t)return r(e,x)}else{var S=F.call(e),I=S==b;if(S!=E&&S!=f&&(!I||g))return D[S]?o(e,S,t):g?e:{};if(x=u(I?{}:e),!t)return i(e,x,d(e))}y||(y=[]),v||(v=[]);for(var w=y.length;w--;)if(y[w]==e)return v[w];return y.push(e),v.push(x),(_?l:a)(e,function(r,l){x[l]=n(r,t,h,l,e,y,v)}),x}var r=e("./arrayCopy"),l=e("./arrayEach"),i=e("./baseCopy"),a=e("./baseForOwn"),s=e("./initCloneArray"),o=e("./initCloneByTag"),u=e("./initCloneObject"),p=e("../lang/isArray"),c=e("../lang/isObject"),d=e("../object/keys"),f="[object Arguments]",h="[object Array]",m="[object Boolean]",g="[object Date]",y="[object Error]",b="[object Function]",v="[object Map]",x="[object Number]",E="[object Object]",_="[object RegExp]",S="[object Set]",I="[object String]",w="[object WeakMap]",k="[object ArrayBuffer]",A="[object Float32Array]",C="[object Float64Array]",T="[object Int8Array]",M="[object Int16Array]",j="[object Int32Array]",P="[object Uint8Array]",L="[object Uint8ClampedArray]",O="[object Uint16Array]",R="[object Uint32Array]",D={};D[f]=D[h]=D[k]=D[m]=D[g]=D[A]=D[C]=D[T]=D[M]=D[j]=D[x]=D[E]=D[_]=D[I]=D[P]=D[L]=D[O]=D[R]=!0,D[y]=D[b]=D[v]=D[S]=D[w]=!1;var N=Object.prototype,F=N.toString;t.exports=n},{"../lang/isArray":311,"../lang/isObject":317,"../object/keys":327,"./arrayCopy":246,"./arrayEach":247,"./baseCopy":256,"./baseForOwn":262,"./initCloneArray":295,"./initCloneByTag":296,"./initCloneObject":297}],255:[function(e,t){function n(e,t){if(e!==t){var n=e===e,r=t===t;if(e>t||!n||"undefined"==typeof e&&r)return 1;if(t>e||!r||"undefined"==typeof t&&n)return-1}return 0}t.exports=n},{}],256:[function(e,t){function n(e,t,n){n||(n=t,t={});for(var r=-1,l=n.length;++r<l;){var i=n[r];t[i]=e[i]}return t}t.exports=n},{}],257:[function(e,t){function n(e,t){var n=e?e.length:0;if(!l(n))return r(e,t);for(var a=-1,s=i(e);++a<n&&t(s[a],a,s)!==!1;);return e}var r=e("./baseForOwn"),l=e("./isLength"),i=e("./toObject");t.exports=n},{"./baseForOwn":262,"./isLength":301,"./toObject":308}],258:[function(e,t){function n(e,t){var n=e?e.length:0;if(!l(n))return r(e,t);for(var a=i(e);n--&&t(a[n],n,a)!==!1;);return e}var r=e("./baseForOwnRight"),l=e("./isLength"),i=e("./toObject");t.exports=n},{"./baseForOwnRight":263,"./isLength":301,"./toObject":308}],259:[function(e,t){function n(e,t,s,o){for(var u=o-1,p=e.length,c=-1,d=[];++u<p;){var f=e[u];if(a(f)&&i(f.length)&&(l(f)||r(f))){t&&(f=n(f,t,s,0));var h=-1,m=f.length;for(d.length+=m;++h<m;)d[++c]=f[h]}else s||(d[++c]=f)}return d}var r=e("../lang/isArguments"),l=e("../lang/isArray"),i=e("./isLength"),a=e("./isObjectLike");t.exports=n},{"../lang/isArguments":310,"../lang/isArray":311,"./isLength":301,"./isObjectLike":302}],260:[function(e,t){function n(e,t,n){for(var l=-1,i=r(e),a=n(e),s=a.length;++l<s;){var o=a[l];if(t(i[o],o,i)===!1)break}return e}var r=e("./toObject");t.exports=n},{"./toObject":308}],261:[function(e,t){function n(e,t){return r(e,t,l)}var r=e("./baseFor"),l=e("../object/keysIn");t.exports=n},{"../object/keysIn":328,"./baseFor":260}],262:[function(e,t){function n(e,t){return r(e,t,l)}var r=e("./baseFor"),l=e("../object/keys"); t.exports=n},{"../object/keys":327,"./baseFor":260}],263:[function(e,t){function n(e,t){return r(e,t,l)}var r=e("./baseForRight"),l=e("../object/keys");t.exports=n},{"../object/keys":327,"./baseForRight":264}],264:[function(e,t){function n(e,t,n){for(var l=r(e),i=n(e),a=i.length;a--;){var s=i[a];if(t(l[s],s,l)===!1)break}return e}var r=e("./toObject");t.exports=n},{"./toObject":308}],265:[function(e,t){function n(e,t,n){if(t!==t)return r(e,n);for(var l=n-1,i=e.length;++l<i;)if(e[l]===t)return l;return-1}var r=e("./indexOfNaN");t.exports=n},{"./indexOfNaN":294}],266:[function(e,t){function n(e,t,l,i,a,s){if(e===t)return 0!==e||1/e==1/t;var o=typeof e,u=typeof t;return"function"!=o&&"object"!=o&&"function"!=u&&"object"!=u||null==e||null==t?e!==e&&t!==t:r(e,t,n,l,i,a,s)}var r=e("./baseIsEqualDeep");t.exports=n},{"./baseIsEqualDeep":267}],267:[function(e,t){function n(e,t,n,c,h,m,g){var y=a(e),b=a(t),v=u,x=u;y||(v=f.call(e),v==o?v=p:v!=p&&(y=s(e))),b||(x=f.call(t),x==o?x=p:x!=p&&(b=s(t)));var E=v==p,_=x==p,S=v==x;if(S&&!y&&!E)return l(e,t,v);var I=E&&d.call(e,"__wrapped__"),w=_&&d.call(t,"__wrapped__");if(I||w)return n(I?e.value():e,w?t.value():t,c,h,m,g);if(!S)return!1;m||(m=[]),g||(g=[]);for(var k=m.length;k--;)if(m[k]==e)return g[k]==t;m.push(e),g.push(t);var A=(y?r:i)(e,t,n,c,h,m,g);return m.pop(),g.pop(),A}var r=e("./equalArrays"),l=e("./equalByTag"),i=e("./equalObjects"),a=e("../lang/isArray"),s=e("../lang/isTypedArray"),o="[object Arguments]",u="[object Array]",p="[object Object]",c=Object.prototype,d=c.hasOwnProperty,f=c.toString;t.exports=n},{"../lang/isArray":311,"../lang/isTypedArray":321,"./equalArrays":291,"./equalByTag":292,"./equalObjects":293}],268:[function(e,t){function n(e){return"function"==typeof e||!1}t.exports=n},{}],269:[function(e,t){function n(e,t,n,l,a){var s=t.length;if(null==e)return!s;for(var o=-1,u=!a;++o<s;)if(u&&l[o]?n[o]!==e[t[o]]:!i.call(e,t[o]))return!1;for(o=-1;++o<s;){var p=t[o];if(u&&l[o])var c=i.call(e,p);else{var d=e[p],f=n[o];c=a?a(d,f,p):void 0,"undefined"==typeof c&&(c=r(f,d,a,!0))}if(!c)return!1}return!0}var r=e("./baseIsEqual"),l=Object.prototype,i=l.hasOwnProperty;t.exports=n},{"./baseIsEqual":266}],270:[function(e,t){function n(e,t){var n=[];return r(e,function(e,r,l){n.push(t(e,r,l))}),n}var r=e("./baseEach");t.exports=n},{"./baseEach":257}],271:[function(e,t){function n(e){var t=i(e),n=t.length;if(1==n){var a=t[0],o=e[a];if(l(o))return function(e){return null!=e&&e[a]===o&&s.call(e,a)}}for(var u=Array(n),p=Array(n);n--;)o=e[t[n]],u[n]=o,p[n]=l(o);return function(e){return r(e,t,u,p)}}var r=e("./baseIsMatch"),l=e("./isStrictComparable"),i=e("../object/keys"),a=Object.prototype,s=a.hasOwnProperty;t.exports=n},{"../object/keys":327,"./baseIsMatch":269,"./isStrictComparable":303}],272:[function(e,t){function n(e,t){return l(t)?function(n){return null!=n&&n[e]===t}:function(n){return null!=n&&r(t,n[e],null,!0)}}var r=e("./baseIsEqual"),l=e("./isStrictComparable");t.exports=n},{"./baseIsEqual":266,"./isStrictComparable":303}],273:[function(e,t){function n(e,t,c,d,f){if(!o(e))return e;var h=s(t.length)&&(a(t)||p(t));return(h?r:l)(t,function(t,r,l){if(u(t))return d||(d=[]),f||(f=[]),i(e,l,r,n,c,d,f);var a=e[r],s=c?c(a,t,r,e,l):void 0,o="undefined"==typeof s;o&&(s=t),!h&&"undefined"==typeof s||!o&&(s===s?s===a:a!==a)||(e[r]=s)}),e}var r=e("./arrayEach"),l=e("./baseForOwn"),i=e("./baseMergeDeep"),a=e("../lang/isArray"),s=e("./isLength"),o=e("../lang/isObject"),u=e("./isObjectLike"),p=e("../lang/isTypedArray");t.exports=n},{"../lang/isArray":311,"../lang/isObject":317,"../lang/isTypedArray":321,"./arrayEach":247,"./baseForOwn":262,"./baseMergeDeep":274,"./isLength":301,"./isObjectLike":302}],274:[function(e,t){function n(e,t,n,p,c,d,f){for(var h=d.length,m=t[n];h--;)if(d[h]==m)return void(e[n]=f[h]);var g=e[n],y=c?c(g,m,n,e,t):void 0,b="undefined"==typeof y;b&&(y=m,a(m.length)&&(i(m)||o(m))?y=i(g)?g:g?r(g):[]:s(m)||l(m)?y=l(g)?u(g):s(g)?g:{}:b=!1),d.push(m),f.push(y),b?e[n]=p(y,m,c,d,f):(y===y?y!==g:g===g)&&(e[n]=y)}var r=e("./arrayCopy"),l=e("../lang/isArguments"),i=e("../lang/isArray"),a=e("./isLength"),s=e("../lang/isPlainObject"),o=e("../lang/isTypedArray"),u=e("../lang/toPlainObject");t.exports=n},{"../lang/isArguments":310,"../lang/isArray":311,"../lang/isPlainObject":318,"../lang/isTypedArray":321,"../lang/toPlainObject":322,"./arrayCopy":246,"./isLength":301}],275:[function(e,t){function n(e){return function(t){return null==t?void 0:t[e]}}t.exports=n},{}],276:[function(e,t){function n(e,t,n,r,l){return l(e,function(e,l,i){n=r?(r=!1,e):t(n,e,l,i)}),n}t.exports=n},{}],277:[function(e,t){var n=e("../utility/identity"),r=e("./metaMap"),l=r?function(e,t){return r.set(e,t),e}:n;t.exports=l},{"../utility/identity":334,"./metaMap":304}],278:[function(e,t){function n(e,t){var n;return r(e,function(e,r,l){return n=t(e,r,l),!n}),!!n}var r=e("./baseEach");t.exports=n},{"./baseEach":257}],279:[function(e,t){function n(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=n},{}],280:[function(e,t){function n(e){return"string"==typeof e?e:null==e?"":e+""}t.exports=n},{}],281:[function(e,t){function n(e,t){var n=-1,a=r,s=e.length,o=!0,u=o&&s>=200,p=u?i():null,c=[];p?(a=l,o=!1):(u=!1,p=t?[]:c);e:for(;++n<s;){var d=e[n],f=t?t(d,n,e):d;if(o&&d===d){for(var h=p.length;h--;)if(p[h]===f)continue e;t&&p.push(f),c.push(d)}else a(p,f,0)<0&&((t||u)&&p.push(f),c.push(d))}return c}var r=e("./baseIndexOf"),l=e("./cacheIndexOf"),i=e("./createCache");t.exports=n},{"./baseIndexOf":265,"./cacheIndexOf":285,"./createCache":290}],282:[function(e,t){function n(e,t){for(var n=-1,r=t.length,l=Array(r);++n<r;)l[n]=e[t[n]];return l}t.exports=n},{}],283:[function(e,t){function n(e,t,n){if("function"!=typeof e)return r;if("undefined"==typeof t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,l){return e.call(t,n,r,l)};case 4:return function(n,r,l,i){return e.call(t,n,r,l,i)};case 5:return function(n,r,l,i,a){return e.call(t,n,r,l,i,a)}}return function(){return e.apply(t,arguments)}}var r=e("../utility/identity");t.exports=n},{"../utility/identity":334}],284:[function(e,t){(function(n){function r(e){return s.call(e,0)}var l=e("../utility/constant"),i=e("../lang/isNative"),a=i(a=n.ArrayBuffer)&&a,s=i(s=a&&new a(0).slice)&&s,o=Math.floor,u=i(u=n.Uint8Array)&&u,p=function(){try{var e=i(e=n.Float64Array)&&e,t=new e(new a(10),0,1)&&e}catch(r){}return t}(),c=p?p.BYTES_PER_ELEMENT:0;s||(r=a&&u?function(e){var t=e.byteLength,n=p?o(t/c):0,r=n*c,l=new a(t);if(n){var i=new p(l,0,n);i.set(new p(e,0,n))}return t!=r&&(i=new u(l,r),i.set(new u(e,r))),l}:l(null)),t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isNative":315,"../utility/constant":333}],285:[function(e,t){function n(e,t){var n=e.data,l="string"==typeof t||r(t)?n.set.has(t):n.hash[t];return l?0:-1}var r=e("../lang/isObject");t.exports=n},{"../lang/isObject":317}],286:[function(e,t){function n(e){var t=this.data;"string"==typeof e||r(e)?t.set.add(e):t.hash[e]=!0}var r=e("../lang/isObject");t.exports=n},{"../lang/isObject":317}],287:[function(e,t){function n(e,t){return r(e.criteria,t.criteria)||e.index-t.index}var r=e("./baseCompareAscending");t.exports=n},{"./baseCompareAscending":255}],288:[function(e,t){function n(e,t){return function(n,a,s){var o=t?t():{};if(a=r(a,s,3),i(n))for(var u=-1,p=n.length;++u<p;){var c=n[u];e(o,c,a(c,u,n),n)}else l(n,function(t,n,r){e(o,t,a(t,n,r),r)});return o}}var r=e("./baseCallback"),l=e("./baseEach"),i=e("../lang/isArray");t.exports=n},{"../lang/isArray":311,"./baseCallback":253,"./baseEach":257}],289:[function(e,t){function n(e){return function(){var t=arguments,n=t.length,i=t[0];if(2>n||null==i)return i;var a=t[n-2],s=t[n-1],o=t[3];n>3&&"function"==typeof a?(a=r(a,s,5),n-=2):(a=n>2&&"function"==typeof s?s:null,n-=a?1:0),o&&l(t[1],t[2],o)&&(a=3==n?null:a,n=2);for(var u=0;++u<n;){var p=t[u];p&&e(i,p,a)}return i}}var r=e("./bindCallback"),l=e("./isIterateeCall");t.exports=n},{"./bindCallback":283,"./isIterateeCall":300}],290:[function(e,t){(function(n){var r=e("./SetCache"),l=e("../utility/constant"),i=e("../lang/isNative"),a=i(a=n.Set)&&a,s=i(s=Object.create)&&s,o=s&&a?function(e){return new r(e)}:l(null);t.exports=o}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isNative":315,"../utility/constant":333,"./SetCache":245}],291:[function(e,t){function n(e,t,n,r,l,i,a){var s=-1,o=e.length,u=t.length,p=!0;if(o!=u&&!(l&&u>o))return!1;for(;p&&++s<o;){var c=e[s],d=t[s];if(p=void 0,r&&(p=l?r(d,c,s):r(c,d,s)),"undefined"==typeof p)if(l)for(var f=u;f--&&(d=t[f],!(p=c&&c===d||n(c,d,r,l,i,a))););else p=c&&c===d||n(c,d,r,l,i,a)}return!!p}t.exports=n},{}],292:[function(e,t){function n(e,t,n){switch(n){case r:case l:return+e==+t;case i:return e.name==t.name&&e.message==t.message;case a:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case s:case o:return e==t+""}return!1}var r="[object Boolean]",l="[object Date]",i="[object Error]",a="[object Number]",s="[object RegExp]",o="[object String]";t.exports=n},{}],293:[function(e,t){function n(e,t,n,l,a,s,o){var u=r(e),p=u.length,c=r(t),d=c.length;if(p!=d&&!a)return!1;for(var f,h=-1;++h<p;){var m=u[h],g=i.call(t,m);if(g){var y=e[m],b=t[m];g=void 0,l&&(g=a?l(b,y,m):l(y,b,m)),"undefined"==typeof g&&(g=y&&y===b||n(y,b,l,a,s,o))}if(!g)return!1;f||(f="constructor"==m)}if(!f){var v=e.constructor,x=t.constructor;if(v!=x&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof x&&x instanceof x))return!1}return!0}var r=e("../object/keys"),l=Object.prototype,i=l.hasOwnProperty;t.exports=n},{"../object/keys":327}],294:[function(e,t){function n(e,t,n){for(var r=e.length,l=t+(n?0:-1);n?l--:++l<r;){var i=e[l];if(i!==i)return l}return-1}t.exports=n},{}],295:[function(e,t){function n(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&l.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var r=Object.prototype,l=r.hasOwnProperty;t.exports=n},{}],296:[function(e,t){function n(e,t,n){var x=e.constructor;switch(t){case u:return r(e);case l:case i:return new x(+e);case p:case c:case d:case f:case h:case m:case g:case y:case b:var E=e.buffer;return new x(n?r(E):E,e.byteOffset,e.length);case a:case o:return new x(e);case s:var _=new x(e.source,v.exec(e));_.lastIndex=e.lastIndex}return _}var r=e("./bufferClone"),l="[object Boolean]",i="[object Date]",a="[object Number]",s="[object RegExp]",o="[object String]",u="[object ArrayBuffer]",p="[object Float32Array]",c="[object Float64Array]",d="[object Int8Array]",f="[object Int16Array]",h="[object Int32Array]",m="[object Uint8Array]",g="[object Uint8ClampedArray]",y="[object Uint16Array]",b="[object Uint32Array]",v=/\w*$/;t.exports=n},{"./bufferClone":284}],297:[function(e,t){function n(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=Object),new t}t.exports=n},{}],298:[function(e,t){function n(e){var t=!(i.funcNames?e.name:i.funcDecomp);if(!t){var n=o.call(e);i.funcNames||(t=!a.test(n)),t||(t=s.test(n)||l(e),r(e,t))}return t}var r=e("./baseSetData"),l=e("../lang/isNative"),i=e("../support"),a=/^\s*function[ \n\r\t]+\w/,s=/\bthis\b/,o=Function.prototype.toString;t.exports=n},{"../lang/isNative":315,"../support":332,"./baseSetData":277}],299:[function(e,t){function n(e,t){return e=+e,t=null==t?r:t,e>-1&&e%1==0&&t>e}var r=Math.pow(2,53)-1;t.exports=n},{}],300:[function(e,t){function n(e,t,n){if(!i(n))return!1;var a=typeof t;if("number"==a)var s=n.length,o=l(s)&&r(t,s);else o="string"==a&&t in n;if(o){var u=n[t];return e===e?e===u:u!==u}return!1}var r=e("./isIndex"),l=e("./isLength"),i=e("../lang/isObject");t.exports=n},{"../lang/isObject":317,"./isIndex":299,"./isLength":301}],301:[function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&r>=e}var r=Math.pow(2,53)-1;t.exports=n},{}],302:[function(e,t){function n(e){return e&&"object"==typeof e||!1}t.exports=n},{}],303:[function(e,t){function n(e){return e===e&&(0===e?1/e>0:!r(e))}var r=e("../lang/isObject");t.exports=n},{"../lang/isObject":317}],304:[function(e,t){(function(n){var r=e("../lang/isNative"),l=r(l=n.WeakMap)&&l,i=l&&new l;t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isNative":315}],305:[function(e,t){function n(e){var t;if(!l(e)||o.call(e)!=i||!s.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var n;return r(e,function(e,t){n=t}),"undefined"==typeof n||s.call(e,n)}var r=e("./baseForIn"),l=e("./isObjectLike"),i="[object Object]",a=Object.prototype,s=a.hasOwnProperty,o=a.toString;t.exports=n},{"./baseForIn":261,"./isObjectLike":302}],306:[function(e,t){function n(e){for(var t=s(e),n=t.length,u=n&&e.length,c=u&&a(u)&&(l(e)||o.nonEnumArgs&&r(e)),d=-1,f=[];++d<n;){var h=t[d];(c&&i(h,u)||p.call(e,h))&&f.push(h)}return f}var r=e("../lang/isArguments"),l=e("../lang/isArray"),i=e("./isIndex"),a=e("./isLength"),s=e("../object/keysIn"),o=e("../support"),u=Object.prototype,p=u.hasOwnProperty;t.exports=n},{"../lang/isArguments":310,"../lang/isArray":311,"../object/keysIn":328,"../support":332,"./isIndex":299,"./isLength":301}],307:[function(e,t){function n(e,t){for(var n,r=-1,l=e.length,i=-1,a=[];++r<l;){var s=e[r],o=t?t(s,r,e):s;r&&n===o||(n=o,a[++i]=s)}return a}t.exports=n},{}],308:[function(e,t){function n(e){return r(e)?e:Object(e)}var r=e("../lang/isObject");t.exports=n},{"../lang/isObject":317}],309:[function(e,t){function n(e,t,n){return t="function"==typeof t&&l(t,n,1),r(e,!0,t)}var r=e("../internal/baseClone"),l=e("../internal/bindCallback");t.exports=n},{"../internal/baseClone":254,"../internal/bindCallback":283}],310:[function(e,t){function n(e){var t=l(e)?e.length:void 0;return r(t)&&s.call(e)==i||!1}var r=e("../internal/isLength"),l=e("../internal/isObjectLike"),i="[object Arguments]",a=Object.prototype,s=a.toString;t.exports=n},{"../internal/isLength":301,"../internal/isObjectLike":302}],311:[function(e,t){var n=e("../internal/isLength"),r=e("./isNative"),l=e("../internal/isObjectLike"),i="[object Array]",a=Object.prototype,s=a.toString,o=r(o=Array.isArray)&&o,u=o||function(e){return l(e)&&n(e.length)&&s.call(e)==i||!1};t.exports=u},{"../internal/isLength":301,"../internal/isObjectLike":302,"./isNative":315}],312:[function(e,t){function n(e){return e===!0||e===!1||r(e)&&a.call(e)==l||!1}var r=e("../internal/isObjectLike"),l="[object Boolean]",i=Object.prototype,a=i.toString;t.exports=n},{"../internal/isObjectLike":302}],313:[function(e,t){function n(e){if(null==e)return!0;var t=e.length;return a(t)&&(l(e)||o(e)||r(e)||s(e)&&i(e.splice))?!t:!u(e).length}var r=e("./isArguments"),l=e("./isArray"),i=e("./isFunction"),a=e("../internal/isLength"),s=e("../internal/isObjectLike"),o=e("./isString"),u=e("../object/keys");t.exports=n},{"../internal/isLength":301,"../internal/isObjectLike":302,"../object/keys":327,"./isArguments":310,"./isArray":311,"./isFunction":314,"./isString":320}],314:[function(e,t){(function(n){var r=e("../internal/baseIsFunction"),l=e("./isNative"),i="[object Function]",a=Object.prototype,s=a.toString,o=l(o=n.Uint8Array)&&o,u=r(/x/)||o&&!r(o)?function(e){return s.call(e)==i}:r;t.exports=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../internal/baseIsFunction":268,"./isNative":315}],315:[function(e,t){function n(e){return null==e?!1:u.call(e)==i?p.test(o.call(e)):l(e)&&a.test(e)||!1}var r=e("../string/escapeRegExp"),l=e("../internal/isObjectLike"),i="[object Function]",a=/^\[object .+?Constructor\]$/,s=Object.prototype,o=Function.prototype.toString,u=s.toString,p=RegExp("^"+r(u).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},{"../internal/isObjectLike":302,"../string/escapeRegExp":331}],316:[function(e,t){function n(e){return"number"==typeof e||r(e)&&a.call(e)==l||!1}var r=e("../internal/isObjectLike"),l="[object Number]",i=Object.prototype,a=i.toString;t.exports=n},{"../internal/isObjectLike":302}],317:[function(e,t){function n(e){var t=typeof e;return"function"==t||e&&"object"==t||!1}t.exports=n},{}],318:[function(e,t){var n=e("./isNative"),r=e("../internal/shimIsPlainObject"),l="[object Object]",i=Object.prototype,a=i.toString,s=n(s=Object.getPrototypeOf)&&s,o=s?function(e){if(!e||a.call(e)!=l)return!1;var t=e.valueOf,i=n(t)&&(i=s(t))&&s(i);return i?e==i||s(e)==i:r(e)}:r;t.exports=o},{"../internal/shimIsPlainObject":305,"./isNative":315}],319:[function(e,t){function n(e){return r(e)&&a.call(e)==l||!1}var r=e("../internal/isObjectLike"),l="[object RegExp]",i=Object.prototype,a=i.toString;t.exports=n},{"../internal/isObjectLike":302}],320:[function(e,t){function n(e){return"string"==typeof e||r(e)&&a.call(e)==l||!1}var r=e("../internal/isObjectLike"),l="[object String]",i=Object.prototype,a=i.toString;t.exports=n},{"../internal/isObjectLike":302}],321:[function(e,t){function n(e){return l(e)&&r(e.length)&&C[M.call(e)]||!1}var r=e("../internal/isLength"),l=e("../internal/isObjectLike"),i="[object Arguments]",a="[object Array]",s="[object Boolean]",o="[object Date]",u="[object Error]",p="[object Function]",c="[object Map]",d="[object Number]",f="[object Object]",h="[object RegExp]",m="[object Set]",g="[object String]",y="[object WeakMap]",b="[object ArrayBuffer]",v="[object Float32Array]",x="[object Float64Array]",E="[object Int8Array]",_="[object Int16Array]",S="[object Int32Array]",I="[object Uint8Array]",w="[object Uint8ClampedArray]",k="[object Uint16Array]",A="[object Uint32Array]",C={};C[v]=C[x]=C[E]=C[_]=C[S]=C[I]=C[w]=C[k]=C[A]=!0,C[i]=C[a]=C[b]=C[s]=C[o]=C[u]=C[p]=C[c]=C[d]=C[f]=C[h]=C[m]=C[g]=C[y]=!1;var T=Object.prototype,M=T.toString;t.exports=n},{"../internal/isLength":301,"../internal/isObjectLike":302}],322:[function(e,t){function n(e){return r(e,l(e))}var r=e("../internal/baseCopy"),l=e("../object/keysIn");t.exports=n},{"../internal/baseCopy":256,"../object/keysIn":328}],323:[function(e,t){var n=e("../internal/baseAssign"),r=e("../internal/createAssigner"),l=r(n);t.exports=l},{"../internal/baseAssign":252,"../internal/createAssigner":289}],324:[function(e,t){function n(e){if(null==e)return e;var t=r(arguments);return t.push(i),l.apply(void 0,t)}var r=e("../internal/arrayCopy"),l=e("./assign"),i=e("../internal/assignDefaults");t.exports=n},{"../internal/arrayCopy":246,"../internal/assignDefaults":251,"./assign":323}],325:[function(e,t){t.exports=e("./assign")},{"./assign":323}],326:[function(e,t){function n(e,t){return e?l.call(e,t):!1}var r=Object.prototype,l=r.hasOwnProperty;t.exports=n},{}],327:[function(e,t){var n=e("../internal/isLength"),r=e("../lang/isNative"),l=e("../lang/isObject"),i=e("../internal/shimKeys"),a=r(a=Object.keys)&&a,s=a?function(e){if(e)var t=e.constructor,r=e.length;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&r&&n(r)?i(e):l(e)?a(e):[]}:i;t.exports=s},{"../internal/isLength":301,"../internal/shimKeys":306,"../lang/isNative":315,"../lang/isObject":317}],328:[function(e,t){function n(e){if(null==e)return[];s(e)||(e=Object(e));var t=e.length;t=t&&a(t)&&(l(e)||o.nonEnumArgs&&r(e))&&t||0;for(var n=e.constructor,u=-1,c="function"==typeof n&&n.prototype===e,d=Array(t),f=t>0;++u<t;)d[u]=u+"";for(var h in e)f&&i(h,t)||"constructor"==h&&(c||!p.call(e,h))||d.push(h);return d}var r=e("../lang/isArguments"),l=e("../lang/isArray"),i=e("../internal/isIndex"),a=e("../internal/isLength"),s=e("../lang/isObject"),o=e("../support"),u=Object.prototype,p=u.hasOwnProperty;t.exports=n},{"../internal/isIndex":299,"../internal/isLength":301,"../lang/isArguments":310,"../lang/isArray":311,"../lang/isObject":317,"../support":332}],329:[function(e,t){var n=e("../internal/baseMerge"),r=e("../internal/createAssigner"),l=r(n);t.exports=l},{"../internal/baseMerge":273,"../internal/createAssigner":289}],330:[function(e,t){function n(e){return r(e,l(e))}var r=e("../internal/baseValues"),l=e("./keys");t.exports=n},{"../internal/baseValues":282,"./keys":327}],331:[function(e,t){function n(e){return e=r(e),e&&i.test(e)?e.replace(l,"\\$&"):e}var r=e("../internal/baseToString"),l=/[.*+?^${}()|[\]\/\\]/g,i=RegExp(l.source);t.exports=n},{"../internal/baseToString":280}],332:[function(e,t){(function(n){var r=e("./lang/isNative"),l=/\bthis\b/,i=Object.prototype,a=(a=n.window)&&a.document,s=i.propertyIsEnumerable,o={};!function(){o.funcDecomp=!r(n.WinRTError)&&l.test(function(){return this}),o.funcNames="string"==typeof Function.name;try{o.dom=11===a.createDocumentFragment().nodeType}catch(e){o.dom=!1}try{o.nonEnumArgs=!s.call(arguments,1)}catch(e){o.nonEnumArgs=!0}}(0,0),t.exports=o}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lang/isNative":315}],333:[function(e,t){function n(e){return function(){return e}}t.exports=n},{}],334:[function(e,t){function n(e){return e}t.exports=n},{}],335:[function(e,t){(function(n){function r(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}function l(e,t){return t=t||{},function(n){return a(n,e,t)}}function i(e,t){e=e||{},t=t||{};var n={};return Object.keys(t).forEach(function(e){n[e]=t[e]}),Object.keys(e).forEach(function(t){n[t]=e[t]}),n}function a(e,t,n){if("string"!=typeof t)throw new TypeError("glob pattern string required");return n||(n={}),n.nocomment||"#"!==t.charAt(0)?""===t.trim()?""===e:new s(t,n).match(e):!1}function s(e,t){if(!(this instanceof s))return new s(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),g&&(e=e.split("\\").join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function o(){if(!this._made){var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error),this.debug(this.pattern,n),n=this.globParts=n.map(function(e){return e.split(I)}),this.debug(this.pattern,n),n=n.map(function(e){return e.map(this.parse,this)},this),this.debug(this.pattern,n),n=n.filter(function(e){return-1===e.indexOf(!1)}),this.debug(this.pattern,n),this.set=n}}function u(){var e=this.pattern,t=!1,n=this.options,r=0;if(!n.nonegate){for(var l=0,i=e.length;i>l&&"!"===e.charAt(l);l++)t=!t,r++;r&&(this.pattern=e.substr(r)),this.negate=t}}function p(e,t){if(t||(t=this instanceof s?this.options:{}),e="undefined"==typeof e?this.pattern:e,"undefined"==typeof e)throw new Error("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:b(e)}function c(e,t){function n(){if(i){switch(i){case"*":s+=x,o=!0;break;case"?":s+=v,o=!0;break;default:s+="\\"+i}g.debug("clearStateChar %j %j",i,s),i=!1}}var r=this.options;if(!r.noglobstar&&"**"===e)return y;if(""===e)return"";for(var l,i,a,s="",o=!!r.nocase,u=!1,p=[],c=!1,d=-1,f=-1,m="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",g=this,b=0,E=e.length;E>b&&(a=e.charAt(b));b++)if(this.debug("%s %s %s %j",e,b,s,a),u&&S[a])s+="\\"+a,u=!1;else switch(a){case"/":return!1;case"\\":n(),u=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,b,s,a),c){this.debug(" in class"),"!"===a&&b===f+1&&(a="^"),s+=a;continue}g.debug("call clearStateChar %j",i),n(),i=a,r.noext&&n();continue;case"(":if(c){s+="(";continue}if(!i){s+="\\(";continue}l=i,p.push({type:l,start:b-1,reStart:s.length}),s+="!"===i?"(?:(?!":"(?:",this.debug("plType %j %j",i,s),i=!1;continue;case")":if(c||!p.length){s+="\\)";continue}switch(n(),o=!0,s+=")",l=p.pop().type){case"!":s+="[^/]*?)";break;case"?":case"+":case"*":s+=l;case"@":}continue;case"|":if(c||!p.length||u){s+="\\|",u=!1;continue}n(),s+="|";continue;case"[":if(n(),c){s+="\\"+a;continue}c=!0,f=b,d=s.length,s+=a;continue;case"]":if(b===f+1||!c){s+="\\"+a,u=!1;continue}if(c){var _=e.substring(f+1,b);try{new RegExp("["+_+"]")}catch(I){var k=this.parse(_,w);s=s.substr(0,d)+"\\["+k[0]+"\\]",o=o||k[1],c=!1;continue}}o=!0,c=!1,s+=a;continue;default:n(),u?u=!1:!S[a]||"^"===a&&c||(s+="\\"),s+=a}if(c){var _=e.substr(f+1),k=this.parse(_,w);s=s.substr(0,d)+"\\["+k[0],o=o||k[1]}for(var A;A=p.pop();){var C=s.slice(A.reStart+3);C=C.replace(/((?:\\{2})*)(\\?)\|/g,function(e,t,n){return n||(n="\\"),t+t+n+"|"}),this.debug("tail=%j\n %s",C,C);var T="*"===A.type?x:"?"===A.type?v:"\\"+A.type;o=!0,s=s.slice(0,A.reStart)+T+"\\("+C}n(),u&&(s+="\\\\");var M=!1;switch(s.charAt(0)){case".":case"[":case"(":M=!0}if(""!==s&&o&&(s="(?=.)"+s),M&&(s=m+s),t===w)return[s,o];if(!o)return h(e);var j=r.nocase?"i":"",P=new RegExp("^"+s+"$",j);return P._glob=e,P._src=s,P}function d(){if(this.regexp||this.regexp===!1)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1;var t=this.options,n=t.noglobstar?x:t.dot?E:_,r=t.nocase?"i":"",l=e.map(function(e){return e.map(function(e){return e===y?n:"string"==typeof e?m(e):e._src}).join("\\/")}).join("|");l="^(?:"+l+")$",this.negate&&(l="^(?!"+l+").*$");try{return this.regexp=new RegExp(l,r)}catch(i){return this.regexp=!1}}function f(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var n=this.options;g&&(e=e.split("\\").join("/")),e=e.split(I),this.debug(this.pattern,"split",e);var r=this.set;this.debug(this.pattern,"set",r);for(var l,i=e.length-1;i>=0&&!(l=e[i]);i--);for(var i=0,a=r.length;a>i;i++){var s=r[i],o=e;n.matchBase&&1===s.length&&(o=[l]);var u=this.matchOne(o,s,t);if(u)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}function h(e){return e.replace(/\\(.)/g,"$1")}function m(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}t.exports=a,a.Minimatch=s;var g=!1;"undefined"!=typeof n&&"win32"===n.platform&&(g=!0);var y=a.GLOBSTAR=s.GLOBSTAR={},b=e("brace-expansion"),v="[^/]",x=v+"*?",E="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",_="(?:(?!(?:\\/|^)\\.).)*?",S=r("().*{}+?[]^$\\!"),I=/\/+/;a.filter=l,a.defaults=function(e){if(!e||!Object.keys(e).length)return a;var t=a,n=function(n,r,l){return t.minimatch(n,r,i(e,l))};return n.Minimatch=function(n,r){return new t.Minimatch(n,i(e,r))},n},s.defaults=function(e){return e&&Object.keys(e).length?a.defaults(e).Minimatch:s},s.prototype.debug=function(){},s.prototype.make=o,s.prototype.parseNegate=u,a.braceExpand=function(e,t){return p(e,t)},s.prototype.braceExpand=p,s.prototype.parse=c;var w={};a.makeRe=function(e,t){return new s(e,t||{}).makeRe()},s.prototype.makeRe=d,a.match=function(e,t,n){n=n||{};var r=new s(t,n);return e=e.filter(function(e){return r.match(e)}),r.options.nonull&&!e.length&&e.push(t),e},s.prototype.match=f,s.prototype.matchOne=function(e,t,n){var r=this.options;this.debug("matchOne",{"this":this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var l=0,i=0,a=e.length,s=t.length;a>l&&s>i;l++,i++){this.debug("matchOne loop");var o=t[i],u=e[l];if(this.debug(t,o,u),o===!1)return!1;if(o===y){this.debug("GLOBSTAR",[t,o,u]);var p=l,c=i+1;if(c===s){for(this.debug("** at the end");a>l;l++)if("."===e[l]||".."===e[l]||!r.dot&&"."===e[l].charAt(0))return!1;return!0}e:for(;a>p;){var d=e[p];if(this.debug("\nglobstar while",e,p,t,c,d),this.matchOne(e.slice(p),t.slice(c),n))return this.debug("globstar found match!",p,a,d),!0;if("."===d||".."===d||!r.dot&&"."===d.charAt(0)){this.debug("dot detected!",e,p,t,c);break e}this.debug("globstar swallow a segment, and continue"),p++}return n&&(this.debug("\n>>> no match, partial?",e,p,t,c),p===a)?!0:!1}var f;if("string"==typeof o?(f=r.nocase?u.toLowerCase()===o.toLowerCase():u===o,this.debug("string match",o,u,f)):(f=u.match(o),this.debug("pattern match",o,u,f)),!f)return!1}if(l===a&&i===s)return!0;if(l===a)return n;if(i===s){var h=l===a-1&&""===e[l];return h}throw new Error("wtf?")}}).call(this,e("_process"))},{_process:185,"brace-expansion":336}],336:[function(e,t){function n(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function r(e){return e.split("\\\\").join(h).split("\\{").join(m).split("\\}").join(g).split("\\,").join(y).split("\\.").join(b)}function l(e){return e.split(h).join("\\").split(m).join("{").split(g).join("}").split(y).join(",").split(b).join(".")}function i(e){if(!e)return[""];var t=[],n=f("{","}",e);if(!n)return e.split(",");var r=n.pre,l=n.body,a=n.post,s=r.split(",");s[s.length-1]+="{"+l+"}";var o=i(a);return a.length&&(s[s.length-1]+=o.shift(),s.push.apply(s,o)),t.push.apply(t,s),t}function a(e){return e?c(r(e),!0).map(l):[]}function s(e){return"{"+e+"}"}function o(e){return/^-?0\d/.test(e)}function u(e,t){return t>=e}function p(e,t){return e>=t}function c(e,t){var r=[],l=f("{","}",e);if(!l||/\$$/.test(l.pre))return[e];var a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body),m=a||h,y=/^(.*,)+(.+)?$/.test(l.body);if(!m&&!y)return l.post.match(/,.*}/)?(e=l.pre+"{"+l.body+g+l.post,c(e)):[e];var b;if(m)b=l.body.split(/\.\./);else if(b=i(l.body),1===b.length&&(b=c(b[0],!1).map(s),1===b.length)){var v=l.post.length?c(l.post,!1):[""];return v.map(function(e){return l.pre+b[0]+e})}var x,E=l.pre,v=l.post.length?c(l.post,!1):[""];if(m){var _=n(b[0]),S=n(b[1]),I=Math.max(b[0].length,b[1].length),w=3==b.length?Math.abs(n(b[2])):1,k=u,A=_>S;A&&(w*=-1,k=p);var C=b.some(o);x=[];for(var T=_;k(T,S);T+=w){var M;if(h)M=String.fromCharCode(T),"\\"===M&&(M="");else if(M=String(T),C){var j=I-M.length;if(j>0){var P=new Array(j+1).join("0");M=0>T?"-"+P+M.slice(1):P+M}}x.push(M)}}else x=d(b,function(e){return c(e,!1)});for(var L=0;L<x.length;L++)for(var O=0;O<v.length;O++){var R=E+x[L]+v[O];(!t||m||R)&&r.push(R)}return r}var d=e("concat-map"),f=e("balanced-match");t.exports=a;var h="\x00SLASH"+Math.random()+"\x00",m="\x00OPEN"+Math.random()+"\x00",g="\x00CLOSE"+Math.random()+"\x00",y="\x00COMMA"+Math.random()+"\x00",b="\x00PERIOD"+Math.random()+"\x00"},{"balanced-match":337,"concat-map":338}],337:[function(e,t){function n(e,t,r){for(var l=0,i={},a=!1,s=0;s<r.length;s++)if(e==r.substr(s,e.length))"start"in i||(i.start=s),l++;else if(t==r.substr(s,t.length)&&"start"in i&&(a=!0,l--,!l))return i.end=s,i.pre=r.substr(0,i.start),i.body=i.end-i.start>1?r.substring(i.start+e.length,i.end):"",i.post=r.slice(i.end+t.length),i;if(l&&a){var o=i.start+e.length;return i=n(e,t,r.substr(o)),i&&(i.start+=o,i.end+=o,i.pre=r.slice(0,o)+i.pre),i}}t.exports=n},{}],338:[function(e,t){t.exports=function(e,t){for(var r=[],l=0;l<e.length;l++){var i=t(e[l],l);n(i)?r.push.apply(r,i):r.push(i)}return r};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],339:[function(e,t){(function(e){"use strict";function n(e){return"/"===e.charAt(0)}function r(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,n=t.exec(e),r=n[1]||"",l=!!r&&":"!==r.charAt(1);return!!n[2]||l}t.exports="win32"===e.platform?r:n,t.exports.posix=n,t.exports.win32=r}).call(this,e("_process"))},{_process:185}],340:[function(e,t,n){"use strict";function r(e,t,n){if(c)try{c.call(p,e,t,{value:n})}catch(r){e[t]=n}else e[t]=n}function l(e){return e&&(r(e,"call",e.call),r(e,"apply",e.apply)),e}function i(e){return d?d.call(p,e):(g.prototype=e||null,new g)}function a(){do var e=s(m.call(h.call(y(),36),2));while(f.call(b,e));return b[e]=e}function s(e){var t={};return t[e]=!0,Object.keys(t)[0]}function o(){return i(null)}function u(e){function t(t){function n(n,r){return n===s?r?i=null:i||(i=e(t)):void 0}var i;r(t,l,n)}function n(e){return f.call(e,l)||t(e),e[l](s)}var l=a(),s=i(null);return e=e||o,n.forget=function(e){f.call(e,l)&&e[l](s,!0)},n}var p=Object,c=Object.defineProperty,d=Object.create;l(c),l(d);var f=l(Object.prototype.hasOwnProperty),h=l(Number.prototype.toString),m=l(String.prototype.slice),g=function(){},y=Math.random,b=i(null);r(n,"makeUniqueKey",a);var v=Object.getOwnPropertyNames;Object.getOwnPropertyNames=function(e){for(var t=v(e),n=0,r=0,l=t.length;l>n;++n)f.call(b,t[n])||(n>r&&(t[r]=t[n]),++r); return t.length=r,t},r(n,"makeAccessor",u)},{}],341:[function(e,t,n){function r(e){o.ok(this instanceof r),c.Identifier.assert(e),Object.defineProperties(this,{contextId:{value:e},listing:{value:[]},marked:{value:[!0]},finalLoc:{value:l()},tryEntries:{value:[]}}),Object.defineProperties(this,{leapManager:{value:new d.LeapManager(this)}})}function l(){return p.literal(-1)}function i(e){return c.BreakStatement.check(e)||c.ContinueStatement.check(e)||c.ReturnStatement.check(e)||c.ThrowStatement.check(e)}function a(e){return new Error("all declarations should have been transformed into assignments before the Exploder began its work: "+JSON.stringify(e))}function s(e){var t=e.type;return"normal"===t?!m.call(e,"target"):"break"===t||"continue"===t?!m.call(e,"value")&&c.Literal.check(e.target):"return"===t||"throw"===t?m.call(e,"value")&&!m.call(e,"target"):!1}var o=e("assert"),u=e("ast-types"),p=(u.builtInTypes.array,u.builders),c=u.namedTypes,d=e("./leap"),f=e("./meta"),h=e("./util"),m=Object.prototype.hasOwnProperty,g=r.prototype;n.Emitter=r,g.mark=function(e){c.Literal.assert(e);var t=this.listing.length;return-1===e.value?e.value=t:o.strictEqual(e.value,t),this.marked[t]=!0,e},g.emit=function(e){c.Expression.check(e)&&(e=p.expressionStatement(e)),c.Statement.assert(e),this.listing.push(e)},g.emitAssign=function(e,t){return this.emit(this.assign(e,t)),e},g.assign=function(e,t){return p.expressionStatement(p.assignmentExpression("=",e,t))},g.contextProperty=function(e,t){return p.memberExpression(this.contextId,t?p.literal(e):p.identifier(e),!!t)};var y={prev:!0,next:!0,sent:!0,rval:!0};g.isVolatileContextProperty=function(e){if(c.MemberExpression.check(e)){if(e.computed)return!0;if(c.Identifier.check(e.object)&&c.Identifier.check(e.property)&&e.object.name===this.contextId.name&&m.call(y,e.property.name))return!0}return!1},g.stop=function(e){e&&this.setReturnValue(e),this.jump(this.finalLoc)},g.setReturnValue=function(e){c.Expression.assert(e.value),this.emitAssign(this.contextProperty("rval"),this.explodeExpression(e))},g.clearPendingException=function(e,t){c.Literal.assert(e);var n=p.callExpression(this.contextProperty("catch",!0),[e]);t?this.emitAssign(t,n):this.emit(n)},g.jump=function(e){this.emitAssign(this.contextProperty("next"),e),this.emit(p.breakStatement())},g.jumpIf=function(e,t){c.Expression.assert(e),c.Literal.assert(t),this.emit(p.ifStatement(e,p.blockStatement([this.assign(this.contextProperty("next"),t),p.breakStatement()])))},g.jumpIfNot=function(e,t){c.Expression.assert(e),c.Literal.assert(t);var n;n=c.UnaryExpression.check(e)&&"!"===e.operator?e.argument:p.unaryExpression("!",e),this.emit(p.ifStatement(n,p.blockStatement([this.assign(this.contextProperty("next"),t),p.breakStatement()])))};var b=0;g.makeTempVar=function(){return this.contextProperty("t"+b++)},g.getContextFunction=function(e){var t=p.functionExpression(e||null,[this.contextId],p.blockStatement([this.getDispatchLoop()]),!1,!1);return t._aliasFunction=!0,t},g.getDispatchLoop=function(){var e,t=this,n=[],r=!1;return t.listing.forEach(function(l,a){t.marked.hasOwnProperty(a)&&(n.push(p.switchCase(p.literal(a),e=[])),r=!1),r||(e.push(l),i(l)&&(r=!0))}),this.finalLoc.value=this.listing.length,n.push(p.switchCase(this.finalLoc,[]),p.switchCase(p.literal("end"),[p.returnStatement(p.callExpression(this.contextProperty("stop"),[]))])),p.whileStatement(p.literal(1),p.switchStatement(p.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),n))},g.getTryLocsList=function(){if(0===this.tryEntries.length)return null;var e=0;return p.arrayExpression(this.tryEntries.map(function(t){var n=t.firstLoc.value;o.ok(n>=e,"try entries out of order"),e=n;var r=t.catchEntry,l=t.finallyEntry,i=[t.firstLoc,r?r.firstLoc:null];return l&&(i[2]=l.firstLoc,i[3]=l.afterLoc),p.arrayExpression(i)}))},g.explode=function(e,t){o.ok(e instanceof u.NodePath);var n=e.value,r=this;if(c.Node.assert(n),c.Statement.check(n))return r.explodeStatement(e);if(c.Expression.check(n))return r.explodeExpression(e,t);if(c.Declaration.check(n))throw a(n);switch(n.type){case"Program":return e.get("body").map(r.explodeStatement,r);case"VariableDeclarator":throw a(n);case"Property":case"SwitchCase":case"CatchClause":throw new Error(n.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+JSON.stringify(n.type))}},g.explodeStatement=function(e,t){o.ok(e instanceof u.NodePath);var n=e.value,r=this;if(c.Statement.assert(n),t?c.Identifier.assert(t):t=null,c.BlockStatement.check(n))return e.get("body").each(r.explodeStatement,r);if(!f.containsLeap(n))return void r.emit(n);switch(n.type){case"ExpressionStatement":r.explodeExpression(e.get("expression"),!0);break;case"LabeledStatement":var i=l();r.leapManager.withEntry(new d.LabeledEntry(i,n.label),function(){r.explodeStatement(e.get("body"),n.label)}),r.mark(i);break;case"WhileStatement":var a=l(),i=l();r.mark(a),r.jumpIfNot(r.explodeExpression(e.get("test")),i),r.leapManager.withEntry(new d.LoopEntry(i,a,t),function(){r.explodeStatement(e.get("body"))}),r.jump(a),r.mark(i);break;case"DoWhileStatement":var s=l(),m=l(),i=l();r.mark(s),r.leapManager.withEntry(new d.LoopEntry(i,m,t),function(){r.explode(e.get("body"))}),r.mark(m),r.jumpIf(r.explodeExpression(e.get("test")),s),r.mark(i);break;case"ForStatement":var g=l(),y=l(),i=l();n.init&&r.explode(e.get("init"),!0),r.mark(g),n.test&&r.jumpIfNot(r.explodeExpression(e.get("test")),i),r.leapManager.withEntry(new d.LoopEntry(i,y,t),function(){r.explodeStatement(e.get("body"))}),r.mark(y),n.update&&r.explode(e.get("update"),!0),r.jump(g),r.mark(i);break;case"ForInStatement":c.Identifier.assert(n.left);var g=l(),i=l(),b=r.makeTempVar();r.emitAssign(b,p.callExpression(h.runtimeProperty("keys"),[r.explodeExpression(e.get("right"))])),r.mark(g);var v=r.makeTempVar();r.jumpIf(p.memberExpression(p.assignmentExpression("=",v,p.callExpression(b,[])),p.identifier("done"),!1),i),r.emitAssign(n.left,p.memberExpression(v,p.identifier("value"),!1)),r.leapManager.withEntry(new d.LoopEntry(i,g,t),function(){r.explodeStatement(e.get("body"))}),r.jump(g),r.mark(i);break;case"BreakStatement":r.emitAbruptCompletion({type:"break",target:r.leapManager.getBreakLoc(n.label)});break;case"ContinueStatement":r.emitAbruptCompletion({type:"continue",target:r.leapManager.getContinueLoc(n.label)});break;case"SwitchStatement":for(var x=r.emitAssign(r.makeTempVar(),r.explodeExpression(e.get("discriminant"))),i=l(),E=l(),_=E,S=[],I=n.cases||[],w=I.length-1;w>=0;--w){var k=I[w];c.SwitchCase.assert(k),k.test?_=p.conditionalExpression(p.binaryExpression("===",x,k.test),S[w]=l(),_):S[w]=E}r.jump(r.explodeExpression(new u.NodePath(_,e,"discriminant"))),r.leapManager.withEntry(new d.SwitchEntry(i),function(){e.get("cases").each(function(e){var t=(e.value,e.name);r.mark(S[t]),e.get("consequent").each(r.explodeStatement,r)})}),r.mark(i),-1===E.value&&(r.mark(E),o.strictEqual(i.value,E.value));break;case"IfStatement":var A=n.alternate&&l(),i=l();r.jumpIfNot(r.explodeExpression(e.get("test")),A||i),r.explodeStatement(e.get("consequent")),A&&(r.jump(i),r.mark(A),r.explodeStatement(e.get("alternate"))),r.mark(i);break;case"ReturnStatement":r.emitAbruptCompletion({type:"return",value:r.explodeExpression(e.get("argument"))});break;case"WithStatement":throw new Error(node.type+" not supported in generator functions.");case"TryStatement":var i=l(),C=n.handler;!C&&n.handlers&&(C=n.handlers[0]||null);var T=C&&l(),M=T&&new d.CatchEntry(T,C.param),j=n.finalizer&&l(),P=j&&new d.FinallyEntry(j,i),L=new d.TryEntry(r.getUnmarkedCurrentLoc(),M,P);r.tryEntries.push(L),r.updateContextPrevLoc(L.firstLoc),r.leapManager.withEntry(L,function(){if(r.explodeStatement(e.get("block")),T){r.jump(j?j:i),r.updateContextPrevLoc(r.mark(T));var t=e.get("handler","body"),n=r.makeTempVar();r.clearPendingException(L.firstLoc,n);var l=t.scope,a=C.param.name;c.CatchClause.assert(l.node),o.strictEqual(l.lookup(a),l),u.visit(t,{visitIdentifier:function(e){return h.isReference(e,a)&&e.scope.lookup(a)===l?n:void this.traverse(e)},visitFunction:function(e){return e.scope.declares(a)?!1:void this.traverse(e)}}),r.leapManager.withEntry(M,function(){r.explodeStatement(t)})}j&&(r.updateContextPrevLoc(r.mark(j)),r.leapManager.withEntry(P,function(){r.explodeStatement(e.get("finalizer"))}),r.emit(p.returnStatement(p.callExpression(r.contextProperty("finish"),[P.firstLoc]))))}),r.mark(i);break;case"ThrowStatement":r.emit(p.throwStatement(r.explodeExpression(e.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(n.type))}},g.emitAbruptCompletion=function(e){s(e)||o.ok(!1,"invalid completion record: "+JSON.stringify(e)),o.notStrictEqual(e.type,"normal","normal completions are not abrupt");var t=[p.literal(e.type)];"break"===e.type||"continue"===e.type?(c.Literal.assert(e.target),t[1]=e.target):("return"===e.type||"throw"===e.type)&&e.value&&(c.Expression.assert(e.value),t[1]=e.value),this.emit(p.returnStatement(p.callExpression(this.contextProperty("abrupt"),t)))},g.getUnmarkedCurrentLoc=function(){return p.literal(this.listing.length)},g.updateContextPrevLoc=function(e){e?(c.Literal.assert(e),-1===e.value?e.value=this.listing.length:o.strictEqual(e.value,this.listing.length)):e=this.getUnmarkedCurrentLoc(),this.emitAssign(this.contextProperty("prev"),e)},g.explodeExpression=function(e,t){function n(e){return c.Expression.assert(e),t?void s.emit(e):e}function r(e,t,n){o.ok(t instanceof u.NodePath),o.ok(!n||!e,"Ignoring the result of a child expression but forcing it to be assigned to a temporary variable?");var r=s.explodeExpression(t,n);return n||(e||d&&(s.isVolatileContextProperty(r)||f.hasSideEffects(r)))&&(r=s.emitAssign(e||s.makeTempVar(),r)),r}o.ok(e instanceof u.NodePath);var i=e.value;if(!i)return i;c.Expression.assert(i);var a,s=this;if(!f.containsLeap(i))return n(i);var d=f.containsLeap.onlyChildren(i);switch(i.type){case"MemberExpression":return n(p.memberExpression(s.explodeExpression(e.get("object")),i.computed?r(null,e.get("property")):i.property,i.computed));case"CallExpression":var h=e.get("callee"),m=s.explodeExpression(h);return!c.MemberExpression.check(h.node)&&c.MemberExpression.check(m)&&(m=p.sequenceExpression([p.literal(0),m])),n(p.callExpression(m,e.get("arguments").map(function(e){return r(null,e)})));case"NewExpression":return n(p.newExpression(r(null,e.get("callee")),e.get("arguments").map(function(e){return r(null,e)})));case"ObjectExpression":return n(p.objectExpression(e.get("properties").map(function(e){return p.property(e.value.kind,e.value.key,r(null,e.get("value")))})));case"ArrayExpression":return n(p.arrayExpression(e.get("elements").map(function(e){return r(null,e)})));case"SequenceExpression":var g=i.expressions.length-1;return e.get("expressions").each(function(e){e.name===g?a=s.explodeExpression(e,t):s.explodeExpression(e,!0)}),a;case"LogicalExpression":var y=l();t||(a=s.makeTempVar());var b=r(a,e.get("left"));return"&&"===i.operator?s.jumpIfNot(b,y):(o.strictEqual(i.operator,"||"),s.jumpIf(b,y)),r(a,e.get("right"),t),s.mark(y),a;case"ConditionalExpression":var v=l(),y=l(),x=s.explodeExpression(e.get("test"));return s.jumpIfNot(x,v),t||(a=s.makeTempVar()),r(a,e.get("consequent"),t),s.jump(y),s.mark(v),r(a,e.get("alternate"),t),s.mark(y),a;case"UnaryExpression":return n(p.unaryExpression(i.operator,s.explodeExpression(e.get("argument")),!!i.prefix));case"BinaryExpression":return n(p.binaryExpression(i.operator,r(null,e.get("left")),r(null,e.get("right"))));case"AssignmentExpression":return n(p.assignmentExpression(i.operator,s.explodeExpression(e.get("left")),s.explodeExpression(e.get("right"))));case"UpdateExpression":return n(p.updateExpression(i.operator,s.explodeExpression(e.get("argument")),i.prefix));case"YieldExpression":var y=l(),E=i.argument&&s.explodeExpression(e.get("argument"));if(E&&i.delegate){var a=s.makeTempVar();return s.emit(p.returnStatement(p.callExpression(s.contextProperty("delegateYield"),[E,p.literal(a.property.name),y]))),s.mark(y),a}return s.emitAssign(s.contextProperty("next"),y),s.emit(p.returnStatement(E||null)),s.mark(y),s.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(i.type))}}},{"./leap":343,"./meta":344,"./util":345,assert:175,"ast-types":173}],342:[function(e,t,n){var r=e("assert"),l=e("ast-types"),i=l.namedTypes,a=l.builders,s=Object.prototype.hasOwnProperty;n.hoist=function(e){function t(e,t){i.VariableDeclaration.assert(e);var r=[];return e.declarations.forEach(function(e){n[e.id.name]=e.id,e.init?r.push(a.assignmentExpression("=",e.id,e.init)):t&&r.push(e.id)}),0===r.length?null:1===r.length?r[0]:a.sequenceExpression(r)}r.ok(e instanceof l.NodePath),i.Function.assert(e.value);var n={};l.visit(e.get("body"),{visitVariableDeclaration:function(e){var n=t(e.value,!1);return null!==n?a.expressionStatement(n):(e.replace(),!1)},visitForStatement:function(e){var n=e.value.init;i.VariableDeclaration.check(n)&&e.get("init").replace(t(n,!1)),this.traverse(e)},visitForInStatement:function(e){var n=e.value.left;i.VariableDeclaration.check(n)&&e.get("left").replace(t(n,!0)),this.traverse(e)},visitFunctionDeclaration:function(e){var t=e.value;n[t.id.name]=t.id;var r=(e.parent.node,a.expressionStatement(a.assignmentExpression("=",t.id,a.functionExpression(t.id,t.params,t.body,t.generator,t.expression))));return i.BlockStatement.check(e.parent.node)?(e.parent.get("body").unshift(r),e.replace()):e.replace(r),!1},visitFunctionExpression:function(){return!1}});var o={};e.get("params").each(function(e){var t=e.value;i.Identifier.check(t)&&(o[t.name]=t)});var u=[];return Object.keys(n).forEach(function(e){s.call(o,e)||u.push(a.variableDeclarator(n[e],null))}),0===u.length?null:a.variableDeclaration("var",u)}},{assert:175,"ast-types":173}],343:[function(e,t,n){function r(){d.ok(this instanceof r)}function l(e){r.call(this),h.Literal.assert(e),this.returnLoc=e}function i(e,t,n){r.call(this),h.Literal.assert(e),h.Literal.assert(t),n?h.Identifier.assert(n):n=null,this.breakLoc=e,this.continueLoc=t,this.label=n}function a(e){r.call(this),h.Literal.assert(e),this.breakLoc=e}function s(e,t,n){r.call(this),h.Literal.assert(e),t?d.ok(t instanceof o):t=null,n?d.ok(n instanceof u):n=null,d.ok(t||n),this.firstLoc=e,this.catchEntry=t,this.finallyEntry=n}function o(e,t){r.call(this),h.Literal.assert(e),h.Identifier.assert(t),this.firstLoc=e,this.paramId=t}function u(e,t){r.call(this),h.Literal.assert(e),h.Literal.assert(t),this.firstLoc=e,this.afterLoc=t}function p(e,t){r.call(this),h.Literal.assert(e),h.Identifier.assert(t),this.breakLoc=e,this.label=t}function c(t){d.ok(this instanceof c);var n=e("./emit").Emitter;d.ok(t instanceof n),this.emitter=t,this.entryStack=[new l(t.finalLoc)]}{var d=e("assert"),f=e("ast-types"),h=f.namedTypes,m=(f.builders,e("util").inherits);Object.prototype.hasOwnProperty}m(l,r),n.FunctionEntry=l,m(i,r),n.LoopEntry=i,m(a,r),n.SwitchEntry=a,m(s,r),n.TryEntry=s,m(o,r),n.CatchEntry=o,m(u,r),n.FinallyEntry=u,m(p,r),n.LabeledEntry=p;var g=c.prototype;n.LeapManager=c,g.withEntry=function(e,t){d.ok(e instanceof r),this.entryStack.push(e);try{t.call(this.emitter)}finally{var n=this.entryStack.pop();d.strictEqual(n,e)}},g._findLeapLocation=function(e,t){for(var n=this.entryStack.length-1;n>=0;--n){var r=this.entryStack[n],l=r[e];if(l)if(t){if(r.label&&r.label.name===t.name)return l}else if(!(r instanceof p))return l}return null},g.getBreakLoc=function(e){return this._findLeapLocation("breakLoc",e)},g.getContinueLoc=function(e){return this._findLeapLocation("continueLoc",e)}},{"./emit":341,assert:175,"ast-types":173,util:201}],344:[function(e,t,n){function r(e,t){function n(e){function t(e){return n||(s.check(e)?e.some(t):o.Node.check(e)&&(l.strictEqual(n,!1),n=r(e))),n}o.Node.assert(e);var n=!1;return a.eachField(e,function(e,n){t(n)}),n}function r(r){o.Node.assert(r);var l=i(r);return u.call(l,e)?l[e]:l[e]=u.call(p,r.type)?!1:u.call(t,r.type)?!0:n(r)}return r.onlyChildren=n,r}var l=e("assert"),i=e("private").makeAccessor(),a=e("ast-types"),s=a.builtInTypes.array,o=a.namedTypes,u=Object.prototype.hasOwnProperty,p={FunctionExpression:!0},c={CallExpression:!0,ForInStatement:!0,UnaryExpression:!0,BinaryExpression:!0,AssignmentExpression:!0,UpdateExpression:!0,NewExpression:!0},d={YieldExpression:!0,BreakStatement:!0,ContinueStatement:!0,ReturnStatement:!0,ThrowStatement:!0};for(var f in d)u.call(d,f)&&(c[f]=d[f]);n.hasSideEffects=r("hasSideEffects",c),n.containsLeap=r("containsLeap",d)},{assert:175,"ast-types":173,"private":340}],345:[function(e,t,n){var r=(e("assert"),e("ast-types")),l=r.namedTypes,i=r.builders,a=Object.prototype.hasOwnProperty;n.defaults=function(e){for(var t,n=arguments.length,r=1;n>r;++r)if(t=arguments[r])for(var l in t)a.call(t,l)&&!a.call(e,l)&&(e[l]=t[l]);return e},n.runtimeProperty=function(e){return i.memberExpression(i.identifier("regeneratorRuntime"),i.identifier(e),!1)},n.isReference=function(e,t){var n=e.value;if(!l.Identifier.check(n))return!1;if(t&&n.name!==t)return!1;var r=e.parent.value;switch(r.type){case"VariableDeclarator":return"init"===e.name;case"MemberExpression":return"object"===e.name||r.computed&&"property"===e.name;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":return"id"===e.name?!1:r.params===e.parentPath&&r.params[e.name]===n?!1:!0;case"ClassDeclaration":case"ClassExpression":return"id"!==e.name;case"CatchClause":return"param"!==e.name;case"Property":case"MethodDefinition":return"key"!==e.name;case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"LabeledStatement":return!1;default:return!0}}},{assert:175,"ast-types":173}],346:[function(e,t,n){var r=(e("assert"),e("fs"),e("ast-types")),l=r.namedTypes,i=r.builders,a=(r.builtInTypes.array,r.builtInTypes.object,r.NodePath),s=e("./hoist").hoist,o=e("./emit").Emitter,u=e("./util").runtimeProperty;n.transform=function(e,t){t=t||{};var n=e instanceof a?e:new a(e);return p.visit(n,t),e=n.value,t.madeChanges=p.wasChangeReported(),e};var p=r.PathVisitor.fromMethodsObject({reset:function(e,t){this.options=t},visitFunction:function(e){this.traverse(e);var t=e.value,n=t.async&&!this.options.disableAsync;if(t.generator||n){this.reportChanged(),t.generator=!1,t.expression&&(t.expression=!1,t.body=i.blockStatement([i.returnStatement(t.body)])),n&&c.visit(e.get("body"));var r=t.id||(t.id=e.scope.parent.declareTemporary("callee$")),a=[],p=e.value.body;p.body=p.body.filter(function(e){return e&&null!=e._blockHoist?(a.push(e),!1):!0});var d=i.identifier(t.id.name+"$"),f=e.scope.declareTemporary("context$"),h=s(e),m=new o(f);m.explode(e.get("body")),h&&h.declarations.length>0&&a.push(h);var g=[m.getContextFunction(d),n?i.literal(null):r,i.thisExpression()],y=m.getTryLocsList();y&&g.push(y);var b=i.callExpression(u(n?"async":"wrap"),g);if(a.push(i.returnStatement(b)),t.body=i.blockStatement(a),t.body._declarations=p._declarations,n)return void(t.async=!1);if(!l.FunctionDeclaration.check(t))return l.FunctionExpression.assert(t),i.callExpression(u("mark"),[t]);for(var v=e.parent;v&&!l.BlockStatement.check(v.value)&&!l.Program.check(v.value);)v=v.parent;if(v){e.replace(),t.type="FunctionExpression";var x=i.variableDeclaration("var",[i.variableDeclarator(t.id,i.callExpression(u("mark"),[t]))]);t.comments&&(x.leadingComments=t.leadingComments,x.trailingComments=t.trailingComments,t.leadingComments=null,t.trailingComments=null),x._blockHoist=3;{var E=v.get("body");E.value.length}E.push(x)}}}}),c=r.PathVisitor.fromMethodsObject({visitFunction:function(){return!1},visitAwaitExpression:function(e){var t=e.value.argument;return e.value.all&&(t=i.callExpression(i.memberExpression(i.identifier("Promise"),i.identifier("all"),!1),[t])),i.yieldExpression(t,!1)}})},{"./emit":341,"./hoist":342,"./util":345,assert:175,"ast-types":173,fs:174}],347:[function(e,t){(function(n){function r(e,t){function n(e){l.push(e)}function r(){this.queue(compile(l.join(""),t).code),this.queue(null)}var l=[];return a(n,r)}function l(){e("./runtime")}{var i=(e("assert"),e("path")),a=(e("fs"),e("through")),s=e("./lib/visit").transform;e("./lib/util"),e("ast-types")}t.exports=r,r.runtime=l,l.path=i.join(n,"runtime.js"),r.transform=s}).call(this,"/node_modules/regenerator-babel")},{"./lib/util":345,"./lib/visit":346,"./runtime":349,assert:175,"ast-types":173,fs:174,path:184,through:348}],348:[function(e,t,n){(function(r){function l(e,t,n){function l(){for(;u.length&&!c.paused;){var e=u.shift();if(null===e)return c.emit("end");c.emit("data",e)}}function a(){c.writable=!1,t.call(c),!c.readable&&c.autoDestroy&&c.destroy()}e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};var s=!1,o=!1,u=[],p=!1,c=new i;return c.readable=c.writable=!0,c.paused=!1,c.autoDestroy=!(n&&n.autoDestroy===!1),c.write=function(t){return e.call(this,t),!c.paused},c.queue=c.push=function(e){return p?c:(null==e&&(p=!0),u.push(e),l(),c)},c.on("end",function(){c.readable=!1,!c.writable&&c.autoDestroy&&r.nextTick(function(){c.destroy()})}),c.end=function(e){return s?void 0:(s=!0,arguments.length&&c.write(e),a(),c)},c.destroy=function(){return o?void 0:(o=!0,s=!0,u.length=0,c.writable=c.readable=!1,c.emit("close"),c)},c.pause=function(){return c.paused?void 0:(c.paused=!0,c)},c.resume=function(){return c.paused&&(c.paused=!1,c.emit("resume")),l(),c.paused||c.emit("drain"),c},c}var i=e("stream");n=t.exports=l,l.through=l}).call(this,e("_process"))},{_process:185,stream:197}],349:[function(e,t){(function(e){!function(e){"use strict";function n(e,t,n,r){return new a(e,t,n||null,r||[])}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}function l(){}function i(){}function a(e,t,n,l){function i(t,l){if(o===v)throw new Error("Generator is already running");if(o===x)return c();for(;;){var i=s.delegate;if(i){var a=r(i.iterator[t],i.iterator,l);if("throw"===a.type){s.delegate=null,t="throw",l=a.arg;continue}t="next",l=d;var u=a.arg;if(!u.done)return o=b,u;s[i.resultName]=u.value,s.next=i.nextLoc,s.delegate=null}if("next"===t){if(o===y&&"undefined"!=typeof l)throw new TypeError("attempt to send "+JSON.stringify(l)+" to newborn generator");o===b?s.sent=l:delete s.sent}else if("throw"===t){if(o===y)throw o=x,l;s.dispatchException(l)&&(t="next",l=d)}else"return"===t&&s.abrupt("return",l);o=v;var a=r(e,n,s);if("normal"===a.type){o=s.done?x:b;var u={value:a.arg,done:s.done};if(a.arg!==E)return u;s.delegate&&"next"===t&&(l=d)}else"throw"===a.type&&(o=x,"next"===t?s.dispatchException(a.arg):l=a.arg)}}var a=t?Object.create(t.prototype):this,s=new u(l),o=y;return a.next=i.bind(a,"next"),a["throw"]=i.bind(a,"throw"),a["return"]=i.bind(a,"return"),a}function s(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function o(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function u(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(s,this),this.reset()}function p(e){if(e){var t=e[h];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function l(){for(;++n<e.length;)if(f.call(e,n))return l.value=e[n],l.done=!1,l;return l.value=d,l.done=!0,l};return r.next=r}}return{next:c}}function c(){return{value:d,done:!0}}var d,f=Object.prototype.hasOwnProperty,h="function"==typeof Symbol&&Symbol.iterator||"@@iterator",m="object"==typeof t,g=e.regeneratorRuntime;if(g)return void(m&&(t.exports=g));g=e.regeneratorRuntime=m?t.exports:{},g.wrap=n;var y="suspendedStart",b="suspendedYield",v="executing",x="completed",E={},_=i.prototype=a.prototype;l.prototype=_.constructor=i,i.constructor=l,l.displayName="GeneratorFunction",g.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return t?t===l||"GeneratorFunction"===(t.displayName||t.name):!1},g.mark=function(e){return e.__proto__=i,e.prototype=Object.create(_),e},g.async=function(e,t,l,i){return new Promise(function(a,s){function o(e){var t=r(this,null,e);if("throw"===t.type)return void s(t.arg);var n=t.arg;n.done?a(n.value):Promise.resolve(n.value).then(p,c)}var u=n(e,t,l,i),p=o.bind(u.next),c=o.bind(u["throw"]);p()})},_[h]=function(){return this},_.toString=function(){return"[object Generator]"},g.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},g.values=p,u.prototype={constructor:u,reset:function(){this.prev=0,this.next=0,this.sent=d,this.done=!1,this.delegate=null,this.tryEntries.forEach(o);for(var e,t=0;f.call(this,e="t"+t)||20>t;++t)this[e]=null},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return i.type="throw",i.arg=e,n.next=t,!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var l=this.tryEntries[r],i=l.completion;if("root"===l.tryLoc)return t("end");if(l.tryLoc<=this.prev){var a=f.call(l,"catchLoc"),s=f.call(l,"finallyLoc");if(a&&s){if(this.prev<l.catchLoc)return t(l.catchLoc,!0);if(this.prev<l.finallyLoc)return t(l.finallyLoc)}else if(a){if(this.prev<l.catchLoc)return t(l.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return t(l.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&f.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var l=r;break}}l&&("break"===e||"continue"===e)&&l.tryLoc<=t&&t<l.finallyLoc&&(l=null);var i=l?l.completion:{};return i.type=e,i.arg=t,l?this.next=l.finallyLoc:this.complete(i),E},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=e.arg,this.next="end"):"normal"===e.type&&t&&(this.next=t),E},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc)}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var l=r.arg;o(n)}return l}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:p(e),resultName:t,nextLoc:n},E}}}("object"==typeof e?e:"object"==typeof window?window:this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],350:[function(e,t,n){var r=e("regenerate");n.REGULAR={d:r().addRange(48,57),D:r().addRange(0,47).addRange(58,65535),s:r(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:r().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,65535),w:r(95).addRange(48,57).addRange(65,90).addRange(97,122),W:r(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,65535)},n.UNICODE={d:r().addRange(48,57),D:r().addRange(0,47).addRange(58,1114111),s:r(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:r().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:r(95).addRange(48,57).addRange(65,90).addRange(97,122),W:r(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)},n.UNICODE_IGNORE_CASE={d:r().addRange(48,57),D:r().addRange(0,47).addRange(58,1114111),s:r(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:r().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:r(95,383,8490).addRange(48,57).addRange(65,90).addRange(97,122),W:r(75,83,96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)}},{regenerate:352}],351:[function(e,t){t.exports={75:8490,83:383,107:8490,115:383,181:924,197:8491,383:83,452:453,453:452,455:456,456:455,458:459,459:458,497:498,498:497,837:8126,914:976,917:1013,920:1012,921:8126,922:1008,924:181,928:982,929:1009,931:962,934:981,937:8486,962:931,976:914,977:1012,981:934,982:928,1008:922,1009:929,1012:[920,977],1013:917,7776:7835,7835:7776,8126:[837,921],8486:937,8490:75,8491:197,66560:66600,66561:66601,66562:66602,66563:66603,66564:66604,66565:66605,66566:66606,66567:66607,66568:66608,66569:66609,66570:66610,66571:66611,66572:66612,66573:66613,66574:66614,66575:66615,66576:66616,66577:66617,66578:66618,66579:66619,66580:66620,66581:66621,66582:66622,66583:66623,66584:66624,66585:66625,66586:66626,66587:66627,66588:66628,66589:66629,66590:66630,66591:66631,66592:66632,66593:66633,66594:66634,66595:66635,66596:66636,66597:66637,66598:66638,66599:66639,66600:66560,66601:66561,66602:66562,66603:66563,66604:66564,66605:66565,66606:66566,66607:66567,66608:66568,66609:66569,66610:66570,66611:66571,66612:66572,66613:66573,66614:66574,66615:66575,66616:66576,66617:66577,66618:66578,66619:66579,66620:66580,66621:66581,66622:66582,66623:66583,66624:66584,66625:66585,66626:66586,66627:66587,66628:66588,66629:66589,66630:66590,66631:66591,66632:66592,66633:66593,66634:66594,66635:66595,66636:66596,66637:66597,66638:66598,66639:66599,71840:71872,71841:71873,71842:71874,71843:71875,71844:71876,71845:71877,71846:71878,71847:71879,71848:71880,71849:71881,71850:71882,71851:71883,71852:71884,71853:71885,71854:71886,71855:71887,71856:71888,71857:71889,71858:71890,71859:71891,71860:71892,71861:71893,71862:71894,71863:71895,71864:71896,71865:71897,71866:71898,71867:71899,71868:71900,71869:71901,71870:71902,71871:71903,71872:71840,71873:71841,71874:71842,71875:71843,71876:71844,71877:71845,71878:71846,71879:71847,71880:71848,71881:71849,71882:71850,71883:71851,71884:71852,71885:71853,71886:71854,71887:71855,71888:71856,71889:71857,71890:71858,71891:71859,71892:71860,71893:71861,71894:71862,71895:71863,71896:71864,71897:71865,71898:71866,71899:71867,71900:71868,71901:71869,71902:71870,71903:71871}},{}],352:[function(t,n,r){(function(t){!function(l){var i="object"==typeof r&&r,a="object"==typeof n&&n&&n.exports==i&&n,s="object"==typeof t&&t;(s.global===s||s.window===s)&&(l=s);var o={rangeOrder:"A range’s `stop` value must be greater than or equal to the `start` value.",codePointRange:"Invalid code point value. Code points range from U+000000 to U+10FFFF."},u=55296,p=56319,c=56320,d=57343,f=/\\x00([^0123456789]|$)/g,h={},m=h.hasOwnProperty,g=function(e,t){var n;for(n in t)m.call(t,n)&&(e[n]=t[n]);return e},y=function(e,t){for(var n=-1,r=e.length;++n<r;)t(e[n],n)},b=h.toString,v=function(e){return"[object Array]"==b.call(e)},x=function(e){return"number"==typeof e||"[object Number]"==b.call(e)},E="0000",_=function(e,t){var n=String(e);return n.length<t?(E+n).slice(-t):n},S=function(e){return Number(e).toString(16).toUpperCase()},I=[].slice,w=function(e){for(var t,n=-1,r=e.length,l=r-1,i=[],a=!0,s=0;++n<r;)if(t=e[n],a)i.push(t),s=t,a=!1;else if(t==s+1){if(n!=l){s=t;continue}a=!0,i.push(t+1)}else i.push(s+1,t),s=t;return a||i.push(t+1),i},k=function(e,t){for(var n,r,l=0,i=e.length;i>l;){if(n=e[l],r=e[l+1],t>=n&&r>t)return t==n?r==n+1?(e.splice(l,2),e):(e[l]=t+1,e):t==r-1?(e[l+1]=t,e):(e.splice(l,2,n,t,t+1,r),e);l+=2}return e},A=function(e,t,n){if(t>n)throw Error(o.rangeOrder);for(var r,l,i=0;i<e.length;){if(r=e[i],l=e[i+1]-1,r>n)return e;if(r>=t&&n>=l)e.splice(i,2);else{if(t>=r&&l>n)return t==r?(e[i]=n+1,e[i+1]=l+1,e):(e.splice(i,2,r,t,n+1,l+1),e);if(t>=r&&l>=t)e[i+1]=t;else if(n>=r&&l>=n)return e[i]=n+1,e;i+=2}}return e},C=function(e,t){var n,r,l=0,i=null,a=e.length; if(0>t||t>1114111)throw RangeError(o.codePointRange);for(;a>l;){if(n=e[l],r=e[l+1],t>=n&&r>t)return e;if(t==n-1)return e[l]=t,e;if(n>t)return e.splice(null!=i?i+2:0,0,t,t+1),e;if(t==r)return t+1==e[l+2]?(e.splice(l,4,n,e[l+3]),e):(e[l+1]=t+1,e);i=l,l+=2}return e.push(t,t+1),e},T=function(e,t){for(var n,r,l=0,i=e.slice(),a=t.length;a>l;)n=t[l],r=t[l+1]-1,i=n==r?C(i,n):j(i,n,r),l+=2;return i},M=function(e,t){for(var n,r,l=0,i=e.slice(),a=t.length;a>l;)n=t[l],r=t[l+1]-1,i=n==r?k(i,n):A(i,n,r),l+=2;return i},j=function(e,t,n){if(t>n)throw Error(o.rangeOrder);if(0>t||t>1114111||0>n||n>1114111)throw RangeError(o.codePointRange);for(var r,l,i=0,a=!1,s=e.length;s>i;){if(r=e[i],l=e[i+1],a){if(r==n+1)return e.splice(i-1,2),e;if(r>n)return e;r>=t&&n>=r&&(l>t&&n>=l-1?(e.splice(i,2),i-=2):(e.splice(i-1,2),i-=2))}else{if(r==n+1)return e[i]=t,e;if(r>n)return e.splice(i,0,t,n+1),e;if(t>=r&&l>t&&l>=n+1)return e;t>=r&&l>t||l==t?(e[i+1]=n+1,a=!0):r>=t&&n+1>=l&&(e[i]=t,e[i+1]=n+1,a=!0)}i+=2}return a||e.push(t,n+1),e},P=function(e,t){var n=0,r=e.length,l=e[n],i=e[r-1];if(r>=2&&(l>t||t>i))return!1;for(;r>n;){if(l=e[n],i=e[n+1],t>=l&&i>t)return!0;n+=2}return!1},L=function(e,t){for(var n,r=0,l=t.length,i=[];l>r;)n=t[r],P(e,n)&&i.push(n),++r;return w(i)},O=function(e){return!e.length},R=function(e){return 2==e.length&&e[0]+1==e[1]},D=function(e){for(var t,n,r=0,l=[],i=e.length;i>r;){for(t=e[r],n=e[r+1];n>t;)l.push(t),++t;r+=2}return l},N=Math.floor,F=function(e){return parseInt(N((e-65536)/1024)+u,10)},B=function(e){return parseInt((e-65536)%1024+c,10)},V=String.fromCharCode,U=function(e){var t;return t=9==e?"\\t":10==e?"\\n":12==e?"\\f":13==e?"\\r":92==e?"\\\\":36==e||e>=40&&43>=e||45==e||46==e||63==e||e>=91&&94>=e||e>=123&&125>=e?"\\"+V(e):e>=32&&126>=e?V(e):255>=e?"\\x"+_(S(e),2):"\\u"+_(S(e),4)},q=function(e){var t,n=e.length,r=e.charCodeAt(0);return r>=u&&p>=r&&n>1?(t=e.charCodeAt(1),1024*(r-u)+t-c+65536):r},G=function(e){var t,n,r="",l=0,i=e.length;if(R(e))return U(e[0]);for(;i>l;)t=e[l],n=e[l+1]-1,r+=t==n?U(t):t+1==n?U(t)+U(n):U(t)+"-"+U(n),l+=2;return"["+r+"]"},W=function(e){for(var t,n,r=[],l=[],i=[],a=[],s=0,o=e.length;o>s;)t=e[s],n=e[s+1]-1,u>t?(u>n&&i.push(t,n+1),n>=u&&p>=n&&(i.push(t,u),r.push(u,n+1)),n>=c&&d>=n&&(i.push(t,u),r.push(u,p+1),l.push(c,n+1)),n>d&&(i.push(t,u),r.push(u,p+1),l.push(c,d+1),65535>=n?i.push(d+1,n+1):(i.push(d+1,65536),a.push(65536,n+1)))):t>=u&&p>=t?(n>=u&&p>=n&&r.push(t,n+1),n>=c&&d>=n&&(r.push(t,p+1),l.push(c,n+1)),n>d&&(r.push(t,p+1),l.push(c,d+1),65535>=n?i.push(d+1,n+1):(i.push(d+1,65536),a.push(65536,n+1)))):t>=c&&d>=t?(n>=c&&d>=n&&l.push(t,n+1),n>d&&(l.push(t,d+1),65535>=n?i.push(d+1,n+1):(i.push(d+1,65536),a.push(65536,n+1)))):t>d&&65535>=t?65535>=n?i.push(t,n+1):(i.push(t,65536),a.push(65536,n+1)):a.push(t,n+1),s+=2;return{loneHighSurrogates:r,loneLowSurrogates:l,bmp:i,astral:a}},z=function(e){for(var t,n,r,l,i,a,s=[],o=[],u=!1,p=-1,c=e.length;++p<c;)if(t=e[p],n=e[p+1]){for(r=t[0],l=t[1],i=n[0],a=n[1],o=l;i&&r[0]==i[0]&&r[1]==i[1];)o=R(a)?C(o,a[0]):j(o,a[0],a[1]-1),++p,t=e[p],r=t[0],l=t[1],n=e[p+1],i=n&&n[0],a=n&&n[1],u=!0;s.push([r,u?o:l]),u=!1}else s.push(t);return H(s)},H=function(e){if(1==e.length)return e;for(var t=-1,n=-1;++t<e.length;){var r=e[t],l=r[1],i=l[0],a=l[1];for(n=t;++n<e.length;){var s=e[n],o=s[1],u=o[0],p=o[1];i==u&&a==p&&(r[0]=R(s[0])?C(r[0],s[0][0]):j(r[0],s[0][0],s[0][1]-1),e.splice(n,1),--n)}}return e},J=function(e){if(!e.length)return[];for(var t,n,r,l,i,a,s=0,o=0,u=0,p=[],f=e.length;f>s;){t=e[s],n=e[s+1]-1,r=F(t),l=B(t),i=F(n),a=B(n);var h=l==c,m=a==d,g=!1;r==i||h&&m?(p.push([[r,i+1],[l,a+1]]),g=!0):p.push([[r,r+1],[l,d+1]]),!g&&i>r+1&&(m?(p.push([[r+1,i+1],[c,a+1]]),g=!0):p.push([[r+1,i],[c,d+1]])),g||p.push([[i,i+1],[c,a+1]]),o=r,u=i,s+=2}return z(p)},Y=function(e){var t=[];return y(e,function(e){var n=e[0],r=e[1];t.push(G(n)+G(r))}),t.join("|")},X=function(e,t){var n=[],r=W(e),l=r.loneHighSurrogates,i=r.loneLowSurrogates,a=r.bmp,s=r.astral,o=(!O(r.astral),!O(l)),u=!O(i),p=J(s);return t&&(a=T(a,l),o=!1,a=T(a,i),u=!1),O(a)||n.push(G(a)),p.length&&n.push(Y(p)),o&&n.push(G(l)+"(?![\\uDC00-\\uDFFF])"),u&&n.push("(?:[^\\uD800-\\uDBFF]|^)"+G(i)),n.join("|")},K=function(e){return arguments.length>1&&(e=I.call(arguments)),this instanceof K?(this.data=[],e?this.add(e):this):(new K).add(e)};K.version="1.2.0";var $=K.prototype;g($,{add:function(e){var t=this;return null==e?t:e instanceof K?(t.data=T(t.data,e.data),t):(arguments.length>1&&(e=I.call(arguments)),v(e)?(y(e,function(e){t.add(e)}),t):(t.data=C(t.data,x(e)?e:q(e)),t))},remove:function(e){var t=this;return null==e?t:e instanceof K?(t.data=M(t.data,e.data),t):(arguments.length>1&&(e=I.call(arguments)),v(e)?(y(e,function(e){t.remove(e)}),t):(t.data=k(t.data,x(e)?e:q(e)),t))},addRange:function(e,t){var n=this;return n.data=j(n.data,x(e)?e:q(e),x(t)?t:q(t)),n},removeRange:function(e,t){var n=this,r=x(e)?e:q(e),l=x(t)?t:q(t);return n.data=A(n.data,r,l),n},intersection:function(e){var t=this,n=e instanceof K?D(e.data):e;return t.data=L(t.data,n),t},contains:function(e){return P(this.data,x(e)?e:q(e))},clone:function(){var e=new K;return e.data=this.data.slice(0),e},toString:function(e){var t=X(this.data,e?e.bmpOnly:!1);return t.replace(f,"\\0$1")},toRegExp:function(e){return RegExp(this.toString(),e||"")},valueOf:function(){return D(this.data)}}),$.toArray=$.valueOf,"function"==typeof e&&"object"==typeof e.amd&&e.amd?e(function(){return K}):i&&!i.nodeType?a?a.exports=K:i.regenerate=K:l.regenerate=K}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],353:[function(t,n,r){(function(t){(function(){"use strict";function l(){var e,t,n=16384,r=[],l=-1,i=arguments.length;if(!i)return"";for(var a="";++l<i;){var s=Number(arguments[l]);if(!isFinite(s)||0>s||s>1114111||A(s)!=s)throw RangeError("Invalid code point: "+s);65535>=s?r.push(s):(s-=65536,e=(s>>10)+55296,t=s%1024+56320,r.push(e,t)),(l+1==i||r.length>n)&&(a+=k.apply(null,r),r.length=0)}return a}function i(e,t){if(-1==t.indexOf("|")){if(e==t)return;throw Error("Invalid node type: "+e)}if(t=i.hasOwnProperty(t)?i[t]:i[t]=RegExp("^(?:"+t+")$"),!t.test(e))throw Error("Invalid node type: "+e)}function a(e){var t=e.type;if(a.hasOwnProperty(t)&&"function"==typeof a[t])return a[t](e);throw Error("Invalid node type: "+t)}function s(e){i(e.type,"alternative");var t=e.body,n=t?t.length:0;if(1==n)return v(t[0]);for(var r=-1,l="";++r<n;)l+=v(t[r]);return l}function o(e){switch(i(e.type,"anchor"),e.kind){case"start":return"^";case"end":return"$";case"boundary":return"\\b";case"not-boundary":return"\\B";default:throw Error("Invalid assertion")}}function u(e){return i(e.type,"anchor|characterClass|characterClassEscape|dot|group|reference|value"),a(e)}function p(e){i(e.type,"characterClass");var t=e.body,n=t?t.length:0,r=-1,l="[";for(e.negative&&(l+="^");++r<n;)l+=f(t[r]);return l+="]"}function c(e){return i(e.type,"characterClassEscape"),"\\"+e.value}function d(e){i(e.type,"characterClassRange");var t=e.min,n=e.max;if("characterClassRange"==t.type||"characterClassRange"==n.type)throw Error("Invalid character class range");return f(t)+"-"+f(n)}function f(e){return i(e.type,"anchor|characterClassEscape|characterClassRange|dot|value"),a(e)}function h(e){i(e.type,"disjunction");var t=e.body,n=t?t.length:0;if(0==n)throw Error("No body");if(1==n)return a(t[0]);for(var r=-1,l="";++r<n;)0!=r&&(l+="|"),l+=a(t[r]);return l}function m(e){return i(e.type,"dot"),"."}function g(e){i(e.type,"group");var t="(";switch(e.behavior){case"normal":break;case"ignore":t+="?:";break;case"lookahead":t+="?=";break;case"negativeLookahead":t+="?!";break;default:throw Error("Invalid behaviour: "+e.behaviour)}var n=e.body,r=n?n.length:0;if(1==r)t+=a(n[0]);else for(var l=-1;++l<r;)t+=a(n[l]);return t+=")"}function y(e){i(e.type,"quantifier");var t="",n=e.min,r=e.max;switch(r){case void 0:case null:switch(n){case 0:t="*";break;case 1:t="+";break;default:t="{"+n+",}"}break;default:t=n==r?"{"+n+"}":0==n&&1==r?"?":"{"+n+","+r+"}"}return e.greedy||(t+="?"),u(e.body[0])+t}function b(e){return i(e.type,"reference"),"\\"+e.matchIndex}function v(e){return i(e.type,"anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value"),a(e)}function x(e){i(e.type,"value");var t=e.kind,n=e.codePoint;switch(t){case"controlLetter":return"\\c"+l(n+64);case"hexadecimalEscape":return"\\x"+("00"+n.toString(16).toUpperCase()).slice(-2);case"identifier":return"\\"+l(n);case"null":return"\\"+n;case"octal":return"\\"+n.toString(8);case"singleEscape":switch(n){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r";default:throw Error("Invalid codepoint: "+n)}case"symbol":return l(n);case"unicodeEscape":return"\\u"+("0000"+n.toString(16).toUpperCase()).slice(-4);case"unicodeCodePointEscape":return"\\u{"+n.toString(16).toUpperCase()+"}";default:throw Error("Unsupported node kind: "+t)}}var E={"function":!0,object:!0},_=E[typeof window]&&window||this,S=E[typeof r]&&r,I=E[typeof n]&&n&&!n.nodeType&&n,w=S&&I&&"object"==typeof t&&t;!w||w.global!==w&&w.window!==w&&w.self!==w||(_=w);var k=String.fromCharCode,A=Math.floor;a.alternative=s,a.anchor=o,a.characterClass=p,a.characterClassEscape=c,a.characterClassRange=d,a.disjunction=h,a.dot=m,a.group=g,a.quantifier=y,a.reference=b,a.value=x,"function"==typeof e&&"object"==typeof e.amd&&e.amd?e(function(){return{generate:a}}):S&&I?S.generate=a:_.regjsgen={generate:a}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],354:[function(e,t){!function(){function e(e,t){function n(t){return t.raw=e.substring(t.range[0],t.range[1]),t}function r(e,t){return e.range[0]=t,n(e)}function l(e,t){return n({type:"anchor",kind:e,range:[K-t,K]})}function i(e,t,r,l){return n({type:"value",kind:e,codePoint:t,range:[r,l]})}function a(e,t,n,r){return r=r||0,i(e,t,K-(n.length+r),K)}function s(e){var t=e[0],n=t.charCodeAt(0);if(X){var r;if(1===t.length&&n>=55296&&56319>=n&&(r=E().charCodeAt(0),r>=56320&&57343>=r))return K++,i("symbol",1024*(n-55296)+r-56320+65536,K-2,K)}return i("symbol",n,K-1,K)}function o(e,t,r){return n({type:"disjunction",body:e,range:[t,r]})}function u(){return n({type:"dot",range:[K-1,K]})}function p(e){return n({type:"characterClassEscape",value:e,range:[K-2,K]})}function c(e){return n({type:"reference",matchIndex:parseInt(e,10),range:[K-1-e.length,K]})}function d(e,t,r,l){return n({type:"group",behavior:e,body:t,range:[r,l]})}function f(e,t,r,l){return null==l&&(r=K-1,l=K),n({type:"quantifier",min:e,max:t,greedy:!0,body:null,range:[r,l]})}function h(e,t,r){return n({type:"alternative",body:e,range:[t,r]})}function m(e,t,r,l){return n({type:"characterClass",body:e,negative:t,range:[r,l]})}function g(e,t,r,l){if(e.codePoint>t.codePoint)throw SyntaxError("invalid range in character class");return n({type:"characterClassRange",min:e,max:t,range:[r,l]})}function y(e){return"alternative"===e.type?e.body:[e]}function b(t){t=t||1;var n=e.substring(K,K+t);return K+=t||1,n}function v(e){if(!x(e))throw SyntaxError("character: "+e)}function x(t){return e.indexOf(t,K)===K?b(t.length):void 0}function E(){return e[K]}function _(t){return e.indexOf(t,K)===K}function S(t){return e[K+1]===t}function I(t){var n=e.substring(K),r=n.match(t);return r&&(r.range=[],r.range[0]=K,b(r[0].length),r.range[1]=K),r}function w(){var e=[],t=K;for(e.push(k());x("|");)e.push(k());return 1===e.length?e[0]:o(e,t,K)}function k(){for(var e,t=[],n=K;e=A();)t.push(e);return 1===t.length?t[0]:h(t,n,K)}function A(){if(K>=e.length||_("|")||_(")"))return null;var t=T();if(t)return t;var n=j();if(!n)throw SyntaxError("Expected atom");var l=M()||!1;return l?(l.body=y(n),r(l,n.range[0]),l):n}function C(e,t,n,r){var l=null,i=K;if(x(e))l=t;else{if(!x(n))return!1;l=r}var a=w();if(!a)throw SyntaxError("Expected disjunction");v(")");var s=d(l,y(a),i,K);return"normal"==l&&Y&&J++,s}function T(){return x("^")?l("start",1):x("$")?l("end",1):x("\\b")?l("boundary",2):x("\\B")?l("not-boundary",2):C("(?=","lookahead","(?!","negativeLookahead")}function M(){var e,t,n,r;if(x("*"))t=f(0);else if(x("+"))t=f(1);else if(x("?"))t=f(0,1);else if(e=I(/^\{([0-9]+)\}/))n=parseInt(e[1],10),t=f(n,n,e.range[0],e.range[1]);else if(e=I(/^\{([0-9]+),\}/))n=parseInt(e[1],10),t=f(n,void 0,e.range[0],e.range[1]);else if(e=I(/^\{([0-9]+),([0-9]+)\}/)){if(n=parseInt(e[1],10),r=parseInt(e[2],10),n>r)throw SyntaxError("numbers out of order in {} quantifier");t=f(n,r,e.range[0],e.range[1])}return t&&x("?")&&(t.greedy=!1,t.range[1]+=1),t}function j(){var e;if(e=I(/^[^^$\\.*+?(){[|]/))return s(e);if(x("."))return u();if(x("\\")){if(e=O(),!e)throw SyntaxError("atomEscape");return e}return(e=B())?e:C("(?:","ignore","(","normal")}function P(e){if(X){var t,r;if("unicodeEscape"==e.kind&&(t=e.codePoint)>=55296&&56319>=t&&_("\\")&&S("u")){var l=K;K++;var i=L();"unicodeEscape"==i.kind&&(r=i.codePoint)>=56320&&57343>=r?(e.range[1]=i.range[1],e.codePoint=1024*(t-55296)+r-56320+65536,e.type="value",e.kind="unicodeCodePointEscape",n(e)):K=l}}return e}function L(){return O(!0)}function O(e){var t;if(t=R())return t;if(e){if(x("b"))return a("singleEscape",8,"\\b");if(x("B"))throw SyntaxError("\\B not possible inside of CharacterClass")}return t=D()}function R(){var e,t;if(e=I(/^(?!0)\d+/)){t=e[0];var n=parseInt(e[0],10);return J>=n?c(e[0]):(H.push(n),b(-e[0].length),(e=I(/^[0-7]{1,3}/))?a("octal",parseInt(e[0],8),e[0],1):(e=s(I(/^[89]/)),r(e,e.range[0]-1)))}return(e=I(/^[0-7]{1,3}/))?(t=e[0],/^0{1,3}$/.test(t)?a("null",0,"0",t.length+1):a("octal",parseInt(t,8),t,1)):(e=I(/^[dDsSwW]/))?p(e[0]):!1}function D(){var e;if(e=I(/^[fnrtv]/)){var t=0;switch(e[0]){case"t":t=9;break;case"n":t=10;break;case"v":t=11;break;case"f":t=12;break;case"r":t=13}return a("singleEscape",t,"\\"+e[0])}return(e=I(/^c([a-zA-Z])/))?a("controlLetter",e[1].charCodeAt(0)%32,e[1],2):(e=I(/^x([0-9a-fA-F]{2})/))?a("hexadecimalEscape",parseInt(e[1],16),e[1],2):(e=I(/^u([0-9a-fA-F]{4})/))?P(a("unicodeEscape",parseInt(e[1],16),e[1],2)):X&&(e=I(/^u\{([0-9a-fA-F]+)\}/))?a("unicodeCodePointEscape",parseInt(e[1],16),e[1],4):F()}function N(e){var t=new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]");return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||e>=48&&57>=e||92===e||e>=128&&t.test(String.fromCharCode(e))}function F(){var e,t="‌",n="‍";return N(E())?x(t)?a("identifier",8204,t):x(n)?a("identifier",8205,n):null:(e=b(),a("identifier",e.charCodeAt(0),e,1))}function B(){var e,t=K;return(e=I(/^\[\^/))?(e=V(),v("]"),m(e,!0,t,K)):x("[")?(e=V(),v("]"),m(e,!1,t,K)):null}function V(){var e;if(_("]"))return[];if(e=q(),!e)throw SyntaxError("nonEmptyClassRanges");return e}function U(e){var t,n,r;if(_("-")&&!S("]")){if(v("-"),r=W(),!r)throw SyntaxError("classAtom");n=K;var l=V();if(!l)throw SyntaxError("classRanges");return t=e.range[0],"empty"===l.type?[g(e,r,t,n)]:[g(e,r,t,n)].concat(l)}if(r=G(),!r)throw SyntaxError("nonEmptyClassRangesNoDash");return[e].concat(r)}function q(){var e=W();if(!e)throw SyntaxError("classAtom");return _("]")?[e]:U(e)}function G(){var e=W();if(!e)throw SyntaxError("classAtom");return _("]")?e:U(e)}function W(){return x("-")?s("-"):z()}function z(){var e;if(e=I(/^[^\\\]-]/))return s(e[0]);if(x("\\")){if(e=L(),!e)throw SyntaxError("classEscape");return P(e)}}var H=[],J=0,Y=!0,X=-1!==(t||"").indexOf("u"),K=0;e=String(e),""===e&&(e="(?:)");var $=w();if($.range[1]!==e.length)throw SyntaxError("Could not parse entire input - got stuck: "+e);for(var Q=0;Q<H.length;Q++)if(H[Q]<=J)return K=0,Y=!1,w();return $}var n={parse:e};"undefined"!=typeof t&&t.exports?t.exports=n:window.regjsparser=n}()},{}],355:[function(e,t){function n(e){return _?E?h.UNICODE_IGNORE_CASE[e]:h.UNICODE[e]:h.REGULAR[e]}function r(e,t){return g.call(e,t)}function l(e,t){for(var n in t)e[n]=t[n]}function i(e,t){if(t){var n=c(t,"");switch(n.type){case"characterClass":case"group":case"value":break;default:n=a(n,t)}l(e,n)}}function a(e,t){return{type:"group",behavior:"ignore",body:[e],raw:"(?:"+t+")"}}function s(e){return r(f,e)?f[e]:!1}function o(e){{var t=d();e.body.forEach(function(e){switch(e.type){case"value":if(t.add(e.codePoint),E&&_){var r=s(e.codePoint);r&&t.add(r)}break;case"characterClassRange":var l=e.min.codePoint,i=e.max.codePoint;t.addRange(l,i),E&&_&&t.iuAddRange(l,i);break;case"characterClassEscape":t.add(n(e.value));break;default:throw Error("Unknown term type: "+e.type)}})}return e.negative&&(t=(_?y:b).clone().remove(t)),i(e,t.toString()),e}function u(e){switch(e.type){case"dot":i(e,(_?v:x).toString());break;case"characterClass":e=o(e);break;case"characterClassEscape":i(e,n(e.value).toString());break;case"alternative":case"disjunction":case"group":case"quantifier":e.body=e.body.map(u);break;case"value":var t=e.codePoint,r=d(t);if(E&&_){var l=s(t);l&&r.add(l)}i(e,r.toString());break;case"anchor":case"empty":case"group":case"reference":break;default:throw Error("Unknown term type: "+e.type)}return e}var p=e("regjsgen").generate,c=e("regjsparser").parse,d=e("regenerate"),f=e("./data/iu-mappings.json"),h=e("./data/character-class-escape-sets.js"),m={},g=m.hasOwnProperty,y=d().addRange(0,1114111),b=d().addRange(0,65535),v=y.clone().remove(10,13,8232,8233),x=v.clone().intersection(b);d.prototype.iuAddRange=function(e,t){var n=this;do{var r=s(e);r&&n.add(r)}while(++e<=t);return n};var E=!1,_=!1;t.exports=function(e,t){var n=c(e,t);return E=t?t.indexOf("i")>-1:!1,_=t?t.indexOf("u")>-1:!1,l(n,u(n)),p(n)}},{"./data/character-class-escape-sets.js":350,"./data/iu-mappings.json":351,regenerate:352,regjsgen:353,regjsparser:354}],356:[function(e,t){"use strict";var n=e("is-finite");t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected a string as the first argument");if(0>t||!n(t))throw new TypeError("Expected a finite positive number");var r="";do 1&t&&(r+=e),e+=e;while(t>>=1);return r}},{"is-finite":357}],357:[function(e,t,n){arguments[4][225][0].apply(n,arguments)},{dup:225}],358:[function(e,t){"use strict";t.exports=/^#!.*/},{}],359:[function(e,t){"use strict";t.exports=function(e){var t=/^\\\\\?\\/.test(e),n=/[^\x00-\x80]+/.test(e);return t||n?e:e.replace(/\\/g,"/")}},{}],360:[function(e,t,n){n.SourceMapGenerator=e("./source-map/source-map-generator").SourceMapGenerator,n.SourceMapConsumer=e("./source-map/source-map-consumer").SourceMapConsumer,n.SourceNode=e("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":366,"./source-map/source-map-generator":367,"./source-map/source-node":368}],361:[function(e,t){if("function"!=typeof n)var n=e("amdefine")(t,e);n(function(e,t){function n(){this._array=[],this._set={}}var r=e("./util");n.fromArray=function(e,t){for(var r=new n,l=0,i=e.length;i>l;l++)r.add(e[l],t);return r},n.prototype.add=function(e,t){var n=this.has(e),l=this._array.length;(!n||t)&&this._array.push(e),n||(this._set[r.toSetString(e)]=l)},n.prototype.has=function(e){return Object.prototype.hasOwnProperty.call(this._set,r.toSetString(e))},n.prototype.indexOf=function(e){if(this.has(e))return this._set[r.toSetString(e)];throw new Error('"'+e+'" is not in the set.')},n.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},n.prototype.toArray=function(){return this._array.slice()},t.ArraySet=n})},{"./util":369,amdefine:370}],362:[function(e,t){if("function"!=typeof n)var n=e("amdefine")(t,e);n(function(e,t){function n(e){return 0>e?(-e<<1)+1:(e<<1)+0}function r(e){var t=1===(1&e),n=e>>1;return t?-n:n}var l=e("./base64"),i=5,a=1<<i,s=a-1,o=a;t.encode=function(e){var t,r="",a=n(e);do t=a&s,a>>>=i,a>0&&(t|=o),r+=l.encode(t);while(a>0);return r},t.decode=function(e,t,n){var a,u,p=e.length,c=0,d=0;do{if(t>=p)throw new Error("Expected more digits in base 64 VLQ value.");u=l.decode(e.charAt(t++)),a=!!(u&o),u&=s,c+=u<<d,d+=i}while(a);n.value=r(c),n.rest=t}})},{"./base64":363,amdefine:370}],363:[function(e,t){if("function"!=typeof n)var n=e("amdefine")(t,e);n(function(e,t){var n={},r={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(function(e,t){n[e]=t,r[t]=e}),t.encode=function(e){if(e in r)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){if(e in n)return n[e];throw new TypeError("Not a valid base 64 digit: "+e)}})},{amdefine:370}],364:[function(e,t){if("function"!=typeof n)var n=e("amdefine")(t,e);n(function(e,t){function n(e,r,l,i,a,s){var o=Math.floor((r-e)/2)+e,u=a(l,i[o],!0);return 0===u?o:u>0?r-o>1?n(o,r,l,i,a,s):s==t.LEAST_UPPER_BOUND?r<i.length?r:-1:o:o-e>1?n(e,o,l,i,a,s):s==t.LEAST_UPPER_BOUND?o:0>e?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,r,l,i){return 0===r.length?-1:n(-1,r.length,e,r,l,i||t.GREATEST_LOWER_BOUND)}})},{amdefine:370}],365:[function(e,t){if("function"!=typeof n)var n=e("amdefine")(t,e);n(function(e,t){function n(e,t){var n=e.generatedLine,r=t.generatedLine,i=e.generatedColumn,a=t.generatedColumn;return r>n||r==n&&a>=i||l.compareByGeneratedPositions(e,t)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var l=e("./util");r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){n(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(l.compareByGeneratedPositions),this._sorted=!0),this._array},t.MappingList=r})},{"./util":369,amdefine:370}],366:[function(e,t){if("function"!=typeof n)var n=e("amdefine")(t,e);n(function(e,t){function n(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new l(t):new r(t)}function r(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=i.getArg(t,"version"),r=i.getArg(t,"sources"),l=i.getArg(t,"names",[]),a=i.getArg(t,"sourceRoot",null),o=i.getArg(t,"sourcesContent",null),u=i.getArg(t,"mappings"),p=i.getArg(t,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);r=r.map(i.normalize),this._names=s.fromArray(l,!0),this._sources=s.fromArray(r,!0),this.sourceRoot=a,this.sourcesContent=o,this._mappings=u,this.file=p}function l(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=i.getArg(t,"version"),l=i.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);var a={line:-1,column:0};this._sections=l.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=i.getArg(e,"offset"),r=i.getArg(t,"line"),l=i.getArg(t,"column");if(r<a.line||r===a.line&&l<a.column)throw new Error("Section offsets must be ordered and non-overlapping.");return a=t,{generatedOffset:{generatedLine:r+1,generatedColumn:l+1},consumer:new n(i.getArg(e,"map"))}})}var i=e("./util"),a=e("./binary-search"),s=e("./array-set").ArraySet,o=e("./base64-vlq");n.fromSourceMap=function(e){return r.fromSourceMap(e)},n.prototype._version=3,n.prototype.__generatedMappings=null,Object.defineProperty(n.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__generatedMappings}}),n.prototype.__originalMappings=null,Object.defineProperty(n.prototype,"_originalMappings",{get:function(){return this.__originalMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__originalMappings}}),n.prototype._nextCharIsMappingSeparator=function(e,t){var n=e.charAt(t);return";"===n||","===n},n.prototype._parseMappings=function(){throw new Error("Subclasses must implement _parseMappings")},n.GENERATED_ORDER=1,n.ORIGINAL_ORDER=2,n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.prototype.eachMapping=function(e,t,r){var l,a=t||null,s=r||n.GENERATED_ORDER;switch(s){case n.GENERATED_ORDER:l=this._generatedMappings;break;case n.ORIGINAL_ORDER:l=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var o=this.sourceRoot;l.map(function(e){var t=e.source;return null!=t&&null!=o&&(t=i.join(o,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name}}).forEach(e,a)},n.prototype.allGeneratedPositionsFor=function(e){var t={source:i.getArg(e,"source"),originalLine:i.getArg(e,"line"),originalColumn:0};null!=this.sourceRoot&&(t.source=i.relative(this.sourceRoot,t.source));var n=[],r=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions,a.LEAST_UPPER_BOUND);if(r>=0)for(var l=this._originalMappings[r];l&&l.originalLine===t.originalLine;)n.push({line:i.getArg(l,"generatedLine",null),column:i.getArg(l,"generatedColumn",null),lastColumn:i.getArg(l,"lastGeneratedColumn",null)}),l=this._originalMappings[++r];return n},t.SourceMapConsumer=n,r.prototype=Object.create(n.prototype),r.prototype.consumer=n,r.fromSourceMap=function(e){var t=Object.create(r.prototype);return t._names=s.fromArray(e._names.toArray(),!0),t._sources=s.fromArray(e._sources.toArray(),!0),t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file,t.__generatedMappings=e._mappings.toArray().slice(),t.__originalMappings=e._mappings.toArray().slice().sort(i.compareByOriginalPositions),t},r.prototype._version=3,Object.defineProperty(r.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?i.join(this.sourceRoot,e):e},this)}}),r.prototype._parseMappings=function(e){for(var t,n,r,l,a=1,s=0,u=0,p=0,c=0,d=0,f=e.length,h=0,m={},g={};f>h;)if(";"===e.charAt(h))a++,++h,s=0;else if(","===e.charAt(h))++h;else{for(t={},t.generatedLine=a,l=h;f>l&&!this._nextCharIsMappingSeparator(e,l);++l);if(n=e.slice(h,l),r=m[n])h+=n.length;else{for(r=[];l>h;)o.decode(e,h,g),value=g.value,h=g.rest,r.push(value);m[n]=r}if(t.generatedColumn=s+r[0],s=t.generatedColumn,r.length>1){if(t.source=this._sources.at(c+r[1]),c+=r[1],2===r.length)throw new Error("Found a source, but no line and column");if(t.originalLine=u+r[2],u=t.originalLine,t.originalLine+=1,3===r.length)throw new Error("Found a source and line, but no column");t.originalColumn=p+r[3],p=t.originalColumn,r.length>4&&(t.name=this._names.at(d+r[4]),d+=r[4])}this.__generatedMappings.push(t),"number"==typeof t.originalLine&&this.__originalMappings.push(t)}this.__generatedMappings.sort(i.compareByGeneratedPositions),this.__originalMappings.sort(i.compareByOriginalPositions)},r.prototype._findMapping=function(e,t,n,r,l,i){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return a.search(e,t,l,i)},r.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},r.prototype.originalPositionFor=function(e){var t={generatedLine:i.getArg(e,"line"),generatedColumn:i.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",i.compareByGeneratedPositions,i.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(r>=0){var l=this._generatedMappings[r];if(l.generatedLine===t.generatedLine){var a=i.getArg(l,"source",null);return null!=a&&null!=this.sourceRoot&&(a=i.join(this.sourceRoot,a)),{source:a,line:i.getArg(l,"originalLine",null),column:i.getArg(l,"originalColumn",null),name:i.getArg(l,"name",null)}}}return{source:null,line:null,column:null,name:null}},r.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=i.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var n;if(null!=this.sourceRoot&&(n=i.urlParse(this.sourceRoot))){var r=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},r.prototype.generatedPositionFor=function(e){var t={source:i.getArg(e,"source"),originalLine:i.getArg(e,"line"),originalColumn:i.getArg(e,"column")};null!=this.sourceRoot&&(t.source=i.relative(this.sourceRoot,t.source));var r=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions,i.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(r>=0){var l=this._originalMappings[r];return{line:i.getArg(l,"generatedLine",null),column:i.getArg(l,"generatedColumn",null),lastColumn:i.getArg(l,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},t.BasicSourceMapConsumer=r,l.prototype=Object.create(n.prototype),l.prototype.constructor=n,l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),l.prototype.originalPositionFor=function(e){var t={generatedLine:i.getArg(e,"line"),generatedColumn:i.getArg(e,"column")},n=a.search(t,this._sections,function(e,t){var n=e.generatedLine-t.generatedOffset.generatedLine;return n?n:e.generatedColumn-t.generatedOffset.generatedColumn}),r=this._sections[n];return r?r.consumer.originalPositionFor({line:t.generatedLine-(r.generatedOffset.generatedLine-1),column:t.generatedColumn-(r.generatedOffset.generatedLine===t.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},l.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n],l=r.consumer.sourceContentFor(e,!0);if(l)return l}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var n=this._sections[t];if(-1!==n.consumer.sources.indexOf(i.getArg(e,"source"))){var r=n.consumer.generatedPositionFor(e);if(r){var l={line:r.line+(n.generatedOffset.generatedLine-1),column:r.column+(n.generatedOffset.generatedLine===r.line?n.generatedOffset.generatedColumn-1:0)};return l}}}return{line:null,column:null}},l.prototype._parseMappings=function(){this.__generatedMappings=[],this.__originalMappings=[];for(var e=0;e<this._sections.length;e++)for(var t=this._sections[e],n=t.consumer._generatedMappings,r=0;r<n.length;r++){var l=n[e],a=l.source,s=t.consumer.sourceRoot;null!=a&&null!=s&&(a=i.join(s,a));var o={source:a,generatedLine:l.generatedLine+(t.generatedOffset.generatedLine-1),generatedColumn:l.column+(t.generatedOffset.generatedLine===l.generatedLine)?t.generatedOffset.generatedColumn-1:0,originalLine:l.originalLine,originalColumn:l.originalColumn,name:l.name}; this.__generatedMappings.push(o),"number"==typeof o.originalLine&&this.__originalMappings.push(o)}this.__generatedMappings.sort(i.compareByGeneratedPositions),this.__originalMappings.sort(i.compareByOriginalPositions)},t.IndexedSourceMapConsumer=l})},{"./array-set":361,"./base64-vlq":362,"./binary-search":364,"./util":369,amdefine:370}],367:[function(e,t){if("function"!=typeof n)var n=e("amdefine")(t,e);n(function(e,t){function n(e){e||(e={}),this._file=l.getArg(e,"file",null),this._sourceRoot=l.getArg(e,"sourceRoot",null),this._skipValidation=l.getArg(e,"skipValidation",!1),this._sources=new i,this._names=new i,this._mappings=new a,this._sourcesContents=null}var r=e("./base64-vlq"),l=e("./util"),i=e("./array-set").ArraySet,a=e("./mapping-list").MappingList;n.prototype._version=3,n.fromSourceMap=function(e){var t=e.sourceRoot,r=new n({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=l.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)}),e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&r.setSourceContent(t,n)}),r},n.prototype.addMapping=function(e){var t=l.getArg(e,"generated"),n=l.getArg(e,"original",null),r=l.getArg(e,"source",null),i=l.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,i),null==r||this._sources.has(r)||this._sources.add(r),null==i||this._names.has(i)||this._names.add(i),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i})},n.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=l.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[l.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[l.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},n.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var a=this._sourceRoot;null!=a&&(r=l.relative(a,r));var s=new i,o=new i;this._mappings.unsortedForEach(function(t){if(t.source===r&&null!=t.originalLine){var i=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=i.source&&(t.source=i.source,null!=n&&(t.source=l.join(n,t.source)),null!=a&&(t.source=l.relative(a,t.source)),t.originalLine=i.line,t.originalColumn=i.column,null!=i.name&&(t.name=i.name))}var u=t.source;null==u||s.has(u)||s.add(u);var p=t.name;null==p||o.has(p)||o.add(p)},this),this._sources=s,this._names=o,e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=l.join(n,t)),null!=a&&(t=l.relative(a,t)),this.setSourceContent(t,r))},this)},n.prototype._validateMapping=function(e,t,n,r){if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!n&&!r||e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},n.prototype._serializeMappings=function(){for(var e,t=0,n=1,i=0,a=0,s=0,o=0,u="",p=this._mappings.toArray(),c=0,d=p.length;d>c;c++){if(e=p[c],e.generatedLine!==n)for(t=0;e.generatedLine!==n;)u+=";",n++;else if(c>0){if(!l.compareByGeneratedPositions(e,p[c-1]))continue;u+=","}u+=r.encode(e.generatedColumn-t),t=e.generatedColumn,null!=e.source&&(u+=r.encode(this._sources.indexOf(e.source)-o),o=this._sources.indexOf(e.source),u+=r.encode(e.originalLine-1-a),a=e.originalLine-1,u+=r.encode(e.originalColumn-i),i=e.originalColumn,null!=e.name&&(u+=r.encode(this._names.indexOf(e.name)-s),s=this._names.indexOf(e.name)))}return u},n.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=l.relative(t,e));var n=l.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},n.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=n})},{"./array-set":361,"./base64-vlq":362,"./mapping-list":365,"./util":369,amdefine:370}],368:[function(e,t){if("function"!=typeof n)var n=e("amdefine")(t,e);n(function(e,t){function n(e,t,n,r,l){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==l?null:l,this[s]=!0,null!=r&&this.add(r)}var r=e("./source-map-generator").SourceMapGenerator,l=e("./util"),i=/(\r?\n)/,a=10,s="$$$isSourceNode$$$";n.fromStringWithSourceMap=function(e,t,r){function a(e,t){if(null===e||void 0===e.source)s.add(t);else{var i=r?l.join(r,e.source):e.source;s.add(new n(e.originalLine,e.originalColumn,i,t,e.name))}}var s=new n,o=e.split(i),u=function(){var e=o.shift(),t=o.shift()||"";return e+t},p=1,c=0,d=null;return t.eachMapping(function(e){if(null!==d){if(!(p<e.generatedLine)){var t=o[0],n=t.substr(0,e.generatedColumn-c);return o[0]=t.substr(e.generatedColumn-c),c=e.generatedColumn,a(d,n),void(d=e)}var n="";a(d,u()),p++,c=0}for(;p<e.generatedLine;)s.add(u()),p++;if(c<e.generatedColumn){var t=o[0];s.add(t.substr(0,e.generatedColumn)),o[0]=t.substr(e.generatedColumn),c=e.generatedColumn}d=e},this),o.length>0&&(d&&a(d,u()),s.add(o.join(""))),t.sources.forEach(function(e){var n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=l.join(r,e)),s.setSourceContent(e,n))}),s},n.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[s]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},n.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[s]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},n.prototype.walk=function(e){for(var t,n=0,r=this.children.length;r>n;n++)t=this.children[n],t[s]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},n.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;r-1>n;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},n.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[s]?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this},n.prototype.setSourceContent=function(e,t){this.sourceContents[l.toSetString(e)]=t},n.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;n>t;t++)this.children[t][s]&&this.children[t].walkSourceContents(e);for(var r=Object.keys(this.sourceContents),t=0,n=r.length;n>t;t++)e(l.fromSetString(r[t]),this.sourceContents[r[t]])},n.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},n.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},n=new r(e),l=!1,i=null,s=null,o=null,u=null;return this.walk(function(e,r){t.code+=e,null!==r.source&&null!==r.line&&null!==r.column?((i!==r.source||s!==r.line||o!==r.column||u!==r.name)&&n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name}),i=r.source,s=r.line,o=r.column,u=r.name,l=!0):l&&(n.addMapping({generated:{line:t.line,column:t.column}}),i=null,l=!1);for(var p=0,c=e.length;c>p;p++)e.charCodeAt(p)===a?(t.line++,t.column=0,p+1===c?(i=null,l=!1):l&&n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name})):t.column++}),this.walkSourceContents(function(e,t){n.setSourceContent(e,t)}),{code:t.code,map:n}},t.SourceNode=n})},{"./source-map-generator":367,"./util":369,amdefine:370}],369:[function(e,t){if("function"!=typeof n)var n=e("amdefine")(t,e);n(function(e,t){function n(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')}function r(e){var t=e.match(f);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function l(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function i(e){var t=e,n=r(e);if(n){if(!n.path)return e;t=n.path}for(var i,a="/"===t.charAt(0),s=t.split(/\/+/),o=0,u=s.length-1;u>=0;u--)i=s[u],"."===i?s.splice(u,1):".."===i?o++:o>0&&(""===i?(s.splice(u+1,o),o=0):(s.splice(u,2),o--));return t=s.join("/"),""===t&&(t=a?"/":"."),n?(n.path=t,l(n)):t}function a(e,t){""===e&&(e="."),""===t&&(t=".");var n=r(t),a=r(e);if(a&&(e=a.path||"/"),n&&!n.scheme)return a&&(n.scheme=a.scheme),l(n);if(n||t.match(h))return t;if(a&&!a.host&&!a.path)return a.host=t,l(a);var s="/"===t.charAt(0)?t:i(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=s,l(a)):s}function s(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");var n=r(e);return"/"==t.charAt(0)&&n&&"/"==n.path?t.slice(1):0===t.indexOf(e+"/")?t.substr(e.length+1):t}function o(e){return"$"+e}function u(e){return e.substr(1)}function p(e,t){var n=e||"",r=t||"";return(n>r)-(r>n)}function c(e,t,n){var r;return(r=p(e.source,t.source))?r:(r=e.originalLine-t.originalLine)?r:(r=e.originalColumn-t.originalColumn,r||n?r:(r=p(e.name,t.name))?r:(r=e.generatedLine-t.generatedLine,r?r:e.generatedColumn-t.generatedColumn))}function d(e,t,n){var r;return(r=e.generatedLine-t.generatedLine)?r:(r=e.generatedColumn-t.generatedColumn,r||n?r:(r=p(e.source,t.source))?r:(r=e.originalLine-t.originalLine)?r:(r=e.originalColumn-t.originalColumn,r?r:p(e.name,t.name)))}t.getArg=n;var f=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,h=/^data:.+\,.+$/;t.urlParse=r,t.urlGenerate=l,t.normalize=i,t.join=a,t.relative=s,t.toSetString=o,t.fromSetString=u,t.compareByOriginalPositions=c,t.compareByGeneratedPositions=d})},{amdefine:370}],370:[function(e,t){(function(n,r){"use strict";function l(t,l){function i(e){var t,n;for(t=0;e[t];t+=1)if(n=e[t],"."===n)e.splice(t,1),t-=1;else if(".."===n){if(1===t&&(".."===e[2]||".."===e[0]))break;t>0&&(e.splice(t-1,2),t-=2)}}function a(e,t){var n;return e&&"."===e.charAt(0)&&t&&(n=t.split("/"),n=n.slice(0,n.length-1),n=n.concat(e.split("/")),i(n),e=n.join("/")),e}function s(e){return function(t){return a(t,e)}}function o(e){function t(t){h[e]=t}return t.fromText=function(){throw new Error("amdefine does not implement load.fromText")},t}function u(e,n,i){var a,s,o,u;if(e)s=h[e]={},o={id:e,uri:r,exports:s},a=c(l,s,o,e);else{if(m)throw new Error("amdefine with no module ID cannot be called more than once per file.");m=!0,s=t.exports,o=t,a=c(l,s,o,t.id)}n&&(n=n.map(function(e){return a(e)})),u="function"==typeof i?i.apply(o.exports,n):i,void 0!==u&&(o.exports=u,e&&(h[e]=o.exports))}function p(e,t,n){Array.isArray(e)?(n=t,t=e,e=void 0):"string"!=typeof e&&(n=e,e=t=void 0),t&&!Array.isArray(t)&&(n=t,t=void 0),t||(t=["require","exports","module"]),e?f[e]=[e,t,n]:u(e,t,n)}var c,d,f={},h={},m=!1,g=e("path");return c=function(e,t,r,l){function i(i,a){return"string"==typeof i?d(e,t,r,i,l):(i=i.map(function(n){return d(e,t,r,n,l)}),void n.nextTick(function(){a.apply(null,i)}))}return i.toUrl=function(e){return 0===e.indexOf(".")?a(e,g.dirname(r.filename)):e},i},l=l||function(){return t.require.apply(t,arguments)},d=function(e,t,n,r,l){var i,p,m=r.indexOf("!"),g=r;if(-1===m){if(r=a(r,l),"require"===r)return c(e,t,n,l);if("exports"===r)return t;if("module"===r)return n;if(h.hasOwnProperty(r))return h[r];if(f[r])return u.apply(null,f[r]),h[r];if(e)return e(g);throw new Error("No module with ID: "+r)}return i=r.substring(0,m),r=r.substring(m+1,r.length),p=d(e,t,n,i,l),r=p.normalize?p.normalize(r,s(l)):a(r,l),h[r]?h[r]:(p.load(r,c(e,t,n,l),o(r),{}),h[r])},p.require=function(e){return h[e]?h[e]:f[e]?(u.apply(null,f[e]),h[e]):void 0},p.amd={},p}t.exports=l}).call(this,e("_process"),"/node_modules/source-map/node_modules/amdefine/amdefine.js")},{_process:185,path:184}],371:[function(e,t,n){"use strict";t.exports=function r(e){function t(){}t.prototype=e,new t}},{}],372:[function(e,t){"use strict";t.exports=function(e){return e.replace(/[\s\uFEFF\xA0]+$/g,"")}},{}],373:[function(e,t){t.exports={name:"babel",description:"Turn ES6 code into readable vanilla ES5 with source maps",version:"5.0.0-beta4",author:"Sebastian McKenzie <[email protected]>",homepage:"https://babeljs.io/",repository:"babel/babel",preferGlobal:!0,main:"lib/babel/api/node.js",browser:{"./lib/babel/api/register/node.js":"./lib/babel/api/register/browser.js"},bin:{babel:"./bin/babel/index.js","babel-node":"./bin/babel-node","babel-external-helpers":"./bin/babel-external-helpers"},keywords:["harmony","classes","modules","let","const","var","es6","transpile","transpiler","6to5","babel"],scripts:{bench:"make bench",test:"make test"},dependencies:{"ast-types":"~0.7.0",chalk:"^1.0.0",chokidar:"^0.12.6",commander:"^2.6.0","convert-source-map":"^0.5.0","core-js":"^0.6.0",debug:"^2.1.1","detect-indent":"^3.0.0",estraverse:"^1.9.1",esutils:"^1.1.6","fs-readdir-recursive":"^0.1.0",globals:"^6.2.0","is-integer":"^1.0.4","js-tokens":"1.0.0",leven:"^1.0.1","line-numbers":"0.2.0",lodash:"^3.2.0",minimatch:"^2.0.3","output-file-sync":"^1.1.0","path-is-absolute":"^1.0.0","private":"^0.1.6","regenerator-babel":"0.8.13-2",regexpu:"^1.1.2",repeating:"^1.1.2","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.4.0","source-map-support":"^0.2.9","to-fast-properties":"^1.0.0","trim-right":"^1.0.0"},devDependencies:{babel:"4.7.13",browserify:"^9.0.3",chai:"^2.0.0",eslint:"^0.15.1","babel-eslint":"^1.0.1",esvalid:"^1.1.0",istanbul:"^0.3.5",matcha:"^0.6.0",mocha:"^2.1.0",rimraf:"^2.2.8","uglify-js":"^2.4.16"}}},{}],374:[function(e,t){t.exports={"abstract-expression-call":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceGet",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},computed:!0,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"abstract-expression-delete":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceDelete",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},computed:!0,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"abstract-expression-get":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceGet",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},computed:!0,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"abstract-expression-set":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceSet",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},computed:!0,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"array-comprehension-container":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"array-from":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"array-push":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"STATEMENT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"call-instance-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,type:"ThisExpression",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INITIALIZERS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"call-static-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CONSTRUCTOR",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INITIALIZERS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"CONSTRUCTOR",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},call:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"CONTEXT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"class-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"DECORATOR",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"class-super-constructor-call-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},operator:"!=",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null},"class-super-constructor-call":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},operator:"!=",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null},"corejs-is-iterator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CORE_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"$for",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"isIterable",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"corejs-iterator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CORE_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"$for",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"getIterator",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"default-parameter":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"VARIABLE_NAME",type:"Identifier",end:null},init:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARGUMENT_KEY",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"DEFAULT_VALUE",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARGUMENT_KEY",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"let",type:"VariableDeclaration",end:null}],type:"Program",end:null},"exports-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-default-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-module-declaration-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-module-declaration":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},{start:null,loc:null,range:null,value:"__esModule",raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"for-of-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARR",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:!1,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"BODY",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"Program",end:null},"for-of-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},init:{loc:null,start:null,range:null,test:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},computed:!0,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:null,update:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},operator:">=",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,operator:"++",prefix:!1,argument:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},computed:!0,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"Program",end:null},"for-of":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:!1,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},computed:!0,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"STEP_KEY",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{start:null,loc:null,range:null,operator:"!",prefix:!0,argument:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"STEP_KEY",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:!0,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:!0,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[],type:"BlockStatement",end:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},right:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"CatchClause",end:null,_scopeInfo:null,_paths:null},guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"!",prefix:!0,argument:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:null,guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null}],type:"Program",end:null},"helper-async-to-generator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"fn",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"gen",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"fn",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"Promise",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"reject",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,value:"next",raw:null,type:"Literal",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"callThrow",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,value:"throw",raw:null,type:"Literal",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"arg",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"gen",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arg",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"error",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"reject",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"error",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:null,type:"ReturnStatement",end:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"CatchClause",end:null,_scopeInfo:null,_paths:null},guardedHandlers:[],finalizer:null,type:"TryStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Promise",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"then",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"callThrow",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-bind":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Function",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-class-call-check":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"instance",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,operator:"!",prefix:!0,argument:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"instance",type:"Identifier",end:null},operator:"instanceof",right:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"BinaryExpression",end:null,parenthesizedExpression:!0,_paths:null},type:"UnaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Cannot call a class as a function",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-create-class":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:!1,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,value:!1,raw:null,type:"Literal",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-create-decorated-class":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:!1,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,operator:"delete",prefix:!0,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,leadingComments:null,_paths:null},{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,operator:"delete",prefix:!0,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,value:!1,raw:null,type:"Literal",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"initializer",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:!1,argument:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"The decorator for method ",raw:null,type:"Literal",end:null},operator:"+",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},operator:"+",right:{start:null,loc:null,range:null,value:" is of the invalid type ",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"+",right:{start:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"initializer",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoInitializers",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticInitializers",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoInitializers",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticInitializers",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-default-props":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},right:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"ForInStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-defaults":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyNames",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:!1,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-define-property":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},operator:"==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-extends":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"assign",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:1,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:!1,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},right:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"ForInStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-get":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getPrototypeOf",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-has-own":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-inherits":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"Super expression must either be null or a function, not ",raw:null,type:"Literal",end:null},operator:"+",right:{start:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"create",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:!1,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__proto__",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-interop-require-wildcard":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},alternate:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},value:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-interop-require":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},alternate:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-object-destructuring-empty":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Cannot destructure undefined",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-object-without-properties":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},init:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},right:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"indexOf",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:">=",right:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"ContinueStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,operator:"!",prefix:!0,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"ContinueStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"ForInStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-self-global":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"self",type:"Identifier",end:null},alternate:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-set":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getPrototypeOf",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-slice":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"slice",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-sliced-to-array-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},operator:"in",right:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_iterator",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},computed:!0,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{start:null,loc:null,range:null,operator:"!",prefix:!0,argument:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_iterator",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:!0,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Invalid attempt to destructure non-iterable instance",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-sliced-to-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},operator:"in",right:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,leadingComments:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:!1,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},computed:!0,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{start:null,loc:null,range:null,operator:"!",prefix:!0,argument:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:!0,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:!0,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},right:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"CatchClause",end:null,_scopeInfo:null,_paths:null},guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"!",prefix:!0,argument:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:null,guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},type:"ThrowStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Invalid attempt to destructure non-iterable instance",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-tagged-template-literal-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-tagged-template-literal":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"freeze",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"freeze",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-temporal-assert-defined":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"val",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"name",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"undef",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"val",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undef",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"ReferenceError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"name",type:"Identifier",end:null},operator:"+",right:{start:null,loc:null,range:null,value:" is not defined - temporal dead zone",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-temporal-undefined":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null,parenthesizedExpression:!0},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-to-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-to-consumable-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:!1,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-typeof":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,value:"symbol",raw:null,type:"Literal",end:null},alternate:{start:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"let-scoping-return":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{start:null,loc:null,range:null,name:"RETURN",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"object",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"RETURN",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"v",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null},"named-function":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"GET_OUTER_ID",type:"Identifier",end:null},generator:!1,expression:!1,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"property-method-assignment-wrapper-generator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"WRAPPER_KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},generator:!0,expression:!1,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,delegate:!0,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"YieldExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"WRAPPER_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"WRAPPER_KEY",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"property-method-assignment-wrapper":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"WRAPPER_KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},generator:!1,expression:!1,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"WRAPPER_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"WRAPPER_KEY",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"prototype-identifier":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CLASS_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"require-assign-key":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"VARIABLE_NAME",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"require",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null}],type:"Program",end:null},require:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"require",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},rest:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LEN",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ARRAY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"ARRAY_LEN",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"START",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},operator:"<",right:{start:null,loc:null,range:null,name:"LEN",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:!1,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARRAY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARRAY_KEY",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"Program",end:null},"self-contained-helpers-head":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},computed:!0,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"HELPER",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},system:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"System",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"register",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"MODULE_DEPENDENCIES",type:"Identifier",end:null},{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"EXPORT_IDENTIFIER",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{start:null,loc:null,range:null,name:"setters",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"SETTERS",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{start:null,loc:null,range:null,name:"execute",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"EXECUTE",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"tail-call-body":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"AGAIN_ID",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:!0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,body:{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"AGAIN_ID",type:"Identifier",end:null},body:{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"BLOCK",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null},type:"WhileStatement",end:null,_scopeInfo:null,_paths:null},label:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"LabeledStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null}],type:"Program",end:null},"test-exports":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"test-module":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"umd-commonjs-strict":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"root",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"amd",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"AMD_ARGUMENTS",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"object",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"COMMON_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"BROWSER_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"UMD_ROOT",type:"Identifier",end:null},{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"FACTORY_PARAMETERS",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"FACTORY_BODY",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"umd-runner-body":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"amd",type:"Identifier",end:null},computed:!1,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"AMD_ARGUMENTS",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"COMMON_TEST",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"COMMON_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:!0,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null}} },{}]},{},[19])(19)});
frontend/src/components/ChatView.js
nepeat/chatforesnics
import React from 'react'; import Message from './Message'; const ChatView = ({messages}) => { if (messages.length === 0) { return <h1>Loading</h1>; } let lastSender; let senderChange = false; return ( <div className='messages'> {messages.map((message) => { if (lastSender !== message.from) { lastSender = message.from; senderChange = true; } else { senderChange = false; } return <Message key={'message_' + message.guid} message={message} lastSender={lastSender} senderChange={senderChange} />; })} </div> ); }; export default ChatView;
src/svg-icons/image/wb-incandescent.js
pradel/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageWbIncandescent = (props) => ( <SvgIcon {...props}> <path d="M3.55 18.54l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8zM11 22.45h2V19.5h-2v2.95zM4 10.5H1v2h3v-2zm11-4.19V1.5H9v4.81C7.21 7.35 6 9.28 6 11.5c0 3.31 2.69 6 6 6s6-2.69 6-6c0-2.22-1.21-4.15-3-5.19zm5 4.19v2h3v-2h-3zm-2.76 7.66l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4z"/> </SvgIcon> ); ImageWbIncandescent = pure(ImageWbIncandescent); ImageWbIncandescent.displayName = 'ImageWbIncandescent'; export default ImageWbIncandescent;
app/containers/FeaturePage/index.js
PanJ/SimplerCityGlide
/* * FeaturePage * * List all the features */ import React from 'react'; import { connect } from 'react-redux'; import { push } from 'react-router-redux'; import Button from 'components/Button'; import H1 from 'components/H1'; import styles from './styles.css'; export class FeaturePage extends React.Component { /** * Changes the route * * @param {string} route The route we want to go to */ openRoute = (route) => { this.props.changeRoute(route); }; /** * Changed route to '/' */ openHomePage = () => { this.openRoute('/'); }; render() { return ( <div> <H1>Features</H1> <ul className={styles.list}> <li className={styles.listItem}> <p className={styles.listItemTitle}>Quick scaffolding</p> <p>Automate the creation of components, containers, routes, selectors and sagas - and their tests - right from the CLI!</p> </li> <li className={styles.listItem}> <p className={styles.listItemTitle}>Instant feedback</p> <p>Enjoy the best DX and code your app at the speed of thought! Your saved changes to the CSS and JS are reflected instantaneously without refreshing the page. Preserve application state even when you update something in the underlying code!</p> </li> <li className={styles.listItem}> <p className={styles.listItemTitle}>Predictable state management</p> <p>Unidirectional data flow allows for change logging and time travel debugging.</p> </li> <li className={styles.listItem}> <p className={styles.listItemTitle}>Next generation JavaScript</p> <p>Use template strings, object destructuring, arrow functions, JSX syntax and more, today.</p> </li> <li className={styles.listItem}> <p className={styles.listItemTitle}>Next generation CSS</p> <p>Write composable CSS that's co-located with your components for complete modularity. Unique generated class names keep the specificity low while eliminating style clashes. Ship only the styles that are on the page for the best performance.</p> </li> <li className={styles.listItem}> <p className={styles.listItemTitle}>Industry-standard routing</p> <p>It's natural to want to add pages (e.g. `/about`) to your application, and routing makes this possible.</p> </li> <li className={styles.listItem}> <p className={styles.listItemTitle}>Offline-first</p> <p>The next frontier in performant web apps: availability without a network connection from the instant your users load the app.</p> </li> </ul> <Button handleRoute={this.openHomePage}>Home</Button> </div> ); } } FeaturePage.propTypes = { changeRoute: React.PropTypes.func, }; function mapDispatchToProps(dispatch) { return { changeRoute: (url) => dispatch(push(url)), }; } export default connect(null, mapDispatchToProps)(FeaturePage);
src/pages/404.js
agitavitjuvanjan/Team-14
import React from 'react' const NotFoundPage = () => ( <div> <h1>NOT FOUND</h1> <p>You just hit a route that doesn&#39;t exist... the sadness.</p> </div> ) export default NotFoundPage
packages/material-ui-icons/src/DoneAllSharp.js
allanalexandre/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="M0 0h24v24H0V0z" /><g><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z" /></g></React.Fragment> , 'DoneAllSharp');
node_modules/babel-preset-react/lib/index.js
wiflsnmo/react_study2
"use strict"; exports.__esModule = true; var _babelPresetFlow = require("babel-preset-flow"); var _babelPresetFlow2 = _interopRequireDefault(_babelPresetFlow); var _babelPluginTransformReactJsx = require("babel-plugin-transform-react-jsx"); var _babelPluginTransformReactJsx2 = _interopRequireDefault(_babelPluginTransformReactJsx); var _babelPluginSyntaxJsx = require("babel-plugin-syntax-jsx"); var _babelPluginSyntaxJsx2 = _interopRequireDefault(_babelPluginSyntaxJsx); var _babelPluginTransformReactDisplayName = require("babel-plugin-transform-react-display-name"); var _babelPluginTransformReactDisplayName2 = _interopRequireDefault(_babelPluginTransformReactDisplayName); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = { presets: [_babelPresetFlow2.default], plugins: [_babelPluginTransformReactJsx2.default, _babelPluginSyntaxJsx2.default, _babelPluginTransformReactDisplayName2.default], env: { development: { plugins: [] } } }; module.exports = exports["default"];
example/components/PureComponent.js
cashsun/rehearse
import React from 'react'; export default ()=> { return (<div>I'm a pure component.</div>) }
ajax/libs/material-ui/4.9.7/es/internal/svg-icons/ArrowDropDown.min.js
cdnjs/cdnjs
import*as React from"react";import createSvgIcon from"./createSvgIcon";export default createSvgIcon(React.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");
fields/types/textarea/TextareaField.js
matthieugayon/keystone
import Field from '../Field'; import React from 'react'; module.exports = Field.create({ displayName: 'TextareaField', renderField () { var styles = { height: this.props.height, }; return <textarea name={this.props.path} styles={styles} ref="focusTarget" value={this.props.value} onChange={this.valueChanged} autoComplete="off" className="FormInput" />; }, });
ajax/libs/mobx/2.4.0-fix427/mobx.min.js
tonytomov/cdnjs
/** MobX - (c) Michel Weststrate 2015, 2016 - MIT Licensed */ "use strict";function se(n,a,u){var o,e,r;"string"==typeof n?(o=n,e=a,r=u):"function"==typeof n&&(o=n.name||"Autorun@"+i(),e=n,r=a),p(e,"autorun methods cannot have modifiers"),t("function"==typeof e,"autorun expects a function"),t(0===e.length,"autorun expects a function without arguments"),r&&(e=e.bind(r));var s=new m(o,function(){this.track(e)});return s.schedule(),s.getDisposer()}function Ce(e,s,u,l){var r,o,a,t;"string"==typeof e?(r=e,o=s,a=u,t=l):"function"==typeof e&&(r="When@"+i(),o=e,a=s,t=u);var c=!1,n=se(r,function(){if(o.call(t)){n?n():c=!0;var e=I();a.call(t),j(e)}});return c&&n(),n}function nn(e,t,n){return a("`autorunUntil` is deprecated, please use `when`."),Ce.apply(null,arguments)}function en(e,u,c,l){var a,t,n,r;"string"==typeof e?(a=e,t=u,n=c,r=l):"function"==typeof e&&(a=e.name||"AutorunAsync@"+i(),t=e,n=u,r=c),void 0===n&&(n=1),r&&(t=t.bind(r));var s=!1,o=new m(a,function(){s||(s=!0,setTimeout(function(){s=!1,o.isDisposed||o.track(t)},n))});return o.schedule(),o.getDisposer()}function Yt(a,f,x,g,b,_){function y(){if(!l.isDisposed){var e=!1;l.track(function(){var t=d();e=fe(w,s,t),s=t}),u&&r&&t(s),u||e!==!0||t(s),u&&(u=!1)}}var c,p,t,r,e,o;"string"==typeof a?(c=a,p=f,t=x,r=g,e=b,o=_):(c=a.name||f.name||"Reaction@"+i(),p=a,t=f,r=x,e=g,o=b),void 0===r&&(r=!1),void 0===e&&(e=0);var v=T(p,n.Reference),R=v[0],d=v[1],w=R===n.Structure;o&&(d=d.bind(o),t=he(c,t.bind(o)));var u=!0,h=!1,s=void 0,l=new m(c,function(){1>e?y():h||(h=!0,setTimeout(function(){h=!1,y()},e))});return l.schedule(),l.getDisposer()}function re(e,n,r,o){return arguments.length<3&&"function"==typeof e?qt(e,n):(t(!r||!r.set,"@observable properties cannot have a setter: "+n),gt.apply(null,arguments))}function qt(r,o){var e=T(r,n.Recursive),i=e[0],t=e[1];return new h(t,o,i===n.Structure,t.name)}function Fe(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function Jt(n,o){t("function"==typeof n&&1===n.length,"createTransformer expects a function that accepts one argument");var r={},i=e.resetId,a=function(e){function t(t,r){e.call(this,function(){return n(r)},null,!1,"Transformer-"+n.name+"-"+t),this.sourceIdentifier=t,this.sourceObject=r}return N(t,e),t.prototype.onBecomeUnobserved=function(){var t=this.value;e.prototype.onBecomeUnobserved.call(this),delete r[this.sourceIdentifier],o&&o(t,this.sourceObject)},t}(h);return function(o){i!==e.resetId&&(r={},i=e.resetId);var n=Ut(o),t=r[n];return t?t.get():(t=r[n]=new a(n,o),t.get())}}function Ut(e){if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object, got: "+e);var t=e.$transformId;return void 0===t&&(t=i(),k(e,"$transformId",t)),t}function Mt(e,t){return le()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),re(e,t).get()}function ee(e){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return t(arguments.length>=2,"extendObservable expected 2 or more arguments"),t("object"==typeof e,"extendObservable expects an object as first argument"),t(!(e instanceof x),"extendObservable should not be used on maps, use map.merge instead"),o.forEach(function(r){t("object"==typeof r,"all arguments of extendObservable should be objects"),Ge(e,r,n.Recursive,null)}),e}function Ge(e,t,r,o){var i=ne(e,o,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!Re(e,n))continue;Qt(i,n,t[n])}return e}function Pt(e,t){return We(d(e,t))}function We(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=Q(e.observing).map(We)),t}function Tt(e,t){return qe(d(e,t))}function qe(e){var t={name:e.name};return e.observers&&e.observers.length>0&&(t.observers=e.observers.asArray().map(qe)),t}function Ct(e,t,n){return"function"==typeof n?ot(e,t,n):At(e,t)}function At(e,t){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),v(me(e)).intercept(t)):v(e).intercept(t)}function ot(e,t,n){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ee(e,{property:e[t]}),ot(e,t,n)):v(e,t).intercept(n)}function P(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof x||e instanceof l)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(y(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof at||e instanceof m||e instanceof h}function Rt(r,e,n){return t(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",e),pt(r,e),t(!n||!n.get,"@observable can not be used on getters, use @computed instead"),xt.apply(null,arguments)}function me(e,u){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return Rt.apply(null,arguments);if(t(arguments.length<3,"observable expects zero, one or two arguments"),P(e))return e;var s=T(e,n.Recursive),r=s[0],i=s[1],c=r===n.Reference?o.Reference:wt(i);switch(c){case o.Array:case o.PlainObject:return G(i,r);case o.Reference:case o.ComplexObject:return new A(i,r);case o.ComplexFunction:throw new Error("[mobx.observable] To be able to make a function reactive it should not have arguments. If you need an observable reference to a function, use `observable(asReference(f))`");case o.ViewFunction:return a("Use `computed(expr)` instead of `observable(expr)`"),re(e,u)}t(!1,"Illegal State")}function wt(e){return null===e||void 0===e?o.Reference:"function"==typeof e?e.length?o.ComplexFunction:o.ViewFunction:Array.isArray(e)||e instanceof l?o.Array:"object"==typeof e?g(e)?o.PlainObject:o.ComplexObject:o.Reference}function bt(t,n,e,r){return"function"==typeof e?ft(t,n,e,r):mt(t,n,e)}function mt(e,t,n){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),v(me(e)).observe(t,n)):v(e).observe(t,n)}function ft(e,t,n,r){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ee(e,{property:e[t]}),ft(e,t,n,r)):v(e,t).observe(n,r)}function w(e,n,t){function i(r){return n&&t.push([e,r]),r}if(void 0===n&&(n=!0),void 0===t&&(t=null),e instanceof Date||e instanceof RegExp)return e;if(n&&null===t&&(t=[]),n&&null!==e&&"object"==typeof e)for(var r=0,s=t.length;s>r;r++)if(t[r][0]===e)return t[r][1];if(!e)return e;if(Array.isArray(e)||e instanceof l){var o=i([]),a=e.map(function(e){return w(e,n,t)});o.length=a.length;for(var r=0,s=a.length;s>r;r++)o[r]=a[r];return o}if(e instanceof x){var u=i({});return e.forEach(function(e,r){return u[r]=w(e,n,t)}),u}if(P(e)&&e.$mobx instanceof A)return w(e(),n,t);if(e instanceof A)return w(e.get(),n,t);if("object"==typeof e){var o=i({});for(var c in e)o[c]=w(e[c],n,t);return o}return e}function dt(n,e,t){return void 0===e&&(e=!0),void 0===t&&(t=null),a("toJSON is deprecated. Use toJS instead"),w.apply(null,arguments)}function ce(e){return console.log(e),e}function yt(n,r){switch(arguments.length){case 0:if(n=e.derivationStack[e.derivationStack.length-1],!n)return ce("whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested it's value.");break;case 2:n=d(n,r)}return n=d(n),n instanceof h?ce(n.whyRun()):n instanceof m?ce(n.whyRun()):void t(!1,"whyRun can only be used on reactions and computed values")}function he(e,t,n,r){return 1===arguments.length&&"function"==typeof e?xe(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?xe(e,t):1===arguments.length&&"string"==typeof e?ut(e):ut(t).apply(null,arguments)}function ut(e){return function(n,r,t){return t&&"function"==typeof t.value?(t.value=xe(e,t.value),t.enumerable=!1,t):_t(e).apply(this,arguments)}}function st(e){return"function"==typeof e&&e.isMobxAction===!0}function St(e,o,i){var n="string"==typeof e?e:e.name||"<unnamed action>",r="function"==typeof e?e:o,a="function"==typeof e?o:i;return t("function"==typeof r,"`runInAction` expects a function"),t(0===r.length,"`runInAction` expects a function without arguments"),t("string"==typeof n&&n.length>0,"actions should have valid names, got: '"+n+"'"),it(n,r,a,void 0)}function xe(e,n){t("function"==typeof n,"`action` can only be invoked on functions"),t("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var r=function(){return it(e,n,this,arguments)};return r.isMobxAction=!0,r}function it(f,p,i,n){var v=e.derivationStack;t(!(v[v.length-1]instanceof h),"Computed values or transformers should not invoke actions or trigger other side effects");var l,c=r();if(c){l=Date.now();var a=n&&n.length||0,d=new Array(a);if(a>0)for(var o=0;a>o;o++)d[o]=n[o];s({type:"action",name:f,fn:p,target:i,arguments:d})}var y=I();Oe(f,i,!1);var m=B(!0);try{return p.apply(i,n)}finally{U(m),ke(!1),j(y),c&&u({time:Date.now()-l})}}function kt(n){t(0===e.derivationStack.length,"It is not allowed to set `useStrict` when a derivation is running"),e.strictMode=n,e.allowStateChanges=!n}function rt(e,t){var n=B(e),r=t();return U(n),r}function B(t){var n=e.allowStateChanges;return e.allowStateChanges=t,n}function U(t){e.allowStateChanges=t}function nt(e){t(e.isDirty,"atom not dirty"),e.isDirty=!1,oe(e,!0)}function le(){return e.derivationStack.length>0&&e.isTracking}function pe(){e.allowStateChanges||t(!1,e.strictMode?"It is not allowed to create or change state outside an `action` when MobX is in strict mode. Wrap the current method in `action` if this state change is intended":"It is not allowed to change the state when a computed value or transformer is being evaluated. Use 'autorun' to create reactive functions with side-effects.")}function jt(e){1===++e.dependencyStaleCount&&Pe(e)}function Vt(e,n){if(t(e.dependencyStaleCount>0,"unexpected ready notification"),n&&(e.dependencyChangeCount+=1),0===--e.dependencyStaleCount)if(e.dependencyChangeCount>0){e.dependencyChangeCount=0;var r=e.onDependenciesReady();oe(e,r)}else oe(e,!1)}function Qe(t,s){var n=t.observing;t.observing=new Array(n.length+100),t.unboundDepsCount=0,t.runId=++e.runId,e.derivationStack.push(t);var u=e.isTracking;e.isTracking=!0;var o,i=!0;try{o=s.call(t),i=!1}finally{if(i){var a="[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render() method of an observer based React component. These functions should never throw exceptions as MobX will not always be able to recover from them. "+("Please fix the error reported after this message or enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+t.name+"'");r()&&S({type:"error",object:this,message:a}),console.warn(a),t.unboundDepsCount=0,t.observing=n,Z()}else e.isTracking=u,e.derivationStack.length-=1,Lt(t,n)}return o}function Lt(n,r){for(var o=r.length,i=n.observing,a=i.length=n.unboundDepsCount,e=0;o>e;e++)r[e].diffValue=-1;for(var e=0;a>e;e++){var t=i[e];++t.diffValue>0&&(t.diffValue=0,zt(t,n))}for(var e=0;o>e;e++){var t=r[e];t.diffValue<0&&(t.diffValue=0,Ne(t,n))}}function ye(n){for(var e=n.observing,r=e.length,t=0;r>t;t++)Ne(e[t],n);e.length=0}function Ke(e){var t=I(),n=e();return j(t),n}function I(){var t=e.isTracking;return e.isTracking=!1,t}function j(t){e.isTracking=t}function an(){}function Z(){e.resetId++;var n=new et;for(var t in n)-1===It.indexOf(t)&&(e[t]=n[t]);e.allowStateChanges=!e.strictMode}function zt(e,t){e.observers.add(t)}function Ne(e,t){e.observers.remove(t),0===e.observers.length&&e.onBecomeUnobserved()}function ze(n){if(e.isTracking!==!1){var t=e.derivationStack[e.derivationStack.length-1];t.runId!==n.lastAccessedBy&&(n.lastAccessedBy=t.runId,t.observing[t.unboundDepsCount++]=n)}}function Pe(e){for(var t=e.observers.asArray(),r=t.length,n=0;r>n;n++)jt(t[n]);e.staleObservers=e.staleObservers.concat(t)}function oe(e,t){e.staleObservers.splice(0).forEach(function(e){return Vt(e,t)})}function ie(){if(!(e.isRunningReactions===!0||e.inTransaction>0)){e.isRunningReactions=!0;for(var t=e.pendingReactions,o=0;t.length>0;){if(++o===Dt)throw new Error("Reaction doesn't converge to a stable state. Probably there is a cycle in the reactive function: "+t[0].toString());for(var r=t.splice(0),n=0,i=r.length;i>n;n++)r[n].runReaction()}e.isRunningReactions=!1}}function r(){return Y}function S(r){if(!Y)return!1;for(var n=e.spyListeners,t=0,o=n.length;o>t;t++)n[t](r)}function s(e){var t=ct({},e,{spyReportStart:!0});S(t)}function u(e){S(e?ct({},e,He):He)}function Le(t){return e.spyListeners.push(t),Y=e.spyListeners.length>0,K(function(){var n=e.spyListeners.indexOf(t);-1!==n&&e.spyListeners.splice(n,1),Y=e.spyListeners.length>0})}function rn(e){return a("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(a("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?Le(e):(a("trackTransitions without callback has been deprecated and is a no-op now. If you are using the mobx-react-devtools, please update them first"),function(){})}function L(n,e,t){void 0===e&&(e=void 0),void 0===t&&(t=!0),Oe(n.name||"anonymous transaction",e,t);var r=n.call(e);return ke(t),r}function Oe(o,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),e.inTransaction+=1,n&&r()&&s({type:"transaction",target:t,name:o})}function ke(t){if(void 0===t&&(t=!0),0===--e.inTransaction){for(var o=e.changedAtoms.splice(0),n=0,i=o.length;i>n;n++)nt(o[n]);ie()}t&&r()&&u()}function R(e){return e.interceptors&&e.interceptors.length>0}function H(t,n){var e=t.interceptors||(t.interceptors=[]);return e.push(n),K(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function _(o,e){for(var i=I(),r=o.interceptors,n=0,a=r.length;a>n;n++)if(e=r[n](e),t(!e||e.type,"Intercept handlers should return nothing or a change object"),!e)return null;return j(i),e}function f(e){return e.changeListeners&&e.changeListeners.length>0}function q(t,n){var e=t.changeListeners||(t.changeListeners=[]);return e.push(n),K(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function b(r,n){var o=I(),e=r.changeListeners;if(e){e=e.slice();for(var t=0,i=e.length;i>t;t++)Array.isArray(n)?e[t].apply(null,n):e[t](n);j(o)}}function we(e){return new ae(e)}function _e(e){return new z(e)}function Se(e){return new ge(e)}function $t(e,t){return $e(e,t)}function T(e,t){return e instanceof ae?[n.Reference,e.value]:e instanceof z?[n.Structure,e.value]:e instanceof ge?[n.Flat,e.value]:[t,e]}function on(e){return e===we?n.Reference:e===_e?n.Structure:e===Se?n.Flat:(t(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),n.Recursive)}function G(e,a,i){var r;if(P(e))return e;switch(a){case n.Reference:return e;case n.Flat:p(e,"Items inside 'asFlat' cannot have modifiers"),r=n.Reference;break;case n.Structure:p(e,"Items inside 'asStructure' cannot have modifiers"),r=n.Structure;break;case n.Recursive:o=T(e,n.Recursive),r=o[0],e=o[1];break;default:t(!1,"Illegal State")}return Array.isArray(e)?De(e,r,i):g(e)&&Object.isExtensible(e)?Ge(e,e,r,i):e;var o}function p(e,t){if(e instanceof ae||e instanceof z||e instanceof ge)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function Zt(e){var t=ht(e),n=Ee(e);Object.defineProperty(l.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function ht(e){return function(t){var r=this.$mobx,o=r.values;if(p(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<o.length){pe();var i=o[e];if(R(r)){var a=_(r,{type:"update",object:r.array,index:e,newValue:t});if(!a)return;t=a.newValue}t=r.makeReactiveArrayItem(t);var s=r.mode===n.Structure?!W(i,t):i!==t;s&&(o[e]=t,r.notifyArrayChildUpdate(e,t,i))}else{if(e!==o.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+o.length);r.spliceWithArray(e,0,[t])}}}function Ee(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}}function Ve(t){for(var e=ue;t>e;e++)Zt(e);ue=t}function De(e,t,n){return new l(e,t,n)}function Xt(e){return a("fastArray is deprecated. Please use `observable(asFlat([]))`"),De(e,n.Flat,null)}function F(e){return e instanceof l}function $e(e,t){return new x(e,t)}function J(e){return e instanceof x}function ne(e,t,r){if(void 0===r&&(r=n.Recursive),y(e))return e.$mobx;g(e)||(t=e.constructor.name+"@"+i()),t||(t="ObservableObject@"+i());var o=new Ue(e,t,r);return V(e,"$mobx",o),o}function Qt(e,t,n){e.values[t]?e.target[t]=n:te(e,t,n,!0)}function te(t,n,e,a){a&&pt(t.target,n);var r,o=t.name+"."+n,i=!0;if("function"!=typeof e||0!==e.length||st(e))if(e instanceof z&&"function"==typeof e.value&&0===e.value.length)r=new h(e.value,t.target,!0,o);else{if(i=!1,R(t)){var s=_(t,{object:t.target,name:n,type:"add",newValue:e});if(!s)return;e=s.newValue}r=new A(e,t.mode,o,!1),e=r.value}else r=new h(e,t.target,!1,o);t.values[n]=r,a&&Object.defineProperty(t.target,n,i?Kt(n):Ht(n)),i||Ft(t,t.target,n,e)}function Ht(e){var t=Me[e];return t?t:Me[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Be(this,e,t)}}}function Kt(e){var t=Te[e];return t?t:Te[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:Fe}}function Be(o,i,e){var t=o.$mobx,a=t.values[i];if(R(t)){var n=_(t,{type:"update",object:o,name:i,newValue:e});if(!n)return;e=n.newValue}if(e=a.prepareNewValue(e),e!==D){var l=f(t),c=r(),n=b||f?{type:"update",object:o,oldValue:a.value,name:i,newValue:e}:null;c&&s(n),a.setNewValue(e),l&&b(t,n),c&&u()}}function Ft(t,i,a,c){var n=f(t),e=r(),o=n||e?{type:"add",object:i,name:a,newValue:c}:null;e&&s(o),n&&b(t,o),e&&u()}function y(e){return"object"==typeof e&&null!==e?(E(e),e.$mobx instanceof Ue):!1}function d(e,n){if("object"==typeof e&&null!==e){if(F(e))return t(void 0===n,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(J(e)){if(void 0===n)return d(e._keys);var r=e._data[n]||e._hasMap[n];return t(!!r,"the entry '"+n+"' does not exist in the observable map '"+ve(e)+"'"),r}if(E(e),y(e)){t(!!n,"please specify a property");var o=e.$mobx.values[n];return t(!!o,"no observable property '"+n+"' found on the observable object '"+ve(e)+"'"),o}if(e instanceof O||e instanceof h||e instanceof m)return e}else if("function"==typeof e&&e.$mobx instanceof m)return e.$mobx;t(!1,"Cannot obtain atom from "+e)}function v(e,n){return t(e,"Expection some object"),void 0!==n?v(d(e,n)):e instanceof O||e instanceof h||e instanceof m?e:J(e)?e:(E(e),e.$mobx?e.$mobx:void t(!1,"Cannot obtain administration from "+e))}function ve(e,t){var n;return n=void 0!==t?d(e,t):y(e)||J(e)?v(e):d(e),n.name}function de(e,r,o,i,a){function n(s,n,u,c){if(t(a||Ye(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),u){s.hasOwnProperty("__mobxLazyInitializers")||k(s,"__mobxLazyInitializers",s.__mobxLazyInitializers&&s.__mobxLazyInitializers.slice()||[]);var f=u.value,l=u.initializer;return s.__mobxLazyInitializers.push(function(t){e(t,n,l?l.call(t):f,c,u)}),{enumerable:i,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&E(this),r.call(this,n)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&E(this),o.call(this,n,e)}}}var p={enumerable:i,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[n]===!0||Xe(this,n,void 0,e,c,u),r.call(this,n)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[n]===!0?o.call(this,n,t):Xe(this,n,t,e,c,u)}};return arguments.length<3&&Object.defineProperty(s,n,p),p}return a?function(){if(Ye(arguments))return n.apply(null,arguments);var e=arguments;return function(t,r,o){return n(t,r,o,e)}}:n}function Xe(e,t,n,r,o,i){e.hasOwnProperty("__mobxInitializedProps")||k(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,o,i)}function E(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(k(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function Ye(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function Et(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function M(e){t(e[je]!==!0,"Illegal state: cannot recycle array as iterator"),V(e,je,!0);var n=-1;return V(e,"next",function(){return n++,{done:n>=this.length,value:n<this.length?this[n]:void 0}}),e}function tt(e,t){V(e,Et(),t)}function i(){return++e.mobxGuid}function t(t,n,e){if(!t)throw new Error("[mobx] Invariant failed: "+n+(e?" in '"+e+"'":""))}function a(e){-1===Ie.indexOf(e)&&(Ie.push(e),console.error("[mobx] Deprecated: "+e))}function K(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}function Q(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function be(t,e,n){if(void 0===e&&(e=100),void 0===n&&(n=" - "),!t)return"";var r=t.slice(0,e);return""+r.join(n)+(t.length>e?" (... and "+(t.length-e)+"more)":"")}function g(e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype}function ct(){for(var r=arguments[0],e=1,o=arguments.length;o>e;e++){var t=arguments[e];for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])}return r}function fe(n,e,t){return n?!W(e,t):e!==t}function vt(n,t){for(var e=0;e<t.length;e++)k(n,t[e],n[t[e]])}function k(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function V(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!1,value:n})}function Re(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function pt(n,e){t(Re(n,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function lt(t){var e=[];for(var n in t)e.push(n);return e}function W(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var o=Array.isArray(e)||F(e);if(o!==(Array.isArray(t)||F(t)))return!1;if(o){if(e.length!==t.length)return!1;for(var n=e.length-1;n>=0;n--)if(!W(e[n],t[n]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(lt(e).length!==lt(t).length)return!1;for(var r in e){if(!(r in t))return!1;if(!W(e[r],t[r]))return!1}return!0}return e===t}var N=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)};an(),exports.extras={allowStateChanges:rt,getAtom:d,getDebugName:ve,getDependencyTree:Pt,getObserverTree:Tt,isComputingDerivation:le,isSpyEnabled:r,resetGlobalState:Z,spyReport:S,spyReportEnd:u,spyReportStart:s,trackTransitions:rn},exports._={getAdministration:v,resetGlobalState:Z},exports.autorun=se,exports.when=Ce,exports.autorunUntil=nn,exports.autorunAsync=en,exports.reaction=Yt;var gt=de(function(i,a,c,e,s){var r=s.get;t("function"==typeof r,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var o=!1;e&&1===e.length&&e[0].asStructure===!0&&(o=!0);var u=ne(i,void 0,n.Recursive);te(u,a,o?_e(r):r,!1)},function(e){return this.$mobx.values[e].get()},Fe,!1,!0);exports.computed=re,exports.createTransformer=Jt,exports.expr=Mt,exports.extendObservable=ee,exports.intercept=Ct,exports.isObservable=P;var xt=de(function(t,r,e){var o=B(!0);"function"==typeof e&&(e=we(e));var i=ne(t,void 0,n.Recursive);te(i,r,e,!0),U(o)},function(e){return this.$mobx.values[e].get()},function(e,t){Be(this,e,t)},!0,!1);exports.observable=me;var o;!function(e){e[e.Reference=0]="Reference",e[e.PlainObject=1]="PlainObject",e[e.ComplexObject=2]="ComplexObject",e[e.Array=3]="Array",e[e.ViewFunction=4]="ViewFunction",e[e.ComplexFunction=5]="ComplexFunction"}(o||(o={})),exports.observe=bt,exports.toJS=w,exports.toJSON=dt,exports.whyRun=yt;var _t=de(function(r,t,n,e,a){var o=e&&1===e.length?e[0]:n.name||t||"<unnamed action>",i=he(o,n);k(r,t,i)},function(e){return this[e]},function(){t(!1,"It is not allowed to assign new values to @action fields")},!1,!0);exports.action=he,exports.isAction=st,exports.runInAction=St,exports.useStrict=kt;var O=function(){function n(e){void 0===e&&(e="Atom@"+i()),this.name=e,this.isDirty=!1,this.staleObservers=[],this.observers=new X,this.diffValue=0,this.lastAccessedBy=0}return n.prototype.onBecomeUnobserved=function(){},n.prototype.reportObserved=function(){ze(this)},n.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},n.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,Pe(this))},n.prototype.reportReady=function(){t(this.isDirty,"atom not dirty"),e.inTransaction>0?e.changedAtoms.push(this):(nt(this),ie())},n.prototype.toString=function(){return this.name},n}();exports.BaseAtom=O;var at=function(n){function t(e,t,r){void 0===e&&(e="Atom@"+i()),void 0===t&&(t=Ae),void 0===r&&(r=Ae),n.call(this,e),this.name=e,this.onBecomeObservedHandler=t,this.onBecomeUnobservedHandler=r,this.isBeingTracked=!1}return N(t,n),t.prototype.reportObserved=function(){n.prototype.reportObserved.call(this);var t=e.isTracking;return t&&!this.isBeingTracked&&(this.isBeingTracked=!0,this.onBecomeObservedHandler()),t},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(O);exports.Atom=at;var h=function(){function n(e,t,n,r){this.derivation=e,this.scope=t,this.compareStructural=n,this.isLazy=!0,this.isComputing=!1,this.staleObservers=[],this.observers=new X,this.observing=[],this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.unboundDepsCount=0,this.__mapid="#"+i(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.value=void 0,this.name=r||"ComputedValue@"+i()}return n.prototype.peek=function(){this.isComputing=!0;var e=B(!1),t=this.derivation.call(this.scope);return U(e),this.isComputing=!1,t},n.prototype.onBecomeUnobserved=function(){ye(this),this.isLazy=!0,this.value=void 0},n.prototype.onDependenciesReady=function(){var e=this.trackAndCompute();return e},n.prototype.get=function(){if(t(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),ze(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!le())return this.peek();this.isLazy=!1,this.trackAndCompute()}return this.value},n.prototype.set=function(e){throw new Error("[ComputedValue '"+name+"'] It is not possible to assign a new value to a computed value.")},n.prototype.trackAndCompute=function(){r()&&S({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=Qe(this,this.peek);return fe(this.compareStructural,t,e)},n.prototype.observe=function(n,r){var o=this,e=!0,t=void 0;return se(function(){var i=o.get();if(!e||r){var a=I();n(i,t),j(a)}e=!1,t=i})},n.prototype.toJSON=function(){return this.get()},n.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},n.prototype.whyRun=function(){var n=e.derivationStack.length>0,i=Q(this.observing).map(function(e){return e.name}),r=Q(this.observers.asArray()).map(function(e){return e.name}),t=this.isComputing?n?this.observers.length>0?c.INVALIDATED:c.REQUIRED:c.PEEK:c.NOT_RUNNING;if(t===c.REQUIRED){var o=e.derivationStack[e.derivationStack.length-2];o&&r.push(o.name)}return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+Ot[t]+" "+(t===c.NOT_RUNNING&&this.dependencyStaleCount>0?"(a next run is scheduled)":"")+"\n"+(this.isLazy?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n Didn't expect this computation to be suspended at this point?\n 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\n":" * This computation will re-run if any of the following observables changes:\n "+be(i)+"\n "+(this.isComputing&&n?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n * If the outcome of this computation changes, the following observers will be re-run:\n "+be(r)+"\n")},n}(),c;!function(e){e[e.PEEK=0]="PEEK",e[e.INVALIDATED=1]="INVALIDATED",e[e.REQUIRED=2]="REQUIRED",e[e.NOT_RUNNING=3]="NOT_RUNNING"}(c||(c={}));var Ot=(C={},C[c.PEEK]="[peek] The value of this computed value was requested outside an reaction",C[c.INVALIDATED]="[invalidated] Some observables used by this computation did change",C[c.REQUIRED]="[started] This computation is required by another computed value / reaction",C[c.NOT_RUNNING]="[idle] This compution is currently not running",C);exports.untracked=Ke;var It=["mobxGuid","resetId","spyListeners","strictMode","runId"],et=function(){function e(){this.version=3,this.derivationStack=[],this.runId=0,this.mobxGuid=0,this.inTransaction=0,this.isTracking=!1,this.isRunningReactions=!1,this.changedAtoms=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),e=function(){var e=new et;if(global.__mobservableTrackingStack||global.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(global.__mobxGlobal&&global.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return global.__mobxGlobal?global.__mobxGlobal:global.__mobxGlobal=e}(),Ze,m=function(){function t(e,t){void 0===e&&(e="Reaction@"+i()),this.name=e,this.onInvalidate=t,this.staleObservers=$,this.observers=Ze||(Ze=new X),this.observing=[],this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.unboundDepsCount=0,this.__mapid="#"+i(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return t.prototype.onBecomeUnobserved=function(){},t.prototype.onDependenciesReady=function(){return this.schedule(),!1},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,e.pendingReactions.push(this),ie())},t.prototype.isScheduled=function(){return this.dependencyStaleCount>0||this._isScheduled},t.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&r()&&S({object:this,type:"scheduled-reaction"}))},t.prototype.track=function(e){var t,n=r();n&&(t=Date.now(),s({object:this,type:"reaction",fn:e})),this._isRunning=!0,Qe(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ye(this),n&&u({time:Date.now()-t})},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||ye(this))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.whyRun=function(){var e=Q(this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+be(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n"; },t}();exports.Reaction=m;var Dt=100,Y=!1,He={spyReportEnd:!0};exports.spy=Le,exports.transaction=L;var n;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(n||(n={})),exports.asReference=we,exports.asStructure=_e,exports.asFlat=Se;var ae=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),z=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),ge=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}();exports.asMap=$t;var Nt=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),ue=0,Je=function(){function e(){}return e}();Je.prototype=[];var Bt=function(){function e(e,t,n,r){this.mode=t,this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new O(e||"ObservableArray@"+i())}return e.prototype.makeReactiveArrayItem=function(e){return p(e,"Array values cannot have modifiers"),this.mode===n.Flat||this.mode===n.Reference?e:G(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return H(this,e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),q(this,t)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||0>e)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=e,e>0&&t+e+1>ue&&Ve(t+e+1)},e.prototype.spliceWithArray=function(e,n,t){pe();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:0>e&&(e=Math.max(0,r+e)),n=1===arguments.length?r-e:void 0===n||null===n?0:Math.max(0,Math.min(n,r-e)),void 0===t&&(t=[]),R(this)){var o=_(this,{object:this.array,type:"splice",index:e,removedCount:n,added:t});if(!o)return $;n=o.removedCount,t=o.added}t=t.map(this.makeReactiveArrayItem,this);var s=t.length-n;this.updateArrayLength(r,s);var i=(a=this.values).splice.apply(a,[e,n].concat(t));return(0!==n||0!==t.length)&&this.notifyArraySplice(e,t,i),i;var a},e.prototype.notifyArrayChildUpdate=function(o,i,a){var e=!this.owned&&r(),t=f(this),n=t||e?{object:this.array,type:"update",index:o,newValue:i,oldValue:a}:null;e&&s(n),this.atom.reportChanged(),t&&b(this,n),e&&u()},e.prototype.notifyArraySplice=function(a,t,n){var e=!this.owned&&r(),o=f(this),i=o||e?{object:this.array,type:"splice",index:a,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;e&&s(i),this.atom.reportChanged(),o&&b(this,i),e&&u()},e}(),l=function(t){function e(n,o,i,r){void 0===r&&(r=!1),t.call(this);var e=new Bt(i,o,this,r);V(this,"$mobx",e),n&&n.length?(e.updateArrayLength(0,n.length),e.values=n.map(e.makeReactiveArrayItem,e),e.notifyArraySplice(0,e.values.slice(),$)):e.values=[],Nt&&Object.defineProperty(e.array,"0",Gt)}return N(e,t),e.prototype.intercept=function(e){return this.$mobx.intercept(e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),this.$mobx.observe(t,e)},e.prototype.clear=function(){return this.splice(0)},e.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.peek=function(){return this.$mobx.values},e.prototype.find=function(r,o,t){void 0===t&&(t=0),this.$mobx.atom.reportObserved();for(var n=this.$mobx.values,i=n.length,e=t;i>e;e++)if(r.call(o,n[e],e,this))return n[e]},e.prototype.splice=function(t,n){for(var r=[],e=2;e<arguments.length;e++)r[e-2]=arguments[e];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(t);case 2:return this.$mobx.spliceWithArray(t,n)}return this.$mobx.spliceWithArray(t,n,r)},e.prototype.push=function(){for(var n=[],e=0;e<arguments.length;e++)n[e-0]=arguments[e];var t=this.$mobx;return t.spliceWithArray(t.values.length,0,n),t.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var n=this.$mobx;return n.spliceWithArray(0,0,t),n.values.length},e.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},e.prototype.sort=function(t){this.$mobx.atom.reportObserved();var e=this.slice();return e.sort.apply(e,arguments)},e.prototype.remove=function(t){var e=this.$mobx.values.indexOf(t);return e>-1?(this.splice(e,1),!0):!1},e.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},e.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},e}(Je);tt(l.prototype,function(){return M(this.slice())}),vt(l.prototype,["constructor","observe","clear","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(l.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];k(l.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Gt={configurable:!0,enumerable:!1,set:ht(0),get:Ee(0)};Ve(1e3),exports.fastArray=Xt,exports.isObservableArray=F;var Wt={},x=function(){function e(e,r){var t=this;this.$mobx=Wt,this._data={},this._hasMap={},this.name="ObservableMap@"+i(),this._keys=new l(null,n.Reference,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this._valueMode=on(r),this._valueMode===n.Flat&&(this._valueMode=n.Reference),rt(!0,function(){g(e)?t.merge(e):Array.isArray(e)&&e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)})})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return this.isValidKey(e)?(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get()):!1},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(p(t,"[mobx.map.set] Expected unwrapped value to be inserted to key '"+e+"'. If you need to use modifiers pass them as second argument to the constructor"),R(this)){var r=_(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return;t=r.newValue}n?this._updateValue(e,t):this._addValue(e,t)},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,R(this)){var n=_(this,{type:"delete",object:this,name:e});if(!n)return}if(this._has(e)){var o=r(),i=f(this),n=i||o?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;o&&s(n),L(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.setNewValue(void 0),t._data[e]=void 0},void 0,!1),i&&b(this,n),o&&u()}},e.prototype._updateHasMapEntry=function(t,r){var e=this._hasMap[t];return e?e.setNewValue(r):e=this._hasMap[t]=new A(r,n.Reference,this.name+"."+t+"?",!1),e},e.prototype._updateValue=function(o,e){var t=this._data[o];if(e=t.prepareNewValue(e),e!==D){var n=r(),i=f(this),a=i||n?{type:"update",object:this,oldValue:t.value,name:o,newValue:e}:null;n&&s(a),t.setNewValue(e),i&&b(this,a),n&&u()}},e.prototype._addValue=function(e,n){var t=this;L(function(){var r=t._data[e]=new A(n,t._valueMode,t.name+"."+e,!1);n=r.value,t._updateHasMapEntry(e,!0),t._keys.push(e)},void 0,!1);var o=r(),i=f(this),a=i||o?{type:"add",object:this,name:e,newValue:n}:null;o&&s(a),i&&b(this,a),o&&u()},e.prototype.get=function(e){return e=""+e,this.has(e)?this._data[e].get():void 0},e.prototype.keys=function(){return M(this._keys.slice())},e.prototype.values=function(){return M(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return M(this._keys.map(function(t){return[t,e.get(t)]}))},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return L(function(){t instanceof e?t.keys().forEach(function(e){return n.set(e,t.get(e))}):Object.keys(t).forEach(function(e){return n.set(e,t[e])})},void 0,!1),this},e.prototype.clear=function(){var e=this;L(function(){Ke(function(){e.keys().forEach(e.delete,e)})},void 0,!1)},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var t=this,e={};return this.keys().forEach(function(n){return e[n]=t.get(n)}),e},e.prototype.toJs=function(){return a("toJs is deprecated, use toJS instead"),this.toJS()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null===e||void 0===e?!1:"string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e?!1:!0},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"'")},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,n){return t(n!==!0,"`observe` doesn't support the fire immediately property for observable maps."),q(this,e)},e.prototype.intercept=function(e){return H(this,e)},e}();exports.ObservableMap=x,tt(x.prototype,function(){return this.entries()}),exports.map=$e,exports.isObservableMap=J;var Ue=function(){function e(e,t,n){this.target=e,this.name=t,this.mode=n,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,n){return t(n!==!0,"`observe` doesn't support the fire immediately property for observable objects."),q(this,e)},e.prototype.intercept=function(e){return H(this,e)},e}(),Me={},Te={};exports.isObservableObject=y;var D={},A=function(t){function e(s,u,e,o){void 0===e&&(e="ObservableValue@"+i()),void 0===o&&(o=!0),t.call(this,e),this.mode=u,this.hasUnreportedChange=!1,this.value=void 0;var a=T(s,n.Recursive),c=a[0],l=a[1];this.mode===n.Recursive&&(this.mode=c),this.value=G(l,this.mode,this.name),o&&r()&&S({type:"create",object:this,newValue:this.value})}return N(e,t),e.prototype.set=function(e){var n=this.value;if(e=this.prepareNewValue(e),e!==D){var t=r();t&&s({type:"update",object:this,newValue:e,oldValue:n}),this.setNewValue(e),t&&u()}},e.prototype.prepareNewValue=function(e){if(p(e,"Modifiers cannot be used on non-initial values."),pe(),R(this)){var t=_(this,{object:this,type:"update",newValue:e});if(!t)return D;e=t.newValue}var r=fe(this.mode===n.Structure,this.value,e);return r?G(e,this.mode,this.name):D},e.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),f(this)&&b(this,[e,t])},e.prototype.get=function(){return this.reportObserved(),this.value},e.prototype.intercept=function(e){return H(this,e)},e.prototype.observe=function(e,t){return t&&e(this.value,void 0),q(this,e)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e}(O),je="__$$iterating",X=function(){function e(){this.size=0,this.data={}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),e.prototype.asArray=function(){var e=new Array(this.size),t=0;for(var n in this.data)e[t]=this.data[n],t++;return e},e.prototype.add=function(e){var t=e.__mapid;t in this.data||(this.data[t]=e,this.size++)},e.prototype.remove=function(e){e.__mapid in this.data&&(delete this.data[e.__mapid],this.size--)},e}();exports.SimpleSet=X;var tn=function(){function e(){this.listeners=[],a("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}return e.prototype.emit=function(){for(var t=this.listeners.slice(),e=0,n=t.length;n>e;e++)t[e].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),K(function(){var n=t.listeners.indexOf(e);-1!==n&&t.listeners.splice(n,1)})},e.prototype.once=function(t){var e=this.on(function(){e(),t.apply(this,arguments)});return e},e}();exports.SimpleEventEmitter=tn;var $=[];Object.freeze($);var Ie=[],Ae=function(){},C; //# sourceMappingURL=lib/mobx.min.js.map
demo/src/mockups/shopping/components/shopping-checkout-payment-view-component.js
tuantle/hypertoxin
'use strict'; // eslint-disable-line import { Ht } from 'hypertoxin'; import React from 'react'; import ReactNative from 'react-native'; // eslint-disable-line import PropTypes from 'prop-types'; import DefaultTheme from '../../../themes/default-theme'; const { BodyScreen, HeaderScreen, RowLayout, FlatButton, RaisedButton, IconImage, TextField, HeadlineText, TitleText, SubtitleText } = Ht; export default class ShoppingCheckoutPaymentView extends React.Component { static propTypes = { Theme: PropTypes.object, shade: PropTypes.oneOf([ `light`, `dark` ]), shippingInfoForm: PropTypes.object, onPaymentSubmitted: PropTypes.func, onReset: PropTypes.func } static defaultProps = { Theme: DefaultTheme, shade: `light`, shippingInfoForm: { email: ``, address: ``, city: ``, state: ``, zipCode: ``, phoneNumber: `` }, onPaymentSubmitted: () => null, onReset: () => null } constructor (props) { super(props); this.creditCardNumberTextFieldRef = null; this.creditCardExpDateTextFieldRef = null; this.state = { paymentSubmitted: false, paymentInfoCompleted: false, paymentInfoForm: { creditCardNumber: ``, creditCardExpDate: `` } }; } render () { const component = this; const { shade, navigation, shippingInfoForm, onPaymentSubmitted, onReset } = component.props; const { paymentSubmitted, paymentInfoCompleted } = component.state; return ([ <HeaderScreen key = 'header-screen' ref = {(componentRef) => { component.headerScreenRef = componentRef; }} shade = { shade } label = { !paymentSubmitted ? `CHECKOUT - PAYMENT` : ``} > { !paymentSubmitted ? <FlatButton room = 'content-left' overlay = 'transparent' corner = 'circular' onPress = {() => navigation.goBack()} > <IconImage room = 'content-middle' size = 'large' source = 'go-back' /> </FlatButton> : null } { !paymentSubmitted ? <FlatButton room = 'content-right' overlay = 'transparent' corner = 'circular' label = 'CANCEL' onPress = {() => { component.setState(() => { return { paymentSubmitted: false, paymentInfoCompleted: false, paymentInfoForm: { creditCardNumber: ``, creditCardExpDate: `` } }; }, () => navigation.navigate(`shoppingCart`)); }} /> : null } </HeaderScreen>, <BodyScreen key = 'body-screen' shade = { shade } contentTopRoomAlignment = 'stretch' keyboardAvoiding = { true } > { !paymentSubmitted ? <RowLayout room = 'content-top' shade = { shade } roomAlignment = 'stretch' contentTopRoomAlignment = 'stretch' contentMiddleRoomAlignment = 'stretch' scrollable = { true } margin = {{ top: 150, horizontal: 10 }} > <TextField ref = {(componentRef) => { component.creditCardNumberTextFieldRef = componentRef; }} room = 'content-top' label = 'VISA' secured = { true } inputType = 'credit-card-visa' disableValidation = { true } onDoneEdit = {(value) => { component.setState((prevState) => { const paymentInfoForm = { ...prevState.paymentInfoForm, creditCardNumber: value }; return { paymentInfoCompleted: Object.values(paymentInfoForm).reduce((completed, _value) => { completed = completed && _value !== ``; return completed; }, true), paymentInfoForm }; }, () => { if (component.creditCardExpDateTextFieldRef !== null) { component.creditCardExpDateTextFieldRef.focus(); } }); }} > <IconImage room = 'content-left' source = 'credit-card' /> <FlatButton overlay = 'transparent' room = 'content-right' action = 'clear' corner = 'circular' > <IconImage room = 'content-middle' source = 'cancel' /> </FlatButton> </TextField> <TextField ref = {(componentRef) => { component.creditCardExpDateTextFieldRef = componentRef; }} room = 'content-top' label = 'EXP DATE' hint = 'mm/dd/yy' inputType = 'numeric' charLimit = { 8 } onReformat = {(value) => { return value.split(``).filter((char) => char !== `/`).map((char, index) => { return index === 2 || index === 4 ? `/${char}` : char; }).join(``); }} onDoneEdit = {(value) => { component.setState((prevState) => { const paymentInfoForm = { ...prevState.paymentInfoForm, creditCardExpDate: value }; return { paymentInfoCompleted: Object.values(paymentInfoForm).reduce((completed, _value) => { completed = completed && _value !== ``; return completed; }, true), paymentInfoForm }; }); }} > <FlatButton overlay = 'transparent' room = 'content-right' action = 'clear' corner = 'circular' > <IconImage room = 'content-middle' source = 'cancel' size = 'small' /> </FlatButton> </TextField> <RaisedButton room = 'content-middle' label = 'SUBMIT PAYMENT' color = 'accent' disabled = { !paymentInfoCompleted } onPress = {() => { component.setState(() => { return { paymentSubmitted: true }; }, () => { onPaymentSubmitted(); }); }} margin = {{ right: 10, vertical: 10 }} /> </RowLayout> : <RowLayout room = 'content-top' shade = { shade } roomAlignment = 'stretch' contentTopRoomAlignment = 'center' contentMiddleRoomAlignment = 'center' contentBottomRoomAlignment = 'stretch' scrollable = { true } margin = {{ top: 150, horizontal: 10 }} > <HeadlineText room = 'content-top' color = 'primary' size = 'large' > Thank you!!! </HeadlineText> <SubtitleText room = 'content-middle' size = 'small' > Your orders will be shipped to </SubtitleText> <TitleText room = 'content-middle' size = 'small' >{ shippingInfoForm.address }</TitleText> <TitleText room = 'content-middle' size = 'small' >{ `${shippingInfoForm.city}, ${shippingInfoForm.state} ${shippingInfoForm.zipCode}` }</TitleText> <RaisedButton room = 'content-bottom' label = 'BACK TO SHOPPING' color = 'accent' margin = {{ top: 50 }} onPress = {() => { onReset(); navigation.navigate(`shoppingHome`); }} /> </RowLayout> } </BodyScreen> ]); } }
src/pages/404.js
mattbanks/mattbanks
import React from 'react'; import { Link } from 'gatsby'; import Layout from '../components/Layout'; const IndexPage = () => ( <Layout fullMenu> <article id="main"> <header> <h2>404 - Not Found</h2> <p>Oops! Something went wrong!</p> <Link to="/">Go back to the homepage</Link> </header> </article> </Layout> ); export default IndexPage;
core/src/plugins/gui.ajax/res/js/ui/HOCs/animations/make-motion.js
huzergackl/pydio-core
/* * Copyright 2007-2017 Charles du Jeu - Abstrium SAS <team (at) pyd.io> * This file is part of Pydio. * * Pydio is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Pydio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Pydio. If not, see <http://www.gnu.org/licenses/>. * * The latest code can be found at <https://pydio.com>. */ import React from 'react'; import ReactDOM from 'react-dom'; import shallowCompare from 'react/lib/shallowCompare'; import { TransitionMotion } from 'react-motion'; import stripStyle from 'react-motion/lib/stripStyle'; import {springify, buildTransform} from './utils'; let counter=0 const DEFAULT_ANIMATION={stiffness: 200, damping: 22, precision: 0.1} const makeTransition = (originStyles, targetStyles, enter, leave) => { return (Target) => { class TransitionGroup extends React.PureComponent { constructor(props) { super(props); this.state = { styles: this.build(props) }; } componentWillReceiveProps(nextProps) { this.setState({ styles: this.build(nextProps) }); } build(props) { return React.Children .toArray(props.children) .filter(child => child) // Removing null values .map(child => { return !props.ready ? null : { key: child.key || `t${counter++}`, data: {element: child}, style: springify(targetStyles, enter || DEFAULT_ANIMATION) } }) .filter(child => child); // Removing null values } willEnter(transitionStyle) { return { ...stripStyle(transitionStyle.style), ...originStyles }; } willLeave(transitionStyle) { return { ...transitionStyle.style, ...springify(originStyles, leave || DEFAULT_ANIMATION) } } render() { // Making sure we fliter out properties const {ready, ...props} = this.props return ( <TransitionMotion styles={this.state.styles} willLeave={this.willEnter.bind(this)} willEnter={this.willEnter.bind(this)} > {styles => <Target {...props}> {styles.map(({key, style, data}) => { const Child = data.element.type const itemProps = data.element.props const transform = buildTransform(style, { length: 'px', angle: 'deg' }); return ( <Child key={data.element.key} {...itemProps} style={{ ...itemProps.style, ...style, transform }} /> ); })} </Target> } </TransitionMotion> ); } } TransitionGroup.propTypes = { ready: React.PropTypes.bool.isRequired } TransitionGroup.defaultProps = { ready: true } return TransitionGroup } }; export default makeTransition;
ajax/libs/aui/5.4.1/aui/js/aui-all.js
ruo91/cdnjs
!function(a,b){function c(a){var b=ob[a]={};return $.each(a.split(bb),function(a,c){b[c]=!0}),b}function d(a,c,d){if(d===b&&1===a.nodeType){var e="data-"+c.replace(qb,"-$1").toLowerCase();if(d=a.getAttribute(e),"string"==typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:+d+""===d?+d:pb.test(d)?$.parseJSON(d):d}catch(f){}$.data(a,c,d)}else d=b}return d}function e(a){var b;for(b in a)if(("data"!==b||!$.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function f(){return!1}function g(){return!0}function h(a){return!a||!a.parentNode||11===a.parentNode.nodeType}function i(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function j(a,b,c){if(b=b||0,$.isFunction(b))return $.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return $.grep(a,function(a){return a===b===c});if("string"==typeof b){var d=$.grep(a,function(a){return 1===a.nodeType});if(Kb.test(b))return $.filter(b,d,!c);b=$.filter(b,d)}return $.grep(a,function(a){return $.inArray(a,b)>=0===c})}function k(a){var b=Nb.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function l(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function m(a,b){if(1===b.nodeType&&$.hasData(a)){var c,d,e,f=$._data(a),g=$._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++)$.event.add(b,c,h[c][d])}g.data&&(g.data=$.extend({},g.data))}}function n(a,b){var c;1===b.nodeType&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),$.support.html5Clone&&a.innerHTML&&!$.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Xb.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.selected=a.defaultSelected:"input"===c||"textarea"===c?b.defaultValue=a.defaultValue:"script"===c&&b.text!==a.text&&(b.text=a.text),b.removeAttribute($.expando))}function o(a){return"undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName("*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll("*"):[]}function p(a){Xb.test(a.type)&&(a.defaultChecked=a.checked)}function q(a,b){if(b in a)return b;for(var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=rc.length;e--;)if(b=rc[e]+c,b in a)return b;return d}function r(a,b){return a=b||a,"none"===$.css(a,"display")||!$.contains(a.ownerDocument,a)}function s(a,b){for(var c,d,e=[],f=0,g=a.length;g>f;f++)c=a[f],c.style&&(e[f]=$._data(c,"olddisplay"),b?(e[f]||"none"!==c.style.display||(c.style.display=""),""===c.style.display&&r(c)&&(e[f]=$._data(c,"olddisplay",w(c.nodeName)))):(d=cc(c,"display"),e[f]||"none"===d||$._data(c,"olddisplay",d)));for(f=0;g>f;f++)c=a[f],c.style&&(b&&"none"!==c.style.display&&""!==c.style.display||(c.style.display=b?e[f]||"":"none"));return a}function t(a,b,c){var d=kc.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function u(a,b,c,d){for(var e=c===(d?"border":"content")?4:"width"===b?1:0,f=0;4>e;e+=2)"margin"===c&&(f+=$.css(a,c+qc[e],!0)),d?("content"===c&&(f-=parseFloat(cc(a,"padding"+qc[e]))||0),"margin"!==c&&(f-=parseFloat(cc(a,"border"+qc[e]+"Width"))||0)):(f+=parseFloat(cc(a,"padding"+qc[e]))||0,"padding"!==c&&(f+=parseFloat(cc(a,"border"+qc[e]+"Width"))||0));return f}function v(a,b,c){var d="width"===b?a.offsetWidth:a.offsetHeight,e=!0,f=$.support.boxSizing&&"border-box"===$.css(a,"boxSizing");if(0>=d||null==d){if(d=cc(a,b),(0>d||null==d)&&(d=a.style[b]),lc.test(d))return d;e=f&&($.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+u(a,b,c||(f?"border":"content"),e)+"px"}function w(a){if(nc[a])return nc[a];var b=$("<"+a+">").appendTo(P.body),c=b.css("display");return b.remove(),("none"===c||""===c)&&(dc=P.body.appendChild(dc||$.extend(P.createElement("iframe"),{frameBorder:0,width:0,height:0})),ec&&dc.createElement||(ec=(dc.contentWindow||dc.contentDocument).document,ec.write("<!doctype html><html><body>"),ec.close()),b=ec.body.appendChild(ec.createElement(a)),c=cc(b,"display"),P.body.removeChild(dc)),nc[a]=c,c}function x(a,b,c,d){var e;if($.isArray(b))$.each(b,function(b,e){c||uc.test(a)?d(a,e):x(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==$.type(b))d(a,b);else for(e in b)x(a+"["+e+"]",b[e],c,d)}function y(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(bb),h=0,i=g.length;if($.isFunction(c))for(;i>h;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function z(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;for(var h,i=a[f],j=0,k=i?i.length:0,l=a===Kc;k>j&&(l||!h);j++)h=i[j](c,d,e),"string"==typeof h&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=z(a,c,d,e,h,g)));return!l&&h||g["*"]||(h=z(a,c,d,e,"*",g)),h}function A(a,c){var d,e,f=$.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&$.extend(!0,a,e)}function B(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);for(;"*"===j[0];)j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}return g?(g!==j[0]&&j.unshift(g),d[g]):void 0}function C(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;if(a.dataFilter&&(b=a.dataFilter(b,a.dataType)),g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if("*"!==e){if("*"!==h&&h!==e){if(c=i[h+" "+e]||i["* "+e],!c)for(d in i)if(f=d.split(" "),f[1]===e&&(c=i[h+" "+f[0]]||i["* "+f[0]])){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function D(){try{return new a.XMLHttpRequest}catch(b){}}function E(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function F(){return setTimeout(function(){Vc=b},0),Vc=$.now()}function G(a,b){$.each(b,function(b,c){for(var d=(_c[b]||[]).concat(_c["*"]),e=0,f=d.length;f>e;e++)if(d[e].call(a,b,c))return})}function H(a,b,c){var d,e=0,f=$c.length,g=$.Deferred().always(function(){delete h.elem}),h=function(){for(var b=Vc||F(),c=Math.max(0,i.startTime+i.duration-b),d=c/i.duration||0,e=1-d,f=0,h=i.tweens.length;h>f;f++)i.tweens[f].run(e);return g.notifyWith(a,[i,e,c]),1>e&&h?c:(g.resolveWith(a,[i]),!1)},i=g.promise({elem:a,props:$.extend({},b),opts:$.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Vc||F(),duration:c.duration,tweens:[],createTween:function(b,c){var d=$.Tween(a,i.opts,b,c,i.opts.specialEasing[b]||i.opts.easing);return i.tweens.push(d),d},stop:function(b){for(var c=0,d=b?i.tweens.length:0;d>c;c++)i.tweens[c].run(1);return b?g.resolveWith(a,[i,b]):g.rejectWith(a,[i,b]),this}}),j=i.props;for(I(j,i.opts.specialEasing);f>e;e++)if(d=$c[e].call(i,a,j,i.opts))return d;return G(i,j),$.isFunction(i.opts.start)&&i.opts.start.call(a,i),$.fx.timer($.extend(h,{anim:i,queue:i.opts.queue,elem:a})),i.progress(i.opts.progress).done(i.opts.done,i.opts.complete).fail(i.opts.fail).always(i.opts.always)}function I(a,b){var c,d,e,f,g;for(c in a)if(d=$.camelCase(c),e=b[d],f=a[c],$.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=$.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 J(a,b,c){var d,e,f,g,h,i,j,k,l,m=this,n=a.style,o={},p=[],q=a.nodeType&&r(a);c.queue||(k=$._queueHooks(a,"fx"),null==k.unqueued&&(k.unqueued=0,l=k.empty.fire,k.empty.fire=function(){k.unqueued||l()}),k.unqueued++,m.always(function(){m.always(function(){k.unqueued--,$.queue(a,"fx").length||k.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[n.overflow,n.overflowX,n.overflowY],"inline"===$.css(a,"display")&&"none"===$.css(a,"float")&&($.support.inlineBlockNeedsLayout&&"inline"!==w(a.nodeName)?n.zoom=1:n.display="inline-block")),c.overflow&&(n.overflow="hidden",$.support.shrinkWrapBlocks||m.done(function(){n.overflow=c.overflow[0],n.overflowX=c.overflow[1],n.overflowY=c.overflow[2]}));for(d in b)if(f=b[d],Xc.exec(f)){if(delete b[d],i=i||"toggle"===f,f===(q?"hide":"show"))continue;p.push(d)}if(g=p.length){h=$._data(a,"fxshow")||$._data(a,"fxshow",{}),"hidden"in h&&(q=h.hidden),i&&(h.hidden=!q),q?$(a).show():m.done(function(){$(a).hide()}),m.done(function(){var b;$.removeData(a,"fxshow",!0);for(b in o)$.style(a,b,o[b])});for(d=0;g>d;d++)e=p[d],j=m.createTween(e,q?h[e]:0),o[e]=h[e]||$.style(a,e),e in h||(h[e]=j.start,q&&(j.end=j.start,j.start="width"===e||"height"===e?1:0))}}function K(a,b,c,d,e){return new K.prototype.init(a,b,c,d,e)}function L(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=qc[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function M(a){return $.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}var N,O,P=a.document,Q=a.location,R=a.navigator,S=a.jQuery,T=a.$,U=Array.prototype.push,V=Array.prototype.slice,W=Array.prototype.indexOf,X=Object.prototype.toString,Y=Object.prototype.hasOwnProperty,Z=String.prototype.trim,$=function(a,b){return new $.fn.init(a,b,N)},_=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,ab=/\S/,bb=/\s+/,cb=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,db=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,eb=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,fb=/^[\],:{}\s]*$/,gb=/(?:^|:|,)(?:\s*\[)+/g,hb=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,ib=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,jb=/^-ms-/,kb=/-([\da-z])/gi,lb=function(a,b){return(b+"").toUpperCase()},mb=function(){P.addEventListener?(P.removeEventListener("DOMContentLoaded",mb,!1),$.ready()):"complete"===P.readyState&&(P.detachEvent("onreadystatechange",mb),$.ready())},nb={};$.fn=$.prototype={constructor:$,init:function(a,c,d){var e,f,g;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:db.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1])return c=c instanceof $?c[0]:c,g=c&&c.nodeType?c.ownerDocument||c:P,a=$.parseHTML(e[1],g,!0),eb.test(e[1])&&$.isPlainObject(c)&&this.attr.call(a,c,!0),$.merge(this,a);if(f=P.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=P,this.selector=a,this}return $.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),$.makeArray(a,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return V.call(this)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=$.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,"find"===b?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return $.each(this,a,b)},ready:function(a){return $.ready.promise().done(a),this},eq:function(a){return a=+a,-1===a?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(V.apply(this,arguments),"slice",V.call(arguments).join(","))},map:function(a){return this.pushStack($.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:U,sort:[].sort,splice:[].splice},$.fn.init.prototype=$.fn,$.extend=$.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[1]||{},i=2),"object"==typeof h||$.isFunction(h)||(h={}),j===i&&(h=this,--i);j>i;i++)if(null!=(a=arguments[i]))for(c in a)d=h[c],e=a[c],h!==e&&(k&&e&&($.isPlainObject(e)||(f=$.isArray(e)))?(f?(f=!1,g=d&&$.isArray(d)?d:[]):g=d&&$.isPlainObject(d)?d:{},h[c]=$.extend(k,g,e)):e!==b&&(h[c]=e));return h},$.extend({noConflict:function(b){return a.$===$&&(a.$=T),b&&a.jQuery===$&&(a.jQuery=S),$},isReady:!1,readyWait:1,holdReady:function(a){a?$.readyWait++:$.ready(!0)},ready:function(a){if(a===!0?!--$.readyWait:!$.isReady){if(!P.body)return setTimeout($.ready,1);$.isReady=!0,a!==!0&&--$.readyWait>0||(O.resolveWith(P,[$]),$.fn.trigger&&$(P).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===$.type(a)},isArray:Array.isArray||function(a){return"array"===$.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):nb[X.call(a)]||"object"},isPlainObject:function(a){if(!a||"object"!==$.type(a)||a.nodeType||$.isWindow(a))return!1;try{if(a.constructor&&!Y.call(a,"constructor")&&!Y.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||Y.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return a&&"string"==typeof a?("boolean"==typeof b&&(c=b,b=0),b=b||P,(d=eb.exec(a))?[b.createElement(d[1])]:(d=$.buildFragment([a],b,c?null:[]),$.merge([],(d.cacheable?$.clone(d.fragment):d.fragment).childNodes))):null},parseJSON:function(b){return b&&"string"==typeof b?(b=$.trim(b),a.JSON&&a.JSON.parse?a.JSON.parse(b):fb.test(b.replace(hb,"@").replace(ib,"]").replace(gb,""))?new Function("return "+b)():($.error("Invalid JSON: "+b),void 0)):null},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||$.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&ab.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(jb,"ms-").replace(kb,lb)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||$.isFunction(a);if(d)if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;g>f&&c.apply(a[f++],d)!==!1;);else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;g>f&&c.call(a[f],f,a[f++])!==!1;);return a},trim:Z&&!Z.call("\ufeff\xa0")?function(a){return null==a?"":Z.call(a)}:function(a){return null==a?"":(a+"").replace(cb,"")},makeArray:function(a,b){var c,d=b||[];return null!=a&&(c=$.type(a),null==a.length||"string"===c||"function"===c||"regexp"===c||$.isWindow(a)?U.call(d,a):$.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(W)return W.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,c){var d=c.length,e=a.length,f=0;if("number"==typeof d)for(;d>f;f++)a[e++]=c[f];else for(;c[f]!==b;)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;for(c=!!c;g>f;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof $||i!==b&&"number"==typeof i&&(i>0&&a[0]&&a[i-1]||0===i||$.isArray(a));if(j)for(;i>h;h++)e=c(a[h],h,d),null!=e&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),null!=e&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return"string"==typeof c&&(d=a[c],c=a,a=d),$.isFunction(a)?(e=V.call(arguments,2),f=function(){return a.apply(c,e.concat(V.call(arguments)))},f.guid=a.guid=a.guid||$.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=null==d,k=0,l=a.length;if(d&&"object"==typeof d){for(k in d)$.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){if(i=h===b&&$.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call($(a),c)}):(c.call(a,e),c=null)),c)for(;l>k;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),$.ready.promise=function(b){if(!O)if(O=$.Deferred(),"complete"===P.readyState)setTimeout($.ready,1);else if(P.addEventListener)P.addEventListener("DOMContentLoaded",mb,!1),a.addEventListener("load",$.ready,!1);else{P.attachEvent("onreadystatechange",mb),a.attachEvent("onload",$.ready);var c=!1;try{c=null==a.frameElement&&P.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!$.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}$.ready()}}()}return O.promise(b)},$.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){nb["[object "+b+"]"]=b.toLowerCase()}),N=$(P);var ob={};$.Callbacks=function(a){a="string"==typeof a?ob[a]||c(a):$.extend({},a);var d,e,f,g,h,i,j=[],k=!a.once&&[],l=function(b){for(d=a.memory&&b,e=!0,i=g||0,g=0,h=j.length,f=!0;j&&h>i;i++)if(j[i].apply(b[0],b[1])===!1&&a.stopOnFalse){d=!1;break}f=!1,j&&(k?k.length&&l(k.shift()):d?j=[]:m.disable())},m={add:function(){if(j){var b=j.length;!function c(b){$.each(b,function(b,d){var e=$.type(d);"function"===e?a.unique&&m.has(d)||j.push(d):d&&d.length&&"string"!==e&&c(d)})}(arguments),f?h=j.length:d&&(g=b,l(d))}return this},remove:function(){return j&&$.each(arguments,function(a,b){for(var c;(c=$.inArray(b,j,c))>-1;)j.splice(c,1),f&&(h>=c&&h--,i>=c&&i--)}),this},has:function(a){return $.inArray(a,j)>-1},empty:function(){return j=[],this},disable:function(){return j=k=d=b,this},disabled:function(){return!j},lock:function(){return k=b,d||m.disable(),this},locked:function(){return!k},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],!j||e&&!k||(f?k.push(b):l(b)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!e}};return m},$.extend({Deferred:function(a){var b=[["resolve","done",$.Callbacks("once memory"),"resolved"],["reject","fail",$.Callbacks("once memory"),"rejected"],["notify","progress",$.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return $.Deferred(function(c){$.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]]($.isFunction(g)?function(){var a=g.apply(this,arguments);a&&$.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return null!=a?$.extend(a,d):d}},e={};return d.pipe=d.then,$.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]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=V.call(arguments),g=f.length,h=1!==g||a&&$.isFunction(a.promise)?g:0,i=1===h?a:$.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?V.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);g>e;e++)f[e]&&$.isFunction(f[e].promise)?f[e].promise().done(j(e,d,f)).fail(i.reject).progress(j(e,c,b)):--h;return h||i.resolveWith(d,f),i.promise()}}),$.support=function(){var b,c,d,e,f,g,h,i,j,k,l,m=P.createElement("div");if(m.setAttribute("className","t"),m.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=m.getElementsByTagName("*"),d=m.getElementsByTagName("a")[0],!c||!d||!c.length)return{};e=P.createElement("select"),f=e.appendChild(P.createElement("option")),g=m.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b={leadingWhitespace:3===m.firstChild.nodeType,tbody:!m.getElementsByTagName("tbody").length,htmlSerialize:!!m.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:"on"===g.value,optSelected:f.selected,getSetAttribute:"t"!==m.className,enctype:!!P.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==P.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===P.compatMode,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},g.checked=!0,b.noCloneChecked=g.cloneNode(!0).checked,e.disabled=!0,b.optDisabled=!f.disabled;try{delete m.test}catch(n){b.deleteExpando=!1}if(!m.addEventListener&&m.attachEvent&&m.fireEvent&&(m.attachEvent("onclick",l=function(){b.noCloneEvent=!1}),m.cloneNode(!0).fireEvent("onclick"),m.detachEvent("onclick",l)),g=P.createElement("input"),g.value="t",g.setAttribute("type","radio"),b.radioValue="t"===g.value,g.setAttribute("checked","checked"),g.setAttribute("name","t"),m.appendChild(g),h=P.createDocumentFragment(),h.appendChild(m.lastChild),b.checkClone=h.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=g.checked,h.removeChild(g),h.appendChild(m),m.attachEvent)for(j in{submit:!0,change:!0,focusin:!0})i="on"+j,k=i in m,k||(m.setAttribute(i,"return;"),k="function"==typeof m[i]),b[j+"Bubbles"]=k;return $(function(){var c,d,e,f,g="padding:0;margin:0;border:0;display:block;overflow:hidden;",h=P.getElementsByTagName("body")[0];h&&(c=P.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",h.insertBefore(c,h.firstChild),d=P.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",e=d.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",k=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",b.reliableHiddenOffsets=k&&0===e[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=4===d.offsetWidth,b.doesNotIncludeMarginInBodyOffset=1!==h.offsetTop,a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(d,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(d,null)||{width:"4px"}).width,f=P.createElement("div"),f.style.cssText=d.style.cssText=g,f.style.marginRight=f.style.width="0",d.style.width="1px",d.appendChild(f),b.reliableMarginRight=!parseFloat((a.getComputedStyle(f,null)||{}).marginRight)),"undefined"!=typeof d.style.zoom&&(d.innerHTML="",d.style.cssText=g+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==d.offsetWidth,c.style.zoom=1),h.removeChild(c),c=d=e=f=null)}),h.removeChild(m),c=d=e=f=g=h=m=null,b}();var pb=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,qb=/([A-Z])/g;$.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+($.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?$.cache[a[$.expando]]:a[$.expando],!!a&&!e(a)},data:function(a,c,d,e){if($.acceptData(a)){var f,g,h=$.expando,i="string"==typeof c,j=a.nodeType,k=j?$.cache:a,l=j?a[h]:a[h]&&h;if(l&&k[l]&&(e||k[l].data)||!i||d!==b)return l||(j?a[h]=l=$.deletedIds.pop()||$.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=$.noop)),("object"==typeof c||"function"==typeof c)&&(e?k[l]=$.extend(k[l],c):k[l].data=$.extend(k[l].data,c)),f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[$.camelCase(c)]=d),i?(g=f[c],null==g&&(g=f[$.camelCase(c)])):g=f,g}},removeData:function(a,b,c){if($.acceptData(a)){var d,f,g,h=a.nodeType,i=h?$.cache:a,j=h?a[$.expando]:$.expando;if(i[j]){if(b&&(d=c?i[j]:i[j].data)){$.isArray(b)||(b in d?b=[b]:(b=$.camelCase(b),b=b in d?[b]:b.split(" ")));for(f=0,g=b.length;g>f;f++)delete d[b[f]];if(!(c?e:$.isEmptyObject)(d))return}(c||(delete i[j].data,e(i[j])))&&(h?$.cleanData([a],!0):$.support.deleteExpando||i!=i.window?delete i[j]:i[j]=null)}}},_data:function(a,b,c){return $.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&$.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),$.fn.extend({data:function(a,c){var e,f,g,h,i,j=this[0],k=0,l=null;if(a===b){if(this.length&&(l=$.data(j),1===j.nodeType&&!$._data(j,"parsedAttrs"))){for(g=j.attributes,i=g.length;i>k;k++)h=g[k].name,h.indexOf("data-")||(h=$.camelCase(h.substring(5)),d(j,h,l[h]));$._data(j,"parsedAttrs",!0)}return l}return"object"==typeof a?this.each(function(){$.data(this,a)}):(e=a.split(".",2),e[1]=e[1]?"."+e[1]:"",f=e[1]+"!",$.access(this,function(c){return c===b?(l=this.triggerHandler("getData"+f,[e[0]]),l===b&&j&&(l=$.data(j,a),l=d(j,a,l)),l===b&&e[1]?this.data(e[0]):l):(e[1]=c,this.each(function(){var b=$(this);b.triggerHandler("setData"+f,e),$.data(this,a,c),b.triggerHandler("changeData"+f,e)}),void 0)},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){$.removeData(this,a)})}}),$.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=$._data(a,b),c&&(!d||$.isArray(c)?d=$._data(a,b,$.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=$.queue(a,b),d=c.length,e=c.shift(),f=$._queueHooks(a,b),g=function(){$.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 $._data(a,c)||$._data(a,c,{empty:$.Callbacks("once memory").add(function(){$.removeData(a,b+"queue",!0),$.removeData(a,c,!0)})})}}),$.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length<d?$.queue(this[0],a):c===b?this:this.each(function(){var b=$.queue(this,a,c);$._queueHooks(this,a),"fx"===a&&"inprogress"!==b[0]&&$.dequeue(this,a)})},dequeue:function(a){return this.each(function(){$.dequeue(this,a)})},delay:function(a,b){return a=$.fx?$.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=$.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};for("string"!=typeof a&&(c=a,a=b),a=a||"fx";h--;)d=$._data(g[h],a+"queueHooks"),d&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var rb,sb,tb,ub=/[\t\r\n]/g,vb=/\r/g,wb=/^(?:button|input)$/i,xb=/^(?:button|input|object|select|textarea)$/i,yb=/^a(?:rea|)$/i,zb=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Ab=$.support.getSetAttribute;$.fn.extend({attr:function(a,b){return $.access(this,$.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){$.removeAttr(this,a)})},prop:function(a,b){return $.access(this,$.prop,a,b,arguments.length>1)},removeProp:function(a){return a=$.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if($.isFunction(a))return this.each(function(b){$(this).addClass(a.call(this,b,this.className))});if(a&&"string"==typeof a)for(b=a.split(bb),c=0,d=this.length;d>c;c++)if(e=this[c],1===e.nodeType)if(e.className||1!==b.length){for(f=" "+e.className+" ",g=0,h=b.length;h>g;g++)f.indexOf(" "+b[g]+" ")<0&&(f+=b[g]+" ");e.className=$.trim(f)}else e.className=a;return this},removeClass:function(a){var c,d,e,f,g,h,i;if($.isFunction(a))return this.each(function(b){$(this).removeClass(a.call(this,b,this.className))});if(a&&"string"==typeof a||a===b)for(c=(a||"").split(bb),h=0,i=this.length;i>h;h++)if(e=this[h],1===e.nodeType&&e.className){for(d=(" "+e.className+" ").replace(ub," "),f=0,g=c.length;g>f;f++)for(;d.indexOf(" "+c[f]+" ")>=0;)d=d.replace(" "+c[f]+" "," ");e.className=a?$.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a,d="boolean"==typeof b;return $.isFunction(a)?this.each(function(c){$(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var e,f=0,g=$(this),h=b,i=a.split(bb);e=i[f++];)h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e);else("undefined"===c||"boolean"===c)&&(this.className&&$._data(this,"__className__",this.className),this.className=this.className||a===!1?"":$._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(ub," ").indexOf(b)>=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=$.isFunction(a),this.each(function(d){var f,g=$(this);1===this.nodeType&&(f=e?a.call(this,d,g.val()):a,null==f?f="":"number"==typeof f?f+="":$.isArray(f)&&(f=$.map(f,function(a){return null==a?"":a+""})),c=$.valHooks[this.type]||$.valHooks[this.nodeName.toLowerCase()],c&&"set"in c&&c.set(this,f,"value")!==b||(this.value=f))});if(f)return c=$.valHooks[f.type]||$.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,"string"==typeof d?d.replace(vb,""):null==d?"":d)}}}),$.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},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||($.support.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&$.nodeName(c.parentNode,"optgroup"))){if(b=$(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c=$.makeArray(b);return $(a).find("option").each(function(){this.selected=$.inArray($(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(a&&3!==i&&8!==i&&2!==i)return e&&$.isFunction($.fn[c])?$(a)[c](d):"undefined"==typeof a.getAttribute?$.prop(a,c,d):(h=1!==i||!$.isXMLDoc(a),h&&(c=c.toLowerCase(),g=$.attrHooks[c]||(zb.test(c)?sb:rb)),d!==b?null===d?($.removeAttr(a,c),void 0):g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d):g&&"get"in g&&h&&null!==(f=g.get(a,c))?f:(f=a.getAttribute(c),null===f?b:f))},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&1===a.nodeType)for(d=b.split(bb);g<d.length;g++)e=d[g],e&&(c=$.propFix[e]||e,f=zb.test(e),f||$.attr(a,e,""),a.removeAttribute(Ab?e:c),f&&c in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(wb.test(a.nodeName)&&a.parentNode)$.error("type property can't be changed");else if(!$.support.radioValue&&"radio"===b&&$.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return rb&&$.nodeName(a,"button")?rb.get(a,b):b in a?a.value:null},set:function(a,b,c){return rb&&$.nodeName(a,"button")?rb.set(a,b,c):(a.value=b,void 0)}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!$.isXMLDoc(a),g&&(c=$.propFix[c]||c,f=$.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):xb.test(a.nodeName)||yb.test(a.nodeName)&&a.href?0:b}}}}),sb={get:function(a,c){var d,e=$.prop(a,c);return e===!0||"boolean"!=typeof e&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?$.removeAttr(a,c):(d=$.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},Ab||(tb={name:!0,id:!0,coords:!0},rb=$.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(tb[c]?""!==d.value:d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=P.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},$.each(["width","height"],function(a,b){$.attrHooks[b]=$.extend($.attrHooks[b],{set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0 }})}),$.attrHooks.contenteditable={get:rb.get,set:function(a,b,c){""===b&&(b="false"),rb.set(a,b,c)}}),$.support.hrefNormalized||$.each(["href","src","width","height"],function(a,c){$.attrHooks[c]=$.extend($.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return null===d?b:d}})}),$.support.style||($.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=b+""}}),$.support.optSelected||($.propHooks.selected=$.extend($.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),$.support.enctype||($.propFix.enctype="encoding"),$.support.checkOn||$.each(["radio","checkbox"],function(){$.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}}),$.each(["radio","checkbox"],function(){$.valHooks[this]=$.extend($.valHooks[this],{set:function(a,b){return $.isArray(b)?a.checked=$.inArray($(a).val(),b)>=0:void 0}})});var Bb=/^(?:textarea|input|select)$/i,Cb=/^([^\.]*|)(?:\.(.+)|)$/,Db=/(?:^|\s)hover(\.\S+|)\b/,Eb=/^key/,Fb=/^(?:mouse|contextmenu)|click/,Gb=/^(?:focusinfocus|focusoutblur)$/,Hb=function(a){return $.event.special.hover?a:a.replace(Db,"mouseenter$1 mouseleave$1")};$.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q;if(3!==a.nodeType&&8!==a.nodeType&&c&&d&&(g=$._data(a))){for(d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=$.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return"undefined"==typeof $||a&&$.event.triggered===a.type?b:$.event.dispatch.apply(h.elem,arguments)},h.elem=a),c=$.trim(Hb(c)).split(" "),j=0;j<c.length;j++)k=Cb.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),q=$.event.special[l]||{},l=(f?q.delegateType:q.bindType)||l,q=$.event.special[l]||{},n=$.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&$.expr.match.needsContext.test(f),namespace:m.join(".")},o),p=i[l],p||(p=i[l]=[],p.delegateCount=0,q.setup&&q.setup.call(a,e,m,h)!==!1||(a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h))),q.add&&(q.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?p.splice(p.delegateCount++,0,n):p.push(n),$.event.global[l]=!0;a=null}},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=$.hasData(a)&&$._data(a);if(q&&(m=q.events)){for(b=$.trim(Hb(b||"")).split(" "),f=0;f<b.length;f++)if(g=Cb.exec(b[f])||[],h=i=g[1],j=g[2],h){for(n=$.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null,l=0;l<o.length;l++)p=o[l],!e&&i!==p.origType||c&&c.guid!==p.guid||j&&!j.test(p.namespace)||d&&d!==p.selector&&("**"!==d||!p.selector)||(o.splice(l--,1),p.selector&&o.delegateCount--,n.remove&&n.remove.call(a,p));0===o.length&&k!==o.length&&(n.teardown&&n.teardown.call(a,j,q.handle)!==!1||$.removeEvent(a,h,q.handle),delete m[h])}else for(h in m)$.event.remove(a,h+b[f],c,d,!0);$.isEmptyObject(m)&&(delete q.handle,$.removeData(a,"events",!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,f){if(!e||3!==e.nodeType&&8!==e.nodeType){var g,h,i,j,k,l,m,n,o,p,q=c.type||c,r=[];if(!Gb.test(q+$.event.triggered)&&(q.indexOf("!")>=0&&(q=q.slice(0,-1),h=!0),q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),e&&!$.event.customEvent[q]||$.event.global[q]))if(c="object"==typeof c?c[$.expando]?c:new $.Event(q,c):new $.Event(q),c.type=q,c.isTrigger=!0,c.exclusive=h,c.namespace=r.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,l=q.indexOf(":")<0?"on"+q:"",e){if(c.result=b,c.target||(c.target=e),d=null!=d?$.makeArray(d):[],d.unshift(c),m=$.event.special[q]||{},!m.trigger||m.trigger.apply(e,d)!==!1){if(o=[[e,m.bindType||q]],!f&&!m.noBubble&&!$.isWindow(e)){for(p=m.delegateType||q,j=Gb.test(p+q)?e:e.parentNode,k=e;j;j=j.parentNode)o.push([j,p]),k=j;k===(e.ownerDocument||P)&&o.push([k.defaultView||k.parentWindow||a,p])}for(i=0;i<o.length&&!c.isPropagationStopped();i++)j=o[i][0],c.type=o[i][1],n=($._data(j,"events")||{})[c.type]&&$._data(j,"handle"),n&&n.apply(j,d),n=l&&j[l],n&&$.acceptData(j)&&n.apply&&n.apply(j,d)===!1&&c.preventDefault();return c.type=q,f||c.isDefaultPrevented()||m._default&&m._default.apply(e.ownerDocument,d)!==!1||"click"===q&&$.nodeName(e,"a")||!$.acceptData(e)||l&&e[q]&&("focus"!==q&&"blur"!==q||0!==c.target.offsetWidth)&&!$.isWindow(e)&&(k=e[l],k&&(e[l]=null),$.event.triggered=q,e[q](),$.event.triggered=b,k&&(e[l]=k)),c.result}}else{g=$.cache;for(i in g)g[i].events&&g[i].events[q]&&$.event.trigger(c,d,g[i].handle.elem,!0)}}},dispatch:function(c){c=$.event.fix(c||a.event);var d,e,f,g,h,i,j,k,l,m=($._data(this,"events")||{})[c.type]||[],n=m.delegateCount,o=V.call(arguments),p=!c.exclusive&&!c.namespace,q=$.event.special[c.type]||{},r=[];if(o[0]=c,c.delegateTarget=this,!q.preDispatch||q.preDispatch.call(this,c)!==!1){if(n&&(!c.button||"click"!==c.type))for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||"click"!==c.type){for(h={},j=[],d=0;n>d;d++)k=m[d],l=k.selector,h[l]===b&&(h[l]=k.needsContext?$(l,this).index(f)>=0:$.find(l,this,null,[f]).length),h[l]&&j.push(k);j.length&&r.push({elem:f,matches:j})}for(m.length>n&&r.push({elem:this,matches:m.slice(n)}),d=0;d<r.length&&!c.isPropagationStopped();d++)for(i=r[d],c.currentTarget=i.elem,e=0;e<i.matches.length&&!c.isImmediatePropagationStopped();e++)k=i.matches[e],(p||!c.namespace&&!k.namespace||c.namespace_re&&c.namespace_re.test(k.namespace))&&(c.data=k.data,c.handleObj=k,g=(($.event.special[k.origType]||{}).handle||k.handler).apply(i.elem,o),g!==b&&(c.result=g,g===!1&&(c.preventDefault(),c.stopPropagation())));return q.postDispatch&&q.postDispatch.call(this,c),c.result}},props:"attrChange attrName relatedNode srcElement 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,c){var d,e,f,g=c.button,h=c.fromElement;return null==a.pageX&&null!=c.clientX&&(d=a.target.ownerDocument||P,e=d.documentElement,f=d.body,a.pageX=c.clientX+(e&&e.scrollLeft||f&&f.scrollLeft||0)-(e&&e.clientLeft||f&&f.clientLeft||0),a.pageY=c.clientY+(e&&e.scrollTop||f&&f.scrollTop||0)-(e&&e.clientTop||f&&f.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?c.toElement:h),a.which||g===b||(a.which=1&g?1:2&g?3:4&g?2:0),a}},fix:function(a){if(a[$.expando])return a;var b,c,d=a,e=$.event.fixHooks[a.type]||{},f=e.props?this.props.concat(e.props):this.props;for(a=$.Event(d),b=f.length;b;)c=f[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||P),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,e.filter?e.filter(a,d):a},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){$.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=$.extend(new $.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?$.event.trigger(e,null,b):$.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},$.event.handle=$.event.dispatch,$.removeEvent=P.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&("undefined"==typeof a[d]&&(a[d]=null),a.detachEvent(d,c))},$.Event=function(a,b){return this instanceof $.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?g:f):this.type=a,b&&$.extend(this,b),this.timeStamp=a&&a.timeStamp||$.now(),this[$.expando]=!0,void 0):new $.Event(a,b)},$.Event.prototype={preventDefault:function(){this.isDefaultPrevented=g;var a=this.originalEvent;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=g;var a=this.originalEvent;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=g,this.stopPropagation()},isDefaultPrevented:f,isPropagationStopped:f,isImmediatePropagationStopped:f},$.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){$.event.special[a]={delegateType:b,bindType:b,handle:function(a){{var c,d=this,e=a.relatedTarget,f=a.handleObj;f.selector}return(!e||e!==d&&!$.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),$.support.submitBubbles||($.event.special.submit={setup:function(){return $.nodeName(this,"form")?!1:($.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=$.nodeName(c,"input")||$.nodeName(c,"button")?c.form:b;d&&!$._data(d,"_submit_attached")&&($.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),$._data(d,"_submit_attached",!0))}),void 0)},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&$.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return $.nodeName(this,"form")?!1:($.event.remove(this,"._submit"),void 0)}}),$.support.changeBubbles||($.event.special.change={setup:function(){return Bb.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&($.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),$.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),$.event.simulate("change",this,a,!0)})),!1):($.event.add(this,"beforeactivate._change",function(a){var b=a.target;Bb.test(b.nodeName)&&!$._data(b,"_change_attached")&&($.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||$.event.simulate("change",this.parentNode,a,!0)}),$._data(b,"_change_attached",!0))}),void 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 $.event.remove(this,"._change"),!Bb.test(this.nodeName)}}),$.support.focusinBubbles||$.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){$.event.simulate(b,a.target,$.event.fix(a),!0)};$.event.special[b]={setup:function(){0===c++&&P.addEventListener(a,d,!0)},teardown:function(){0===--c&&P.removeEventListener(a,d,!0)}}}),$.fn.extend({on:function(a,c,d,e,g){var h,i;if("object"==typeof a){"string"!=typeof c&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}if(null==d&&null==e?(e=c,d=c=b):null==e&&("string"==typeof c?(e=d,d=b):(e=d,d=c,c=b)),e===!1)e=f;else if(!e)return this;return 1===g&&(h=e,e=function(a){return $().off(a),h.apply(this,arguments)},e.guid=h.guid||(h.guid=$.guid++)),this.each(function(){$.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,g;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,$(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if("object"==typeof a){for(g in a)this.off(g,c,a[g]);return this}return(c===!1||"function"==typeof c)&&(d=c,c=b),d===!1&&(d=f),this.each(function(){$.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return $(this.context).on(a,this.selector,b,c),this},die:function(a,b){return $(this.context).off(a,this.selector||"**",b),this},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)},trigger:function(a,b){return this.each(function(){$.event.trigger(a,b,this)})},triggerHandler:function(a,b){return this[0]?$.event.trigger(a,b,this[0],!0):void 0},toggle:function(a){var b=arguments,c=a.guid||$.guid++,d=0,e=function(c){var e=($._data(this,"lastToggle"+a.guid)||0)%d;return $._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};for(e.guid=c;d<b.length;)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),$.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){$.fn[b]=function(a,c){return null==c&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Eb.test(b)&&($.event.fixHooks[b]=$.event.keyHooks),Fb.test(b)&&($.event.fixHooks[b]=$.event.mouseHooks)}),function(a,b){function c(a,b,c,d){c=c||[],b=b||F;var e,f,g,h,i=b.nodeType;if(!a||"string"!=typeof a)return c;if(1!==i&&9!==i)return[];if(g=v(b),!g&&!d&&(e=cb.exec(a)))if(h=e[1]){if(9===i){if(f=b.getElementById(h),!f||!f.parentNode)return c;if(f.id===h)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(h))&&w(b,f)&&f.id===h)return c.push(f),c}else{if(e[2])return K.apply(c,L.call(b.getElementsByTagName(a),0)),c;if((h=e[3])&&mb&&b.getElementsByClassName)return K.apply(c,L.call(b.getElementsByClassName(h),0)),c}return p(a.replace(Z,"$1"),b,c,d,g)}function d(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function e(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function f(a){return N(function(b){return b=+b,N(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function g(a,b,c){if(a===b)return c;for(var d=a.nextSibling;d;){if(d===b)return-1;d=d.nextSibling}return 1}function h(a,b){var d,e,f,g,h,i,j,k=Q[D][a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=t.preFilter;h;){(!d||(e=_.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),d=!1,(e=ab.exec(h))&&(f.push(d=new E(e.shift())),h=h.slice(d.length),d.type=e[0].replace(Z," "));for(g in t.filter)!(e=hb[g].exec(h))||j[g]&&!(e=j[g](e))||(f.push(d=new E(e.shift())),h=h.slice(d.length),d.type=g,d.matches=e);if(!d)break}return b?h.length:h?c.error(a):Q(a,i).slice(0)}function i(a,b,c){var d=b.dir,e=c&&"parentNode"===b.dir,f=I++;return b.first?function(b,c,f){for(;b=b[d];)if(e||1===b.nodeType)return a(b,c,f)}:function(b,c,g){if(g){for(;b=b[d];)if((e||1===b.nodeType)&&a(b,c,g))return b}else for(var h,i=H+" "+f+" ",j=i+r;b=b[d];)if(e||1===b.nodeType){if((h=b[D])===j)return b.sizset;if("string"==typeof h&&0===h.indexOf(i)){if(b.sizset)return b}else{if(b[D]=j,a(b,c,g))return b.sizset=!0,b;b.sizset=!1}}}}function j(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function k(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 l(a,b,c,d,e,f){return d&&!d[D]&&(d=l(d)),e&&!e[D]&&(e=l(e,f)),N(function(f,g,h,i){var j,l,m,n=[],p=[],q=g.length,r=f||o(b||"*",h.nodeType?[h]:h,[]),s=!a||!f&&b?r:k(r,n,a,h,i),t=c?e||(f?a:q||d)?[]:g:s;if(c&&c(s,t,h,i),d)for(j=k(t,p),d(j,[],h,i),l=j.length;l--;)(m=j[l])&&(t[p[l]]=!(s[p[l]]=m));if(f){if(e||a){if(e){for(j=[],l=t.length;l--;)(m=t[l])&&j.push(s[l]=m);e(null,t=[],j,i)}for(l=t.length;l--;)(m=t[l])&&(j=e?M.call(f,m):n[l])>-1&&(f[j]=!(g[j]=m))}}else t=k(t===g?t.splice(q,t.length):t),e?e(null,g,t,i):K.apply(g,t)})}function m(a){for(var b,c,d,e=a.length,f=t.relative[a[0].type],g=f||t.relative[" "],h=f?1:0,k=i(function(a){return a===b},g,!0),n=i(function(a){return M.call(b,a)>-1},g,!0),o=[function(a,c,d){return!f&&(d||c!==A)||((b=c).nodeType?k(a,c,d):n(a,c,d))}];e>h;h++)if(c=t.relative[a[h].type])o=[i(j(o),c)];else{if(c=t.filter[a[h].type].apply(null,a[h].matches),c[D]){for(d=++h;e>d&&!t.relative[a[d].type];d++);return l(h>1&&j(o),h>1&&a.slice(0,h-1).join("").replace(Z,"$1"),c,d>h&&m(a.slice(h,d)),e>d&&m(a=a.slice(d)),e>d&&a.join(""))}o.push(c)}return j(o)}function n(a,b){var d=b.length>0,e=a.length>0,f=function(g,h,i,j,l){var m,n,o,p=[],q=0,s="0",u=g&&[],v=null!=l,w=A,x=g||e&&t.find.TAG("*",l&&h.parentNode||h),y=H+=null==w?1:Math.E;for(v&&(A=h!==F&&h,r=f.el);null!=(m=x[s]);s++){if(e&&m){for(n=0;o=a[n];n++)if(o(m,h,i)){j.push(m);break}v&&(H=y,r=++f.el)}d&&((m=!o&&m)&&q--,g&&u.push(m))}if(q+=s,d&&s!==q){for(n=0;o=b[n];n++)o(u,p,h,i);if(g){if(q>0)for(;s--;)u[s]||p[s]||(p[s]=J.call(j));p=k(p)}K.apply(j,p),v&&!g&&p.length>0&&q+b.length>1&&c.uniqueSort(j)}return v&&(H=y,A=w),u};return f.el=0,d?N(f):f}function o(a,b,d){for(var e=0,f=b.length;f>e;e++)c(a,b[e],d);return d}function p(a,b,c,d,e){{var f,g,i,j,k,l=h(a);l.length}if(!d&&1===l.length){if(g=l[0]=l[0].slice(0),g.length>2&&"ID"===(i=g[0]).type&&9===b.nodeType&&!e&&t.relative[g[1].type]){if(b=t.find.ID(i.matches[0].replace(gb,""),b,e)[0],!b)return c;a=a.slice(g.shift().length)}for(f=hb.POS.test(a)?-1:g.length-1;f>=0&&(i=g[f],!t.relative[j=i.type]);f--)if((k=t.find[j])&&(d=k(i.matches[0].replace(gb,""),db.test(g[0].type)&&b.parentNode||b,e))){if(g.splice(f,1),a=d.length&&g.join(""),!a)return K.apply(c,L.call(d,0)),c;break}}return x(a,l)(d,b,e,c,db.test(a)),c}function q(){}var r,s,t,u,v,w,x,y,z,A,B=!0,C="undefined",D=("sizcache"+Math.random()).replace(".",""),E=String,F=a.document,G=F.documentElement,H=0,I=0,J=[].pop,K=[].push,L=[].slice,M=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},N=function(a,b){return a[D]=null==b||b,a},O=function(){var a={},b=[];return N(function(c,d){return b.push(c)>t.cacheLength&&delete a[b.shift()],a[c+" "]=d},a)},P=O(),Q=O(),R=O(),S="[\\x20\\t\\r\\n\\f]",T="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",U=T.replace("w","w#"),V="([*^$|!~]?=)",W="\\["+S+"*("+T+")"+S+"*(?:"+V+S+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+U+")|)|)"+S+"*\\]",X=":("+T+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+W+")|[^:]|\\\\.)*|.*))\\)|)",Y=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+S+"*((?:-\\d)?\\d*)"+S+"*\\)|)(?=[^-]|$)",Z=new RegExp("^"+S+"+|((?:^|[^\\\\])(?:\\\\.)*)"+S+"+$","g"),_=new RegExp("^"+S+"*,"+S+"*"),ab=new RegExp("^"+S+"*([\\x20\\t\\r\\n\\f>+~])"+S+"*"),bb=new RegExp(X),cb=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,db=/[\x20\t\r\n\f]*[+~]/,eb=/h\d/i,fb=/input|select|textarea|button/i,gb=/\\(?!\\)/g,hb={ID:new RegExp("^#("+T+")"),CLASS:new RegExp("^\\.("+T+")"),NAME:new RegExp("^\\[name=['\"]?("+T+")['\"]?\\]"),TAG:new RegExp("^("+T.replace("w","w*")+")"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+X),POS:new RegExp(Y,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+S+"*(even|odd|(([+-]|)(\\d*)n|)"+S+"*(?:([+-]|)"+S+"*(\\d+)|))"+S+"*\\)|)","i"),needsContext:new RegExp("^"+S+"*[>+~]|"+Y,"i")},ib=function(a){var b=F.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},jb=ib(function(a){return a.appendChild(F.createComment("")),!a.getElementsByTagName("*").length}),kb=ib(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==C&&"#"===a.firstChild.getAttribute("href")}),lb=ib(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),mb=ib(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",a.getElementsByClassName&&a.getElementsByClassName("e").length?(a.lastChild.className="e",2===a.getElementsByClassName("e").length):!1}),nb=ib(function(a){a.id=D+0,a.innerHTML="<a name='"+D+"'></a><div name='"+D+"'></div>",G.insertBefore(a,G.firstChild);var b=F.getElementsByName&&F.getElementsByName(D).length===2+F.getElementsByName(D+0).length;return s=!F.getElementById(D),G.removeChild(a),b});try{L.call(G.childNodes,0)[0].nodeType}catch(ob){L=function(a){for(var b,c=[];b=this[a];a++)c.push(b);return c}}c.matches=function(a,b){return c(a,null,null,b)},c.matchesSelector=function(a,b){return c(b,null,null,[a]).length>0},u=c.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=u(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=u(b);return c},v=c.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},w=c.contains=G.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))}:G.compareDocumentPosition?function(a,b){return b&&!!(16&a.compareDocumentPosition(b))}:function(a,b){for(;b=b.parentNode;)if(b===a)return!0;return!1},c.attr=function(a,b){var c,d=v(a);return d||(b=b.toLowerCase()),(c=t.attrHandle[b])?c(a):d||lb?a.getAttribute(b):(c=a.getAttributeNode(b),c?"boolean"==typeof a[b]?a[b]?b:null:c.specified?c.value:null:null)},t=c.selectors={cacheLength:50,createPseudo:N,match:hb,attrHandle:kb?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:s?function(a,b,c){if(typeof b.getElementById!==C&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==C&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==C&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:jb?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c=b.getElementsByTagName(a);if("*"===a){for(var d,e=[],f=0;d=c[f];f++)1===d.nodeType&&e.push(d);return e}return c},NAME:nb&&function(a,b){return typeof b.getElementsByName!==C?b.getElementsByName(name):void 0},CLASS:mb&&function(a,b,c){return typeof b.getElementsByClassName===C||c?void 0:b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(gb,""),a[3]=(a[4]||a[5]||"").replace(gb,""),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1]?(a[2]||c.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*("even"===a[2]||"odd"===a[2])),a[4]=+(a[6]+a[7]||"odd"===a[2])):a[2]&&c.error(a[0]),a},PSEUDO:function(a){var b,c;return hb.CHILD.test(a[0])?null:(a[3]?a[2]=a[3]:(b=a[4])&&(bb.test(b)&&(c=h(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b),a.slice(0,3))}},filter:{ID:s?function(a){return a=a.replace(gb,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(gb,""),function(b){var c=typeof b.getAttributeNode!==C&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return"*"===a?function(){return!0}:(a=a.replace(gb,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=P[D][a+" "];return b||(b=new RegExp("(^|"+S+")"+a+"("+S+"|$)"))&&P(a,function(a){return b.test(a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,d){return function(e){var f=c.attr(e,a);return null==f?"!="===b:b?(f+="","="===b?f===d:"!="===b?f!==d:"^="===b?d&&0===f.indexOf(d):"*="===b?d&&f.indexOf(d)>-1:"$="===b?d&&f.substr(f.length-d.length)===d:"~="===b?(" "+f+" ").indexOf(d)>-1:"|="===b?f===d||f.substr(0,d.length+1)===d+"-":!1):!0}},CHILD:function(a,b,c,d){return"nth"===a?function(a){var b,e,f=a.parentNode;if(1===c&&0===d)return!0;if(f)for(e=0,b=f.firstChild;b&&(1!==b.nodeType||(e++,a!==b));b=b.nextSibling);return e-=d,e===c||e%c===0&&e/c>=0}:function(b){var c=b;switch(a){case"only":case"first":for(;c=c.previousSibling;)if(1===c.nodeType)return!1;if("first"===a)return!0;c=b;case"last":for(;c=c.nextSibling;)if(1===c.nodeType)return!1;return!0}}},PSEUDO:function(a,b){var d,e=t.pseudos[a]||t.setFilters[a.toLowerCase()]||c.error("unsupported pseudo: "+a);return e[D]?e(b):e.length>1?(d=[a,a,"",b],t.setFilters.hasOwnProperty(a.toLowerCase())?N(function(a,c){for(var d,f=e(a,b),g=f.length;g--;)d=M.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,d)}):e}},pseudos:{not:N(function(a){var b=[],c=[],d=x(a.replace(Z,"$1"));return d[D]?N(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;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:N(function(a){return function(b){return c(a,b).length>0}}),contains:N(function(a){return function(b){return(b.textContent||b.innerText||u(b)).indexOf(a)>-1}}),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},parent:function(a){return!t.pseudos.empty(a)},empty:function(a){var b;for(a=a.firstChild;a;){if(a.nodeName>"@"||3===(b=a.nodeType)||4===b)return!1;a=a.nextSibling}return!0},header:function(a){return eb.test(a.nodeName)},text:function(a){var b,c;return"input"===a.nodeName.toLowerCase()&&"text"===(b=a.type)&&(null==(c=a.getAttribute("type"))||c.toLowerCase()===b)},radio:d("radio"),checkbox:d("checkbox"),file:d("file"),password:d("password"),image:d("image"),submit:e("submit"),reset:e("reset"),button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},input:function(a){return fb.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},active:function(a){return a===a.ownerDocument.activeElement},first:f(function(){return[0]}),last:f(function(a,b){return[b-1]}),eq:f(function(a,b,c){return[0>c?c+b:c]}),even:f(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:f(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:f(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:f(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},y=G.compareDocumentPosition?function(a,b){return a===b?(z=!0,0):(a.compareDocumentPosition&&b.compareDocumentPosition?4&a.compareDocumentPosition(b):a.compareDocumentPosition)?-1:1}:function(a,b){if(a===b)return z=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return g(a,b);if(!h)return-1;if(!i)return 1;for(;j;)e.unshift(j),j=j.parentNode;for(j=i;j;)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;c>k&&d>k;k++)if(e[k]!==f[k])return g(e[k],f[k]);return k===c?g(a,f[k],-1):g(e[k],b,1)},[0,0].sort(y),B=!z,c.uniqueSort=function(a){var b,c=[],d=1,e=0;if(z=B,a.sort(y),z){for(;b=a[d];d++)b===a[d-1]&&(e=c.push(d));for(;e--;)a.splice(c[e],1)}return a},c.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},x=c.compile=function(a,b){var c,d=[],e=[],f=R[D][a+" "];if(!f){for(b||(b=h(a)),c=b.length;c--;)f=m(b[c]),f[D]?d.push(f):e.push(f);f=R(a,n(e,d))}return f},F.querySelectorAll&&!function(){var a,b=p,d=/'|\\/g,e=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,f=[":focus"],g=[":active"],i=G.matchesSelector||G.mozMatchesSelector||G.webkitMatchesSelector||G.oMatchesSelector||G.msMatchesSelector;ib(function(a){a.innerHTML="<select><option selected=''></option></select>",a.querySelectorAll("[selected]").length||f.push("\\["+S+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||f.push(":checked")}),ib(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&f.push("[*^$]="+S+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'/>",a.querySelectorAll(":enabled").length||f.push(":enabled",":disabled")}),f=new RegExp(f.join("|")),p=function(a,c,e,g,i){if(!g&&!i&&!f.test(a)){var j,k,l=!0,m=D,n=c,o=9===c.nodeType&&a;if(1===c.nodeType&&"object"!==c.nodeName.toLowerCase()){for(j=h(a),(l=c.getAttribute("id"))?m=l.replace(d,"\\$&"):c.setAttribute("id",m),m="[id='"+m+"'] ",k=j.length;k--;)j[k]=m+j[k].join("");n=db.test(a)&&c.parentNode||c,o=j.join(",")}if(o)try{return K.apply(e,L.call(n.querySelectorAll(o),0)),e}catch(p){}finally{l||c.removeAttribute("id")}}return b(a,c,e,g,i)},i&&(ib(function(b){a=i.call(b,"div");try{i.call(b,"[test!='']:sizzle"),g.push("!=",X)}catch(c){}}),g=new RegExp(g.join("|")),c.matchesSelector=function(b,d){if(d=d.replace(e,"='$1']"),!v(b)&&!g.test(d)&&!f.test(d))try{var h=i.call(b,d);if(h||a||b.document&&11!==b.document.nodeType)return h}catch(j){}return c(d,null,null,[b]).length>0})}(),t.pseudos.nth=t.pseudos.eq,t.filters=q.prototype=t.pseudos,t.setFilters=new q,c.attr=$.attr,$.find=c,$.expr=c.selectors,$.expr[":"]=$.expr.pseudos,$.unique=c.uniqueSort,$.text=c.getText,$.isXMLDoc=c.isXML,$.contains=c.contains}(a);var Ib=/Until$/,Jb=/^(?:parents|prev(?:Until|All))/,Kb=/^.[^:#\[\.,]*$/,Lb=$.expr.match.needsContext,Mb={children:!0,contents:!0,next:!0,prev:!0};$.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if("string"!=typeof a)return $(a).filter(function(){for(b=0,c=h.length;c>b;b++)if($.contains(h[b],this))return!0});for(g=this.pushStack("","find",a),b=0,c=this.length;c>b;b++)if(d=g.length,$.find(a,this[b],g),b>0)for(e=d;e<g.length;e++)for(f=0;d>f;f++)if(g[f]===g[e]){g.splice(e--,1);break}return g},has:function(a){var b,c=$(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if($.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(j(this,a,!1),"not",a)},filter:function(a){return this.pushStack(j(this,a,!0),"filter",a)},is:function(a){return!!a&&("string"==typeof a?Lb.test(a)?$(a,this.context).index(this[0])>=0:$.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Lb.test(a)||"string"!=typeof a?$(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c.ownerDocument&&c!==b&&11!==c.nodeType;){if(g?g.index(c)>-1:$.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}return f=f.length>1?$.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?"string"==typeof a?$.inArray(this[0],$(a)):$.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c="string"==typeof a?$(a,b):$.makeArray(a&&a.nodeType?[a]:a),d=$.merge(this.get(),c);return this.pushStack(h(c[0])||h(d[0])?d:$.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),$.fn.andSelf=$.fn.addBack,$.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return $.dir(a,"parentNode")},parentsUntil:function(a,b,c){return $.dir(a,"parentNode",c)},next:function(a){return i(a,"nextSibling")},prev:function(a){return i(a,"previousSibling")},nextAll:function(a){return $.dir(a,"nextSibling")},prevAll:function(a){return $.dir(a,"previousSibling")},nextUntil:function(a,b,c){return $.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return $.dir(a,"previousSibling",c)},siblings:function(a){return $.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return $.sibling(a.firstChild)},contents:function(a){return $.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:$.merge([],a.childNodes)}},function(a,b){$.fn[a]=function(c,d){var e=$.map(this,b,c);return Ib.test(a)||(d=c),d&&"string"==typeof d&&(e=$.filter(d,e)),e=this.length>1&&!Mb[a]?$.unique(e):e,this.length>1&&Jb.test(a)&&(e=e.reverse()),this.pushStack(e,a,V.call(arguments).join(","))}}),$.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),1===b.length?$.find.matchesSelector(b[0],a)?[b[0]]:[]:$.find.matches(a,b)},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!$(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Nb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Ob=/ jQuery\d+="(?:null|\d+)"/g,Pb=/^\s+/,Qb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Rb=/<([\w:]+)/,Sb=/<tbody/i,Tb=/<|&#?\w+;/,Ub=/<(?:script|style|link)/i,Vb=/<(?:script|object|embed|option|style)/i,Wb=new RegExp("<(?:"+Nb+")[\\s/>]","i"),Xb=/^(?:checkbox|radio)$/,Yb=/checked\s*(?:[^=]|=\s*.checked.)/i,Zb=/\/(java|ecma)script/i,$b=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,_b={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},ac=k(P),bc=ac.appendChild(P.createElement("div")); _b.optgroup=_b.option,_b.tbody=_b.tfoot=_b.colgroup=_b.caption=_b.thead,_b.th=_b.td,$.support.htmlSerialize||(_b._default=[1,"X<div>","</div>"]),$.fn.extend({text:function(a){return $.access(this,function(a){return a===b?$.text(this):this.empty().append((this[0]&&this[0].ownerDocument||P).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if($.isFunction(a))return this.each(function(b){$(this).wrapAll(a.call(this,b))});if(this[0]){var b=$(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return $.isFunction(a)?this.each(function(b){$(this).wrapInner(a.call(this,b))}):this.each(function(){var b=$(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=$.isFunction(a);return this.each(function(c){$(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){$.nodeName(this,"body")||$(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(1===this.nodeType||11===this.nodeType)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(1===this.nodeType||11===this.nodeType)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!h(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=$.clean(arguments);return this.pushStack($.merge(a,this),"before",this.selector)}},after:function(){if(!h(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=$.clean(arguments);return this.pushStack($.merge(this,a),"after",this.selector)}},remove:function(a,b){for(var c,d=0;null!=(c=this[d]);d++)(!a||$.filter(a,[c]).length)&&(b||1!==c.nodeType||($.cleanData(c.getElementsByTagName("*")),$.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)for(1===a.nodeType&&$.cleanData(a.getElementsByTagName("*"));a.firstChild;)a.removeChild(a.firstChild);return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return $.clone(this,a,b)})},html:function(a){return $.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Ob,""):b;if(!("string"!=typeof a||Ub.test(a)||!$.support.htmlSerialize&&Wb.test(a)||!$.support.leadingWhitespace&&Pb.test(a)||_b[(Rb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(Qb,"<$1></$2>");try{for(;e>d;d++)c=this[d]||{},1===c.nodeType&&($.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return h(this[0])?this.length?this.pushStack($($.isFunction(a)?a():a),"replaceWith",a):this:$.isFunction(a)?this.each(function(b){var c=$(this),d=c.html();c.replaceWith(a.call(this,b,d))}):("string"!=typeof a&&(a=$(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;$(this).remove(),b?$(b).before(a):$(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],m=this.length;if(!$.support.checkClone&&m>1&&"string"==typeof j&&Yb.test(j))return this.each(function(){$(this).domManip(a,c,d)});if($.isFunction(j))return this.each(function(e){var f=$(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){if(e=$.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,1===g.childNodes.length&&(g=f),f)for(c=c&&$.nodeName(f,"tr"),h=e.cacheable||m-1;m>i;i++)d.call(c&&$.nodeName(this[i],"table")?l(this[i],"tbody"):this[i],i===h?g:$.clone(g,!0,!0));g=f=null,k.length&&$.each(k,function(a,b){b.src?$.ajax?$.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):$.error("no ajax"):$.globalEval((b.text||b.textContent||b.innerHTML||"").replace($b,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),$.buildFragment=function(a,c,d){var e,f,g,h=a[0];return c=c||P,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,!(1===a.length&&"string"==typeof h&&h.length<512&&c===P&&"<"===h.charAt(0))||Vb.test(h)||!$.support.checkClone&&Yb.test(h)||!$.support.html5Clone&&Wb.test(h)||(f=!0,e=$.fragments[h],g=e!==b),e||(e=c.createDocumentFragment(),$.clean(a,c,e,d),f&&($.fragments[h]=g&&e)),{fragment:e,cacheable:f}},$.fragments={},$.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){$.fn[a]=function(c){var d,e=0,f=[],g=$(c),h=g.length,i=1===this.length&&this[0].parentNode;if((null==i||i&&11===i.nodeType&&1===i.childNodes.length)&&1===h)return g[b](this[0]),this;for(;h>e;e++)d=(e>0?this.clone(!0):this).get(),$(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),$.extend({clone:function(a,b,c){var d,e,f,g;if($.support.html5Clone||$.isXMLDoc(a)||!Wb.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bc.innerHTML=a.outerHTML,bc.removeChild(g=bc.firstChild)),!($.support.noCloneEvent&&$.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||$.isXMLDoc(a)))for(n(a,g),d=o(a),e=o(g),f=0;d[f];++f)e[f]&&n(d[f],e[f]);if(b&&(m(a,g),c))for(d=o(a),e=o(g),f=0;d[f];++f)m(d[f],e[f]);return d=e=null,g},clean:function(a,b,c,d){var e,f,g,h,i,j,l,m,n,o,q,r=b===P&&ac,s=[];for(b&&"undefined"!=typeof b.createDocumentFragment||(b=P),e=0;null!=(g=a[e]);e++)if("number"==typeof g&&(g+=""),g){if("string"==typeof g)if(Tb.test(g)){for(r=r||k(b),l=b.createElement("div"),r.appendChild(l),g=g.replace(Qb,"<$1></$2>"),h=(Rb.exec(g)||["",""])[1].toLowerCase(),i=_b[h]||_b._default,j=i[0],l.innerHTML=i[1]+g+i[2];j--;)l=l.lastChild;if(!$.support.tbody)for(m=Sb.test(g),n="table"!==h||m?"<table>"!==i[1]||m?[]:l.childNodes:l.firstChild&&l.firstChild.childNodes,f=n.length-1;f>=0;--f)$.nodeName(n[f],"tbody")&&!n[f].childNodes.length&&n[f].parentNode.removeChild(n[f]);!$.support.leadingWhitespace&&Pb.test(g)&&l.insertBefore(b.createTextNode(Pb.exec(g)[0]),l.firstChild),g=l.childNodes,l.parentNode.removeChild(l)}else g=b.createTextNode(g);g.nodeType?s.push(g):$.merge(s,g)}if(l&&(g=l=r=null),!$.support.appendChecked)for(e=0;null!=(g=s[e]);e++)$.nodeName(g,"input")?p(g):"undefined"!=typeof g.getElementsByTagName&&$.grep(g.getElementsByTagName("input"),p);if(c)for(o=function(a){return!a.type||Zb.test(a.type)?d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a):void 0},e=0;null!=(g=s[e]);e++)$.nodeName(g,"script")&&o(g)||(c.appendChild(g),"undefined"!=typeof g.getElementsByTagName&&(q=$.grep($.merge([],g.getElementsByTagName("script")),o),s.splice.apply(s,[e+1,0].concat(q)),e+=q.length));return s},cleanData:function(a,b){for(var c,d,e,f,g=0,h=$.expando,i=$.cache,j=$.support.deleteExpando,k=$.event.special;null!=(e=a[g]);g++)if((b||$.acceptData(e))&&(d=e[h],c=d&&i[d])){if(c.events)for(f in c.events)k[f]?$.event.remove(e,f):$.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,$.deletedIds.push(d))}}}),function(){var a,b;$.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=$.uaMatch(R.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),$.browser=b,$.sub=function(){function a(b,c){return new a.fn.init(b,c)}$.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(c,d){return d&&d instanceof $&&!(d instanceof a)&&(d=a(d)),$.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(P);return a}}();var cc,dc,ec,fc=/alpha\([^)]*\)/i,gc=/opacity=([^)]*)/,hc=/^(top|right|bottom|left)$/,ic=/^(none|table(?!-c[ea]).+)/,jc=/^margin/,kc=new RegExp("^("+_+")(.*)$","i"),lc=new RegExp("^("+_+")(?!px)[a-z%]+$","i"),mc=new RegExp("^([-+])=("+_+")","i"),nc={BODY:"block"},oc={position:"absolute",visibility:"hidden",display:"block"},pc={letterSpacing:0,fontWeight:400},qc=["Top","Right","Bottom","Left"],rc=["Webkit","O","Moz","ms"],sc=$.fn.toggle;$.fn.extend({css:function(a,c){return $.access(this,function(a,c,d){return d!==b?$.style(a,c,d):$.css(a,c)},a,c,arguments.length>1)},show:function(){return s(this,!0)},hide:function(){return s(this)},toggle:function(a,b){var c="boolean"==typeof a;return $.isFunction(a)&&$.isFunction(b)?sc.apply(this,arguments):this.each(function(){(c?a:r(this))?$(this).show():$(this).hide()})}}),$.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=cc(a,"opacity");return""===c?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":$.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=$.camelCase(c),j=a.style;if(c=$.cssProps[i]||($.cssProps[i]=q(j,i)),h=$.cssHooks[c]||$.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=mc.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat($.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||$.cssNumber[i]||(d+="px"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=$.camelCase(c);return c=$.cssProps[i]||($.cssProps[i]=q(a.style,i)),h=$.cssHooks[c]||$.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=cc(a,c)),"normal"===f&&c in pc&&(f=pc[c]),d||e!==b?(g=parseFloat(f),d||$.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?cc=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h.getPropertyValue(c)||h[c],""!==d||$.contains(b.ownerDocument,b)||(d=$.style(b,c)),lc.test(d)&&jc.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:P.documentElement.currentStyle&&(cc=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return null==e&&f&&f[b]&&(e=f[b]),lc.test(e)&&!hc.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left="fontSize"===b?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),""===e?"auto":e}),$.each(["height","width"],function(a,b){$.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&ic.test(cc(a,"display"))?$.swap(a,oc,function(){return v(a,b,d)}):v(a,b,d):void 0},set:function(a,c,d){return t(a,c,d?u(a,b,d,$.support.boxSizing&&"border-box"===$.css(a,"boxSizing")):0)}}}),$.support.opacity||($.cssHooks.opacity={get:function(a,b){return gc.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=$.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,b>=1&&""===$.trim(f.replace(fc,""))&&c.removeAttribute&&(c.removeAttribute("filter"),d&&!d.filter)||(c.filter=fc.test(f)?f.replace(fc,e):f+" "+e)}}),$(function(){$.support.reliableMarginRight||($.cssHooks.marginRight={get:function(a,b){return $.swap(a,{display:"inline-block"},function(){return b?cc(a,"marginRight"):void 0})}}),!$.support.pixelPosition&&$.fn.position&&$.each(["top","left"],function(a,b){$.cssHooks[b]={get:function(a,c){if(c){var d=cc(a,b);return lc.test(d)?$(a).position()[b]+"px":d}}}})}),$.expr&&$.expr.filters&&($.expr.filters.hidden=function(a){return 0===a.offsetWidth&&0===a.offsetHeight||!$.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||cc(a,"display"))},$.expr.filters.visible=function(a){return!$.expr.filters.hidden(a)}),$.each({margin:"",padding:"",border:"Width"},function(a,b){$.cssHooks[a+b]={expand:function(c){var d,e="string"==typeof c?c.split(" "):[c],f={};for(d=0;4>d;d++)f[a+qc[d]+b]=e[d]||e[d-2]||e[0];return f}},jc.test(a)||($.cssHooks[a+b].set=t)});var tc=/%20/g,uc=/\[\]$/,vc=/\r?\n/g,wc=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,xc=/^(?:select|textarea)/i;$.fn.extend({serialize:function(){return $.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?$.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||xc.test(this.nodeName)||wc.test(this.type))}).map(function(a,b){var c=$(this).val();return null==c?null:$.isArray(c)?$.map(c,function(a){return{name:b.name,value:a.replace(vc,"\r\n")}}):{name:b.name,value:c.replace(vc,"\r\n")}}).get()}}),$.param=function(a,c){var d,e=[],f=function(a,b){b=$.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=$.ajaxSettings&&$.ajaxSettings.traditional),$.isArray(a)||a.jquery&&!$.isPlainObject(a))$.each(a,function(){f(this.name,this.value)});else for(d in a)x(d,a[d],c,f);return e.join("&").replace(tc,"+")};var yc,zc,Ac=/#.*$/,Bc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cc=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Dc=/^(?:GET|HEAD)$/,Ec=/^\/\//,Fc=/\?/,Gc=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Hc=/([?&])_=[^&]*/,Ic=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Jc=$.fn.load,Kc={},Lc={},Mc=["*/"]+["*"];try{zc=Q.href}catch(Nc){zc=P.createElement("a"),zc.href="",zc=zc.href}yc=Ic.exec(zc.toLowerCase())||[],$.fn.load=function(a,c,d){if("string"!=typeof a&&Jc)return Jc.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),$.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(f="POST"),$.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?$("<div>").append(a.replace(Gc,"")).find(e):a)}),this},$.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){$.fn[b]=function(a){return this.on(b,a)}}),$.each(["get","post"],function(a,c){$[c]=function(a,d,e,f){return $.isFunction(d)&&(f=f||e,e=d,d=b),$.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),$.extend({getScript:function(a,c){return $.get(a,b,c,"script")},getJSON:function(a,b,c){return $.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?A(a,$.ajaxSettings):(b=a,a=$.ajaxSettings),A(a,b),a},ajaxSettings:{url:zc,isLocal:Cc.test(yc[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Mc},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":$.parseJSON,"text xml":$.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:y(Kc),ajaxTransport:y(Lc),ajax:function(a,c){function d(a,c,d,g){var j,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),h=b,f=g||"",w.readyState=a>0?4:0,d&&(t=B(m,w,d)),a>=200&&300>a||304===a?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&($.lastModified[e]=v),v=w.getResponseHeader("Etag"),v&&($.etag[e]=v)),304===a?(x="notmodified",j=!0):(j=C(m,t),x=j.state,l=j.data,s=j.error,j=!s)):(s=x,(!x||a)&&(x="error",0>a&&(a=0))),w.status=a,w.statusText=(c||x)+"",j?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,k&&o.trigger("ajax"+(j?"Success":"Error"),[w,m,j?l:s]),q.fireWith(n,[w,x]),k&&(o.trigger("ajaxComplete",[w,m]),--$.active||$.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=$.ajaxSetup({},c),n=m.context||m,o=n!==m&&(n.nodeType||n instanceof $)?$(n):$.event,p=$.Deferred(),q=$.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,setRequestHeader:function(a,b){if(!u){var c=a.toLowerCase();a=t[c]=t[c]||a,s[a]=b}return this},getAllResponseHeaders:function(){return 2===u?f:null},getResponseHeader:function(a){var c;if(2===u){if(!g)for(g={};c=Bc.exec(f);)g[c[1].toLowerCase()]=c[2];c=g[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return u||(m.mimeType=a),this},abort:function(a){return a=a||v,h&&h.abort(a),d(0,a),this}};if(p.promise(w),w.success=w.done,w.error=w.fail,w.complete=q.add,w.statusCode=function(a){if(a){var b;if(2>u)for(b in a)r[b]=[r[b],a[b]];else b=a[w.status],w.always(b)}return this},m.url=((a||m.url)+"").replace(Ac,"").replace(Ec,yc[1]+"//"),m.dataTypes=$.trim(m.dataType||"*").toLowerCase().split(bb),null==m.crossDomain&&(j=Ic.exec(m.url.toLowerCase()),m.crossDomain=!(!j||j[1]===yc[1]&&j[2]===yc[2]&&(j[3]||("http:"===j[1]?80:443))==(yc[3]||("http:"===yc[1]?80:443)))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=$.param(m.data,m.traditional)),z(Kc,m,c,w),2===u)return w;if(k=m.global,m.type=m.type.toUpperCase(),m.hasContent=!Dc.test(m.type),k&&0===$.active++&&$.event.trigger("ajaxStart"),!m.hasContent&&(m.data&&(m.url+=(Fc.test(m.url)?"&":"?")+m.data,delete m.data),e=m.url,m.cache===!1)){var x=$.now(),y=m.url.replace(Hc,"$1_="+x);m.url=y+(y===m.url?(Fc.test(m.url)?"&":"?")+"_="+x:"")}(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),m.ifModified&&(e=e||m.url,$.lastModified[e]&&w.setRequestHeader("If-Modified-Since",$.lastModified[e]),$.etag[e]&&w.setRequestHeader("If-None-Match",$.etag[e])),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Mc+"; q=0.01":""):m.accepts["*"]);for(l in m.headers)w.setRequestHeader(l,m.headers[l]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(l in{success:1,error:1,complete:1})w[l](m[l]);if(h=z(Lc,m,c,w)){w.readyState=1,k&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,h.send(s,d)}catch(A){if(!(2>u))throw A;d(-1,A)}}else d(-1,"No Transport");return w},active:0,lastModified:{},etag:{}});var Oc=[],Pc=/\?/,Qc=/(=)\?(?=&|$)|\?\?/,Rc=$.now();$.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Oc.pop()||$.expando+"_"+Rc++;return this[a]=!0,a}}),$.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&Qc.test(j),m=k&&!l&&"string"==typeof i&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qc.test(i);return"jsonp"===c.dataTypes[0]||l||m?(f=c.jsonpCallback=$.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(Qc,"$1"+f):m?c.data=i.replace(Qc,"$1"+f):k&&(c.url+=(Pc.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||$.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Oc.push(f)),h&&$.isFunction(g)&&g(h[0]),h=g=b}),"script"):void 0}),$.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return $.globalEval(a),a}}}),$.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),$.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=P.head||P.getElementsByTagName("head")[0]||P.documentElement;return{send:function(e,f){c=P.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){(e||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||f(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var Sc,Tc=a.ActiveXObject?function(){for(var a in Sc)Sc[a](0,1)}:!1,Uc=0;$.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&D()||E()}:D,function(a){$.extend($.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}($.ajaxSettings.xhr()),$.support.ajax&&$.ajaxTransport(function(c){if(!c.crossDomain||$.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=$.noop,Tc&&delete Sc[g]),e)4!==i.readyState&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(n){}try{j=i.statusText}catch(n){j=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?4===i.readyState?setTimeout(d,0):(g=++Uc,Tc&&(Sc||(Sc={},$(a).unload(Tc)),Sc[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var Vc,Wc,Xc=/^(?:toggle|show|hide)$/,Yc=new RegExp("^(?:([-+])=|)("+_+")([a-z%]*)$","i"),Zc=/queueHooks$/,$c=[J],_c={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=Yc.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){if(c=+f[2],d=f[3]||($.cssNumber[a]?"":"px"),"px"!==d&&h){h=$.css(e.elem,a,!0)||c||1;do i=i||".5",h/=i,$.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&1!==i&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};$.Animation=$.extend(H,{tweener:function(a,b){$.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],_c[c]=_c[c]||[],_c[c].unshift(b)},prefilter:function(a,b){b?$c.unshift(a):$c.push(a)}}),$.Tween=K,K.prototype={constructor:K,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||($.cssNumber[c]?"":"px")},cur:function(){var a=K.propHooks[this.prop];return a&&a.get?a.get(this):K.propHooks._default.get(this)},run:function(a){var b,c=K.propHooks[this.prop];return this.pos=b=this.options.duration?$.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):K.propHooks._default.set(this),this}},K.prototype.init.prototype=K.prototype,K.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=$.css(a.elem,a.prop,!1,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){$.fx.step[a.prop]?$.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[$.cssProps[a.prop]]||$.cssHooks[a.prop])?$.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},K.propHooks.scrollTop=K.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},$.each(["toggle","show","hide"],function(a,b){var c=$.fn[b];$.fn[b]=function(d,e,f){return null==d||"boolean"==typeof d||!a&&$.isFunction(d)&&$.isFunction(e)?c.apply(this,arguments):this.animate(L(b,!0),d,e,f)}}),$.fn.extend({fadeTo:function(a,b,c,d){return this.filter(r).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=$.isEmptyObject(a),f=$.speed(b,c,d),g=function(){var b=H(this,$.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return"string"!=typeof a&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=null!=a&&a+"queueHooks",f=$.timers,g=$._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&Zc.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem!==this||null!=a&&f[c].queue!==a||(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&$.dequeue(this,a)})}}),$.each({slideDown:L("show"),slideUp:L("hide"),slideToggle:L("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){$.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),$.speed=function(a,b,c){var d=a&&"object"==typeof a?$.extend({},a):{complete:c||!c&&b||$.isFunction(a)&&a,duration:a,easing:c&&b||b&&!$.isFunction(b)&&b};return d.duration=$.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in $.fx.speeds?$.fx.speeds[d.duration]:$.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){$.isFunction(d.old)&&d.old.call(this),d.queue&&$.dequeue(this,d.queue)},d},$.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},$.timers=[],$.fx=K.prototype.init,$.fx.tick=function(){var a,c=$.timers,d=0;for(Vc=$.now();d<c.length;d++)a=c[d],a()||c[d]!==a||c.splice(d--,1);c.length||$.fx.stop(),Vc=b},$.fx.timer=function(a){a()&&$.timers.push(a)&&!Wc&&(Wc=setInterval($.fx.tick,$.fx.interval))},$.fx.interval=13,$.fx.stop=function(){clearInterval(Wc),Wc=null},$.fx.speeds={slow:600,fast:200,_default:400},$.fx.step={},$.expr&&$.expr.filters&&($.expr.filters.animated=function(a){return $.grep($.timers,function(b){return a===b.elem}).length});var ad=/^(?:body|html)$/i;$.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){$.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j={top:0,left:0},k=this[0],l=k&&k.ownerDocument;if(l)return(d=l.body)===k?$.offset.bodyOffset(k):(c=l.documentElement,$.contains(c,k)?("undefined"!=typeof k.getBoundingClientRect&&(j=k.getBoundingClientRect()),e=M(l),f=c.clientTop||d.clientTop||0,g=c.clientLeft||d.clientLeft||0,h=e.pageYOffset||c.scrollTop,i=e.pageXOffset||c.scrollLeft,{top:j.top+h-f,left:j.left+i-g}):j)},$.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return $.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat($.css(a,"marginTop"))||0,c+=parseFloat($.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=$.css(a,"position");"static"===d&&(a.style.position="relative");var e,f,g=$(a),h=g.offset(),i=$.css(a,"top"),j=$.css(a,"left"),k=("absolute"===d||"fixed"===d)&&$.inArray("auto",[i,j])>-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),$.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},$.fn.extend({position:function(){if(this[0]){var a=this[0],b=this.offsetParent(),c=this.offset(),d=ad.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat($.css(a,"marginTop"))||0,c.left-=parseFloat($.css(a,"marginLeft"))||0,d.top+=parseFloat($.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat($.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||P.body;a&&!ad.test(a.nodeName)&&"static"===$.css(a,"position");)a=a.offsetParent;return a||P.body})}}),$.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);$.fn[a]=function(e){return $.access(this,function(a,e,f){var g=M(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:(g?g.scrollTo(d?$(g).scrollLeft():f,d?f:$(g).scrollTop()):a[e]=f,void 0)},a,e,arguments.length,null)}}),$.each({Height:"height",Width:"width"},function(a,c){$.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){$.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return $.access(this,function(c,d,e){var f;return $.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?$.css(c,d,e,h):$.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=$,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return $})}(window),function(a){var b,c,d="0.3.4",e="hasOwnProperty",f=/[\.\/]/,g="*",h=function(){},i=function(a,b){return a-b},j={n:{}},k=function(a,d){var e,f=c,g=Array.prototype.slice.call(arguments,2),h=k.listeners(a),j=0,l=[],m={},n=[],o=b;b=a,c=0;for(var p=0,q=h.length;q>p;p++)"zIndex"in h[p]&&(l.push(h[p].zIndex),h[p].zIndex<0&&(m[h[p].zIndex]=h[p]));for(l.sort(i);l[j]<0;)if(e=m[l[j++]],n.push(e.apply(d,g)),c)return c=f,n;for(p=0;q>p;p++)if(e=h[p],"zIndex"in e)if(e.zIndex==l[j]){if(n.push(e.apply(d,g)),c)break;do if(j++,e=m[l[j]],e&&n.push(e.apply(d,g)),c)break;while(e)}else m[e.zIndex]=e;else if(n.push(e.apply(d,g)),c)break;return c=f,b=o,n.length?n:null};k.listeners=function(a){var b,c,d,e,h,i,k,l,m=a.split(f),n=j,o=[n],p=[];for(e=0,h=m.length;h>e;e++){for(l=[],i=0,k=o.length;k>i;i++)for(n=o[i].n,c=[n[m[e]],n[g]],d=2;d--;)b=c[d],b&&(l.push(b),p=p.concat(b.f||[]));o=l}return p},k.on=function(a,b){for(var c=a.split(f),d=j,e=0,g=c.length;g>e;e++)d=d.n,!d[c[e]]&&(d[c[e]]={n:{}}),d=d[c[e]];for(d.f=d.f||[],e=0,g=d.f.length;g>e;e++)if(d.f[e]==b)return h;return d.f.push(b),function(a){+a==+a&&(b.zIndex=+a)}},k.stop=function(){c=1},k.nt=function(a){return a?new RegExp("(?:\\.|\\/|^)"+a+"(?:\\.|\\/|$)").test(b):b},k.off=k.unbind=function(a,b){var c,d,h,i,k,l,m,n=a.split(f),o=[j];for(i=0,k=n.length;k>i;i++)for(l=0;l<o.length;l+=h.length-2){if(h=[l,1],c=o[l].n,n[i]!=g)c[n[i]]&&h.push(c[n[i]]);else for(d in c)c[e](d)&&h.push(c[d]);o.splice.apply(o,h)}for(i=0,k=o.length;k>i;i++)for(c=o[i];c.n;){if(b){if(c.f){for(l=0,m=c.f.length;m>l;l++)if(c.f[l]==b){c.f.splice(l,1);break}!c.f.length&&delete c.f}for(d in c.n)if(c.n[e](d)&&c.n[d].f){var p=c.n[d].f;for(l=0,m=p.length;m>l;l++)if(p[l]==b){p.splice(l,1);break}!p.length&&delete c.n[d].f}}else{delete c.f;for(d in c.n)c.n[e](d)&&c.n[d].f&&delete c.n[d].f}c=c.n}},k.once=function(a,b){var c=function(){var d=b.apply(this,arguments);return k.unbind(a,c),d};return k.on(a,c)},k.version=d,k.toString=function(){return"You are running Eve "+d},"undefined"!=typeof module&&module.exports?module.exports=k:"undefined"!=typeof define?define("eve",[],function(){return k}):a.eve=k}(this),window.eve||"function"!=typeof define||"function"!=typeof require||(window.eve=require("eve")),function(){function a(b){if(a.is(b,"function"))return s?b():eve.on("raphael.DOMload",b);if(a.is(b,T))return a._engine.create[B](a,b.splice(0,3+a.is(b[0],R))).add(b);var c=Array.prototype.slice.call(arguments,0);if(a.is(c[c.length-1],"function")){var d=c.pop();return s?d.call(a._engine.create[B](a,c)):eve.on("raphael.DOMload",function(){d.call(a._engine.create[B](a,c))})}return a._engine.create[B](a,arguments)}function b(a){if(Object(a)!==a)return a;var c=new a.constructor;for(var d in a)a[x](d)&&(c[d]=b(a[d]));return c}function c(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function d(a,b,d){function e(){var f=Array.prototype.slice.call(arguments,0),g=f.join("\u2400"),h=e.cache=e.cache||{},i=e.count=e.count||[];return h[x](g)?(c(i,g),d?d(h[g]):h[g]):(i.length>=1e3&&delete h[i.shift()],i.push(g),h[g]=a[B](b,f),d?d(h[g]):h[g])}return e}function e(){return this.hex}function f(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function g(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function h(a,b,c,d,e,f,h,i,j){null==j&&(j=1),j=j>1?1:0>j?0:j;for(var k=j/2,l=12,m=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0,p=0;l>p;p++){var q=k*m[p]+k,r=g(q,a,c,e,h),s=g(q,b,d,f,i),t=r*r+s*s; o+=n[p]*L.sqrt(t)}return k*o}function i(a,b,c,d,e,f,g,i,j){if(!(0>j||h(a,b,c,d,e,f,g,i)<j)){var k,l=1,m=l/2,n=l-m,o=.01;for(k=h(a,b,c,d,e,f,g,i,n);O(k-j)>o;)m/=2,n+=(j>k?1:-1)*m,k=h(a,b,c,d,e,f,g,i,n);return n}}function j(a,b,c,d,e,f,g,h){if(!(M(a,c)<N(e,g)||N(a,c)>M(e,g)||M(b,d)<N(f,h)||N(b,d)>M(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+N(a,c).toFixed(2)||n>+M(a,c).toFixed(2)||n<+N(e,g).toFixed(2)||n>+M(e,g).toFixed(2)||o<+N(b,d).toFixed(2)||o>+M(b,d).toFixed(2)||o<+N(f,h).toFixed(2)||o>+M(f,h).toFixed(2)))return{x:l,y:m}}}}function k(b,c,d){var e=a.bezierBBox(b),f=a.bezierBBox(c);if(!a.isBBoxIntersect(e,f))return d?0:[];for(var g=h.apply(0,b),i=h.apply(0,c),k=~~(g/5),l=~~(i/5),m=[],n=[],o={},p=d?0:[],q=0;k+1>q;q++){var r=a.findDotsAtSegment.apply(a,b.concat(q/k));m.push({x:r.x,y:r.y,t:q/k})}for(q=0;l+1>q;q++)r=a.findDotsAtSegment.apply(a,c.concat(q/l)),n.push({x:r.x,y:r.y,t:q/l});for(q=0;k>q;q++)for(var s=0;l>s;s++){var t=m[q],u=m[q+1],v=n[s],w=n[s+1],x=O(u.x-t.x)<.001?"y":"x",y=O(w.x-v.x)<.001?"y":"x",z=j(t.x,t.y,u.x,u.y,v.x,v.y,w.x,w.y);if(z){if(o[z.x.toFixed(4)]==z.y.toFixed(4))continue;o[z.x.toFixed(4)]=z.y.toFixed(4);var A=t.t+O((z[x]-t[x])/(u[x]-t[x]))*(u.t-t.t),B=v.t+O((z[y]-v[y])/(w[y]-v[y]))*(w.t-v.t);A>=0&&1>=A&&B>=0&&1>=B&&(d?p++:p.push({x:z.x,y:z.y,t1:A,t2:B}))}}return p}function l(b,c,d){b=a._path2curve(b),c=a._path2curve(c);for(var e,f,g,h,i,j,l,m,n,o,p=d?0:[],q=0,r=b.length;r>q;q++){var s=b[q];if("M"==s[0])e=i=s[1],f=j=s[2];else{"C"==s[0]?(n=[e,f].concat(s.slice(1)),e=n[6],f=n[7]):(n=[e,f,e,f,i,j,i,j],e=i,f=j);for(var t=0,u=c.length;u>t;t++){var v=c[t];if("M"==v[0])g=l=v[1],h=m=v[2];else{"C"==v[0]?(o=[g,h].concat(v.slice(1)),g=o[6],h=o[7]):(o=[g,h,g,h,l,m,l,m],g=l,h=m);var w=k(n,o,d);if(d)p+=w;else{for(var x=0,y=w.length;y>x;x++)w[x].segment1=q,w[x].segment2=t,w[x].bez1=n,w[x].bez2=o;p=p.concat(w)}}}}}return p}function m(a,b,c,d,e,f){null!=a?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function n(){return this.x+F+this.y+F+this.width+" \xd7 "+this.height}function o(a,b,c,d,e,f){function g(a){return((l*a+k)*a+j)*a}function h(a,b){var c=i(a,b);return((o*c+n)*c+m)*c}function i(a,b){var c,d,e,f,h,i;for(e=a,i=0;8>i;i++){if(f=g(e)-a,O(f)<b)return e;if(h=(3*l*e+2*k)*e+j,O(h)<1e-6)break;e-=f/h}if(c=0,d=1,e=a,c>e)return c;if(e>d)return d;for(;d>c;){if(f=g(e),O(f-a)<b)return e;a>f?c=e:d=e,e=(d-c)/2+c}return e}var j=3*b,k=3*(d-b)-j,l=1-j-k,m=3*c,n=3*(e-c)-m,o=1-m-n;return h(a,1/(200*f))}function p(a,b){var c=[],d={};if(this.ms=b,this.times=1,a){for(var e in a)a[x](e)&&(d[Z(e)]=a[e],c.push(Z(e)));c.sort(jb)}this.anim=d,this.top=c[c.length-1],this.percents=c}function q(b,c,d,e,f,g){d=Z(d);var h,i,j,k,l,n,p=b.ms,q={},r={},s={};if(e)for(v=0,w=fc.length;w>v;v++){var t=fc[v];if(t.el.id==c.id&&t.anim==b){t.percent!=d?(fc.splice(v,1),j=1):i=t,c.attr(t.totalOrigin);break}}else e=+r;for(var v=0,w=b.percents.length;w>v;v++){if(b.percents[v]==d||b.percents[v]>e*b.top){d=b.percents[v],l=b.percents[v-1]||0,p=p/b.top*(d-l),k=b.percents[v+1],h=b.anim[d];break}e&&c.attr(b.anim[b.percents[v]])}if(h){if(i)i.initstatus=e,i.start=new Date-i.ms*e;else{for(var y in h)if(h[x](y)&&(bb[x](y)||c.paper.customAttributes[x](y)))switch(q[y]=c.attr(y),null==q[y]&&(q[y]=ab[y]),r[y]=h[y],bb[y]){case R:s[y]=(r[y]-q[y])/p;break;case"colour":q[y]=a.getRGB(q[y]);var z=a.getRGB(r[y]);s[y]={r:(z.r-q[y].r)/p,g:(z.g-q[y].g)/p,b:(z.b-q[y].b)/p};break;case"path":var A=Ib(q[y],r[y]),B=A[1];for(q[y]=A[0],s[y]=[],v=0,w=q[y].length;w>v;v++){s[y][v]=[0];for(var D=1,E=q[y][v].length;E>D;D++)s[y][v][D]=(B[v][D]-q[y][v][D])/p}break;case"transform":var F=c._,I=Nb(F[y],r[y]);if(I)for(q[y]=I.from,r[y]=I.to,s[y]=[],s[y].real=!0,v=0,w=q[y].length;w>v;v++)for(s[y][v]=[q[y][v][0]],D=1,E=q[y][v].length;E>D;D++)s[y][v][D]=(r[y][v][D]-q[y][v][D])/p;else{var J=c.matrix||new m,K={_:{transform:F.transform},getBBox:function(){return c.getBBox(1)}};q[y]=[J.a,J.b,J.c,J.d,J.e,J.f],Lb(K,r[y]),r[y]=K._.transform,s[y]=[(K.matrix.a-J.a)/p,(K.matrix.b-J.b)/p,(K.matrix.c-J.c)/p,(K.matrix.d-J.d)/p,(K.matrix.e-J.e)/p,(K.matrix.f-J.f)/p]}break;case"csv":var L=G(h[y])[H](u),M=G(q[y])[H](u);if("clip-rect"==y)for(q[y]=M,s[y]=[],v=M.length;v--;)s[y][v]=(L[v]-q[y][v])/p;r[y]=L;break;default:for(L=[][C](h[y]),M=[][C](q[y]),s[y]=[],v=c.paper.customAttributes[y].length;v--;)s[y][v]=((L[v]||0)-(M[v]||0))/p}var N=h.easing,O=a.easing_formulas[N];if(!O)if(O=G(N).match(X),O&&5==O.length){var P=O;O=function(a){return o(a,+P[1],+P[2],+P[3],+P[4],p)}}else O=lb;if(n=h.start||b.start||+new Date,t={anim:b,percent:d,timestamp:n,start:n+(b.del||0),status:0,initstatus:e||0,stop:!1,ms:p,easing:O,from:q,diff:s,to:r,el:c,callback:h.callback,prev:l,next:k,repeat:g||b.times,origin:c.attr(),totalOrigin:f},fc.push(t),e&&!i&&!j&&(t.stop=!0,t.start=new Date-p*e,1==fc.length))return hc();j&&(t.start=new Date-t.ms*e),1==fc.length&&gc(hc)}eve("raphael.anim.start."+c.id,c,b)}}function r(a){for(var b=0;b<fc.length;b++)fc[b].el.paper==a&&fc.splice(b--,1)}a.version="2.1.0",a.eve=eve;var s,t,u=/[, ]+/,v={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},w=/\{(\d+)\}/g,x="hasOwnProperty",y={doc:document,win:window},z={was:Object.prototype[x].call(y.win,"Raphael"),is:y.win.Raphael},A=function(){this.ca=this.customAttributes={}},B="apply",C="concat",D="createTouch"in y.doc,E="",F=" ",G=String,H="split",I="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[H](F),J={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},K=G.prototype.toLowerCase,L=Math,M=L.max,N=L.min,O=L.abs,P=L.pow,Q=L.PI,R="number",S="string",T="array",U=Object.prototype.toString,V=(a._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),W={NaN:1,Infinity:1,"-Infinity":1},X=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,Y=L.round,Z=parseFloat,$=parseInt,_=G.prototype.toUpperCase,ab=a._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},bb=a._availableAnimAttrs={blur:R,"clip-rect":"csv",cx:R,cy:R,fill:"colour","fill-opacity":R,"font-size":R,height:R,opacity:R,path:"path",r:R,rx:R,ry:R,stroke:"colour","stroke-opacity":R,"stroke-width":R,transform:"transform",width:R,x:R,y:R},cb=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,db={hs:1,rg:1},eb=/,?([achlmqrstvxz]),?/gi,fb=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,gb=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,hb=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,ib=(a._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),jb=function(a,b){return Z(a)-Z(b)},kb=function(){},lb=function(a){return a},mb=a._rectPath=function(a,b,c,d,e){return e?[["M",a+e,b],["l",c-2*e,0],["a",e,e,0,0,1,e,e],["l",0,d-2*e],["a",e,e,0,0,1,-e,e],["l",2*e-c,0],["a",e,e,0,0,1,-e,-e],["l",0,2*e-d],["a",e,e,0,0,1,e,-e],["z"]]:[["M",a,b],["l",c,0],["l",0,d],["l",-c,0],["z"]]},nb=function(a,b,c,d){return null==d&&(d=c),[["M",a,b],["m",0,-d],["a",c,d,0,1,1,0,2*d],["a",c,d,0,1,1,0,-2*d],["z"]]},ob=a._getPath={path:function(a){return a.attr("path")},circle:function(a){var b=a.attrs;return nb(b.cx,b.cy,b.r)},ellipse:function(a){var b=a.attrs;return nb(b.cx,b.cy,b.rx,b.ry)},rect:function(a){var b=a.attrs;return mb(b.x,b.y,b.width,b.height,b.r)},image:function(a){var b=a.attrs;return mb(b.x,b.y,b.width,b.height)},text:function(a){var b=a._getBBox();return mb(b.x,b.y,b.width,b.height)}},pb=a.mapPath=function(a,b){if(!b)return a;var c,d,e,f,g,h,i;for(a=Ib(a),e=0,g=a.length;g>e;e++)for(i=a[e],f=1,h=i.length;h>f;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d;return a};if(a._g=y,a.type=y.win.SVGAngle||y.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==a.type){var qb,rb=y.doc.createElement("div");if(rb.innerHTML='<v:shape adj="1"/>',qb=rb.firstChild,qb.style.behavior="url(#default#VML)",!qb||"object"!=typeof qb.adj)return a.type=E;rb=null}a.svg=!(a.vml="VML"==a.type),a._Paper=A,a.fn=t=A.prototype=a.prototype,a._id=0,a._oid=0,a.is=function(a,b){return b=K.call(b),"finite"==b?!W[x](+a):"array"==b?a instanceof Array:"null"==b&&null===a||b==typeof a&&null!==a||"object"==b&&a===Object(a)||"array"==b&&Array.isArray&&Array.isArray(a)||U.call(a).slice(8,-1).toLowerCase()==b},a.angle=function(b,c,d,e,f,g){if(null==f){var h=b-d,i=c-e;return h||i?(180+180*L.atan2(-i,-h)/Q+360)%360:0}return a.angle(b,c,f,g)-a.angle(d,e,f,g)},a.rad=function(a){return a%360*Q/180},a.deg=function(a){return 180*a/Q%360},a.snapTo=function(b,c,d){if(d=a.is(d,"finite")?d:10,a.is(b,T)){for(var e=b.length;e--;)if(O(b[e]-c)<=d)return b[e]}else{b=+b;var f=c%b;if(d>f)return c-f;if(f>b-d)return c-f+b}return c};a.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=16*L.random()|0,c="x"==a?b:3&b|8;return c.toString(16)});a.setWindow=function(b){eve("raphael.setWindow",a,y.win,b),y.win=b,y.doc=y.win.document,a._engine.initWin&&a._engine.initWin(y.win)};var sb=function(b){if(a.vml){var c,e=/^\s+|\s+$/g;try{var f=new ActiveXObject("htmlfile");f.write("<body>"),f.close(),c=f.body}catch(g){c=createPopup().document.body}var h=c.createTextRange();sb=d(function(a){try{c.style.color=G(a).replace(e,E);var b=h.queryCommandValue("ForeColor");return b=(255&b)<<16|65280&b|(16711680&b)>>>16,"#"+("000000"+b.toString(16)).slice(-6)}catch(d){return"none"}})}else{var i=y.doc.createElement("i");i.title="Rapha\xebl Colour Picker",i.style.display="none",y.doc.body.appendChild(i),sb=d(function(a){return i.style.color=a,y.doc.defaultView.getComputedStyle(i,E).getPropertyValue("color")})}return sb(b)},tb=function(){return"hsb("+[this.h,this.s,this.b]+")"},ub=function(){return"hsl("+[this.h,this.s,this.l]+")"},vb=function(){return this.hex},wb=function(b,c,d){if(null==c&&a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b&&(d=b.b,c=b.g,b=b.r),null==c&&a.is(b,S)){var e=a.getRGB(b);b=e.r,c=e.g,d=e.b}return(b>1||c>1||d>1)&&(b/=255,c/=255,d/=255),[b,c,d]},xb=function(b,c,d,e){b*=255,c*=255,d*=255;var f={r:b,g:c,b:d,hex:a.rgb(b,c,d),toString:vb};return a.is(e,"finite")&&(f.opacity=e),f};a.color=function(b){var c;return a.is(b,"object")&&"h"in b&&"s"in b&&"b"in b?(c=a.hsb2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):a.is(b,"object")&&"h"in b&&"s"in b&&"l"in b?(c=a.hsl2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):(a.is(b,"string")&&(b=a.getRGB(b)),a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b?(c=a.rgb2hsl(b),b.h=c.h,b.s=c.s,b.l=c.l,c=a.rgb2hsb(b),b.v=c.b):(b={hex:"none"},b.r=b.g=b.b=b.h=b.s=b.v=b.l=-1)),b.toString=vb,b},a.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-O(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],xb(e,f,g,d)},a.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var e,f,g,h,i;return a=a%360/60,i=2*b*(.5>c?c:1-c),h=i*(1-O(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],xb(e,f,g,d)},a.rgb2hsb=function(a,b,c){c=wb(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=M(a,b,c),g=f-N(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=0==g?0:g/f,{h:d,s:e,b:f,toString:tb}},a.rgb2hsl=function(a,b,c){c=wb(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=M(a,b,c),h=N(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=0==i?0:.5>f?i/(2*f):i/(2-2*f),{h:d,s:e,l:f,toString:ub}},a._path2string=function(){return this.join(",").replace(eb,"$1")};a._preload=function(a,b){var c=y.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,y.doc.body.removeChild(this)},c.onerror=function(){y.doc.body.removeChild(this)},y.doc.body.appendChild(c),c.src=a};a.getRGB=d(function(b){if(!b||(b=G(b)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:e};if("none"==b)return{r:-1,g:-1,b:-1,hex:"none",toString:e};!(db[x](b.toLowerCase().substring(0,2))||"#"==b.charAt())&&(b=sb(b));var c,d,f,g,h,i,j=b.match(V);return j?(j[2]&&(f=$(j[2].substring(5),16),d=$(j[2].substring(3,5),16),c=$(j[2].substring(1,3),16)),j[3]&&(f=$((h=j[3].charAt(3))+h,16),d=$((h=j[3].charAt(2))+h,16),c=$((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4][H](cb),c=Z(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=Z(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),f=Z(i[2]),"%"==i[2].slice(-1)&&(f*=2.55),"rgba"==j[1].toLowerCase().slice(0,4)&&(g=Z(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100)),j[5]?(i=j[5][H](cb),c=Z(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=Z(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),f=Z(i[2]),"%"==i[2].slice(-1)&&(f*=2.55),("deg"==i[0].slice(-3)||"\xb0"==i[0].slice(-1))&&(c/=360),"hsba"==j[1].toLowerCase().slice(0,4)&&(g=Z(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),a.hsb2rgb(c,d,f,g)):j[6]?(i=j[6][H](cb),c=Z(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=Z(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),f=Z(i[2]),"%"==i[2].slice(-1)&&(f*=2.55),("deg"==i[0].slice(-3)||"\xb0"==i[0].slice(-1))&&(c/=360),"hsla"==j[1].toLowerCase().slice(0,4)&&(g=Z(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),a.hsl2rgb(c,d,f,g)):(j={r:c,g:d,b:f,toString:e},j.hex="#"+(16777216|f|d<<8|c<<16).toString(16).slice(1),a.is(g,"finite")&&(j.opacity=g),j)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:e}},a),a.hsb=d(function(b,c,d){return a.hsb2rgb(b,c,d).hex}),a.hsl=d(function(b,c,d){return a.hsl2rgb(b,c,d).hex}),a.rgb=d(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)}),a.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);return b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b})),c.hex},a.getColor.reset=function(){delete this.start},a.parsePathString=function(b){if(!b)return null;var c=yb(b);if(c.arr)return Ab(c.arr);var d={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[];return a.is(b,T)&&a.is(b[0],T)&&(e=Ab(b)),e.length||G(b).replace(fb,function(a,b,c){var f=[],g=b.toLowerCase();if(c.replace(hb,function(a,b){b&&f.push(+b)}),"m"==g&&f.length>2&&(e.push([b][C](f.splice(0,2))),g="l",b="m"==b?"l":"L"),"r"==g)e.push([b][C](f));else for(;f.length>=d[g]&&(e.push([b][C](f.splice(0,d[g]))),d[g]););}),e.toString=a._path2string,c.arr=Ab(e),e},a.parseTransformString=d(function(b){if(!b)return null;var c=[];return a.is(b,T)&&a.is(b[0],T)&&(c=Ab(b)),c.length||G(b).replace(gb,function(a,b,d){{var e=[];K.call(b)}d.replace(hb,function(a,b){b&&e.push(+b)}),c.push([b][C](e))}),c.toString=a._path2string,c});var yb=function(a){var b=yb.ps=yb.ps||{};return b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[x](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])}),b[a]};a.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=P(j,3),l=P(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*L.atan2(q-s,r-t)/Q;return(q>s||t>r)&&(y+=180),{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:w,y:x},alpha:y}},a.bezierBBox=function(b,c,d,e,f,g,h,i){a.is(b,"array")||(b=[b,c,d,e,f,g,h,i]);var j=Hb.apply(null,b);return{x:j.min.x,y:j.min.y,x2:j.max.x,y2:j.max.y,width:j.max.x-j.min.x,height:j.max.y-j.min.y}},a.isPointInsideBBox=function(a,b,c){return b>=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},a.isBBoxIntersect=function(b,c){var d=a.isPointInsideBBox;return d(c,b.x,b.y)||d(c,b.x2,b.y)||d(c,b.x,b.y2)||d(c,b.x2,b.y2)||d(b,c.x,c.y)||d(b,c.x2,c.y)||d(b,c.x,c.y2)||d(b,c.x2,c.y2)||(b.x<c.x2&&b.x>c.x||c.x<b.x2&&c.x>b.x)&&(b.y<c.y2&&b.y>c.y||c.y<b.y2&&c.y>b.y)},a.pathIntersection=function(a,b){return l(a,b)},a.pathIntersectionNumber=function(a,b){return l(a,b,1)},a.isPointInsidePath=function(b,c,d){var e=a.pathBBox(b);return a.isPointInsideBBox(e,c,d)&&l(b,[["M",c,d],["H",e.x2+10]],1)%2==1},a._removedFactory=function(a){return function(){eve("raphael.log",null,"Rapha\xebl: you are calling to method \u201c"+a+"\u201d of removed object",a)}};var zb=a.pathBBox=function(a){var c=yb(a);if(c.bbox)return c.bbox;if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};a=Ib(a);for(var d,e=0,f=0,g=[],h=[],i=0,j=a.length;j>i;i++)if(d=a[i],"M"==d[0])e=d[1],f=d[2],g.push(e),h.push(f);else{var k=Hb(e,f,d[1],d[2],d[3],d[4],d[5],d[6]);g=g[C](k.min.x,k.max.x),h=h[C](k.min.y,k.max.y),e=d[5],f=d[6]}var l=N[B](0,g),m=N[B](0,h),n=M[B](0,g),o=M[B](0,h),p={x:l,y:m,x2:n,y2:o,width:n-l,height:o-m};return c.bbox=b(p),p},Ab=function(c){var d=b(c);return d.toString=a._path2string,d},Bb=a._pathToRelative=function(b){var c=yb(b);if(c.rel)return Ab(c.rel);a.is(b,T)&&a.is(b&&b[0],T)||(b=a.parsePathString(b));var d=[],e=0,f=0,g=0,h=0,i=0;"M"==b[0][0]&&(e=b[0][1],f=b[0][2],g=e,h=f,i++,d.push(["M",e,f]));for(var j=i,k=b.length;k>j;j++){var l=d[j]=[],m=b[j];if(m[0]!=K.call(m[0]))switch(l[0]=K.call(m[0]),l[0]){case"a":l[1]=m[1],l[2]=m[2],l[3]=m[3],l[4]=m[4],l[5]=m[5],l[6]=+(m[6]-e).toFixed(3),l[7]=+(m[7]-f).toFixed(3);break;case"v":l[1]=+(m[1]-f).toFixed(3);break;case"m":g=m[1],h=m[2];default:for(var n=1,o=m.length;o>n;n++)l[n]=+(m[n]-(n%2?e:f)).toFixed(3)}else{l=d[j]=[],"m"==m[0]&&(g=m[1]+e,h=m[2]+f);for(var p=0,q=m.length;q>p;p++)d[j][p]=m[p]}var r=d[j].length;switch(d[j][0]){case"z":e=g,f=h;break;case"h":e+=+d[j][r-1];break;case"v":f+=+d[j][r-1];break;default:e+=+d[j][r-2],f+=+d[j][r-1]}}return d.toString=a._path2string,c.rel=Ab(d),d},Cb=a._pathToAbsolute=function(b){var c=yb(b);if(c.abs)return Ab(c.abs);if(a.is(b,T)&&a.is(b&&b[0],T)||(b=a.parsePathString(b)),!b||!b.length)return[["M",0,0]];var d=[],e=0,g=0,h=0,i=0,j=0;"M"==b[0][0]&&(e=+b[0][1],g=+b[0][2],h=e,i=g,j++,d[0]=["M",e,g]);for(var k,l,m=3==b.length&&"M"==b[0][0]&&"R"==b[1][0].toUpperCase()&&"Z"==b[2][0].toUpperCase(),n=j,o=b.length;o>n;n++){if(d.push(k=[]),l=b[n],l[0]!=_.call(l[0]))switch(k[0]=_.call(l[0]),k[0]){case"A":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]+e),k[7]=+(l[7]+g);break;case"V":k[1]=+l[1]+g;break;case"H":k[1]=+l[1]+e;break;case"R":for(var p=[e,g][C](l.slice(1)),q=2,r=p.length;r>q;q++)p[q]=+p[q]+e,p[++q]=+p[q]+g;d.pop(),d=d[C](f(p,m));break;case"M":h=+l[1]+e,i=+l[2]+g;default:for(q=1,r=l.length;r>q;q++)k[q]=+l[q]+(q%2?e:g)}else if("R"==l[0])p=[e,g][C](l.slice(1)),d.pop(),d=d[C](f(p,m)),k=["R"][C](l.slice(-2));else for(var s=0,t=l.length;t>s;s++)k[s]=l[s];switch(k[0]){case"Z":e=h,g=i;break;case"H":e=k[1];break;case"V":g=k[1];break;case"M":h=k[k.length-2],i=k[k.length-1];default:e=k[k.length-2],g=k[k.length-1]}}return d.toString=a._path2string,c.abs=Ab(d),d},Db=function(a,b,c,d){return[a,b,c,d,c,d]},Eb=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},Fb=function(a,b,c,e,f,g,h,i,j,k){var l,m=120*Q/180,n=Q/180*(+f||0),o=[],p=d(function(a,b,c){var d=a*L.cos(c)-b*L.sin(c),e=a*L.sin(c)+b*L.cos(c);return{x:d,y:e}});if(k)y=k[0],z=k[1],w=k[2],x=k[3];else{l=p(a,b,-n),a=l.x,b=l.y,l=p(i,j,-n),i=l.x,j=l.y;var q=(L.cos(Q/180*f),L.sin(Q/180*f),(a-i)/2),r=(b-j)/2,s=q*q/(c*c)+r*r/(e*e);s>1&&(s=L.sqrt(s),c=s*c,e=s*e);var t=c*c,u=e*e,v=(g==h?-1:1)*L.sqrt(O((t*u-t*r*r-u*q*q)/(t*r*r+u*q*q))),w=v*c*r/e+(a+i)/2,x=v*-e*q/c+(b+j)/2,y=L.asin(((b-x)/e).toFixed(9)),z=L.asin(((j-x)/e).toFixed(9));y=w>a?Q-y:y,z=w>i?Q-z:z,0>y&&(y=2*Q+y),0>z&&(z=2*Q+z),h&&y>z&&(y-=2*Q),!h&&z>y&&(z-=2*Q)}var A=z-y;if(O(A)>m){var B=z,D=i,E=j;z=y+m*(h&&z>y?1:-1),i=w+c*L.cos(z),j=x+e*L.sin(z),o=Fb(i,j,c,e,f,0,h,D,E,[z,B,w,x])}A=z-y;var F=L.cos(y),G=L.sin(y),I=L.cos(z),J=L.sin(z),K=L.tan(A/4),M=4/3*c*K,N=4/3*e*K,P=[a,b],R=[a+M*G,b-N*F],S=[i+M*J,j-N*I],T=[i,j];if(R[0]=2*P[0]-R[0],R[1]=2*P[1]-R[1],k)return[R,S,T][C](o);o=[R,S,T][C](o).join()[H](",");for(var U=[],V=0,W=o.length;W>V;V++)U[V]=V%2?p(o[V-1],o[V],n).y:p(o[V],o[V+1],n).x;return U},Gb=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:P(j,3)*a+3*P(j,2)*i*c+3*j*i*i*e+P(i,3)*g,y:P(j,3)*b+3*P(j,2)*i*d+3*j*i*i*f+P(i,3)*h}},Hb=d(function(a,b,c,d,e,f,g,h){var i,j=e-2*c+a-(g-2*e+c),k=2*(c-a)-2*(e-c),l=a-c,m=(-k+L.sqrt(k*k-4*j*l))/2/j,n=(-k-L.sqrt(k*k-4*j*l))/2/j,o=[b,h],p=[a,g];return O(m)>"1e12"&&(m=.5),O(n)>"1e12"&&(n=.5),m>0&&1>m&&(i=Gb(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=Gb(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),j=f-2*d+b-(h-2*f+d),k=2*(d-b)-2*(f-d),l=b-d,m=(-k+L.sqrt(k*k-4*j*l))/2/j,n=(-k-L.sqrt(k*k-4*j*l))/2/j,O(m)>"1e12"&&(m=.5),O(n)>"1e12"&&(n=.5),m>0&&1>m&&(i=Gb(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=Gb(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),{min:{x:N[B](0,p),y:N[B](0,o)},max:{x:M[B](0,p),y:M[B](0,o)}}}),Ib=a._path2curve=d(function(a,b){var c=!b&&yb(a);if(!b&&c.curve)return Ab(c.curve);for(var d=Cb(a),e=b&&Cb(b),f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},h=(function(a,b){var c,d;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][C](Fb[B](0,[b.x,b.y][C](a.slice(1))));break;case"S":c=b.x+(b.x-(b.bx||b.x)),d=b.y+(b.y-(b.by||b.y)),a=["C",c,d][C](a.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x)),b.qy=b.y+(b.y-(b.qy||b.y)),a=["C"][C](Eb(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][C](Eb(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][C](Db(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][C](Db(b.x,b.y,a[1],b.y));break;case"V":a=["C"][C](Db(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][C](Db(b.x,b.y,b.X,b.Y))}return a}),i=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)a.splice(b++,0,["C"][C](c.splice(0,6)));a.splice(b,1),l=M(d.length,e&&e.length||0)}},j=function(a,b,c,f,g){a&&b&&"M"==a[g][0]&&"M"!=b[g][0]&&(b.splice(g,0,["M",f.x,f.y]),c.bx=0,c.by=0,c.x=a[g][1],c.y=a[g][2],l=M(d.length,e&&e.length||0))},k=0,l=M(d.length,e&&e.length||0);l>k;k++){d[k]=h(d[k],f),i(d,k),e&&(e[k]=h(e[k],g)),e&&i(e,k),j(d,e,f,g,k),j(e,d,g,f,k);var m=d[k],n=e&&e[k],o=m.length,p=e&&n.length;f.x=m[o-2],f.y=m[o-1],f.bx=Z(m[o-4])||f.x,f.by=Z(m[o-3])||f.y,g.bx=e&&(Z(n[p-4])||g.x),g.by=e&&(Z(n[p-3])||g.y),g.x=e&&n[p-2],g.y=e&&n[p-1]}return e||(c.curve=Ab(d)),e?[d,e]:d},null,Ab),Jb=(a._parseDots=d(function(b){for(var c=[],d=0,e=b.length;e>d;d++){var f={},g=b[d].match(/^([^:]*):?([\d\.]*)/);if(f.color=a.getRGB(g[1]),f.color.error)return null;f.color=f.color.hex,g[2]&&(f.offset=g[2]+"%"),c.push(f)}for(d=1,e=c.length-1;e>d;d++)if(!c[d].offset){for(var h=Z(c[d-1].offset||0),i=0,j=d+1;e>j;j++)if(c[j].offset){i=c[j].offset;break}i||(i=100,j=e),i=Z(i);for(var k=(i-h)/(j-d+1);j>d;d++)h+=k,c[d].offset=h+"%"}return c}),a._tear=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)}),Kb=(a._tofront=function(a,b){b.top!==a&&(Jb(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a)},a._toback=function(a,b){b.bottom!==a&&(Jb(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a)},a._insertafter=function(a,b,c){Jb(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},a._insertbefore=function(a,b,c){Jb(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},a.toMatrix=function(a,b){var c=zb(a),d={_:{transform:E},getBBox:function(){return c}};return Lb(d,b),d.matrix}),Lb=(a.transformPath=function(a,b){return pb(a,Kb(a,b))},a._extractTransform=function(b,c){if(null==c)return b._.transform;c=G(c).replace(/\.{3}|\u2026/g,b._.transform||E);var d=a.parseTransformString(c),e=0,f=0,g=0,h=1,i=1,j=b._,k=new m;if(j.transform=d||[],d)for(var l=0,n=d.length;n>l;l++){var o,p,q,r,s,t=d[l],u=t.length,v=G(t[0]).toLowerCase(),w=t[0]!=v,x=w?k.invert():0;"t"==v&&3==u?w?(o=x.x(0,0),p=x.y(0,0),q=x.x(t[1],t[2]),r=x.y(t[1],t[2]),k.translate(q-o,r-p)):k.translate(t[1],t[2]):"r"==v?2==u?(s=s||b.getBBox(1),k.rotate(t[1],s.x+s.width/2,s.y+s.height/2),e+=t[1]):4==u&&(w?(q=x.x(t[2],t[3]),r=x.y(t[2],t[3]),k.rotate(t[1],q,r)):k.rotate(t[1],t[2],t[3]),e+=t[1]):"s"==v?2==u||3==u?(s=s||b.getBBox(1),k.scale(t[1],t[u-1],s.x+s.width/2,s.y+s.height/2),h*=t[1],i*=t[u-1]):5==u&&(w?(q=x.x(t[3],t[4]),r=x.y(t[3],t[4]),k.scale(t[1],t[2],q,r)):k.scale(t[1],t[2],t[3],t[4]),h*=t[1],i*=t[2]):"m"==v&&7==u&&k.add(t[1],t[2],t[3],t[4],t[5],t[6]),j.dirtyT=1,b.matrix=k}b.matrix=k,j.sx=h,j.sy=i,j.deg=e,j.dx=f=k.e,j.dy=g=k.f,1==h&&1==i&&!e&&j.bbox?(j.bbox.x+=+f,j.bbox.y+=+g):j.dirtyT=1}),Mb=function(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":return[b,1,0,0,1,0,0];case"r":return 4==a.length?[b,0,a[2],a[3]]:[b,0];case"s":return 5==a.length?[b,1,1,a[3],a[4]]:3==a.length?[b,1,1]:[b,1]}},Nb=a._equaliseTransform=function(b,c){c=G(c).replace(/\.{3}|\u2026/g,b),b=a.parseTransformString(b)||[],c=a.parseTransformString(c)||[];for(var d,e,f,g,h=M(b.length,c.length),i=[],j=[],k=0;h>k;k++){if(f=b[k]||Mb(c[k]),g=c[k]||Mb(f),f[0]!=g[0]||"r"==f[0].toLowerCase()&&(f[2]!=g[2]||f[3]!=g[3])||"s"==f[0].toLowerCase()&&(f[3]!=g[3]||f[4]!=g[4]))return;for(i[k]=[],j[k]=[],d=0,e=M(f.length,g.length);e>d;d++)d in f&&(i[k][d]=f[d]),d in g&&(j[k][d]=g[d])}return{from:i,to:j}};a._getContainer=function(b,c,d,e){var f;return f=null!=e||a.is(b,"object")?b:y.doc.getElementById(b),null!=f?f.tagName?null==c?{container:f,width:f.style.pixelWidth||f.offsetWidth,height:f.style.pixelHeight||f.offsetHeight}:{container:f,width:c,height:d}:{container:1,x:b,y:c,width:d,height:e}:void 0},a.pathToRelative=Bb,a._engine={},a.path2curve=Ib,a.matrix=function(a,b,c,d,e,f){return new m(a,b,c,d,e,f)},function(b){function c(a){return a[0]*a[0]+a[1]*a[1]}function d(a){var b=L.sqrt(c(a));a[0]&&(a[0]/=b),a[1]&&(a[1]/=b)}b.add=function(a,b,c,d,e,f){var g,h,i,j,k=[[],[],[]],l=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],n=[[a,c,e],[b,d,f],[0,0,1]];for(a&&a instanceof m&&(n=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]),g=0;3>g;g++)for(h=0;3>h;h++){for(j=0,i=0;3>i;i++)j+=l[g][i]*n[i][h];k[g][h]=j}this.a=k[0][0],this.b=k[1][0],this.c=k[0][1],this.d=k[1][1],this.e=k[0][2],this.f=k[1][2]},b.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new m(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b)},b.clone=function(){return new m(this.a,this.b,this.c,this.d,this.e,this.f)},b.translate=function(a,b){this.add(1,0,0,1,a,b)},b.scale=function(a,b,c,d){null==b&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d)},b.rotate=function(b,c,d){b=a.rad(b),c=c||0,d=d||0;var e=+L.cos(b).toFixed(9),f=+L.sin(b).toFixed(9);this.add(e,f,-f,e,c,d),this.add(1,0,0,1,-c,-d)},b.x=function(a,b){return a*this.a+b*this.c+this.e},b.y=function(a,b){return a*this.b+b*this.d+this.f},b.get=function(a){return+this[G.fromCharCode(97+a)].toFixed(4)},b.toString=function(){return a.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},b.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},b.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},b.split=function(){var b={};b.dx=this.e,b.dy=this.f;var e=[[this.a,this.c],[this.b,this.d]];b.scalex=L.sqrt(c(e[0])),d(e[0]),b.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*b.shear,e[1][1]-e[0][1]*b.shear],b.scaley=L.sqrt(c(e[1])),d(e[1]),b.shear/=b.scaley;var f=-e[0][1],g=e[1][1];return 0>g?(b.rotate=a.deg(L.acos(g)),0>f&&(b.rotate=360-b.rotate)):b.rotate=a.deg(L.asin(f)),b.isSimple=!(+b.shear.toFixed(9)||b.scalex.toFixed(9)!=b.scaley.toFixed(9)&&b.rotate),b.isSuperSimple=!+b.shear.toFixed(9)&&b.scalex.toFixed(9)==b.scaley.toFixed(9)&&!b.rotate,b.noRotation=!+b.shear.toFixed(9)&&!b.rotate,b},b.toTransformString=function(a){var b=a||this[H]();return b.isSimple?(b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4),(b.dx||b.dy?"t"+[b.dx,b.dy]:E)+(1!=b.scalex||1!=b.scaley?"s"+[b.scalex,b.scaley,0,0]:E)+(b.rotate?"r"+[b.rotate,0,0]:E)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(m.prototype);var Ob=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);t.safari="Apple Computer, Inc."==navigator.vendor&&(Ob&&Ob[1]<4||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&Ob&&Ob[1]<8?function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){a.remove()})}:kb;for(var Pb=function(){this.returnValue=!1},Qb=function(){return this.originalEvent.preventDefault()},Rb=function(){this.cancelBubble=!0},Sb=function(){return this.originalEvent.stopPropagation()},Tb=function(){return y.doc.addEventListener?function(a,b,c,d){var e=D&&J[b]?J[b]:b,f=function(e){var f=y.doc.documentElement.scrollTop||y.doc.body.scrollTop,g=y.doc.documentElement.scrollLeft||y.doc.body.scrollLeft,h=e.clientX+g,i=e.clientY+f;if(D&&J[x](b))for(var j=0,k=e.targetTouches&&e.targetTouches.length;k>j;j++)if(e.targetTouches[j].target==a){var l=e;e=e.targetTouches[j],e.originalEvent=l,e.preventDefault=Qb,e.stopPropagation=Sb;break}return c.call(d,e,h,i)};return a.addEventListener(e,f,!1),function(){return a.removeEventListener(e,f,!1),!0}}:y.doc.attachEvent?function(a,b,c,d){var e=function(a){a=a||y.win.event;var b=y.doc.documentElement.scrollTop||y.doc.body.scrollTop,e=y.doc.documentElement.scrollLeft||y.doc.body.scrollLeft,f=a.clientX+e,g=a.clientY+b; return a.preventDefault=a.preventDefault||Pb,a.stopPropagation=a.stopPropagation||Rb,c.call(d,a,f,g)};a.attachEvent("on"+b,e);var f=function(){return a.detachEvent("on"+b,e),!0};return f}:void 0}(),Ub=[],Vb=function(a){for(var b,c=a.clientX,d=a.clientY,e=y.doc.documentElement.scrollTop||y.doc.body.scrollTop,f=y.doc.documentElement.scrollLeft||y.doc.body.scrollLeft,g=Ub.length;g--;){if(b=Ub[g],D){for(var h,i=a.touches.length;i--;)if(h=a.touches[i],h.identifier==b.el._drag.id){c=h.clientX,d=h.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}else a.preventDefault();var j,k=b.el.node,l=k.nextSibling,m=k.parentNode,n=k.style.display;y.win.opera&&m.removeChild(k),k.style.display="none",j=b.el.paper.getElementByPoint(c,d),k.style.display=n,y.win.opera&&(l?m.insertBefore(k,l):m.appendChild(k)),j&&eve("raphael.drag.over."+b.el.id,b.el,j),c+=f,d+=e,eve("raphael.drag.move."+b.el.id,b.move_scope||b.el,c-b.el._drag.x,d-b.el._drag.y,c,d,a)}},Wb=function(b){a.unmousemove(Vb).unmouseup(Wb);for(var c,d=Ub.length;d--;)c=Ub[d],c.el._drag={},eve("raphael.drag.end."+c.el.id,c.end_scope||c.start_scope||c.move_scope||c.el,b);Ub=[]},Xb=a.el={},Yb=I.length;Yb--;)!function(b){a[b]=Xb[b]=function(c,d){return a.is(c,"function")&&(this.events=this.events||[],this.events.push({name:b,f:c,unbind:Tb(this.shape||this.node||y.doc,b,c,d||this)})),this},a["un"+b]=Xb["un"+b]=function(a){for(var c=this.events||[],d=c.length;d--;)if(c[d].name==b&&c[d].f==a)return c[d].unbind(),c.splice(d,1),!c.length&&delete this.events,this;return this}}(I[Yb]);Xb.data=function(b,c){var d=ib[this.id]=ib[this.id]||{};if(1==arguments.length){if(a.is(b,"object")){for(var e in b)b[x](e)&&this.data(e,b[e]);return this}return eve("raphael.data.get."+this.id,this,d[b],b),d[b]}return d[b]=c,eve("raphael.data.set."+this.id,this,c,b),this},Xb.removeData=function(a){return null==a?ib[this.id]={}:ib[this.id]&&delete ib[this.id][a],this},Xb.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},Xb.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};var Zb=[];Xb.drag=function(b,c,d,e,f,g){function h(h){(h.originalEvent||h).preventDefault();var i=y.doc.documentElement.scrollTop||y.doc.body.scrollTop,j=y.doc.documentElement.scrollLeft||y.doc.body.scrollLeft;this._drag.x=h.clientX+j,this._drag.y=h.clientY+i,this._drag.id=h.identifier,!Ub.length&&a.mousemove(Vb).mouseup(Wb),Ub.push({el:this,move_scope:e,start_scope:f,end_scope:g}),c&&eve.on("raphael.drag.start."+this.id,c),b&&eve.on("raphael.drag.move."+this.id,b),d&&eve.on("raphael.drag.end."+this.id,d),eve("raphael.drag.start."+this.id,f||e||this,h.clientX+j,h.clientY+i,h)}return this._drag={},Zb.push({el:this,start:h}),this.mousedown(h),this},Xb.onDragOver=function(a){a?eve.on("raphael.drag.over."+this.id,a):eve.unbind("raphael.drag.over."+this.id)},Xb.undrag=function(){for(var b=Zb.length;b--;)Zb[b].el==this&&(this.unmousedown(Zb[b].start),Zb.splice(b,1),eve.unbind("raphael.drag.*."+this.id));!Zb.length&&a.unmousemove(Vb).unmouseup(Wb)},t.circle=function(b,c,d){var e=a._engine.circle(this,b||0,c||0,d||0);return this.__set__&&this.__set__.push(e),e},t.rect=function(b,c,d,e,f){var g=a._engine.rect(this,b||0,c||0,d||0,e||0,f||0);return this.__set__&&this.__set__.push(g),g},t.ellipse=function(b,c,d,e){var f=a._engine.ellipse(this,b||0,c||0,d||0,e||0);return this.__set__&&this.__set__.push(f),f},t.path=function(b){b&&!a.is(b,S)&&!a.is(b[0],T)&&(b+=E);var c=a._engine.path(a.format[B](a,arguments),this);return this.__set__&&this.__set__.push(c),c},t.image=function(b,c,d,e,f){var g=a._engine.image(this,b||"about:blank",c||0,d||0,e||0,f||0);return this.__set__&&this.__set__.push(g),g},t.text=function(b,c,d){var e=a._engine.text(this,b||0,c||0,G(d));return this.__set__&&this.__set__.push(e),e},t.set=function(b){!a.is(b,"array")&&(b=Array.prototype.splice.call(arguments,0,arguments.length));var c=new jc(b);return this.__set__&&this.__set__.push(c),c},t.setStart=function(a){this.__set__=a||this.set()},t.setFinish=function(){var a=this.__set__;return delete this.__set__,a},t.setSize=function(b,c){return a._engine.setSize.call(this,b,c)},t.setViewBox=function(b,c,d,e,f){return a._engine.setViewBox.call(this,b,c,d,e,f)},t.top=t.bottom=null,t.raphael=a;var $b=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,g=e.clientLeft||d.clientLeft||0,h=b.top+(y.win.pageYOffset||e.scrollTop||d.scrollTop)-f,i=b.left+(y.win.pageXOffset||e.scrollLeft||d.scrollLeft)-g;return{y:h,x:i}};t.getElementByPoint=function(a,b){var c=this,d=c.canvas,e=y.doc.elementFromPoint(a,b);if(y.win.opera&&"svg"==e.tagName){var f=$b(d),g=d.createSVGRect();g.x=a-f.x,g.y=b-f.y,g.width=g.height=1;var h=d.getIntersectionList(g,null);h.length&&(e=h[h.length-1])}if(!e)return null;for(;e.parentNode&&e!=d.parentNode&&!e.raphael;)e=e.parentNode;return e==c.canvas.parentNode&&(e=d),e=e&&e.raphael?c.getById(e.raphaelid):null},t.getById=function(a){for(var b=this.bottom;b;){if(b.id==a)return b;b=b.next}return null},t.forEach=function(a,b){for(var c=this.bottom;c;){if(a.call(b,c)===!1)return this;c=c.next}return this},t.getElementsByPoint=function(a,b){var c=this.set();return this.forEach(function(d){d.isPointInside(a,b)&&c.push(d)}),c},Xb.isPointInside=function(b,c){var d=this.realPath=this.realPath||ob[this.type](this);return a.isPointInsidePath(d,b,c)},Xb.getBBox=function(a){if(this.removed)return{};var b=this._;return a?((b.dirty||!b.bboxwt)&&(this.realPath=ob[this.type](this),b.bboxwt=zb(this.realPath),b.bboxwt.toString=n,b.dirty=0),b.bboxwt):((b.dirty||b.dirtyT||!b.bbox)&&((b.dirty||!this.realPath)&&(b.bboxwt=0,this.realPath=ob[this.type](this)),b.bbox=zb(pb(this.realPath,this.matrix)),b.bbox.toString=n,b.dirty=b.dirtyT=0),b.bbox)},Xb.clone=function(){if(this.removed)return null;var a=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(a),a},Xb.glow=function(a){if("text"==this.type)return null;a=a||{};var b={width:(a.width||10)+(+this.attr("stroke-width")||1),fill:a.fill||!1,opacity:a.opacity||.5,offsetx:a.offsetx||0,offsety:a.offsety||0,color:a.color||"#000"},c=b.width/2,d=this.paper,e=d.set(),f=this.realPath||ob[this.type](this);f=this.matrix?pb(f,this.matrix):f;for(var g=1;c+1>g;g++)e.push(d.path(f).attr({stroke:b.color,fill:b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/c*g).toFixed(3),opacity:+(b.opacity/c).toFixed(3)}));return e.insertBefore(this).translate(b.offsetx,b.offsety)};var _b=function(b,c,d,e,f,g,j,k,l){return null==l?h(b,c,d,e,f,g,j,k):a.findDotsAtSegment(b,c,d,e,f,g,j,k,i(b,c,d,e,f,g,j,k,l))},ac=function(b,c){return function(d,e,f){d=Ib(d);for(var g,h,i,j,k,l="",m={},n=0,o=0,p=d.length;p>o;o++){if(i=d[o],"M"==i[0])g=+i[1],h=+i[2];else{if(j=_b(g,h,i[1],i[2],i[3],i[4],i[5],i[6]),n+j>e){if(c&&!m.start){if(k=_b(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),l+=["C"+k.start.x,k.start.y,k.m.x,k.m.y,k.x,k.y],f)return l;m.start=l,l=["M"+k.x,k.y+"C"+k.n.x,k.n.y,k.end.x,k.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!b&&!c)return k=_b(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),{x:k.x,y:k.y,alpha:k.alpha}}n+=j,g=+i[5],h=+i[6]}l+=i.shift()+i}return m.end=l,k=b?n:c?m:a.findDotsAtSegment(g,h,i[0],i[1],i[2],i[3],i[4],i[5],1),k.alpha&&(k={x:k.x,y:k.y,alpha:k.alpha}),k}},bc=ac(1),cc=ac(),dc=ac(0,1);a.getTotalLength=bc,a.getPointAtLength=cc,a.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return dc(a,b).end;var d=dc(a,c,1);return b?dc(d,b).end:d},Xb.getTotalLength=function(){return"path"==this.type?this.node.getTotalLength?this.node.getTotalLength():bc(this.attrs.path):void 0},Xb.getPointAtLength=function(a){return"path"==this.type?cc(this.attrs.path,a):void 0},Xb.getSubpath=function(b,c){return"path"==this.type?a.getSubpath(this.attrs.path,b,c):void 0};var ec=a.easing_formulas={linear:function(a){return a},"<":function(a){return P(a,1.7)},">":function(a){return P(a,.48)},"<>":function(a){var b=.48-a/1.04,c=L.sqrt(.1734+b*b),d=c-b,e=P(O(d),1/3)*(0>d?-1:1),f=-c-b,g=P(O(f),1/3)*(0>f?-1:1),h=e+g+.5;return 3*(1-h)*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){return a==!!a?a:P(2,-10*a)*L.sin(2*(a-.075)*Q/.3)+1},bounce:function(a){var b,c=7.5625,d=2.75;return 1/d>a?b=c*a*a:2/d>a?(a-=1.5/d,b=c*a*a+.75):2.5/d>a?(a-=2.25/d,b=c*a*a+.9375):(a-=2.625/d,b=c*a*a+.984375),b}};ec.easeIn=ec["ease-in"]=ec["<"],ec.easeOut=ec["ease-out"]=ec[">"],ec.easeInOut=ec["ease-in-out"]=ec["<>"],ec["back-in"]=ec.backIn,ec["back-out"]=ec.backOut;var fc=[],gc=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,16)},hc=function(){for(var b=+new Date,c=0;c<fc.length;c++){var d=fc[c];if(!d.el.removed&&!d.paused){var e,f,g=b-d.start,h=d.ms,i=d.easing,j=d.from,k=d.diff,l=d.to,m=(d.t,d.el),n={},o={};if(d.initstatus?(g=(d.initstatus*d.anim.top-d.prev)/(d.percent-d.prev)*h,d.status=d.initstatus,delete d.initstatus,d.stop&&fc.splice(c--,1)):d.status=(d.prev+(d.percent-d.prev)*(g/h))/d.anim.top,!(0>g))if(h>g){var p=i(g/h);for(var r in j)if(j[x](r)){switch(bb[r]){case R:e=+j[r]+p*h*k[r];break;case"colour":e="rgb("+[ic(Y(j[r].r+p*h*k[r].r)),ic(Y(j[r].g+p*h*k[r].g)),ic(Y(j[r].b+p*h*k[r].b))].join(",")+")";break;case"path":e=[];for(var s=0,t=j[r].length;t>s;s++){e[s]=[j[r][s][0]];for(var u=1,v=j[r][s].length;v>u;u++)e[s][u]=+j[r][s][u]+p*h*k[r][s][u];e[s]=e[s].join(F)}e=e.join(F);break;case"transform":if(k[r].real)for(e=[],s=0,t=j[r].length;t>s;s++)for(e[s]=[j[r][s][0]],u=1,v=j[r][s].length;v>u;u++)e[s][u]=j[r][s][u]+p*h*k[r][s][u];else{var w=function(a){return+j[r][a]+p*h*k[r][a]};e=[["m",w(0),w(1),w(2),w(3),w(4),w(5)]]}break;case"csv":if("clip-rect"==r)for(e=[],s=4;s--;)e[s]=+j[r][s]+p*h*k[r][s];break;default:var y=[][C](j[r]);for(e=[],s=m.paper.customAttributes[r].length;s--;)e[s]=+y[s]+p*h*k[r][s]}n[r]=e}m.attr(n),function(a,b,c){setTimeout(function(){eve("raphael.anim.frame."+a,b,c)})}(m.id,m,d.anim)}else{if(function(b,c,d){setTimeout(function(){eve("raphael.anim.frame."+c.id,c,d),eve("raphael.anim.finish."+c.id,c,d),a.is(b,"function")&&b.call(c)})}(d.callback,m,d.anim),m.attr(l),fc.splice(c--,1),d.repeat>1&&!d.next){for(f in l)l[x](f)&&(o[f]=d.totalOrigin[f]);d.el.attr(o),q(d.anim,d.el,d.anim.percents[0],null,d.totalOrigin,d.repeat-1)}d.next&&!d.stop&&q(d.anim,d.el,d.next,null,d.totalOrigin,d.repeat)}}}a.svg&&m&&m.paper&&m.paper.safari(),fc.length&&gc(hc)},ic=function(a){return a>255?255:0>a?0:a};Xb.animateWith=function(b,c,d,e,f,g){var h=this;if(h.removed)return g&&g.call(h),h;var i=d instanceof p?d:a.animation(d,e,f,g);q(i,h,i.percents[0],null,h.attr());for(var j=0,k=fc.length;k>j;j++)if(fc[j].anim==c&&fc[j].el==b){fc[k-1].start=fc[j].start;break}return h},Xb.onAnimation=function(a){return a?eve.on("raphael.anim.frame."+this.id,a):eve.unbind("raphael.anim.frame."+this.id),this},p.prototype.delay=function(a){var b=new p(this.anim,this.ms);return b.times=this.times,b.del=+a||0,b},p.prototype.repeat=function(a){var b=new p(this.anim,this.ms);return b.del=this.del,b.times=L.floor(M(a,0))||1,b},a.animation=function(b,c,d,e){if(b instanceof p)return b;(a.is(d,"function")||!d)&&(e=e||d||null,d=null),b=Object(b),c=+c||0;var f,g,h={};for(g in b)b[x](g)&&Z(g)!=g&&Z(g)+"%"!=g&&(f=!0,h[g]=b[g]);return f?(d&&(h.easing=d),e&&(h.callback=e),new p({100:h},c)):new p(b,c)},Xb.animate=function(b,c,d,e){var f=this;if(f.removed)return e&&e.call(f),f;var g=b instanceof p?b:a.animation(b,c,d,e);return q(g,f,g.percents[0],null,f.attr()),f},Xb.setTime=function(a,b){return a&&null!=b&&this.status(a,N(b,a.ms)/a.ms),this},Xb.status=function(a,b){var c,d,e=[],f=0;if(null!=b)return q(a,this,-1,N(b,1)),this;for(c=fc.length;c>f;f++)if(d=fc[f],d.el.id==this.id&&(!a||d.anim==a)){if(a)return d.status;e.push({anim:d.anim,status:d.status})}return a?0:e},Xb.pause=function(a){for(var b=0;b<fc.length;b++)fc[b].el.id!=this.id||a&&fc[b].anim!=a||eve("raphael.anim.pause."+this.id,this,fc[b].anim)!==!1&&(fc[b].paused=!0);return this},Xb.resume=function(a){for(var b=0;b<fc.length;b++)if(fc[b].el.id==this.id&&(!a||fc[b].anim==a)){var c=fc[b];eve("raphael.anim.resume."+this.id,this,c.anim)!==!1&&(delete c.paused,this.status(c.anim,c.status))}return this},Xb.stop=function(a){for(var b=0;b<fc.length;b++)fc[b].el.id!=this.id||a&&fc[b].anim!=a||eve("raphael.anim.stop."+this.id,this,fc[b].anim)!==!1&&fc.splice(b--,1);return this},eve.on("raphael.remove",r),eve.on("raphael.clear",r),Xb.toString=function(){return"Rapha\xebl\u2019s object"};var jc=function(a){if(this.items=[],this.length=0,this.type="set",a)for(var b=0,c=a.length;c>b;b++)!a[b]||a[b].constructor!=Xb.constructor&&a[b].constructor!=jc||(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},kc=jc.prototype;kc.push=function(){for(var a,b,c=0,d=arguments.length;d>c;c++)a=arguments[c],!a||a.constructor!=Xb.constructor&&a.constructor!=jc||(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},kc.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},kc.forEach=function(a,b){for(var c=0,d=this.items.length;d>c;c++)if(a.call(b,this.items[c],c)===!1)return this;return this};for(var lc in Xb)Xb[x](lc)&&(kc[lc]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a][B](c,b)})}}(lc));kc.attr=function(b,c){if(b&&a.is(b,T)&&a.is(b[0],"object"))for(var d=0,e=b.length;e>d;d++)this.items[d].attr(b[d]);else for(var f=0,g=this.items.length;g>f;f++)this.items[f].attr(b,c);return this},kc.clear=function(){for(;this.length;)this.pop()},kc.splice=function(a,b){a=0>a?M(this.length+a,0):a,b=M(0,N(this.length-a,b));var c,d=[],e=[],f=[];for(c=2;c<arguments.length;c++)f.push(arguments[c]);for(c=0;b>c;c++)e.push(this[a+c]);for(;c<this.length-a;c++)d.push(this[a+c]);var g=f.length;for(c=0;c<g+d.length;c++)this.items[a+c]=this[a+c]=g>c?f[c]:d[c-g];for(c=this.items.length=this.length-=b-g;this[c];)delete this[c++];return new jc(e)},kc.exclude=function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]==a)return this.splice(b,1),!0},kc.animate=function(b,c,d,e){(a.is(d,"function")||!d)&&(e=d||null);var f,g,h=this.items.length,i=h,j=this;if(!h)return this;e&&(g=function(){!--h&&e.call(j)}),d=a.is(d,S)?d:g;var k=a.animation(b,c,d,g);for(f=this.items[--i].animate(k);i--;)this.items[i]&&!this.items[i].removed&&this.items[i].animateWith(f,k,k);return this},kc.insertAfter=function(a){for(var b=this.items.length;b--;)this.items[b].insertAfter(a);return this},kc.getBBox=function(){for(var a=[],b=[],c=[],d=[],e=this.items.length;e--;)if(!this.items[e].removed){var f=this.items[e].getBBox();a.push(f.x),b.push(f.y),c.push(f.x+f.width),d.push(f.y+f.height)}return a=N[B](0,a),b=N[B](0,b),c=M[B](0,c),d=M[B](0,d),{x:a,y:b,x2:c,y2:d,width:c-a,height:d-b}},kc.clone=function(a){a=new jc;for(var b=0,c=this.items.length;c>b;b++)a.push(this.items[b].clone());return a},kc.toString=function(){return"Rapha\xebl\u2018s set"},a.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)a.face[x](d)&&(b.face[d]=a.face[d]);if(this.fonts[c]?this.fonts[c].push(b):this.fonts[c]=[b],!a.svg){b.face["units-per-em"]=$(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[x](e)){var f=a.glyphs[e];if(b.glyphs[e]={w:f.w,k:{},d:f.d&&"M"+f.d.replace(/[mlcxtrv]/g,function(a){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[a]||"M"})+"z"},f.k)for(var g in f.k)f[x](g)&&(b.glyphs[e].k[g]=f.k[g])}}return a},t.getFont=function(b,c,d,e){if(e=e||"normal",d=d||"normal",c=+c||{normal:400,bold:700,lighter:300,bolder:800}[c]||400,a.fonts){var f=a.fonts[b];if(!f){var g=new RegExp("(^|\\s)"+b.replace(/[^\w\d\s+!~.:_-]/g,E)+"(\\s|$)","i");for(var h in a.fonts)if(a.fonts[x](h)&&g.test(h)){f=a.fonts[h];break}}var i;if(f)for(var j=0,k=f.length;k>j&&(i=f[j],i.face["font-weight"]!=c||i.face["font-style"]!=d&&i.face["font-style"]||i.face["font-stretch"]!=e);j++);return i}},t.print=function(b,c,d,e,f,g,h){g=g||"middle",h=M(N(h||0,1),-1);var i,j=G(d)[H](E),k=0,l=0,m=E;if(a.is(e,d)&&(e=this.getFont(e)),e){i=(f||16)/e.face["units-per-em"];for(var n=e.face.bbox[H](u),o=+n[0],p=n[3]-n[1],q=0,r=+n[1]+("baseline"==g?p+ +e.face.descent:p/2),s=0,t=j.length;t>s;s++){if("\n"==j[s])k=0,w=0,l=0,q+=p;else{var v=l&&e.glyphs[j[s-1]]||{},w=e.glyphs[j[s]];k+=l?(v.w||e.w)+(v.k&&v.k[j[s]]||0)+e.w*h:0,l=1}w&&w.d&&(m+=a.transformPath(w.d,["t",k*i,q*i,"s",i,i,o,r,"t",(b-o)/i,(c-r)/i]))}}return this.path(m).attr({fill:"#000",stroke:"none"})},t.add=function(b){if(a.is(b,"array"))for(var c,d=this.set(),e=0,f=b.length;f>e;e++)c=b[e]||{},v[x](c.type)&&d.push(this[c.type]().attr(c));return d},a.format=function(b,c){var d=a.is(c,T)?[0][C](c):arguments;return b&&a.is(b,S)&&d.length-1&&(b=b.replace(w,function(a,b){return null==d[++b]?E:d[b]})),b||E},a.fullfill=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(a,c,d){var e=d;return c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),"function"==typeof e&&f&&(e=e()))}),e=(null==e||e==d?a:e)+""};return function(b,d){return String(b).replace(a,function(a,b){return c(a,b,d)})}}(),a.ninja=function(){return z.was?y.win.Raphael=z.is:delete Raphael,a},a.st=kc,function(b,c,d){function e(){/in/.test(b.readyState)?setTimeout(e,9):a.eve("raphael.DOMload")}null==b.readyState&&b.addEventListener&&(b.addEventListener(c,d=function(){b.removeEventListener(c,d,!1),b.readyState="complete"},!1),b.readyState="loading"),e()}(document,"DOMContentLoaded"),z.was?y.win.Raphael=a:Raphael=a,eve.on("raphael.DOMload",function(){s=!0})}(),window.Raphael&&window.Raphael.svg&&function(a){var b="hasOwnProperty",c=String,d=parseFloat,e=parseInt,f=Math,g=f.max,h=f.abs,i=f.pow,j=/[, ]+/,k=a.eve,l="",m=" ",n="http://www.w3.org/1999/xlink",o={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},p={};a.toString=function(){return"Your browser supports SVG.\nYou are running Rapha\xebl "+this.version};var q=function(d,e){if(e){"string"==typeof d&&(d=q(d));for(var f in e)e[b](f)&&("xlink:"==f.substring(0,6)?d.setAttributeNS(n,f.substring(6),c(e[f])):d.setAttribute(f,c(e[f])))}else d=a._g.doc.createElementNS("http://www.w3.org/2000/svg",d),d.style&&(d.style.webkitTapHighlightColor="rgba(0,0,0,0)");return d},r=function(b,e){var j="linear",k=b.id+e,m=.5,n=.5,o=b.node,p=b.paper,r=o.style,s=a._g.doc.getElementById(k);if(!s){if(e=c(e).replace(a._radial_gradient,function(a,b,c){if(j="radial",b&&c){m=d(b),n=d(c);var e=2*(n>.5)-1;i(m-.5,2)+i(n-.5,2)>.25&&(n=f.sqrt(.25-i(m-.5,2))*e+.5)&&.5!=n&&(n=n.toFixed(5)-1e-5*e)}return l}),e=e.split(/\s*\-\s*/),"linear"==j){var t=e.shift();if(t=-d(t),isNaN(t))return null;var u=[0,0,f.cos(a.rad(t)),f.sin(a.rad(t))],v=1/(g(h(u[2]),h(u[3]))||1);u[2]*=v,u[3]*=v,u[2]<0&&(u[0]=-u[2],u[2]=0),u[3]<0&&(u[1]=-u[3],u[3]=0)}var w=a._parseDots(e);if(!w)return null;if(k=k.replace(/[\(\)\s,\xb0#]/g,"_"),b.gradient&&k!=b.gradient.id&&(p.defs.removeChild(b.gradient),delete b.gradient),!b.gradient){s=q(j+"Gradient",{id:k}),b.gradient=s,q(s,"radial"==j?{fx:m,fy:n}:{x1:u[0],y1:u[1],x2:u[2],y2:u[3],gradientTransform:b.matrix.invert()}),p.defs.appendChild(s);for(var x=0,y=w.length;y>x;x++)s.appendChild(q("stop",{offset:w[x].offset?w[x].offset:x?"100%":"0%","stop-color":w[x].color||"#fff"}))}}return q(o,{fill:"url(#"+k+")",opacity:1,"fill-opacity":1}),r.fill=l,r.opacity=1,r.fillOpacity=1,1},s=function(a){var b=a.getBBox(1);q(a.pattern,{patternTransform:a.matrix.invert()+" translate("+b.x+","+b.y+")"})},t=function(d,e,f){if("path"==d.type){for(var g,h,i,j,k,m=c(e).toLowerCase().split("-"),n=d.paper,r=f?"end":"start",s=d.node,t=d.attrs,u=t["stroke-width"],v=m.length,w="classic",x=3,y=3,z=5;v--;)switch(m[v]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":w=m[v];break;case"wide":y=5;break;case"narrow":y=2;break;case"long":x=5;break;case"short":x=2}if("open"==w?(x+=2,y+=2,z+=2,i=1,j=f?4:1,k={fill:"none",stroke:t.stroke}):(j=i=x/2,k={fill:t.stroke,stroke:"none"}),d._.arrows?f?(d._.arrows.endPath&&p[d._.arrows.endPath]--,d._.arrows.endMarker&&p[d._.arrows.endMarker]--):(d._.arrows.startPath&&p[d._.arrows.startPath]--,d._.arrows.startMarker&&p[d._.arrows.startMarker]--):d._.arrows={},"none"!=w){var A="raphael-marker-"+w,B="raphael-marker-"+r+w+x+y;a._g.doc.getElementById(A)?p[A]++:(n.defs.appendChild(q(q("path"),{"stroke-linecap":"round",d:o[w],id:A})),p[A]=1);var C,D=a._g.doc.getElementById(B);D?(p[B]++,C=D.getElementsByTagName("use")[0]):(D=q(q("marker"),{id:B,markerHeight:y,markerWidth:x,orient:"auto",refX:j,refY:y/2}),C=q(q("use"),{"xlink:href":"#"+A,transform:(f?"rotate(180 "+x/2+" "+y/2+") ":l)+"scale("+x/z+","+y/z+")","stroke-width":(1/((x/z+y/z)/2)).toFixed(4)}),D.appendChild(C),n.defs.appendChild(D),p[B]=1),q(C,k);var E=i*("diamond"!=w&&"oval"!=w);f?(g=d._.arrows.startdx*u||0,h=a.getTotalLength(t.path)-E*u):(g=E*u,h=a.getTotalLength(t.path)-(d._.arrows.enddx*u||0)),k={},k["marker-"+r]="url(#"+B+")",(h||g)&&(k.d=Raphael.getSubpath(t.path,g,h)),q(s,k),d._.arrows[r+"Path"]=A,d._.arrows[r+"Marker"]=B,d._.arrows[r+"dx"]=E,d._.arrows[r+"Type"]=w,d._.arrows[r+"String"]=e}else f?(g=d._.arrows.startdx*u||0,h=a.getTotalLength(t.path)-g):(g=0,h=a.getTotalLength(t.path)-(d._.arrows.enddx*u||0)),d._.arrows[r+"Path"]&&q(s,{d:Raphael.getSubpath(t.path,g,h)}),delete d._.arrows[r+"Path"],delete d._.arrows[r+"Marker"],delete d._.arrows[r+"dx"],delete d._.arrows[r+"Type"],delete d._.arrows[r+"String"];for(k in p)if(p[b](k)&&!p[k]){var F=a._g.doc.getElementById(k);F&&F.parentNode.removeChild(F)}}},u={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},v=function(a,b,d){if(b=u[c(b).toLowerCase()]){for(var e=a.attrs["stroke-width"]||"1",f={round:e,square:e,butt:0}[a.attrs["stroke-linecap"]||d["stroke-linecap"]]||0,g=[],h=b.length;h--;)g[h]=b[h]*e+(h%2?1:-1)*f;q(a.node,{"stroke-dasharray":g.join(",")})}},w=function(d,f){var i=d.node,k=d.attrs,m=i.style.visibility;i.style.visibility="hidden";for(var o in f)if(f[b](o)){if(!a._availableAttrs[b](o))continue;var p=f[o];switch(k[o]=p,o){case"blur":d.blur(p);break;case"href":case"title":case"target":var u=i.parentNode;if("a"!=u.tagName.toLowerCase()){var w=q("a");u.insertBefore(w,i),w.appendChild(i),u=w}"target"==o?u.setAttributeNS(n,"show","blank"==p?"new":p):u.setAttributeNS(n,o,p);break;case"cursor":i.style.cursor=p;break;case"transform":d.transform(p);break;case"arrow-start":t(d,p);break;case"arrow-end":t(d,p,1);break;case"clip-rect":var x=c(p).split(j);if(4==x.length){d.clip&&d.clip.parentNode.parentNode.removeChild(d.clip.parentNode);var z=q("clipPath"),A=q("rect");z.id=a.createUUID(),q(A,{x:x[0],y:x[1],width:x[2],height:x[3]}),z.appendChild(A),d.paper.defs.appendChild(z),q(i,{"clip-path":"url(#"+z.id+")"}),d.clip=A}if(!p){var B=i.getAttribute("clip-path");if(B){var C=a._g.doc.getElementById(B.replace(/(^url\(#|\)$)/g,l));C&&C.parentNode.removeChild(C),q(i,{"clip-path":l}),delete d.clip}}break;case"path":"path"==d.type&&(q(i,{d:p?k.path=a._pathToAbsolute(p):"M0,0"}),d._.dirty=1,d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1)));break;case"width":if(i.setAttribute(o,p),d._.dirty=1,!k.fx)break;o="x",p=k.x;case"x":k.fx&&(p=-k.x-(k.width||0));case"rx":if("rx"==o&&"rect"==d.type)break;case"cx":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"height":if(i.setAttribute(o,p),d._.dirty=1,!k.fy)break;o="y",p=k.y;case"y":k.fy&&(p=-k.y-(k.height||0));case"ry":if("ry"==o&&"rect"==d.type)break;case"cy":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"r":"rect"==d.type?q(i,{rx:p,ry:p}):i.setAttribute(o,p),d._.dirty=1;break;case"src":"image"==d.type&&i.setAttributeNS(n,"href",p);break;case"stroke-width":(1!=d._.sx||1!=d._.sy)&&(p/=g(h(d._.sx),h(d._.sy))||1),d.paper._vbSize&&(p*=d.paper._vbSize),i.setAttribute(o,p),k["stroke-dasharray"]&&v(d,k["stroke-dasharray"],f),d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"stroke-dasharray":v(d,p,f);break;case"fill":var D=c(p).match(a._ISURL);if(D){z=q("pattern");var E=q("image");z.id=a.createUUID(),q(z,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),q(E,{x:0,y:0,"xlink:href":D[1]}),z.appendChild(E),function(b){a._preload(D[1],function(){var a=this.offsetWidth,c=this.offsetHeight;q(b,{width:a,height:c}),q(E,{width:a,height:c}),d.paper.safari()})}(z),d.paper.defs.appendChild(z),q(i,{fill:"url(#"+z.id+")"}),d.pattern=z,d.pattern&&s(d);break}var F=a.getRGB(p);if(F.error){if(("circle"==d.type||"ellipse"==d.type||"r"!=c(p).charAt())&&r(d,p)){if("opacity"in k||"fill-opacity"in k){var G=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l));if(G){var H=G.getElementsByTagName("stop");q(H[H.length-1],{"stop-opacity":("opacity"in k?k.opacity:1)*("fill-opacity"in k?k["fill-opacity"]:1)})}}k.gradient=p,k.fill="none";break}}else delete f.gradient,delete k.gradient,!a.is(k.opacity,"undefined")&&a.is(f.opacity,"undefined")&&q(i,{opacity:k.opacity}),!a.is(k["fill-opacity"],"undefined")&&a.is(f["fill-opacity"],"undefined")&&q(i,{"fill-opacity":k["fill-opacity"]});F[b]("opacity")&&q(i,{"fill-opacity":F.opacity>1?F.opacity/100:F.opacity});case"stroke":F=a.getRGB(p),i.setAttribute(o,F.hex),"stroke"==o&&F[b]("opacity")&&q(i,{"stroke-opacity":F.opacity>1?F.opacity/100:F.opacity}),"stroke"==o&&d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"gradient":("circle"==d.type||"ellipse"==d.type||"r"!=c(p).charAt())&&r(d,p);break;case"opacity":k.gradient&&!k[b]("stroke-opacity")&&q(i,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(k.gradient){G=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l)),G&&(H=G.getElementsByTagName("stop"),q(H[H.length-1],{"stop-opacity":p}));break}default:"font-size"==o&&(p=e(p,10)+"px");var I=o.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()});i.style[I]=p,d._.dirty=1,i.setAttribute(o,p)}}y(d,f),i.style.visibility=m},x=1.2,y=function(d,f){if("text"==d.type&&(f[b]("text")||f[b]("font")||f[b]("font-size")||f[b]("x")||f[b]("y"))){var g=d.attrs,h=d.node,i=h.firstChild?e(a._g.doc.defaultView.getComputedStyle(h.firstChild,l).getPropertyValue("font-size"),10):10;if(f[b]("text")){for(g.text=f.text;h.firstChild;)h.removeChild(h.firstChild);for(var j,k=c(f.text).split("\n"),m=[],n=0,o=k.length;o>n;n++)j=q("tspan"),n&&q(j,{dy:i*x,x:g.x}),j.appendChild(a._g.doc.createTextNode(k[n])),h.appendChild(j),m[n]=j}else for(m=h.getElementsByTagName("tspan"),n=0,o=m.length;o>n;n++)n?q(m[n],{dy:i*x,x:g.x}):q(m[0],{dy:0});q(h,{x:g.x,y:g.y}),d._.dirty=1;var p=d._getBBox(),r=g.y-(p.y+p.height/2);r&&a.is(r,"finite")&&q(m[0],{dy:r})}},z=function(b,c){this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.matrix=a.matrix(),this.realPath=null,this.paper=c,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},A=a.el;z.prototype=A,A.constructor=z,a._engine.path=function(a,b){var c=q("path");b.canvas&&b.canvas.appendChild(c);var d=new z(c,b);return d.type="path",w(d,{fill:"none",stroke:"#000",path:a}),d},A.rotate=function(a,b,e){if(this.removed)return this;if(a=c(a).split(j),a.length-1&&(b=d(a[1]),e=d(a[2])),a=d(a[0]),null==e&&(b=e),null==b||null==e){var f=this.getBBox(1);b=f.x+f.width/2,e=f.y+f.height/2}return this.transform(this._.transform.concat([["r",a,b,e]])),this},A.scale=function(a,b,e,f){if(this.removed)return this;if(a=c(a).split(j),a.length-1&&(b=d(a[1]),e=d(a[2]),f=d(a[3])),a=d(a[0]),null==b&&(b=a),null==f&&(e=f),null==e||null==f)var g=this.getBBox(1);return e=null==e?g.x+g.width/2:e,f=null==f?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,b,e,f]])),this},A.translate=function(a,b){return this.removed?this:(a=c(a).split(j),a.length-1&&(b=d(a[1])),a=d(a[0])||0,b=+b||0,this.transform(this._.transform.concat([["t",a,b]])),this)},A.transform=function(c){var d=this._;if(null==c)return d.transform;if(a._extractTransform(this,c),this.clip&&q(this.clip,{transform:this.matrix.invert()}),this.pattern&&s(this),this.node&&q(this.node,{transform:this.matrix}),1!=d.sx||1!=d.sy){var e=this.attrs[b]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":e})}return this},A.hide=function(){return!this.removed&&this.paper.safari(this.node.style.display="none"),this},A.show=function(){return!this.removed&&this.paper.safari(this.node.style.display=""),this},A.remove=function(){if(!this.removed&&this.node.parentNode){var b=this.paper;b.__set__&&b.__set__.exclude(this),k.unbind("raphael.*.*."+this.id),this.gradient&&b.defs.removeChild(this.gradient),a._tear(this,b),"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var c in this)this[c]="function"==typeof this[c]?a._removedFactory(c):null;this.removed=!0}},A._getBBox=function(){if("none"==this.node.style.display){this.show();var a=!0}var b={};try{b=this.node.getBBox()}catch(c){}finally{b=b||{}}return a&&this.hide(),b},A.attr=function(c,d){if(this.removed)return this;if(null==c){var e={};for(var f in this.attrs)this.attrs[b](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e}if(null==d&&a.is(c,"string")){if("fill"==c&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==c)return this._.transform;for(var g=c.split(j),h={},i=0,l=g.length;l>i;i++)c=g[i],h[c]=c in this.attrs?this.attrs[c]:a.is(this.paper.customAttributes[c],"function")?this.paper.customAttributes[c].def:a._availableAttrs[c];return l-1?h:h[g[0]]}if(null==d&&a.is(c,"array")){for(h={},i=0,l=c.length;l>i;i++)h[c[i]]=this.attr(c[i]);return h}if(null!=d){var m={};m[c]=d}else null!=c&&a.is(c,"object")&&(m=c);for(var n in m)k("raphael.attr."+n+"."+this.id,this,m[n]);for(n in this.paper.customAttributes)if(this.paper.customAttributes[b](n)&&m[b](n)&&a.is(this.paper.customAttributes[n],"function")){var o=this.paper.customAttributes[n].apply(this,[].concat(m[n]));this.attrs[n]=m[n];for(var p in o)o[b](p)&&(m[p]=o[p])}return w(this,m),this},A.toFront=function(){if(this.removed)return this;"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var b=this.paper;return b.top!=this&&a._tofront(this,b),this},A.toBack=function(){if(this.removed)return this;var b=this.node.parentNode;"a"==b.tagName.toLowerCase()?b.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):b.firstChild!=this.node&&b.insertBefore(this.node,this.node.parentNode.firstChild),a._toback(this,this.paper);this.paper;return this},A.insertAfter=function(b){if(this.removed)return this;var c=b.node||b[b.length-1].node;return c.nextSibling?c.parentNode.insertBefore(this.node,c.nextSibling):c.parentNode.appendChild(this.node),a._insertafter(this,b,this.paper),this},A.insertBefore=function(b){if(this.removed)return this;var c=b.node||b[0].node;return c.parentNode.insertBefore(this.node,c),a._insertbefore(this,b,this.paper),this},A.blur=function(b){var c=this;if(0!==+b){var d=q("filter"),e=q("feGaussianBlur");c.attrs.blur=b,d.id=a.createUUID(),q(e,{stdDeviation:+b||1.5}),d.appendChild(e),c.paper.defs.appendChild(d),c._blur=d,q(c.node,{filter:"url(#"+d.id+")"})}else c._blur&&(c._blur.parentNode.removeChild(c._blur),delete c._blur,delete c.attrs.blur),c.node.removeAttribute("filter") },a._engine.circle=function(a,b,c,d){var e=q("circle");a.canvas&&a.canvas.appendChild(e);var f=new z(e,a);return f.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"},f.type="circle",q(e,f.attrs),f},a._engine.rect=function(a,b,c,d,e,f){var g=q("rect");a.canvas&&a.canvas.appendChild(g);var h=new z(g,a);return h.attrs={x:b,y:c,width:d,height:e,r:f||0,rx:f||0,ry:f||0,fill:"none",stroke:"#000"},h.type="rect",q(g,h.attrs),h},a._engine.ellipse=function(a,b,c,d,e){var f=q("ellipse");a.canvas&&a.canvas.appendChild(f);var g=new z(f,a);return g.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"},g.type="ellipse",q(f,g.attrs),g},a._engine.image=function(a,b,c,d,e,f){var g=q("image");q(g,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"}),g.setAttributeNS(n,"href",b),a.canvas&&a.canvas.appendChild(g);var h=new z(g,a);return h.attrs={x:c,y:d,width:e,height:f,src:b},h.type="image",h},a._engine.text=function(b,c,d,e){var f=q("text");b.canvas&&b.canvas.appendChild(f);var g=new z(f,b);return g.attrs={x:c,y:d,"text-anchor":"middle",text:e,font:a._availableAttrs.font,stroke:"none",fill:"#000"},g.type="text",w(g,g.attrs),g},a._engine.setSize=function(a,b){return this.width=a||this.width,this.height=b||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b&&b.container,d=b.x,e=b.y,f=b.width,g=b.height;if(!c)throw new Error("SVG container not found.");var h,i=q("svg"),j="overflow:hidden;";return d=d||0,e=e||0,f=f||512,g=g||342,q(i,{height:g,version:1.1,width:f,xmlns:"http://www.w3.org/2000/svg"}),1==c?(i.style.cssText=j+"position:absolute;left:"+d+"px;top:"+e+"px",a._g.doc.body.appendChild(i),h=1):(i.style.cssText=j+"position:relative",c.firstChild?c.insertBefore(i,c.firstChild):c.appendChild(i)),c=new a._Paper,c.width=f,c.height=g,c.canvas=i,c.clear(),c._left=c._top=0,h&&(c.renderfix=function(){}),c.renderfix(),c},a._engine.setViewBox=function(a,b,c,d,e){k("raphael.setViewBox",this,this._viewBox,[a,b,c,d,e]);var f,h,i=g(c/this.width,d/this.height),j=this.top,l=e?"meet":"xMinYMin";for(null==a?(this._vbSize&&(i=1),delete this._vbSize,f="0 0 "+this.width+m+this.height):(this._vbSize=i,f=a+m+b+m+c+m+d),q(this.canvas,{viewBox:f,preserveAspectRatio:l});i&&j;)h="stroke-width"in j.attrs?j.attrs["stroke-width"]:1,j.attr({"stroke-width":h}),j._.dirty=1,j._.dirtyT=1,j=j.prev;return this._viewBox=[a,b,c,d,!!e],this},a.prototype.renderfix=function(){var a,b=this.canvas,c=b.style;try{a=b.getScreenCTM()||b.createSVGMatrix()}catch(d){a=b.createSVGMatrix()}var e=-a.e%1,f=-a.f%1;(e||f)&&(e&&(this._left=(this._left+e)%1,c.left=this._left+"px"),f&&(this._top=(this._top+f)%1,c.top=this._top+"px"))},a.prototype.clear=function(){a.eve("raphael.clear",this);for(var b=this.canvas;b.firstChild;)b.removeChild(b.firstChild);this.bottom=this.top=null,(this.desc=q("desc")).appendChild(a._g.doc.createTextNode("Created with Rapha\xebl "+a.version)),b.appendChild(this.desc),b.appendChild(this.defs=q("defs"))},a.prototype.remove=function(){k("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]="function"==typeof this[b]?a._removedFactory(b):null};var B=a.st;for(var C in A)A[b](C)&&!B[b](C)&&(B[C]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(C))}(window.Raphael),window.Raphael&&window.Raphael.vml&&function(a){var b="hasOwnProperty",c=String,d=parseFloat,e=Math,f=e.round,g=e.max,h=e.min,i=e.abs,j="fill",k=/[, ]+/,l=a.eve,m=" progid:DXImageTransform.Microsoft",n=" ",o="",p={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},q=/([clmz]),?([^clmz]*)/gi,r=/ progid:\S+Blur\([^\)]+\)/g,s=/-?[^,\s-]+/g,t="position:absolute;left:0;top:0;width:1px;height:1px",u=21600,v={path:1,rect:1,image:1},w={circle:1,ellipse:1},x=function(b){var d=/[ahqstv]/gi,e=a._pathToAbsolute;if(c(b).match(d)&&(e=a._path2curve),d=/[clmz]/g,e==a._pathToAbsolute&&!c(b).match(d)){var g=c(b).replace(q,function(a,b,c){var d=[],e="m"==b.toLowerCase(),g=p[b];return c.replace(s,function(a){e&&2==d.length&&(g+=d+p["m"==b?"l":"L"],d=[]),d.push(f(a*u))}),g+d});return g}var h,i,j=e(b);g=[];for(var k=0,l=j.length;l>k;k++){h=j[k],i=j[k][0].toLowerCase(),"z"==i&&(i="x");for(var m=1,r=h.length;r>m;m++)i+=f(h[m]*u)+(m!=r-1?",":o);g.push(i)}return g.join(n)},y=function(b,c,d){var e=a.matrix();return e.rotate(-b,.5,.5),{dx:e.x(c,d),dy:e.y(c,d)}},z=function(a,b,c,d,e,f){var g=a._,h=a.matrix,k=g.fillpos,l=a.node,m=l.style,o=1,p="",q=u/b,r=u/c;if(m.visibility="hidden",b&&c){if(l.coordsize=i(q)+n+i(r),m.rotation=f*(0>b*c?-1:1),f){var s=y(f,d,e);d=s.dx,e=s.dy}if(0>b&&(p+="x"),0>c&&(p+=" y")&&(o=-1),m.flip=p,l.coordorigin=d*-q+n+e*-r,k||g.fillsize){var t=l.getElementsByTagName(j);t=t&&t[0],l.removeChild(t),k&&(s=y(f,h.x(k[0],k[1]),h.y(k[0],k[1])),t.position=s.dx*o+n+s.dy*o),g.fillsize&&(t.size=g.fillsize[0]*i(b)+n+g.fillsize[1]*i(c)),l.appendChild(t)}m.visibility="visible"}};a.toString=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl "+this.version};var A=function(a,b,d){for(var e=c(b).toLowerCase().split("-"),f=d?"end":"start",g=e.length,h="classic",i="medium",j="medium";g--;)switch(e[g]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":h=e[g];break;case"wide":case"narrow":j=e[g];break;case"long":case"short":i=e[g]}var k=a.node.getElementsByTagName("stroke")[0];k[f+"arrow"]=h,k[f+"arrowlength"]=i,k[f+"arrowwidth"]=j},B=function(e,i){e.attrs=e.attrs||{};var l=e.node,m=e.attrs,p=l.style,q=v[e.type]&&(i.x!=m.x||i.y!=m.y||i.width!=m.width||i.height!=m.height||i.cx!=m.cx||i.cy!=m.cy||i.rx!=m.rx||i.ry!=m.ry||i.r!=m.r),r=w[e.type]&&(m.cx!=i.cx||m.cy!=i.cy||m.r!=i.r||m.rx!=i.rx||m.ry!=i.ry),s=e;for(var t in i)i[b](t)&&(m[t]=i[t]);if(q&&(m.path=a._getPath[e.type](e),e._.dirty=1),i.href&&(l.href=i.href),i.title&&(l.title=i.title),i.target&&(l.target=i.target),i.cursor&&(p.cursor=i.cursor),"blur"in i&&e.blur(i.blur),(i.path&&"path"==e.type||q)&&(l.path=x(~c(m.path).toLowerCase().indexOf("r")?a._pathToAbsolute(m.path):m.path),"image"==e.type&&(e._.fillpos=[m.x,m.y],e._.fillsize=[m.width,m.height],z(e,1,1,0,0,0))),"transform"in i&&e.transform(i.transform),r){var y=+m.cx,B=+m.cy,D=+m.rx||+m.r||0,E=+m.ry||+m.r||0;l.path=a.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",f((y-D)*u),f((B-E)*u),f((y+D)*u),f((B+E)*u),f(y*u))}if("clip-rect"in i){var G=c(i["clip-rect"]).split(k);if(4==G.length){G[2]=+G[2]+ +G[0],G[3]=+G[3]+ +G[1];var H=l.clipRect||a._g.doc.createElement("div"),I=H.style;I.clip=a.format("rect({1}px {2}px {3}px {0}px)",G),l.clipRect||(I.position="absolute",I.top=0,I.left=0,I.width=e.paper.width+"px",I.height=e.paper.height+"px",l.parentNode.insertBefore(H,l),H.appendChild(l),l.clipRect=H)}i["clip-rect"]||l.clipRect&&(l.clipRect.style.clip="auto")}if(e.textpath){var J=e.textpath.style;i.font&&(J.font=i.font),i["font-family"]&&(J.fontFamily='"'+i["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,o)+'"'),i["font-size"]&&(J.fontSize=i["font-size"]),i["font-weight"]&&(J.fontWeight=i["font-weight"]),i["font-style"]&&(J.fontStyle=i["font-style"])}if("arrow-start"in i&&A(s,i["arrow-start"]),"arrow-end"in i&&A(s,i["arrow-end"],1),null!=i.opacity||null!=i["stroke-width"]||null!=i.fill||null!=i.src||null!=i.stroke||null!=i["stroke-width"]||null!=i["stroke-opacity"]||null!=i["fill-opacity"]||null!=i["stroke-dasharray"]||null!=i["stroke-miterlimit"]||null!=i["stroke-linejoin"]||null!=i["stroke-linecap"]){var K=l.getElementsByTagName(j),L=!1;if(K=K&&K[0],!K&&(L=K=F(j)),"image"==e.type&&i.src&&(K.src=i.src),i.fill&&(K.on=!0),(null==K.on||"none"==i.fill||null===i.fill)&&(K.on=!1),K.on&&i.fill){var M=c(i.fill).match(a._ISURL);if(M){K.parentNode==l&&l.removeChild(K),K.rotate=!0,K.src=M[1],K.type="tile";var N=e.getBBox(1);K.position=N.x+n+N.y,e._.fillpos=[N.x,N.y],a._preload(M[1],function(){e._.fillsize=[this.offsetWidth,this.offsetHeight]})}else K.color=a.getRGB(i.fill).hex,K.src=o,K.type="solid",a.getRGB(i.fill).error&&(s.type in{circle:1,ellipse:1}||"r"!=c(i.fill).charAt())&&C(s,i.fill,K)&&(m.fill="none",m.gradient=i.fill,K.rotate=!1)}if("fill-opacity"in i||"opacity"in i){var O=((+m["fill-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+a.getRGB(i.fill).o+1||2)-1);O=h(g(O,0),1),K.opacity=O,K.src&&(K.color="none")}l.appendChild(K);var P=l.getElementsByTagName("stroke")&&l.getElementsByTagName("stroke")[0],Q=!1;!P&&(Q=P=F("stroke")),(i.stroke&&"none"!=i.stroke||i["stroke-width"]||null!=i["stroke-opacity"]||i["stroke-dasharray"]||i["stroke-miterlimit"]||i["stroke-linejoin"]||i["stroke-linecap"])&&(P.on=!0),("none"==i.stroke||null===i.stroke||null==P.on||0==i.stroke||0==i["stroke-width"])&&(P.on=!1);var R=a.getRGB(i.stroke);P.on&&i.stroke&&(P.color=R.hex),O=((+m["stroke-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+R.o+1||2)-1);var S=.75*(d(i["stroke-width"])||1);if(O=h(g(O,0),1),null==i["stroke-width"]&&(S=m["stroke-width"]),i["stroke-width"]&&(P.weight=S),S&&1>S&&(O*=S)&&(P.weight=1),P.opacity=O,i["stroke-linejoin"]&&(P.joinstyle=i["stroke-linejoin"]||"miter"),P.miterlimit=i["stroke-miterlimit"]||8,i["stroke-linecap"]&&(P.endcap="butt"==i["stroke-linecap"]?"flat":"square"==i["stroke-linecap"]?"square":"round"),i["stroke-dasharray"]){var T={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};P.dashstyle=T[b](i["stroke-dasharray"])?T[i["stroke-dasharray"]]:o}Q&&l.appendChild(P)}if("text"==s.type){s.paper.canvas.style.display=o;var U=s.paper.span,V=100,W=m.font&&m.font.match(/\d+(?:\.\d*)?(?=px)/);p=U.style,m.font&&(p.font=m.font),m["font-family"]&&(p.fontFamily=m["font-family"]),m["font-weight"]&&(p.fontWeight=m["font-weight"]),m["font-style"]&&(p.fontStyle=m["font-style"]),W=d(m["font-size"]||W&&W[0])||10,p.fontSize=W*V+"px",s.textpath.string&&(U.innerHTML=c(s.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var X=U.getBoundingClientRect();s.W=m.w=(X.right-X.left)/V,s.H=m.h=(X.bottom-X.top)/V,s.X=m.x,s.Y=m.y+s.H/2,("x"in i||"y"in i)&&(s.path.v=a.format("m{0},{1}l{2},{1}",f(m.x*u),f(m.y*u),f(m.x*u)+1));for(var Y=["x","y","text","font","font-family","font-weight","font-style","font-size"],Z=0,$=Y.length;$>Z;Z++)if(Y[Z]in i){s._.dirty=1;break}switch(m["text-anchor"]){case"start":s.textpath.style["v-text-align"]="left",s.bbx=s.W/2;break;case"end":s.textpath.style["v-text-align"]="right",s.bbx=-s.W/2;break;default:s.textpath.style["v-text-align"]="center",s.bbx=0}s.textpath.style["v-text-kern"]=!0}},C=function(b,f,g){b.attrs=b.attrs||{};var h=(b.attrs,Math.pow),i="linear",j=".5 .5";if(b.attrs.gradient=f,f=c(f).replace(a._radial_gradient,function(a,b,c){return i="radial",b&&c&&(b=d(b),c=d(c),h(b-.5,2)+h(c-.5,2)>.25&&(c=e.sqrt(.25-h(b-.5,2))*(2*(c>.5)-1)+.5),j=b+n+c),o}),f=f.split(/\s*\-\s*/),"linear"==i){var k=f.shift();if(k=-d(k),isNaN(k))return null}var l=a._parseDots(f);if(!l)return null;if(b=b.shape||b.node,l.length){b.removeChild(g),g.on=!0,g.method="none",g.color=l[0].color,g.color2=l[l.length-1].color;for(var m=[],p=0,q=l.length;q>p;p++)l[p].offset&&m.push(l[p].offset+n+l[p].color);g.colors=m.length?m.join():"0% "+g.color,"radial"==i?(g.type="gradientTitle",g.focus="100%",g.focussize="0 0",g.focusposition=j,g.angle=0):(g.type="gradient",g.angle=(270-k)%360),b.appendChild(g)}return 1},D=function(b,c){this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=c,this.matrix=a.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},E=a.el;D.prototype=E,E.constructor=D,E.transform=function(b){if(null==b)return this._.transform;var d,e=this.paper._viewBoxShift,f=e?"s"+[e.scale,e.scale]+"-1-1t"+[e.dx,e.dy]:o;e&&(d=b=c(b).replace(/\.{3}|\u2026/g,this._.transform||o)),a._extractTransform(this,f+b);var g,h=this.matrix.clone(),i=this.skew,j=this.node,k=~c(this.attrs.fill).indexOf("-"),l=!c(this.attrs.fill).indexOf("url(");if(h.translate(-.5,-.5),l||k||"image"==this.type)if(i.matrix="1 0 0 1",i.offset="0 0",g=h.split(),k&&g.noRotation||!g.isSimple){j.style.filter=h.toFilter();var m=this.getBBox(),p=this.getBBox(1),q=m.x-p.x,r=m.y-p.y;j.coordorigin=q*-u+n+r*-u,z(this,1,1,q,r,0)}else j.style.filter=o,z(this,g.scalex,g.scaley,g.dx,g.dy,g.rotate);else j.style.filter=o,i.matrix=c(h),i.offset=h.offset();return d&&(this._.transform=d),this},E.rotate=function(a,b,e){if(this.removed)return this;if(null!=a){if(a=c(a).split(k),a.length-1&&(b=d(a[1]),e=d(a[2])),a=d(a[0]),null==e&&(b=e),null==b||null==e){var f=this.getBBox(1);b=f.x+f.width/2,e=f.y+f.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,b,e]])),this}},E.translate=function(a,b){return this.removed?this:(a=c(a).split(k),a.length-1&&(b=d(a[1])),a=d(a[0])||0,b=+b||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=b),this.transform(this._.transform.concat([["t",a,b]])),this)},E.scale=function(a,b,e,f){if(this.removed)return this;if(a=c(a).split(k),a.length-1&&(b=d(a[1]),e=d(a[2]),f=d(a[3]),isNaN(e)&&(e=null),isNaN(f)&&(f=null)),a=d(a[0]),null==b&&(b=a),null==f&&(e=f),null==e||null==f)var g=this.getBBox(1);return e=null==e?g.x+g.width/2:e,f=null==f?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,b,e,f]])),this._.dirtyT=1,this},E.hide=function(){return!this.removed&&(this.node.style.display="none"),this},E.show=function(){return!this.removed&&(this.node.style.display=o),this},E._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},E.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),a.eve.unbind("raphael.*.*."+this.id),a._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var b in this)this[b]="function"==typeof this[b]?a._removedFactory(b):null;this.removed=!0}},E.attr=function(c,d){if(this.removed)return this;if(null==c){var e={};for(var f in this.attrs)this.attrs[b](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e}if(null==d&&a.is(c,"string")){if(c==j&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var g=c.split(k),h={},i=0,m=g.length;m>i;i++)c=g[i],h[c]=c in this.attrs?this.attrs[c]:a.is(this.paper.customAttributes[c],"function")?this.paper.customAttributes[c].def:a._availableAttrs[c];return m-1?h:h[g[0]]}if(this.attrs&&null==d&&a.is(c,"array")){for(h={},i=0,m=c.length;m>i;i++)h[c[i]]=this.attr(c[i]);return h}var n;null!=d&&(n={},n[c]=d),null==d&&a.is(c,"object")&&(n=c);for(var o in n)l("raphael.attr."+o+"."+this.id,this,n[o]);if(n){for(o in this.paper.customAttributes)if(this.paper.customAttributes[b](o)&&n[b](o)&&a.is(this.paper.customAttributes[o],"function")){var p=this.paper.customAttributes[o].apply(this,[].concat(n[o]));this.attrs[o]=n[o];for(var q in p)p[b](q)&&(n[q]=p[q])}n.text&&"text"==this.type&&(this.textpath.string=n.text),B(this,n)}return this},E.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&a._tofront(this,this.paper),this},E.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),a._toback(this,this.paper)),this)},E.insertAfter=function(b){return this.removed?this:(b.constructor==a.st.constructor&&(b=b[b.length-1]),b.node.nextSibling?b.node.parentNode.insertBefore(this.node,b.node.nextSibling):b.node.parentNode.appendChild(this.node),a._insertafter(this,b,this.paper),this)},E.insertBefore=function(b){return this.removed?this:(b.constructor==a.st.constructor&&(b=b[0]),b.node.parentNode.insertBefore(this.node,b.node),a._insertbefore(this,b,this.paper),this)},E.blur=function(b){var c=this.node.runtimeStyle,d=c.filter;d=d.replace(r,o),0!==+b?(this.attrs.blur=b,c.filter=d+n+m+".Blur(pixelradius="+(+b||1.5)+")",c.margin=a.format("-{0}px 0 0 -{0}px",f(+b||1.5))):(c.filter=d,c.margin=0,delete this.attrs.blur)},a._engine.path=function(a,b){var c=F("shape");c.style.cssText=t,c.coordsize=u+n+u,c.coordorigin=b.coordorigin;var d=new D(c,b),e={fill:"none",stroke:"#000"};a&&(e.path=a),d.type="path",d.path=[],d.Path=o,B(d,e),b.canvas.appendChild(c);var f=F("skew");return f.on=!0,c.appendChild(f),d.skew=f,d.transform(o),d},a._engine.rect=function(b,c,d,e,f,g){var h=a._rectPath(c,d,e,f,g),i=b.path(h),j=i.attrs;return i.X=j.x=c,i.Y=j.y=d,i.W=j.width=e,i.H=j.height=f,j.r=g,j.path=h,i.type="rect",i},a._engine.ellipse=function(a,b,c,d,e){{var f=a.path();f.attrs}return f.X=b-d,f.Y=c-e,f.W=2*d,f.H=2*e,f.type="ellipse",B(f,{cx:b,cy:c,rx:d,ry:e}),f},a._engine.circle=function(a,b,c,d){{var e=a.path();e.attrs}return e.X=b-d,e.Y=c-d,e.W=e.H=2*d,e.type="circle",B(e,{cx:b,cy:c,r:d}),e},a._engine.image=function(b,c,d,e,f,g){var h=a._rectPath(d,e,f,g),i=b.path(h).attr({stroke:"none"}),k=i.attrs,l=i.node,m=l.getElementsByTagName(j)[0];return k.src=c,i.X=k.x=d,i.Y=k.y=e,i.W=k.width=f,i.H=k.height=g,k.path=h,i.type="image",m.parentNode==l&&l.removeChild(m),m.rotate=!0,m.src=c,m.type="tile",i._.fillpos=[d,e],i._.fillsize=[f,g],l.appendChild(m),z(i,1,1,0,0,0),i},a._engine.text=function(b,d,e,g){var h=F("shape"),i=F("path"),j=F("textpath");d=d||0,e=e||0,g=g||"",i.v=a.format("m{0},{1}l{2},{1}",f(d*u),f(e*u),f(d*u)+1),i.textpathok=!0,j.string=c(g),j.on=!0,h.style.cssText=t,h.coordsize=u+n+u,h.coordorigin="0 0";var k=new D(h,b),l={fill:"#000",stroke:"none",font:a._availableAttrs.font,text:g};k.shape=h,k.path=i,k.textpath=j,k.type="text",k.attrs.text=c(g),k.attrs.x=d,k.attrs.y=e,k.attrs.w=1,k.attrs.h=1,B(k,l),h.appendChild(j),h.appendChild(i),b.canvas.appendChild(h);var m=F("skew");return m.on=!0,h.appendChild(m),k.skew=m,k.transform(o),k},a._engine.setSize=function(b,c){var d=this.canvas.style;return this.width=b,this.height=c,b==+b&&(b+="px"),c==+c&&(c+="px"),d.width=b,d.height=c,d.clip="rect(0 "+b+" "+c+" 0)",this._viewBox&&a._engine.setViewBox.apply(this,this._viewBox),this},a._engine.setViewBox=function(b,c,d,e,f){a.eve("raphael.setViewBox",this,this._viewBox,[b,c,d,e,f]);var h,i,j=this.width,k=this.height,l=1/g(d/j,e/k);return f&&(h=k/e,i=j/d,j>d*h&&(b-=(j-d*h)/2/h),k>e*i&&(c-=(k-e*i)/2/i)),this._viewBox=[b,c,d,e,!!f],this._viewBoxShift={dx:-b,dy:-c,scale:l},this.forEach(function(a){a.transform("...")}),this};var F;a._engine.initWin=function(a){var b=a.document;b.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!b.namespaces.rvml&&b.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),F=function(a){return b.createElement("<rvml:"+a+' class="rvml">')}}catch(c){F=function(a){return b.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},a._engine.initWin(a._g.win),a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b.container,d=b.height,e=b.width,f=b.x,g=b.y;if(!c)throw new Error("VML container not found.");var h=new a._Paper,i=h.canvas=a._g.doc.createElement("div"),j=i.style;return f=f||0,g=g||0,e=e||512,d=d||342,h.width=e,h.height=d,e==+e&&(e+="px"),d==+d&&(d+="px"),h.coordsize=1e3*u+n+1e3*u,h.coordorigin="0 0",h.span=a._g.doc.createElement("span"),h.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",i.appendChild(h.span),j.cssText=a.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",e,d),1==c?(a._g.doc.body.appendChild(i),j.left=f+"px",j.top=g+"px",j.position="absolute"):c.firstChild?c.insertBefore(i,c.firstChild):c.appendChild(i),h.renderfix=function(){},h},a.prototype.clear=function(){a.eve("raphael.clear",this),this.canvas.innerHTML=o,this.span=a._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},a.prototype.remove=function(){a.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]="function"==typeof this[b]?a._removedFactory(b):null;return!0};var G=a.st;for(var H in E)E[b](H)&&!G[b](H)&&(G[H]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(H))}(window.Raphael),function(a,b){function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f,g=b.parentNode,h=g.name;return b.href&&h&&"map"===g.nodeName.toLowerCase()?(f=a("img[usemap=#"+h+"]")[0],!!f&&d(f)):!1}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}function d(b){return!a(b).parents().andSelf().filter(function(){return"hidden"===a.curCSS(this,"visibility")||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{},a.ui.version||(a.extend(a.ui,{version:"1.8.24",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return"number"==typeof b?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;return b=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length)for(var d,e,f=a(this[0]);f.length&&f[0]!==document;){if(d=f.css("position"),("absolute"===d||"relative"===d||"fixed"===d)&&(e=parseInt(f.css("zIndex"),10),!isNaN(e)&&0!==e))return e;f=f.parent()}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(c,d){function e(b,c,d,e){return a.each(f,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),e&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)}),c}var f="Width"===d?["Left","Right"]:["Top","Bottom"],g=d.toLowerCase(),h={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?h["inner"+d].call(this):this.each(function(){a(this).css(g,e(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return"number"!=typeof b?h["outer"+d].call(this,b):this.each(function(){a(this).css(g,e(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));c.offsetHeight,a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=100===c.offsetHeight,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.curCSS||(a.curCSS=a.css),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(d&&a.element[0].parentNode)for(var e=0;e<d.length;e++)a.options[d[e][0]]&&d[e][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?16&a.compareDocumentPosition(b):a!==b&&a.contains(b)},hasScroll:function(b,c){if("hidden"===a(b).css("overflow"))return!1;var d=c&&"left"===c?"scrollLeft":"scrollTop",e=!1;return b[d]>0?!0:(b[d]=1,e=b[d]>0,b[d]=0,e)},isOverAxis:function(a,b,c){return a>b&&b+c>a},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&&a.ui.isOverAxis(c,e,g)}}))}(jQuery),function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d,e=0;null!=(d=b[e]);e++)try{a(d).triggerHandler("remove")}catch(f){}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){return c||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){try{a(this).triggerHandler("remove")}catch(b){}}),d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e,f=b.split(".")[0];b=b.split(".")[1],e=f+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e]=function(c){return!!a.data(c,b)},a[f]=a[f]||{},a[f][b]=function(a,b){arguments.length&&this._createWidget(a,b)};var g=new c;g.options=a.extend(!0,{},g.options),a[f][b].prototype=a.extend(!0,g,{namespace:f,widgetName:b,widgetEventPrefix:a[f][b].prototype.widgetEventPrefix||b,widgetBaseClass:e},d),a.widget.bridge(b,a[f][b])},a.widget.bridge=function(c,d){a.fn[c]=function(e){var f="string"==typeof e,g=Array.prototype.slice.call(arguments,1),h=this;return e=!f&&g.length?a.extend.apply(null,[!0,e].concat(g)):e,f&&"_"===e.charAt(0)?h:(f?this.each(function(){var d=a.data(this,c),f=d&&a.isFunction(d[e])?d[e].apply(d,g):d;return f!==d&&f!==b?(h=f,!1):void 0}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))}),h)}},a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)},a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this),this.element=a(c),this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(0===arguments.length)return a.extend({},this.options);if("string"==typeof c){if(d===b)return this.options[c];e={},e[c]=d}return this._setOptions(e),this},_setOptions:function(b){var c=this;return a.each(b,function(a,b){c._setOption(a,b)}),this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",b),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}}(jQuery),function(a){var b=!1;a(document).mouseup(function(){b=!1}),a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){return!0===a.data(c.target,b.widgetName+".preventClickEvent")?(a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(c){if(!b){this._mouseStarted&&this._mouseUp(c),this._mouseDownEvent=c;var d=this,e=1==c.which,f="string"==typeof this.options.cancel&&c.target.nodeName?a(c.target).closest(this.options.cancel).length:!1;return e&&!f&&this._mouseCapture(c)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(c)&&this._mouseDelayMet(c)&&(this._mouseStarted=this._mouseStart(c)!==!1,!this._mouseStarted)?(c.preventDefault(),!0):(!0===a.data(c.target,this.widgetName+".preventClickEvent")&&a.removeData(c.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),c.preventDefault(),b=!0,!0)):!0}},_mouseMove:function(b){return!a.browser.msie||document.documentMode>=9||b.button?this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted):this._mouseUp(b)},_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(a){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){"original"!=this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function(){return this.element.data("draggable")?(this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this):void 0},_mouseCapture:function(b){var c=this.options;return this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(b),this.handle?(c.iframeFix&&a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),c.containment&&this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b),!0) },_mouseDrag:function(b,c){if(this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp({}),!1;this.position=d.position}return this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px"),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=!1;a.ui.ddmanager&&!this.options.dropBehaviour&&(c=a.ui.ddmanager.drop(this,b)),this.dropped&&(c=this.dropped,this.dropped=!1);for(var d=this.element[0],e=!1;d&&(d=d.parentNode);)d==document&&(e=!0);if(!e&&"original"===this.options.helper)return!1;if("invalid"==this.options.revert&&!c||"valid"==this.options.revert&&c||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var f=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",b)!==!1&&f._clear()})}else this._trigger("stop",b)!==!1&&this._clear();return!1},_mouseUp:function(b){return a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){var c=this.options.handle&&a(this.options.handle,this.element).length?!1:!0;return a(this.options.handle,this.element).find("*").andSelf().each(function(){this==b.target&&(c=!0)}),c},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):"clone"==c.helper?this.element.clone().removeAttr("id"):this.element;return d.parents("body").length||d.appendTo("parent"==c.appendTo?this.element[0].parentNode:c.appendTo),d[0]==this.element[0]||/(fixed|absolute)/.test(d.css("position"))||d.css("position","absolute"),d},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&a.browser.msie)&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;if("parent"==b.containment&&(b.containment=this.helper[0].parentNode),("document"==b.containment||"window"==b.containment)&&(this.containment=["document"==b.containment?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"==b.containment?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"==b.containment?0:a(window).scrollLeft())+a("document"==b.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"==b.containment?0:a(window).scrollTop())+(a("document"==b.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(b.containment)||b.containment.constructor==Array)b.containment.constructor==Array&&(this.containment=b.containment);else{var c=a(b.containment),d=c[0];if(!d)return;var e=(c.offset(),"hidden"!=a(d).css("overflow"));this.containment=[(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0),(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0),(e?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c}},_convertPositionTo:function(b,c){c||(c=this.position);var d="absolute"==b?1:-1,e=(this.options,"absolute"!=this.cssPosition||this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent),f=/(html|body)/i.test(e[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&a.browser.version<526&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollTop():f?0:e.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&a.browser.version<526&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,e=/(html|body)/i.test(d[0].tagName),f=b.pageX,g=b.pageY;if(this.originalPosition){var h;if(this.containment){if(this.relative_container){var i=this.relative_container.offset();h=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]}else h=this.containment;b.pageX-this.offset.click.left<h[0]&&(f=h[0]+this.offset.click.left),b.pageY-this.offset.click.top<h[1]&&(g=h[1]+this.offset.click.top),b.pageX-this.offset.click.left>h[2]&&(f=h[2]+this.offset.click.left),b.pageY-this.offset.click.top>h[3]&&(g=h[3]+this.offset.click.top)}if(c.grid){var j=c.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY;g=h?j-this.offset.click.top<h[1]||j-this.offset.click.top>h[3]?j-this.offset.click.top<h[1]?j+c.grid[1]:j-c.grid[1]:j:j;var k=c.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0]:this.originalPageX;f=h?k-this.offset.click.left<h[0]||k-this.offset.click.left>h[2]?k-this.offset.click.left<h[0]?k+c.grid[0]:k-c.grid[0]:k:k}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]==this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(b,c,d){return d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d]),"drag"==b&&(this.positionAbs=this._convertPositionTo("absolute")),a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.extend(a.ui.draggable,{version:"1.8.24"}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var d=a(this).data("draggable"),e=d.options,f=a.extend({},c,{item:d.element});d.sortables=[],a(e.connectToSortable).each(function(){var c=a.data(this,"sortable");c&&!c.options.disabled&&(d.sortables.push({instance:c,shouldRevert:c.options.revert}),c.refreshPositions(),c._trigger("activate",b,f))})},stop:function(b,c){var d=a(this).data("draggable"),e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){this.instance.isOver?(this.instance.isOver=0,d.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(b),this.instance.options.helper=this.instance.options._helper,"original"==d.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",b,e))})},drag:function(b,c){var d=a(this).data("draggable"),e=this;a.each(d.sortables,function(){this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this.instance._intersectsWith(this.instance.containerCache)?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(e).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return c.helper[0]},b.target=this.instance.currentItem[0],this.instance._mouseCapture(b,!0),this.instance._mouseStart(b,!0,!0),this.instance.offset.click.top=d.offset.click.top,this.instance.offset.click.left=d.offset.click.left,this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top,d._trigger("toSortable",b),d.dropped=this.instance.element,d.currentItem=d.element,this.instance.fromOutside=d),this.instance.currentItem&&this.instance._mouseDrag(b)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",b,this.instance._uiHash(this.instance)),this.instance._mouseStop(b,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),d._trigger("fromSortable",b),d.dropped=!1)})}}),a.ui.plugin.add("draggable","cursor",{start:function(){var b=a("body"),c=a(this).data("draggable").options;b.css("cursor")&&(c._cursor=b.css("cursor")),b.css("cursor",c.cursor)},stop:function(){var b=a(this).data("draggable").options;b._cursor&&a("body").css("cursor",b._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("opacity")&&(e._opacity=d.css("opacity")),d.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(){var b=a(this).data("draggable");b.scrollParent[0]!=document&&"HTML"!=b.scrollParent[0].tagName&&(b.overflowOffset=b.scrollParent.offset())},drag:function(b){var c=a(this).data("draggable"),d=c.options,e=!1;c.scrollParent[0]!=document&&"HTML"!=c.scrollParent[0].tagName?(d.axis&&"x"==d.axis||(c.overflowOffset.top+c.scrollParent[0].offsetHeight-b.pageY<d.scrollSensitivity?c.scrollParent[0].scrollTop=e=c.scrollParent[0].scrollTop+d.scrollSpeed:b.pageY-c.overflowOffset.top<d.scrollSensitivity&&(c.scrollParent[0].scrollTop=e=c.scrollParent[0].scrollTop-d.scrollSpeed)),d.axis&&"y"==d.axis||(c.overflowOffset.left+c.scrollParent[0].offsetWidth-b.pageX<d.scrollSensitivity?c.scrollParent[0].scrollLeft=e=c.scrollParent[0].scrollLeft+d.scrollSpeed:b.pageX-c.overflowOffset.left<d.scrollSensitivity&&(c.scrollParent[0].scrollLeft=e=c.scrollParent[0].scrollLeft-d.scrollSpeed))):(d.axis&&"x"==d.axis||(b.pageY-a(document).scrollTop()<d.scrollSensitivity?e=a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<d.scrollSensitivity&&(e=a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed))),d.axis&&"y"==d.axis||(b.pageX-a(document).scrollLeft()<d.scrollSensitivity?e=a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<d.scrollSensitivity&&(e=a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed)))),e!==!1&&a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(c,b)}}),a.ui.plugin.add("draggable","snap",{start:function(){var b=a(this).data("draggable"),c=b.options;b.snapElements=[],a(c.snap.constructor!=String?c.snap.items||":data(draggable)":c.snap).each(function(){var c=a(this),d=c.offset();this!=b.element[0]&&b.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:d.top,left:d.left})})},drag:function(b,c){for(var d=a(this).data("draggable"),e=d.options,f=e.snapTolerance,g=c.offset.left,h=g+d.helperProportions.width,i=c.offset.top,j=i+d.helperProportions.height,k=d.snapElements.length-1;k>=0;k--){var l=d.snapElements[k].left,m=l+d.snapElements[k].width,n=d.snapElements[k].top,o=n+d.snapElements[k].height;if(g>l-f&&m+f>g&&i>n-f&&o+f>i||g>l-f&&m+f>g&&j>n-f&&o+f>j||h>l-f&&m+f>h&&i>n-f&&o+f>i||h>l-f&&m+f>h&&j>n-f&&o+f>j){if("inner"!=e.snapMode){var p=Math.abs(n-j)<=f,q=Math.abs(o-i)<=f,r=Math.abs(l-h)<=f,s=Math.abs(m-g)<=f;p&&(c.position.top=d._convertPositionTo("relative",{top:n-d.helperProportions.height,left:0}).top-d.margins.top),q&&(c.position.top=d._convertPositionTo("relative",{top:o,left:0}).top-d.margins.top),r&&(c.position.left=d._convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left-d.margins.left),s&&(c.position.left=d._convertPositionTo("relative",{top:0,left:m}).left-d.margins.left)}var t=p||q||r||s;if("outer"!=e.snapMode){var p=Math.abs(n-i)<=f,q=Math.abs(o-j)<=f,r=Math.abs(l-g)<=f,s=Math.abs(m-h)<=f;p&&(c.position.top=d._convertPositionTo("relative",{top:n,left:0}).top-d.margins.top),q&&(c.position.top=d._convertPositionTo("relative",{top:o-d.helperProportions.height,left:0}).top-d.margins.top),r&&(c.position.left=d._convertPositionTo("relative",{top:0,left:l}).left-d.margins.left),s&&(c.position.left=d._convertPositionTo("relative",{top:0,left:m-d.helperProportions.width}).left-d.margins.left)}!d.snapElements[k].snapping&&(p||q||r||s||t)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=p||q||r||s||t}else d.snapElements[k].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=!1}}}),a.ui.plugin.add("draggable","stack",{start:function(){var b=a(this).data("draggable").options,c=a.makeArray(a(b.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});if(c.length){var d=parseInt(c[0].style.zIndex)||0;a(c).each(function(a){this.style.zIndex=d+a}),this[0].style.zIndex=d+c.length}}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("zIndex")&&(e._zIndex=d.css("zIndex")),d.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})}(jQuery),function(a){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===a.axis||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){a.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--)this.items[b].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,c){"disabled"===b?(this.options[b]=c,this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){var d=this;if(this.reverting)return!1;if(this.options.disabled||"static"==this.options.type)return!1;this._refreshItems(b);{var e=null,f=this;a(b.target).parents().each(function(){return a.data(this,d.widgetName+"-item")==f?(e=a(this),!1):void 0})}if(a.data(b.target,d.widgetName+"-item")==f&&(e=a(b.target)),!e)return!1;if(this.options.handle&&!c){var g=!1;if(a(this.options.handle,e).find("*").andSelf().each(function(){this==b.target&&(g=!0)}),!g)return!1}return this.currentItem=e,this._removeCurrentsFromItems(),!0},_mouseStart:function(b,c,d){var e=this.options,f=this;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),e.containment&&this._setContainment(),e.cursor&&(a("body").css("cursor")&&(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",e.cursor)),e.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",e.opacity)),e.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",e.zIndex)),this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!d)for(var g=this.containers.length-1;g>=0;g--)this.containers[g]._trigger("activate",b,f._uiHash(this));return a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b),!0},_mouseDrag:function(b){if(this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll){var c=this.options,d=!1;this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<c.scrollSensitivity?this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop+c.scrollSpeed:b.pageY-this.overflowOffset.top<c.scrollSensitivity&&(this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop-c.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX<c.scrollSensitivity?this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft+c.scrollSpeed:b.pageX-this.overflowOffset.left<c.scrollSensitivity&&(this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft-c.scrollSpeed)):(b.pageY-a(document).scrollTop()<c.scrollSensitivity?d=a(document).scrollTop(a(document).scrollTop()-c.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<c.scrollSensitivity&&(d=a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed)),b.pageX-a(document).scrollLeft()<c.scrollSensitivity?d=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<c.scrollSensitivity&&(d=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed))),d!==!1&&a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b)}this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px");for(var e=this.items.length-1;e>=0;e--){var f=this.items[e],g=f.item[0],h=this._intersectsWithPointer(f);if(h&&f.instance===this.currentContainer&&g!=this.currentItem[0]&&this.placeholder[1==h?"next":"prev"]()[0]!=g&&!a.ui.contains(this.placeholder[0],g)&&("semi-dynamic"==this.options.type?!a.ui.contains(this.element[0],g):!0)){if(this.direction=1==h?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(f))break;this._rearrange(b,f),this._trigger("change",b,this._uiHash());break}}return this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(b,c){if(b){if(a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b),this.options.revert){var d=this,e=d.placeholder.offset();d.reverting=!0,a(this.helper).animate({left:e.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1}},cancel:function(){var b=this;if(this.dragging){this._mouseUp({target:null}),"original"==this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("deactivate",null,b._uiHash(this)),this.containers[c].containerCache.over&&(this.containers[c]._trigger("out",null,b._uiHash(this)),this.containers[c].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!=this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);c&&d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"="),d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")}),d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l=d+j>h&&i>d+j&&b+k>f&&g>b+k;return"pointer"==this.options.tolerance||this.options.forcePointerForContainers||"pointer"!=this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?l:f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i},_intersectsWithPointer:function(b){var c="x"===this.options.axis||a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top,b.height),d="y"===this.options.axis||a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left,b.width),e=c&&d,f=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();return e?this.floating?g&&"right"==g||"down"==f?2:1:f&&("down"==f?2:1):!1},_intersectsWithSides:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top+b.height/2,b.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left+b.width/2,b.width),e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return this.floating&&f?"right"==f&&d||"left"==f&&!d:e&&("down"==e&&c||"up"==e&&!c)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return 0!=a&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return 0!=a&&(a>0?"right":"left")},refresh:function(a){return this._refreshItems(a),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c=[],d=[],e=this._connectWith();if(e&&b)for(var f=e.length-1;f>=0;f--)for(var g=a(e[f]),h=g.length-1;h>=0;h--){var i=a.data(g[h],this.widgetName);i&&i!=this&&!i.options.disabled&&d.push([a.isFunction(i.options.items)?i.options.items.call(i.element):a(i.options.items,i.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),i])}d.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var f=d.length-1;f>=0;f--)d[f][0].each(function(){c.push(this)});return a(c)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data("+this.widgetName+"-item)"),b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(b){this.items=[],this.containers=[this];var c=this.items,d=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],e=this._connectWith();if(e&&this.ready)for(var f=e.length-1;f>=0;f--)for(var g=a(e[f]),h=g.length-1;h>=0;h--){var i=a.data(g[h],this.widgetName);i&&i!=this&&!i.options.disabled&&(d.push([a.isFunction(i.options.items)?i.options.items.call(i.element[0],b,{item:this.currentItem}):a(i.options.items,i.element),i]),this.containers.push(i))}for(var f=d.length-1;f>=0;f--)for(var j=d[f][1],k=d[f][0],h=0,l=k.length;l>h;h++){var m=a(k[h]);m.data(this.widgetName+"-item",j),c.push({item:m,instance:j,width:0,height:0,left:0,top:0})}},refreshPositions:function(b){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var c=this.items.length-1;c>=0;c--){var d=this.items[c];if(d.instance==this.currentContainer||!this.currentContainer||d.item[0]==this.currentItem[0]){var e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;b||(d.width=e.outerWidth(),d.height=e.outerHeight());var f=e.offset();d.left=f.left,d.top=f.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var c=this.containers.length-1;c>=0;c--){var f=this.containers[c].element.offset();this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},_createPlaceholder:function(b){var c=b||this,d=c.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return e||(b.style.visibility="hidden"),b},update:function(a,b){(!e||d.forcePlaceholderSize)&&(b.height()||b.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10)),b.width()||b.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10)))}}}c.placeholder=a(d.placeholder.element.call(c.element,c.currentItem)),c.currentItem.after(c.placeholder),d.placeholder.update(c,c.placeholder)},_contactContainers:function(b){for(var c=null,d=null,e=this.containers.length-1;e>=0;e--)if(!a.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(c&&a.ui.contains(this.containers[e].element[0],c.element[0]))continue;c=this.containers[e],d=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1;else if(this.currentContainer!=this.containers[d]){for(var f=1e4,g=null,h=this.positionAbs[this.containers[d].floating?"left":"top"],i=this.items.length-1;i>=0;i--)if(a.ui.contains(this.containers[d].element[0],this.items[i].item[0])){var j=this.containers[d].floating?this.items[i].item.offset().left:this.items[i].item.offset().top;Math.abs(j-h)<f&&(f=Math.abs(j-h),g=this.items[i],this.direction=j-h>0?"down":"up")}if(!g&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[d],g?this._rearrange(b,g,null,!0):this._rearrange(b,null,this.containers[d].element,!0),this._trigger("change",b,this._uiHash()),this.containers[d]._trigger("change",b,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):"clone"==c.helper?this.currentItem.clone():this.currentItem;return d.parents("body").length||a("parent"!=c.appendTo?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]),d[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(""==d[0].style.width||c.forceHelperSize)&&d.width(this.currentItem.width()),(""==d[0].style.height||c.forceHelperSize)&&d.height(this.currentItem.height()),d},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&a.browser.msie)&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)} },_getRelativeOffset:function(){if("relative"==this.cssPosition){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;if("parent"==b.containment&&(b.containment=this.helper[0].parentNode),("document"==b.containment||"window"==b.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a("document"==b.containment?document:window).width()-this.helperProportions.width-this.margins.left,(a("document"==b.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),!/^(document|window|parent)$/.test(b.containment)){var c=a(b.containment)[0],d=a(b.containment).offset(),e="hidden"!=a(c).css("overflow");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(e?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(e?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,c){c||(c=this.position);var d="absolute"==b?1:-1,e=(this.options,"absolute"!=this.cssPosition||this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent),f=/(html|body)/i.test(e[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollTop():f?0:e.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,e=/(html|body)/i.test(d[0].tagName);"relative"!=this.cssPosition||this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset());var f=b.pageX,g=b.pageY;if(this.originalPosition&&(this.containment&&(b.pageX-this.offset.click.left<this.containment[0]&&(f=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top<this.containment[1]&&(g=this.containment[1]+this.offset.click.top),b.pageX-this.offset.click.left>this.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top)),c.grid)){var h=this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1];g=this.containment?h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3]?h-this.offset.click.top<this.containment[1]?h+c.grid[1]:h-c.grid[1]:h:h;var i=this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0];f=this.containment?i-this.offset.click.left<this.containment[0]||i-this.offset.click.left>this.containment[2]?i-this.offset.click.left<this.containment[0]?i+c.grid[0]:i-c.grid[0]:i:i}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],"down"==this.direction?b.item[0]:b.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var e=this,f=this.counter;window.setTimeout(function(){f==e.counter&&e.refreshPositions(!d)},0)},_clear:function(b,c){this.reverting=!1;var d=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)("auto"==this._storedCSS[e]||"static"==this._storedCSS[e])&&(this._storedCSS[e]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!c&&d.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev==this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent==this.currentItem.parent()[0]||c||d.push(function(a){this._trigger("update",a,this._uiHash())}),this!==this.currentContainer&&(c||(d.push(function(a){this._trigger("remove",a,this._uiHash())}),d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.currentContainer)),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.currentContainer))));for(var e=this.containers.length-1;e>=0;e--)c||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[e])),this.containers[e].containerCache.over&&(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[e])),this.containers[e].containerCache.over=0);if(this._storedCursor&&a("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"==this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",b,this._uiHash());for(var e=0;e<d.length;e++)d[e].call(this,b);this._trigger("stop",b,this._uiHash())}return this.fromOutside=!1,!1}if(c||this._trigger("beforeStop",b,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null,!c){for(var e=0;e<d.length;e++)d[e].call(this,b);this._trigger("stop",b,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}}),a.extend(a.ui.sortable,{version:"1.8.24"})}(jQuery),window.Raphael&&(Raphael.shadow=function(a,b,c,d,e){e=e||{};var f,g,h,i=jQuery(e.target),j=jQuery("<div/>",{"class":"aui-shadow"}),k=e.shadow||e.color||"#000",l=10*e.size||0,m=e.offsetSize||3,n=e.zindex||0,o=e.radius||0,p="0.4",q=e.blur||3;return c+=l+2*q,d+=l+2*q,Raphael.shadow.BOX_SHADOW_SUPPORT?(i.addClass("aui-box-shadow"),j.addClass("hidden")):(0===a&&0===b&&i.length>0&&(h=i.offset(),a=m-q+h.left,b=m-q+h.top),jQuery.browser.msie&&jQuery.browser.version<"9"&&(k="#f0f0f0",p="0.2"),j.css({position:"absolute",left:a,top:b,width:c,height:d,zIndex:n}),i.length>0?(j.appendTo(document.body),f=Raphael(j[0],c,d,o)):f=Raphael(a,b,c,d,o),f.canvas.style.position="absolute",g=f.rect(q,q,c-2*q,d-2*q).attr({fill:k,stroke:k,blur:""+q,opacity:p}),j)},Raphael.shadow.BOX_SHADOW_SUPPORT=function(){for(var a=document.documentElement.style,b=["boxShadow","MozBoxShadow","WebkitBoxShadow","msBoxShadow"],c=0;c<b.length;c++)if(b[c]in a)return!0;return!1}()),jQuery.os={};var jQueryOSplatform=navigator.platform.toLowerCase();jQuery.os.windows=-1!=jQueryOSplatform.indexOf("win"),jQuery.os.mac=-1!=jQueryOSplatform.indexOf("mac"),jQuery.os.linux=-1!=jQueryOSplatform.indexOf("linux"),function(a){function b(a){this.num=0,this.timer=a>0?a:!1}function c(c){if(a.isPlainObject(c.data)||a.isArray(c.data)||"string"==typeof c.data){var e=c.handler,f={timer:700};!function(b){"string"==typeof b?f.combo=[b]:a.isArray(b)?f.combo=b:a.extend(f,b),f.combo=a.map(f.combo,function(a){return a.toLowerCase()})}(c.data),c.index=new b(f.timer),c.handler=function(b){if(this===b.target||!/textarea|select|input/i.test(b.target.nodeName)){var g="keypress"!==b.type?a.hotkeys.specialKeys[b.which]:null,h=String.fromCharCode(b.which).toLowerCase(),i="",j={};b.altKey&&"alt"!==g&&(i+="alt+"),b.ctrlKey&&"ctrl"!==g&&(i+="ctrl+"),b.metaKey&&!b.ctrlKey&&"meta"!==g&&(i+="meta+"),b.shiftKey&&"shift"!==g&&(i+="shift+"),g&&(j[i+g]=!0),h&&(j[i+h]=!0),/shift+/.test(i)&&(j[i.replace("shift+","")+a.hotkeys.shiftNums[g||h]]=!0);var k=c.index,l=f.combo;if(d(l[k.val()],j)){if(k.val()===l.length-1)return k.reset(),e.apply(this,arguments);k.inc()}else k.reset(),d(l[0],j)&&k.inc()}}}}function d(a,b){for(var c=a.split(" "),d=0,e=c.length;e>d;d++)if(b[c[d]])return!0;return!1}a.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",91:"meta",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",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:"scroll",188:",",190:".",191:"/",224:"meta",219:"[",221:"]"},keypressKeys:["<",">","?"],shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"}},a.each(a.hotkeys.keypressKeys,function(b,c){a.hotkeys.shiftNums[c]=c}),b.prototype.val=function(){return this.num},b.prototype.inc=function(){this.timer&&(clearTimeout(this.timeout),this.timeout=setTimeout(a.proxy(b.prototype.reset,this),this.timer)),this.num++},b.prototype.reset=function(){this.timer&&clearTimeout(this.timeout),this.num=0},a.each(["keydown","keyup","keypress"],function(){a.event.special[this]={add:c}})}(jQuery),jQuery.fn.moveTo=function(a){var b,c={transition:!1,scrollOffset:35},d=jQuery.extend(c,a),e=this,f=e.offset().top;if((jQuery(window).scrollTop()+jQuery(window).height()-this.outerHeight()<f||jQuery(window).scrollTop()+d.scrollOffset>f)&&jQuery(window).height()>d.scrollOffset){if(b=jQuery(window).scrollTop()+d.scrollOffset>f?f-(jQuery(window).height()-this.outerHeight())+d.scrollOffset:f-d.scrollOffset,!jQuery.fn.moveTo.animating&&d.transition)return jQuery(document).trigger("moveToStarted",this),jQuery.fn.moveTo.animating=!0,jQuery("html,body").animate({scrollTop:b},1e3,function(){jQuery(document).trigger("moveToFinished",e),delete jQuery.fn.moveTo.animating}),this;var g=jQuery("html, body");return g.is(":animated")&&(g.stop(),delete jQuery.fn.moveTo.animating),jQuery(document).trigger("moveToStarted"),jQuery(window).scrollTop(b),setTimeout(function(){jQuery(document).trigger("moveToFinished",e)},100),this}return jQuery(document).trigger("moveToFinished",this),this},function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.bind("mouseout",function(a){var c=$(a.target).closest(b);c.length&&c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(c){var d=$(c.target).closest(b);!$.datepicker._isDisabledDatepicker(instActive.inline?a.parent()[0]:instActive.input[0])&&d.length&&(d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d.addClass("ui-state-hover"),d.hasClass("ui-datepicker-prev")&&d.addClass("ui-datepicker-prev-hover"),d.hasClass("ui-datepicker-next")&&d.addClass("ui-datepicker-next-hover"))})}function extendRemove(a,b){$.extend(a,b);for(var c in b)(null==b[c]||b[c]==undefined)&&(a[c]=b[c]);return a}function isArray(a){return a&&($.browser.safari&&"object"==typeof a&&a.length||a.constructor&&a.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.24"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return extendRemove(this._defaults,a||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline="div"==nodeName||"span"==nodeName;target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),"input"==nodeName?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:c,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(a,b){var c=$(a);b.append=$([]),b.trigger=$([]),c.hasClass(this.markerClassName)||(this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),$.data(a,PROP_NAME,b),b.settings.disabled&&this._disableDatepicker(a))},_attachments:function(a,b){var c=this._get(b,"appendText"),d=this._get(b,"isRTL");b.append&&b.append.remove(),c&&(b.append=$('<span class="'+this._appendClass+'">'+c+"</span>"),a[d?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&&b.trigger.remove();var e=this._get(b,"showOn");if(("focus"==e||"both"==e)&&a.focus(this._showDatepicker),"button"==e||"both"==e){var f=this._get(b,"buttonText"),g=this._get(b,"buttonImage");b.trigger=$(this._get(b,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:g,alt:f,title:f}):$('<button type="button"></button>').addClass(this._triggerClass).html(""==g?f:$("<img/>").attr({src:g,alt:f,title:f}))),a[d?"before":"after"](b.trigger),b.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==a[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=a[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(a[0])):$.datepicker._showDatepicker(a[0]),!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){for(var b=0,c=0,d=0;d<a.length;d++)a[d].length>b&&(b=a[d].length,c=d);return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=$(a);c.hasClass(this.markerClassName)||(c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),$.data(a,PROP_NAME,b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(a),b.dpDiv.css("display","block"))},_dialogDatepicker:function(a,b,c,d,e){var f=this._dialogInst;if(!f){this.uuid+=1;var g="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+g+'" style="position: absolute; top: -100px; width: 0px;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f.settings={},$.data(this._dialogInput[0],PROP_NAME,f)}if(extendRemove(f.settings,d||{}),b=b&&b.constructor==Date?this._formatDate(f,b):b,this._dialogInput.val(b),this._pos=e?e.length?e:[e.pageX,e.pageY]:null,!this._pos){var h=document.documentElement.clientWidth,i=document.documentElement.clientHeight,j=document.documentElement.scrollLeft||document.body.scrollLeft,k=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[h/2-100+j,i/2-150+k]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),f.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,f),this},_destroyDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(b.hasClass(this.markerClassName)){var d=a.nodeName.toLowerCase();$.removeData(a,PROP_NAME),"input"==d?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"==d||"span"==d)&&b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(b.hasClass(this.markerClassName)){var d=a.nodeName.toLowerCase();if("input"==d)a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if("div"==d||"span"==d){var e=b.children("."+this._inlineClass);e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b})}},_disableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(b.hasClass(this.markerClassName)){var d=a.nodeName.toLowerCase();if("input"==d)a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if("div"==d||"span"==d){var e=b.children("."+this._inlineClass);e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return!0;return!1},_getInst:function(a){try{return $.data(a,PROP_NAME)}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var d=this._getInst(a);if(2==arguments.length&&"string"==typeof b)return"defaults"==b?$.extend({},$.datepicker._defaults):d?"all"==b?$.extend({},d.settings):this._get(d,b):null;var e=b||{};if("string"==typeof b&&(e={},e[b]=c),d){this._curInst==d&&this._hideDatepicker();var f=this._getDateDatepicker(a,!0),g=this._getMinMaxDate(d,"min"),h=this._getMinMaxDate(d,"max");extendRemove(d.settings,e),null!==g&&e.dateFormat!==undefined&&e.minDate===undefined&&(d.settings.minDate=this._formatDate(d,g)),null!==h&&e.dateFormat!==undefined&&e.maxDate===undefined&&(d.settings.maxDate=this._formatDate(d,h)),this._attachments($(a),d),this._autoSize(d),this._setDate(d,f),this._updateAlternate(d),this._updateDatepicker(d)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&&this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&&!c.inline&&this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(a){var b=$.datepicker._getInst(a.target),c=!0,d=b.dpDiv.is(".ui-datepicker-rtl");if(b._keyEvent=!0,$.datepicker._datepickerShowing)switch(a.keyCode){case 9:$.datepicker._hideDatepicker(),c=!1;break;case 13:var e=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",b.dpDiv);e[0]&&$.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,e[0]);var f=$.datepicker._get(b,"onSelect");if(f){var g=$.datepicker._formatDate(b);f.apply(b.input?b.input[0]:null,[g,b])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 35:(a.ctrlKey||a.metaKey)&&$.datepicker._clearDate(a.target),c=a.ctrlKey||a.metaKey;break;case 36:(a.ctrlKey||a.metaKey)&&$.datepicker._gotoToday(a.target),c=a.ctrlKey||a.metaKey;break;case 37:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?1:-1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 38:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,-7,"D"),c=a.ctrlKey||a.metaKey;break;case 39:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?-1:1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 40:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,7,"D"),c=a.ctrlKey||a.metaKey;break;default:c=!1}else 36==a.keyCode&&a.ctrlKey?$.datepicker._showDatepicker(this):c=!1;c&&(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(a){var b=$.datepicker._getInst(a.target);if($.datepicker._get(b,"constrainInput")){var c=$.datepicker._possibleChars($.datepicker._get(b,"dateFormat")),d=String.fromCharCode(a.charCode==undefined?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||" ">d||!c||c.indexOf(d)>-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal)try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));c&&($.datepicker._setDateFromField(b),$.datepicker._updateAlternate(b),$.datepicker._updateDatepicker(b))}catch(d){$.datepicker.log(d)}return!0},_showDatepicker:function(a){if(a=a.target||a,"input"!=a.nodeName.toLowerCase()&&(a=$("input",a.parentNode)[0]),!$.datepicker._isDisabledDatepicker(a)&&$.datepicker._lastInput!=a){var b=$.datepicker._getInst(a);$.datepicker._curInst&&$.datepicker._curInst!=b&&($.datepicker._curInst.dpDiv.stop(!0,!0),b&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var c=$.datepicker._get(b,"beforeShow"),d=c?c.apply(a,[a,b]):{};if(d!==!1){extendRemove(b.settings,d),b.lastVal=null,$.datepicker._lastInput=a,$.datepicker._setDateFromField(b),$.datepicker._inDialog&&(a.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(a),$.datepicker._pos[1]+=a.offsetHeight);var e=!1;$(a).parents().each(function(){return e|="fixed"==$(this).css("position"),!e}),e&&$.browser.opera&&($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var f={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};if($.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(b),f=$.datepicker._checkOffset(b,f,e),b.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":e?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"}),!b.inline){var g=$.datepicker._get(b,"showAnim"),h=$.datepicker._get(b,"duration"),i=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects[g]?b.dpDiv.show(g,$.datepicker._get(b,"showOptions"),h,i):b.dpDiv[g||"show"](g?h:null,i),g&&h||i(),b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus(),$.datepicker._curInst=b}}}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a,a.dpDiv.empty().append(this._generateHTML(a)),this._attachHandlers(a);var d=a.dpDiv.find("iframe.ui-datepicker-cover");d.length&&d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a),f=e[1],g=17;if(a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),a.dpDiv[(1!=e[0]||1!=e[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==$.datepicker._curInst&&$.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus(),a.yearshtml){var h=a.yearshtml;setTimeout(function(){h===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth(),e=a.dpDiv.outerHeight(),f=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+(c?0:$(document).scrollLeft()),i=document.documentElement.clientHeight+(c?0:$(document).scrollTop());return b.left-=this._get(a,"isRTL")?d-f:0,b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0,b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0,b.left-=Math.min(b.left,b.left+d>h&&h>d?Math.abs(b.left+d-h):0),b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0),b},_findPos:function(a){for(var b=this._getInst(a),c=this._get(b,"isRTL");a&&("hidden"==a.type||1!=a.nodeType||$.expr.filters.hidden(a));)a=a[c?"previousSibling":"nextSibling"];var d=$(a).offset();return[d.left,d.top]},_hideDatepicker:function(a){var b=this._curInst;if(b&&(!a||b==$.data(a,PROP_NAME))&&this._datepickerShowing){var c=this._get(b,"showAnim"),d=this._get(b,"duration"),e=function(){$.datepicker._tidyDialog(b)};$.effects&&$.effects[c]?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,e):b.dpDiv["slideDown"==c?"slideUp":"fadeIn"==c?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1;var f=this._get(b,"onClose");f&&f.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if($.datepicker._curInst){var b=$(a.target),c=$.datepicker._getInst(b[0]);(b[0].id!=$.datepicker._mainDivId&&0==b.parents("#"+$.datepicker._mainDivId).length&&!b.hasClass($.datepicker.markerClassName)&&!b.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||b.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=c)&&$.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){var d=$(a),e=this._getInst(d[0]);this._isDisabledDatepicker(d[0])||(this._adjustInstDate(e,b+("M"==c?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e))},_gotoToday:function(a){var b=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{var d=new Date;c.selectedDay=d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a),e=this._getInst(d[0]);e["selected"+("M"==c?"Month":"Year")]=e["draw"+("M"==c?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){var e=$(a);if(!$(d).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(e[0])){var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){{var b=$(a);this._getInst(b[0])}this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a),d=this._getInst(c[0]);b=null!=b?b:this._formatDate(d),d.input&&d.input.val(b),this._updateAlternate(d);var e=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.input&&d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],"object"!=typeof d.input[0]&&d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b>0&&6>b,""]},iso8601Week:function(a){var b=new Date(a.getTime()); b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(null==a||null==b)throw"Invalid arguments";if(b="object"==typeof b?b.toString():b+"",""==b)return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d="string"!=typeof d?d:(new Date).getFullYear()%100+parseInt(d,10);for(var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){var c=s+1<a.length&&a.charAt(s+1)==b;return c&&s++,c},o=function(a){var c=n(a),d="@"==a?14:"!"==a?20:"y"==a&&c?4:"o"==a?3:2,e=new RegExp("^\\d{1,"+d+"}"),f=b.substring(r).match(e);if(!f)throw"Missing number at position "+r;return r+=f[0].length,parseInt(f[0],10)},p=function(a,c,d){var e=$.map(n(a)?d:c,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)}),f=-1;if($.each(e,function(a,c){var d=c[1];return b.substr(r,d.length).toLowerCase()==d.toLowerCase()?(f=c[0],r+=d.length,!1):void 0}),-1!=f)return f+1;throw"Unknown name at position "+r},q=function(){if(b.charAt(r)!=a.charAt(s))throw"Unexpected literal at position "+r;r++},r=0,s=0;s<a.length;s++)if(m)"'"!=a.charAt(s)||n("'")?q():m=!1;else switch(a.charAt(s)){case"d":k=o("d");break;case"D":p("D",e,f);break;case"o":l=o("o");break;case"m":j=o("m");break;case"M":j=p("M",g,h);break;case"y":i=o("y");break;case"@":var t=new Date(o("@"));i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"!":var t=new Date((o("!")-this._ticksTo1970)/1e4);i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"'":n("'")?q():m=!0;break;default:q()}if(r<b.length)throw"Extra/unparsed characters found in date: "+b.substring(r);if(-1==i?i=(new Date).getFullYear():100>i&&(i+=(new Date).getFullYear()-(new Date).getFullYear()%100+(d>=i?0:-100)),l>-1)for(j=1,k=l;;){var u=this._getDaysInMonth(i,j-1);if(u>=k)break;j++,k-=u}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,h=function(b){var c=m+1<a.length&&a.charAt(m+1)==b;return c&&m++,c},i=function(a,b,c){var d=""+b;if(h(a))for(;d.length<c;)d="0"+d;return d},j=function(a,b,c,d){return h(a)?d[b]:c[b]},k="",l=!1;if(b)for(var m=0;m<a.length;m++)if(l)"'"!=a.charAt(m)||h("'")?k+=a.charAt(m):l=!1;else switch(a.charAt(m)){case"d":k+=i("d",b.getDate(),2);break;case"D":k+=j("D",b.getDay(),d,e);break;case"o":k+=i("o",Math.round((new Date(b.getFullYear(),b.getMonth(),b.getDate()).getTime()-new Date(b.getFullYear(),0,0).getTime())/864e5),3);break;case"m":k+=i("m",b.getMonth()+1,2);break;case"M":k+=j("M",b.getMonth(),f,g);break;case"y":k+=h("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":k+=b.getTime();break;case"!":k+=1e4*b.getTime()+this._ticksTo1970;break;case"'":h("'")?k+="'":l=!0;break;default:k+=a.charAt(m)}return k},_possibleChars:function(a){for(var b="",c=!1,d=function(b){var c=e+1<a.length&&a.charAt(e+1)==b;return c&&e++,c},e=0;e<a.length;e++)if(c)"'"!=a.charAt(e)||d("'")?b+=a.charAt(e):c=!1;else switch(a.charAt(e)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":d("'")?b+="'":c=!0;break;default:b+=a.charAt(e)}return b},_get:function(a,b){return a.settings[b]!==undefined?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c,d,e=this._get(a,"dateFormat"),f=a.lastVal=a.input?a.input.val():null;c=d=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{c=this.parseDate(e,f,g)||d}catch(h){this.log(h),f=b?"":f}a.selectedDay=c.getDate(),a.drawMonth=a.selectedMonth=c.getMonth(),a.drawYear=a.selectedYear=c.getFullYear(),a.currentDay=f?c.getDate():0,a.currentMonth=f?c.getMonth():0,a.currentYear=f?c.getFullYear():0,this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var d=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},e=function(b){try{return $.datepicker.parseDate($.datepicker._get(a,"dateFormat"),b,$.datepicker._getFormatConfig(a))}catch(c){}for(var d=(b.toLowerCase().match(/^c/)?$.datepicker._getDate(a):null)||new Date,e=d.getFullYear(),f=d.getMonth(),g=d.getDate(),h=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=h.exec(b);i;){switch(i[2]||"d"){case"d":case"D":g+=parseInt(i[1],10);break;case"w":case"W":g+=7*parseInt(i[1],10);break;case"m":case"M":f+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f));break;case"y":case"Y":e+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f))}i=h.exec(b)}return new Date(e,f,g)},f=null==b||""===b?c:"string"==typeof b?e(b):"number"==typeof b?isNaN(b)?c:d(b):new Date(b.getTime());return f=f&&"Invalid Date"==f.toString()?c:f,f&&(f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0)),this._daylightSavingAdjust(f)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),e==a.selectedMonth&&f==a.selectedYear||c||this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&""==a.input.val()?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_attachHandlers:function(a){var b=this._get(a,"stepMonths"),c="#"+a.id.replace(/\\\\/g,"\\");a.dpDiv.find("[data-handler]").map(function(){var a={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(c,-b,"M")},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(c,+b,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(c)},selectDay:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectDay(c,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(c,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(c,this,"Y"),!1}};$(this).bind(this.getAttribute("data-event"),a[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),d=this._get(a,"showButtonPanel"),e=this._get(a,"hideIfNoPrevNext"),f=this._get(a,"navigationAsDateFormat"),g=this._getNumberOfMonths(a),h=this._get(a,"showCurrentAtPos"),i=this._get(a,"stepMonths"),j=1!=g[0]||1!=g[1],k=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),l=this._getMinMaxDate(a,"min"),m=this._getMinMaxDate(a,"max"),n=a.drawMonth-h,o=a.drawYear;if(0>n&&(n+=12,o--),m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));for(p=l&&l>p?l:p;this._daylightSavingAdjust(new Date(o,n,1))>p;)n--,0>n&&(n=11,o--)}a.drawMonth=n,a.drawYear=o;var q=this._get(a,"prevText");q=f?this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a)):q;var r=this._canAdjustMonth(a,-1,o,n)?'<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>":e?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>",s=this._get(a,"nextText");s=f?this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a)):s;var t=this._canAdjustMonth(a,1,o,n)?'<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>":e?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>",u=this._get(a,"currentText"),v=this._get(a,"gotoCurrent")&&a.currentDay?k:b;u=f?this.formatDate(u,v,this._getFormatConfig(a)):u;var w=a.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">'+this._get(a,"closeText")+"</button>",x=d?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?w:"")+(this._isInRange(a,v)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click">'+u+"</button>":"")+(c?"":w)+"</div>":"",y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;for(var z=this._get(a,"showWeek"),A=this._get(a,"dayNames"),B=(this._get(a,"dayNamesShort"),this._get(a,"dayNamesMin")),C=this._get(a,"monthNames"),D=this._get(a,"monthNamesShort"),E=this._get(a,"beforeShowDay"),F=this._get(a,"showOtherMonths"),G=this._get(a,"selectOtherMonths"),H=(this._get(a,"calculateWeek")||this.iso8601Week,this._getDefaultDate(a)),I="",J=0;J<g[0];J++){var K="";this.maxRows=4;for(var L=0;L<g[1];L++){var M=this._daylightSavingAdjust(new Date(o,n,a.selectedDay)),N=" ui-corner-all",O="";if(j){if(O+='<div class="ui-datepicker-group',g[1]>1)switch(L){case 0:O+=" ui-datepicker-group-first",N=" ui-corner-"+(c?"right":"left");break;case g[1]-1:O+=" ui-datepicker-group-last",N=" ui-corner-"+(c?"left":"right");break;default:O+=" ui-datepicker-group-middle",N=""}O+='">'}O+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+N+'">'+(/all|left/.test(N)&&0==J?c?t:r:"")+(/all|right/.test(N)&&0==J?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,J>0||L>0,C,D)+'</div><table class="ui-datepicker-calendar"><thead><tr>';for(var P=z?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"",Q=0;7>Q;Q++){var R=(Q+y)%7;P+="<th"+((Q+y+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+A[R]+'">'+B[R]+"</span></th>"}O+=P+"</tr></thead><tbody>";var S=this._getDaysInMonth(o,n);o==a.selectedYear&&n==a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,S));var T=(this._getFirstDayOfMonth(o,n)-y+7)%7,U=Math.ceil((T+S)/7),V=j?this.maxRows>U?this.maxRows:U:U;this.maxRows=V;for(var W=this._daylightSavingAdjust(new Date(o,n,1-T)),X=0;V>X;X++){O+="<tr>";for(var Y=z?'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(W)+"</td>":"",Q=0;7>Q;Q++){var Z=E?E.apply(a.input?a.input[0]:null,[W]):[!0,""],_=W.getMonth()!=n,ab=_&&!G||!Z[0]||l&&l>W||m&&W>m;Y+='<td class="'+((Q+y+6)%7>=5?" ui-datepicker-week-end":"")+(_?" ui-datepicker-other-month":"")+(W.getTime()==M.getTime()&&n==a.selectedMonth&&a._keyEvent||H.getTime()==W.getTime()&&H.getTime()==M.getTime()?" "+this._dayOverClass:"")+(ab?" "+this._unselectableClass+" ui-state-disabled":"")+(_&&!F?"":" "+Z[1]+(W.getTime()==k.getTime()?" "+this._currentClass:"")+(W.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+(_&&!F||!Z[2]?"":' title="'+Z[2]+'"')+(ab?"":' data-handler="selectDay" data-event="click" data-month="'+W.getMonth()+'" data-year="'+W.getFullYear()+'"')+">"+(_&&!F?"&#xa0;":ab?'<span class="ui-state-default">'+W.getDate()+"</span>":'<a class="ui-state-default'+(W.getTime()==b.getTime()?" ui-state-highlight":"")+(W.getTime()==k.getTime()?" ui-state-active":"")+(_?" ui-priority-secondary":"")+'" href="#">'+W.getDate()+"</a>")+"</td>",W.setDate(W.getDate()+1),W=this._daylightSavingAdjust(W)}O+=Y+"</tr>"}n++,n>11&&(n=0,o++),O+="</tbody></table>"+(j?"</div>"+(g[0]>0&&L==g[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),K+=O}I+=K}return I+=x+($.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),a._keyEvent=!1,I},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='<div class="ui-datepicker-title">',m="";if(f||!i)m+='<span class="ui-datepicker-month">'+g[b]+"</span>";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';for(var p=0;12>p;p++)(!n||p>=d.getMonth())&&(!o||p<=e.getMonth())&&(m+='<option value="'+p+'"'+(p==b?' selected="selected"':"")+">"+h[p]+"</option>");m+="</select>"}if(k||(l+=m+(!f&&i&&j?"":"&#xa0;")),!a.yearshtml)if(a.yearshtml="",f||!j)l+='<span class="ui-datepicker-year">'+c+"</span>";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));for(t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';u>=t;t++)a.yearshtml+='<option value="'+t+'"'+(t==c?' selected="selected"':"")+">"+t+"</option>";a.yearshtml+="</select>",l+=a.yearshtml,a.yearshtml=null}return l+=this._get(a,"yearSuffix"),k&&(l+=(!f&&i&&j?"":"&#xa0;")+m),l+="</div>"},_adjustInstDate:function(a,b,c){var d=a.drawYear+("Y"==c?b:0),e=a.drawMonth+("M"==c?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+("D"==c?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),("M"==c||"Y"==c)&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&c>b?c:b;return e=d&&e>d?d:e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return null==b?[1,1]:"number"==typeof b?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return new Date(a,b,1).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(0>b?b:e[0]*e[1]),1));return 0>b&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b="string"!=typeof b?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?"object"==typeof b?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return"string"!=typeof a||"isDisabled"!=a&&"getDate"!=a&&"widget"!=a?"option"==a&&2==arguments.length&&"string"==typeof arguments[1]?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){"string"==typeof a?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.24",window["DP_jQuery_"+dpuuid]=$}(jQuery),function(){"use strict";if("undefined"==typeof jQuery)throw new Error("jQuery is required for AJS to function.");"undefined"==typeof window.console?window.console={messages:[],log:function(a){this.messages.push(a)},show:function(){alert(this.messages.join("\n")),this.messages=[]}}:console.show=function(){},window.AJS=function(){function a(a){var b={"<":"&lt;",">":"&gt;","&":"&amp;","'":"&#39;","`":"&#96;"};return"string"==typeof b[a]?b[a]:"&quot;"}var b,c,d=[],e=0,f=/[&"'<>`]/g,g={version:"${project.version}",params:{},$:jQuery,log:function(){"undefined"!=typeof console&&console.log&&Function.prototype.apply.apply(console.log,[console,arguments])},warn:function(){"undefined"!=typeof console&&console.warn&&Function.prototype.apply.apply(console.warn,[console,arguments])},error:function(){"undefined"!=typeof console&&console.error&&Function.prototype.apply.apply(console.error,[console,arguments])},preventDefault:function(a){a.preventDefault()},stopEvent:function(a){return a.stopPropagation(),!1},include:function(a){if(!this.contains(d,a)){d.push(a);var b=document.createElement("script");b.src=a,this.$("body").append(b)}},toggleClassName:function(a,b){(a=this.$(a))&&a.toggleClass(b)},setVisible:function(a,b){if(a=this.$(a)){var c=this.$;c(a).each(function(){var a=c(this).hasClass("hidden");a&&b?c(this).removeClass("hidden"):a||b||c(this).addClass("hidden")})}},setCurrent:function(a,b){(a=this.$(a))&&(b?a.addClass("current"):a.removeClass("current"))},isVisible:function(a){return!this.$(a).hasClass("hidden")},isClipped:function(a){return a=AJS.$(a),a.prop("scrollWidth")>a.prop("clientWidth")},populateParameters:function(a){a||(a=this.params);var b=this;this.$(".parameters input").each(function(){var c=this.value,d=this.title||this.id;b.$(this).hasClass("list")?a[d]?a[d].push(c):a[d]=[c]:a[d]=c.match(/^(tru|fals)e$/i)?"true"===c.toLowerCase():c})},toInit:function(a){var b=this;return this.$(function(){try{a.apply(this,arguments)}catch(c){b.log("Failed to run init function: "+c+"\n"+a.toString())}}),this},indexOf:function(a,b,c){var d=a.length;null===c?c=0:0>c&&(c=Math.max(0,d+c));for(var e=c;d>e;e++)if(a[e]===b)return e;return-1},contains:function(a,b){return this.indexOf(a,b)>-1},firebug:function(){AJS.log("DEPRECATED: AJS.firebug should no longer be used.");var a=this.$(document.createElement("script"));a.attr("src","https://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js"),this.$("head").append(a),function(){window.firebug?firebug.init():setTimeout(AJS.firebug,0)}()},clone:function(a){return AJS.$(a).clone().removeAttr("id")},alphanum:function(a,b){a=(a+"").toLowerCase(),b=(b+"").toLowerCase();for(var c=/(\d+|\D+)/g,d=a.match(c),e=b.match(c),f=Math.max(d.length,e.length),g=0;f>g;g++){if(g===d.length)return-1;if(g===e.length)return 1;var h=parseInt(d[g],10)+"",i=parseInt(e[g],10)+"";if(h===d[g]&&i===e[g]&&h!==i)return(h-i)/Math.abs(h-i);if((h!==d[g]||i!==e[g])&&d[g]!==e[g])return d[g]<e[g]?-1:1}return 0},onTextResize:function(a){if("function"==typeof a)if(AJS.onTextResize["on-text-resize"])AJS.onTextResize["on-text-resize"].push(function(b){a(b)});else{var b=AJS("div");b.css({width:"1em",height:"1em",position:"absolute",top:"-9999em",left:"-9999em"}),this.$("body").append(b),b.size=b.width(),setInterval(function(){if(b.size!==b.width()){b.size=b.width();for(var a=0,c=AJS.onTextResize["on-text-resize"].length;c>a;a++)AJS.onTextResize["on-text-resize"][a](b.size)}},0),AJS.onTextResize.em=b,AJS.onTextResize["on-text-resize"]=[function(b){a(b)}]}},unbindTextResize:function(a){for(var b=0,c=AJS.onTextResize["on-text-resize"].length;c>b;b++)if(AJS.onTextResize["on-text-resize"][b]===a)return AJS.onTextResize["on-text-resize"].splice(b,1)},escape:function(a){return escape(a).replace(/%u\w{4}/gi,function(a){return unescape(a)})},escapeHtml:function(b){return b.replace(f,a)},filterBySearch:function(a,b,c){if(!b)return[];var d=this.$,e=c&&c.keywordsField||"keywords",f=c&&c.ignoreForCamelCase?"i":"",g=c&&c.matchBoundary?"\\b":"",h=c&&c.splitRegex||/\s+/,i=b.split(h),j=[];d.each(i,function(){var a=[new RegExp(g+this,"i")];if(/^([A-Z][a-z]*) {2,}$/.test(this)){var b=this.replace(/([A-Z][a-z]*)/g,"\\b$1[^,]*");a.push(new RegExp(b,f))}j.push(a)});var k=[];return d.each(a,function(){for(var a=0;a<j.length;a++){for(var b=!1,c=0;c<j[a].length;c++)if(j[a][c].test(this[e])){b=!0;break}if(!b)return}k.push(this)}),k},drawLogo:function(a){AJS.log("DEPRECATED: AJS.drawLogo should no longer be used.");var b=a.scaleFactor||1,c=a.fill||"#fff",d=a.stroke||"#000",e=400*b,f=40*b,g=a.strokeWidth||1,h=a.containerID||".aui-logo";AJS.$(".aui-logo").length||AJS.$("body").append('<div id="aui-logo" class="aui-logo"><div>');var i=Raphael(h,e+50*b,f+100*b),j=i.path("M 0,0 c 3.5433333,-4.7243333 7.0866667,-9.4486667 10.63,-14.173 -14.173,0 -28.346,0 -42.519,0 C -35.432667,-9.4486667 -38.976333,-4.7243333 -42.52,0 -28.346667,0 -14.173333,0 0,0 z m 277.031,28.346 c -14.17367,0 -28.34733,0 -42.521,0 C 245.14,14.173 255.77,0 266.4,-14.173 c -14.17267,0 -28.34533,0 -42.518,0 C 213.25167,0 202.62133,14.173 191.991,28.346 c -14.17333,0 -28.34667,0 -42.52,0 14.17333,-18.8976667 28.34667,-37.7953333 42.52,-56.693 -7.08667,-9.448667 -14.17333,-18.897333 -21.26,-28.346 -14.173,0 -28.346,0 -42.519,0 7.08667,9.448667 14.17333,18.897333 21.26,28.346 -14.17333,18.8976667 -28.34667,37.7953333 -42.52,56.693 -14.173333,0 -28.346667,0 -42.52,0 10.63,-14.173 21.26,-28.346 31.89,-42.519 -14.390333,0 -28.780667,0 -43.171,0 C 42.520733,1.330715e-4 31.889933,14.174867 21.26,28.347 c -42.520624,6.24e-4 -85.039187,-8.13e-4 -127.559,-0.001 11.220667,-14.961 22.441333,-29.922 33.662,-44.883 -6.496,-8.661 -12.992,-17.322 -19.488,-25.983 5.905333,0 11.810667,0 17.716,0 -10.63,-14.173333 -21.26,-28.346667 -31.89,-42.52 14.173333,0 28.346667,0 42.52,0 10.63,14.173333 21.26,28.346667 31.89,42.52 14.173333,0 28.3466667,0 42.52,0 -10.63,-14.173333 -21.26,-28.346667 -31.89,-42.52 14.1733333,0 28.3466667,0 42.52,0 10.63,14.173333 21.26,28.346667 31.89,42.52 14.390333,0 28.780667,0 43.171,0 -10.63,-14.173333 -21.26,-28.346667 -31.89,-42.52 42.51967,0 85.03933,0 127.559,0 10.63033,14.173333 21.26067,28.346667 31.891,42.52 14.17267,0 28.34533,0 42.518,0 -10.63,-14.173333 -21.26,-28.346667 -31.89,-42.52 14.17367,0 28.34733,0 42.521,0 14.17333,18.897667 28.34667,37.795333 42.52,56.693 -14.17333,18.8976667 -28.34667,37.7953333 -42.52,56.693 z");j.scale(b,-b,0,0),j.translate(120*b,f),j.attr("fill",c),j.attr("stroke",d),j.attr("stroke-width",g)},debounce:function(a,b){var c,d;return function(){var e=arguments,f=this,g=function(){d=a.apply(f,e)};return clearTimeout(c),c=setTimeout(g,b),d}},id:function(a){if(b=e++ +"",c=a?a+b:"aui-uid-"+b,document.getElementById(c)){if(c=c+"-"+(new Date).getTime(),document.getElementById(c))throw new Error("ERROR: timestamped fallback ID "+c+" exists. AJS.id stopped.");return c}return c},_addID:function(a,b){var c=AJS.$(a),d=b||!1;c.each(function(){var a=AJS.$(this);a.attr("id")||a.attr("id",AJS.id(d))})},enable:function(a,b){var c=AJS.$(a);return"undefined"==typeof b&&(b=!0),c.each(function(){this.disabled=!b})}};if("undefined"!=typeof AJS)for(var h in AJS)g[h]=AJS[h];var i=function(){var a=null;return arguments.length&&"string"==typeof arguments[0]&&(a=AJS.$(document.createElement(arguments[0])),2===arguments.length&&a.html(arguments[1])),a};for(var j in g)i[j]=g[j];return i}(),AJS.$(function(){var a=AJS.$("body");a.data("auiVersion")||a.attr("data-aui-version",AJS.version),AJS.populateParameters()}),AJS.$.ajaxSettings.traditional=!0}(),AJS.format=function(){var a=/'(?!')/g,b=/^\d+$/,c=/^(\d+),number$/,d=/^(\d+)\,choice\,(.+)/,e=/^(\d+)([#<])(.+)/,f=function(a,f){var g,h="";if(g=a.match(b))h=f.length>++a?f[a]:"";else if(g=a.match(c))h=f.length>++g[1]?f[g[1]]:"";else if(g=a.match(d)){var i=f.length>++g[1]?f[g[1]]:null;if(null!==i){for(var j=g[2].split("|"),k=null,l=0;l<j.length;l++){var m=j[l].match(e),n=parseInt(m[1],10);if(n>i){if(k){h=k;break}h=m[3];break}if(i==n&&"#"==m[2]){h=m[3];break}l==j.length-1&&(h=m[3]),k=m[3]}var o=[h].concat(Array.prototype.slice.call(f,1));h=AJS.format.apply(AJS,o)}}return h},g=function(a){for(var b=!1,c=-1,d=0,e=0;e<a.length;e++){var f=a.charAt(e);if("'"==f&&(b=!b),!b)if("{"===f)0===d&&(c=e),d++;else if("}"===f&&d>0&&(d--,0===d)){var g=[];return g.push(a.substring(0,e+1)),g.push(a.substring(0,c)),g.push(a.substring(c+1,e)),g}}return null},h=function(b){for(var c=arguments,d="",e=g(b);e;)b=b.substring(e[0].length),d+=e[1].replace(a,""),d+=f(e[2],c),e=g(b);return d+=b.replace(a,"")};return h.apply(AJS,arguments)},AJS.I18n={getText:function(a){var b=Array.prototype.slice.call(arguments,1);return AJS.I18n.keys&&Object.prototype.hasOwnProperty.call(AJS.I18n.keys,a)?AJS.format.apply(null,[AJS.I18n.keys[a]].concat(b)):a}},AJS._internal||(AJS._internal={}),function(a){AJS._internal.browser={};var b=null;AJS._internal.browser.supportsCalc=function(){if(null===b){var c=a('<div style="height: 10px; height: -webkit-calc(20px + 0); height: calc(20px);"></div>');b=20===c.appendTo(document.documentElement).height(),c.remove()}return b}}(AJS.$),function(a){AJS._internal=AJS._internal||{},AJS._internal.widget=function(b,c){var d="_aui-widget-"+b;return function(b,e){var f,g;a.isPlainObject(b)?g=b:(f=b,g=e);var h,i=f&&a(f);return i&&i.data(d)?h=i.data(d):(h=new c(i,g||{}),i=h.$el,i.data(d,h)),h}}}(AJS.$),function(){function a(a,b){for(var c=a.length;c--;)if(b(a[c]))return c;return-1}function b(b,c){return a(b,function(a){return a[0]===c[0]})}function c(b){return a(b,function(a){return AJS.layer(a).isBlanketed()})}function d(a){var b;if(a.length){var c=a[a.length-1],d=parseInt(c.css("z-index"),10);b=(isNaN(d)?0:d)+100}else b=0;return Math.max(3e3,b)}function e(){this._stack=[]}e.prototype.push=function(a){if(b(this._stack,a)>=0)throw new Error("The given element is already an active layer");var e=AJS.layer(a),f=d(this._stack);e._showLayer(f),e.isBlanketed()&&(c(this._stack)>=0&&AJS.undim(),AJS.dim(!1,f-20)),this._stack.push(a)},e.prototype.popUntil=function(a){var d=b(this._stack,a);if(0>d)return null;var e=this._stack.slice(d);this._stack=this._stack.slice(0,d);var f=c(e);if(f>=0){AJS.undim();var g=c(this._stack);g>=0&&AJS.dim(!1,this._stack[g].css("z-index")-20)}for(var h;e.length;)h=e.pop(),AJS.layer(h)._hideLayer();return h},e.prototype.popTop=function(){if(!this._stack.length)return null;var a=this._stack[this._stack.length-1];return AJS.layer(a).isModal()?null:this.popUntil(a)},e.prototype.popUntilTopBlanketed=function(){var a=c(this._stack);if(0>a)return null;var b=this._stack[a];return AJS.layer(b).isModal()?null:this.popUntil(b)},AJS.LayerManager=e}(AJS.$),function(a){AJS.LayerManager.global=new AJS.LayerManager,a(document).on("keydown",function(a){if(a.keyCode===AJS.keyCode.ESCAPE){var b=AJS.LayerManager.global.popTop();b&&a.preventDefault()}}).on("click",".aui-blanket",function(a){var b=AJS.LayerManager.global.popUntilTopBlanketed();b&&a.preventDefault()})}(AJS.$),AJS.FocusManager=function(a){function b(){}return b.defaultFocusSelector=":input:visible:enabled",b.prototype.enter=function(a){var c=a.attr("data-aui-focus-selector"),d=c||b.defaultFocusSelector,e=a.is(d)?a:a.find(d);e.first().focus()},b.prototype.exit=function(b){var c=document.activeElement;(b[0]===c||b.has(c).length)&&a(c).blur()},b.global=new b,b}(AJS.$),AJS=AJS||{},function(){var a="%CONTEXT_PATH%";a=0===a.indexOf("%_CONTEXT_PATH")?!1:a,AJS.contextPath=function(){for(var b=null,c=[a,window.contextPath,window.Confluence&&Confluence.getContextPath(),window.BAMBOO&&BAMBOO.contextPath,window.FECRU&&FECRU.pageContext],d=0;d<c.length;d++)if("string"==typeof c[d]){b=c[d];break}return b}}(),function(){function a(a,b){b=b||"";var c=new RegExp(f(a)+"=([^|]+)"),d=b.match(c);return d&&d[1]}function b(a,b,c){var d=new RegExp("(\\s|\\|)*\\b"+f(a)+"=[^|]*[|]*");if(c=c||"",c=c.replace(d,"|"),""!==b){var e=a+"="+b;c.length+e.length<4020&&(c+="|"+e)}return c.replace(i,"|")}function c(a){return a.replace(h,"")}function d(a){var b=new RegExp("\\b"+f(a)+"=((?:[^\\\\;]+|\\\\.)*)(?:;|$)"),d=document.cookie.match(b);return d&&c(d[1])}function e(a,b,c){var d,e="",f='"'+b.replace(j,'\\"')+'"';c&&(d=new Date,d.setTime(+d+24*c*60*60*1e3),e="; expires="+d.toGMTString()),document.cookie=a+"="+f+e+";path=/"}function f(a){return a.replace(k,"\\$&")}var g="AJS.conglomerate.cookie",h=/(\\|^"|"$)/g,i=/\|\|+/g,j=/"/g,k=/[.*+?|^$()[\]{\\]/g;AJS.Cookie={save:function(a,c,f){var h=d(g);h=b(a,c,h),e(g,h,f||365)},read:function(b,c){var e=d(g),f=a(b,e);return null!=f?f:c},erase:function(a){this.save(a,"")}}}(),function(a){var b;AJS.dim=function(c,d){return b||(b=a.browser.msie&&parseInt(a.browser.version,10)<8?a("html"):a(document.body)),AJS.dim.$dim||(AJS.dim.$dim=AJS("div").addClass("aui-blanket"),d&&AJS.dim.$dim.css({zIndex:d}),a.browser.msie&&AJS.dim.$dim.css({width:"200%",height:Math.max(a(document).height(),a(window).height())+"px"}),a("body").append(AJS.dim.$dim),a.browser.msie&&c!==!1&&(AJS.dim.$shim=a('<iframe frameBorder="0" class="aui-blanket-shim" src="about:blank"/>'),AJS.dim.$shim.css({height:Math.max(a(document).height(),a(window).height())+"px"}),d&&AJS.dim.$shim.css({zIndex:d-1}),a("body").append(AJS.dim.$shim),AJS.dim.shim=AJS.dim.$shim),AJS.dim.cachedOverflow=b.css("overflow"),b.css("overflow","hidden")),AJS.dim.$dim},AJS.undim=function(){if(AJS.dim.$dim&&(AJS.dim.$dim.remove(),AJS.dim.$dim=null,AJS.dim.$shim&&(AJS.dim.$shim.remove(),AJS.dim.$shim=null),b&&b.css("overflow",AJS.dim.cachedOverflow),a.browser.safari)){var c=a(window).scrollTop();a(window).scrollTop(10+5*(10==c)).scrollTop(c)}}}(AJS.$),function(a){function b(b){this.$el=a(b||'<div class="aui-layer" aria-hidden="true"></div>')}var c="_aui-internal-layer-",d="_aui-internal-layer-global-";b.prototype.changeSize=function(a,b){return this.$el.css("width",a),this.$el.css("height","content"===b?"":b),this},b.prototype.on=function(a,b){return this.$el.on(c+a,b),this},b.prototype.show=function(){return this.$el.is(":visible")?this:(AJS.LayerManager.global.push(this.$el),this)},b.prototype.hide=function(){return this.$el.is(":visible")?(AJS.LayerManager.global.popUntil(this.$el),this):this},b.prototype.remove=function(){this.hide(),this.$el.remove(),this.$el=null},b.prototype._showLayer=function(b){this.$el.parent().is("body")||this.$el.appendTo(document.body),this.$el.data("_aui-layer-cached-z-index",this.$el.css("z-index")),this.$el.css("z-index",b),this.$el.attr("aria-hidden","false"),AJS.FocusManager.global.enter(this.$el),this.$el.trigger(c+"show"),a(document).trigger(d+"show",[this.$el])},b.prototype._hideLayer=function(){AJS.FocusManager.global.exit(this.$el),this.$el.attr("aria-hidden","true"),this.$el.css("z-index",this.$el.data("_aui-layer-cached-z-index")||""),this.$el.data("_aui-layer-cached-z-index",""),this.$el.trigger(c+"hide"),a(document).trigger(d+"hide",[this.$el])},b.prototype.isBlanketed=function(){return"true"===this.$el.attr("data-aui-blanketed")},b.prototype.isModal=function(){return"true"===this.$el.attr("data-aui-modal") },AJS.layer=AJS._internal.widget("layer",b),AJS.layer.on=function(b,c){return a(document).on(d+b,c),this}}(AJS.$),AJS.popup=function(a){var b={width:800,height:600,closeOnOutsideClick:!1,keypressListener:function(a){27===a.keyCode&&c.is(":visible")&&i.hide()}};"object"!=typeof a&&(a={width:arguments[0],height:arguments[1],id:arguments[2]},a=AJS.$.extend({},a,arguments[3])),a=AJS.$.extend({},b,a);var c=AJS("div").addClass("aui-popup");a.id&&c.attr("id",a.id);var d=3e3;AJS.$(".aui-dialog").each(function(){var a=AJS.$(this);d=a.css("z-index")>d?a.css("z-index"):d});var e=function(b,e){return a.width=b=b||a.width,a.height=e=e||a.height,c.css({marginTop:-Math.round(e/2)+"px",marginLeft:-Math.round(b/2)+"px",width:b,height:e,"z-index":parseInt(d,10)+2}),arguments.callee}(a.width,a.height);AJS.$("body").append(c),c.hide(),AJS.enable(c);var f=AJS.$(".aui-blanket"),g=function(a,b){var c=AJS.$(a,b);return c.length?(c.focus(),!0):!1},h=function(b){if(0===AJS.$(".dialog-page-body",b).find(":focus").length){if(a.focusSelector)return g(a.focusSelector,b);var c=":input:visible:enabled:first";g(c,AJS.$(".dialog-page-body",b))||g(c,AJS.$(".dialog-button-panel",b))||g(c,AJS.$(".dialog-page-menu",b))}},i={changeSize:function(b,c){(b&&b!=a.width||c&&c!=a.height)&&e(b,c),this.show()},show:function(){var b=function(){AJS.$(document).off("keydown",a.keypressListener).on("keydown",a.keypressListener),AJS.dim(),f=AJS.$(".aui-blanket"),0!=f.size()&&a.closeOnOutsideClick&&f.click(function(){c.is(":visible")&&i.hide()}),c.show(),AJS.popup.current=this,h(c),AJS.$(document).trigger("showLayer",["popup",this])};b.call(this),this.show=b},hide:function(){AJS.$(document).unbind("keydown",a.keypressListener),f.unbind(),this.element.hide(),0==AJS.$(".aui-dialog:visible").size()&&AJS.undim();var b=document.activeElement;this.element.has(b).length&&b.blur(),AJS.$(document).trigger("hideLayer",["popup",this]),AJS.popup.current=null,this.enable()},element:c,remove:function(){c.remove(),this.element=null},disable:function(){this.disabled||(this.popupBlanket=AJS.$("<div class='dialog-blanket'> </div>").css({height:c.height(),width:c.width()}),c.append(this.popupBlanket),this.disabled=!0)},enable:function(){this.disabled&&(this.disabled=!1,this.popupBlanket.remove(),this.popupBlanket=null)}};return i},function(){function a(a,b,c,d){a.buttonpanel||a.addButtonPanel(),this.page=a,this.onclick=c,this._onclick=function(){return c.call(this,a.dialog,a)===!0},this.item=AJS("button",b).addClass("button-panel-button"),d&&this.item.addClass(d),"function"==typeof c&&this.item.click(this._onclick),a.buttonpanel.append(this.item),this.id=a.button.length,a.button[this.id]=this}function b(a,b,c,d,e){a.buttonpanel||a.addButtonPanel(),e||(e="#"),this.page=a,this.onclick=c,this._onclick=function(){return c.call(this,a.dialog,a)===!0},this.item=AJS("a",b).attr("href",e).addClass("button-panel-link"),d&&this.item.addClass(d),"function"==typeof c&&this.item.click(this._onclick),a.buttonpanel.append(this.item),this.id=a.button.length,a.button[this.id]=this}function c(a,b){var c="left"==a?-1:1;return function(a){var d=this.page[b];if(this.id!=(1==c?d.length-1:0)){c*=a||1,d[this.id+c].item[0>c?"before":"after"](this.item),d.splice(this.id,1),d.splice(this.id+c,0,this);for(var e=0,f=d.length;f>e;e++)"panel"==b&&this.page.curtab==d[e].id&&(this.page.curtab=e),d[e].id=e}return this}}function d(a){return function(){this.page[a].splice(this.id,1);for(var b=0,c=this.page[a].length;c>b;b++)this.page[a][b].id=b;this.item.remove()}}a.prototype.moveUp=a.prototype.moveLeft=c("left","button"),a.prototype.moveDown=a.prototype.moveRight=c("right","button"),a.prototype.remove=d("button"),a.prototype.html=function(a){return this.item.html(a)},a.prototype.onclick=function(a){return"undefined"==typeof a?this.onclick:(this.item.unbind("click",this._onclick),this._onclick=function(){return a.call(this,page.dialog,page)===!0},"function"==typeof a&&this.item.click(this._onclick),void 0)};var e=20,f=function(a,b,c,d,f){c instanceof AJS.$||(c=AJS.$(c)),this.dialog=a.dialog,this.page=a,this.id=a.panel.length,this.button=AJS("button").html(b).addClass("item-button"),f&&(this.button[0].id=f),this.item=AJS("li").append(this.button).addClass("page-menu-item"),this.body=AJS("div").append(c).addClass("dialog-panel-body").css("height",a.dialog.height+"px"),this.padding=e,d&&this.body.addClass(d);var g=a.panel.length,h=this;a.menu.append(this.item),a.body.append(this.body),a.panel[g]=this;var i=function(){var b;a.curtab+1&&(b=a.panel[a.curtab],b.body.hide(),b.item.removeClass("selected"),"function"==typeof b.onblur&&b.onblur()),a.curtab=h.id,h.body.show(),h.item.addClass("selected"),"function"==typeof h.onselect&&h.onselect(),"function"==typeof a.ontabchange&&a.ontabchange(h,b)};this.button.click?this.button.click(i):(AJS.log("atlassian-dialog:Panel:constructor - this.button.click false"),this.button.onclick=i),i(),0==g?a.menu.css("display","none"):a.menu.show()};f.prototype.select=function(){this.button.click()},f.prototype.moveUp=f.prototype.moveLeft=c("left","panel"),f.prototype.moveDown=f.prototype.moveRight=c("right","panel"),f.prototype.remove=d("panel"),f.prototype.html=function(a){return a?(this.body.html(a),this):this.body.html()},f.prototype.setPadding=function(a){return isNaN(+a)||(this.body.css("padding",+a),this.padding=+a,this.page.recalcSize()),this};var g=56,h=51,i=50,j=function(a,b){this.dialog=a,this.id=a.page.length,this.element=AJS("div").addClass("dialog-components"),this.body=AJS("div").addClass("dialog-page-body"),this.menu=AJS("ul").addClass("dialog-page-menu").css("height",a.height+"px"),this.body.append(this.menu),this.curtab,this.panel=[],this.button=[],b&&this.body.addClass(b),a.popup.element.append(this.element.append(this.menu).append(this.body)),a.page[a.page.length]=this};j.prototype.recalcSize=function(){for(var a=this.header?g:0,b=this.buttonpanel?h:0,c=this.panel.length;c--;){var d=this.dialog.height-a-b;this.panel[c].body.css("height",d),this.menu.css("height",d)}},j.prototype.addButtonPanel=function(){this.buttonpanel=AJS("div").addClass("dialog-button-panel"),this.element.append(this.buttonpanel)},j.prototype.addPanel=function(a,b,c,d){return new f(this,a,b,c,d),this.recalcSize(),this},j.prototype.addHeader=function(a,b){return this.header&&this.header.remove(),this.header=AJS("h2").text(a||"").addClass("dialog-title"),b&&this.header.addClass(b),this.element.prepend(this.header),this.recalcSize(),this},j.prototype.addButton=function(b,c,d){return new a(this,b,c,d),this.recalcSize(),this},j.prototype.addLink=function(a,c,d,e){return new b(this,a,c,d,e),this.recalcSize(),this},j.prototype.gotoPanel=function(a){this.panel[a.id||a].select()},j.prototype.getCurrentPanel=function(){return this.panel[this.curtab]},j.prototype.hide=function(){this.element.hide()},j.prototype.show=function(){this.element.show()},j.prototype.remove=function(){this.element.remove()},AJS.Dialog=function(a,b,c){var d={};+a||(d=Object(a),a=d.width,b=d.height,c=d.id),this.height=b||480,this.width=a||640,this.id=c,d=AJS.$.extend({},d,{width:this.width,height:this.height,id:this.id}),this.popup=AJS.popup(d),this.popup.element.addClass("aui-dialog"),this.page=[],this.curpage=0,new j(this)},AJS.Dialog.prototype.addHeader=function(a,b){return this.page[this.curpage].addHeader(a,b),this},AJS.Dialog.prototype.addButton=function(a,b,c){return this.page[this.curpage].addButton(a,b,c),this},AJS.Dialog.prototype.addLink=function(a,b,c,d){return this.page[this.curpage].addLink(a,b,c,d),this},AJS.Dialog.prototype.addSubmit=function(a,b){return this.page[this.curpage].addButton(a,b,"button-panel-submit-button"),this},AJS.Dialog.prototype.addCancel=function(a,b){return this.page[this.curpage].addLink(a,b,"button-panel-cancel-link"),this},AJS.Dialog.prototype.addButtonPanel=function(){return this.page[this.curpage].addButtonPanel(),this},AJS.Dialog.prototype.addPanel=function(a,b,c,d){return this.page[this.curpage].addPanel(a,b,c,d),this},AJS.Dialog.prototype.addPage=function(a){return new j(this,a),this.page[this.curpage].hide(),this.curpage=this.page.length-1,this},AJS.Dialog.prototype.nextPage=function(){return this.page[this.curpage++].hide(),this.curpage>=this.page.length&&(this.curpage=0),this.page[this.curpage].show(),this},AJS.Dialog.prototype.prevPage=function(){return this.page[this.curpage--].hide(),this.curpage<0&&(this.curpage=this.page.length-1),this.page[this.curpage].show(),this},AJS.Dialog.prototype.gotoPage=function(a){return this.page[this.curpage].hide(),this.curpage=a,this.curpage<0?this.curpage=this.page.length-1:this.curpage>=this.page.length&&(this.curpage=0),this.page[this.curpage].show(),this},AJS.Dialog.prototype.getPanel=function(a,b){var c=null==b?this.curpage:a;return null==b&&(b=a),this.page[c].panel[b]},AJS.Dialog.prototype.getPage=function(a){return this.page[a]},AJS.Dialog.prototype.getCurrentPanel=function(){return this.page[this.curpage].getCurrentPanel()},AJS.Dialog.prototype.gotoPanel=function(a,b){if(null!=b){var c=a.id||a;this.gotoPage(c)}this.page[this.curpage].gotoPanel("undefined"==typeof b?a:b)},AJS.Dialog.prototype.show=function(){return this.popup.show(),AJS.trigger("show.dialog",{dialog:this}),this},AJS.Dialog.prototype.hide=function(){return this.popup.hide(),AJS.trigger("hide.dialog",{dialog:this}),this},AJS.Dialog.prototype.remove=function(){this.popup.hide(),this.popup.remove(),AJS.trigger("remove.dialog",{dialog:this})},AJS.Dialog.prototype.disable=function(){return this.popup.disable(),this},AJS.Dialog.prototype.enable=function(){return this.popup.enable(),this},AJS.Dialog.prototype.get=function(a){var b=[],c=this,d='#([^"][^ ]*|"[^"]*")',e=":(\\d+)",f="page|panel|button|header",g="(?:("+f+")(?:"+d+"|"+e+")?|"+d+")",h=new RegExp("(?:^|,)\\s*"+g+"(?:\\s+"+g+")?\\s*(?=,|$)","ig");(a+"").replace(h,function(a,d,e,f,g,h,i,j,k){d=d&&d.toLowerCase();var l=[];if("page"==d&&c.page[f]?(l.push(c.page[f]),d=h,d=d&&d.toLowerCase(),e=i,f=j,g=k):l=c.page,e=e&&(e+"").replace(/"/g,""),i=i&&(i+"").replace(/"/g,""),g=g&&(g+"").replace(/"/g,""),k=k&&(k+"").replace(/"/g,""),d||g)for(var m=l.length;m--;){if(g||"panel"==d&&(e||!e&&null==f))for(var n=l[m].panel.length;n--;)(l[m].panel[n].button.html()==g||l[m].panel[n].button.html()==e||"panel"==d&&!e&&null==f)&&b.push(l[m].panel[n]);if(g||"button"==d&&(e||!e&&null==f))for(var n=l[m].button.length;n--;)(l[m].button[n].item.html()==g||l[m].button[n].item.html()==e||"button"==d&&!e&&null==f)&&b.push(l[m].button[n]);l[m][d]&&l[m][d][f]&&b.push(l[m][d][f]),"header"==d&&l[m].header&&b.push(l[m].header)}else b=b.concat(l)});for(var i={length:b.length},j=b.length;j--;){i[j]=b[j];for(var k in b[j])k in i||!function(a){i[a]=function(){for(var b=this.length;b--;)"function"==typeof this[b][a]&&this[b][a].apply(this[b],arguments)}}(k)}return i},AJS.Dialog.prototype.updateHeight=function(){for(var a=0,b=AJS.$(window).height()-g-h-2*i,c=0;this.getPanel(c);c++)this.getPanel(c).body.css({height:"auto",display:"block"}).outerHeight()>a&&(a=Math.min(b,this.getPanel(c).body.outerHeight())),c!==this.page[this.curpage].curtab&&this.getPanel(c).body.css({display:"none"});for(c=0;this.getPanel(c);c++)this.getPanel(c).body.css({height:a||this.height});this.page[0].menu.height(a),this.height=a+g+h+1,this.popup.changeSize(void 0,this.height)},AJS.Dialog.prototype.isMaximised=function(){return this.popup.element.outerHeight()>=AJS.$(window).height()-2*i},AJS.Dialog.prototype.getCurPanel=function(){return this.getPanel(this.page[this.curpage].curtab)},AJS.Dialog.prototype.getCurPanelButton=function(){return this.getCurPanel().button}}(),function(a){function b(){var b,c,d=[],e=a(window),f=function(a){function d(a){return g.indexOf(" "+a+" ")>=0}var e,f,g=" "+a.$el[0].className+" ",h=d("aui-dialog2-small")?"small":d("aui-dialog2-medium")?"medium":d("aui-dialog2-large")?"large":d("aui-dialog2-xlarge")?"xlarge":"custom";switch(h){case"small":e=c>420,f=b>500;break;case"medium":e=c>620,f=b>500;break;case"large":e=c>820,f=b>700;break;case"xlarge":e=c>1e3,f=b>700;break;default:e=!0,f=!0}a.$el.toggleClass("aui-dialog2-fullscreen",!e).css("height",b-107-(e?200:0)),a.$el.find(".aui-dialog2-content").css("min-height",f?"":b>500?"193px":"93px")},g=function(){b=e.height(),c=e.width();for(var a=0,g=d.length;g>a;a++)f(d[a])},h=function(a){d.length||(b=e.height(),c=e.width(),e.on("resize",g)),f(a),d.push(a)},i=function(b){d=a.grep(d,function(a){return b!==a}),d.length||e.off("resize",g)};return{show:h,hide:i}}function c(a,c){f||(f=AJS._internal.browser.supportsCalc()?{}:b()),f[c]&&f[c](a)}function d(a){jQuery.each(g,function(b,c){var d="data-"+b;a[0].hasAttribute(d)||a.attr(d,c)})}function e(b){this.$el=b?a(b):a(AJS.parseHtml(a(aui.dialog.dialog2({})))),d(this.$el)}var f,g={"aui-focus-selector":".aui-dialog2-content :input:visible:enabled","aui-blanketed":"true"};e.prototype.on=function(a,b){return AJS.layer(this.$el).on(a,b),this},e.prototype.show=function(){return c(this,"show"),AJS.layer(this.$el).show(),this},e.prototype.hide=function(){return c(this,"hide"),AJS.layer(this.$el).hide(),this.$el.data("aui-remove-on-hide")&&AJS.layer(this.$el).remove(),this},e.prototype.remove=function(){return c(this,"hide"),AJS.layer(this.$el).remove(),this},AJS.dialog2=AJS._internal.widget("dialog2",e),AJS.dialog2.on=function(a,b){AJS.layer.on(a,function(a,c){c.is(".aui-dialog2")&&b.apply(this,arguments)})},a(document).on("click",".aui-dialog2-header-close",function(b){b.preventDefault(),AJS.dialog2(a(this).closest(".aui-dialog2")).hide()})}(AJS.$),function(a){"use strict";var b=0;AJS.DatePicker=function(c,d){var e,f,g,h;return e={},h=b++,g=a(c),g.attr("data-aui-dp-uuid",h),d=a.extend(void 0,AJS.DatePicker.prototype.defaultOptions,d),e.getField=function(){return g},e.getOptions=function(){return d},f=function(){var b,c,f,i,j,k,l,m,n,o,p;e.hide=function(){l=!0,o.hide(),l=!1},e.show=function(){o.show()},k=function(){p.off(),b=a("<div/>"),b.attr("data-aui-dp-popup-uuid",h),p.append(b);var c={dateFormat:a.datepicker.W3C,defaultDate:g.val(),maxDate:g.attr("max"),minDate:g.attr("min"),nextText:">",onSelect:function(a){g.val(a),g.change(),e.hide(),m=!0,g.focus()},prevText:"<"};d.languageCode in AJS.DatePicker.prototype.localisations||(d.languageCode=""),a.extend(c,AJS.DatePicker.prototype.localisations[d.languageCode]),d.firstDay>-1&&(c.firstDay=d.firstDay),"undefined"!=typeof g.attr("step")&&AJS.log("WARNING: The AJS date picker polyfill currently does not support the step attribute!"),b.datepicker(c),g.on("focusout",f),g.on("propertychange keyup input paste",j)},c=function(b){var c=a(b.target);b.preventDefault(),c.closest(p).length||c.is(g)||c.closest("body").length&&e.hide()},f=function(){n||(a("body").on("focus blur click mousedown","*",c),n=!0)},i=function(){m?m=!1:e.show()},j=function(){b.datepicker("setDate",g.val()),b.datepicker("option",{maxDate:g.attr("max"),minDate:g.attr("min")})},e.destroyPolyfill=function(){e.hide(),g.attr("placeholder",null),g.off("propertychange keyup input paste",j),g.off("focus click",i),g.off("focusout",f),g.attr("type","date"),"undefined"!=typeof b&&b.datepicker("destroy"),delete e.destroyPolyfill,delete e.show,delete e.hide},l=!1,m=!1,n=!1,o=AJS.InlineDialog(g,void 0,function(a,c,d){"undefined"==typeof b&&(p=a,k()),d()},{hideCallback:function(){a("body").off("focus blur click mousedown","*",c),n=!1},hideDelay:null,noBind:!0,preHideCallback:function(){return l},width:300}),g.on("focus click",i),g.attr("placeholder","YYYY-MM-DD"),d.overrideBrowserDefault&&AJS.DatePicker.prototype.browserSupportsDateField&&(g[0].type="text")},e.reset=function(){"function"==typeof e.destroyPolyfill&&e.destroyPolyfill(),(!AJS.DatePicker.prototype.browserSupportsDateField||d.overrideBrowserDefault)&&f()},e.reset(),e},AJS.DatePicker.prototype.browserSupportsDateField="date"===a('<input type="date" />')[0].type,AJS.DatePicker.prototype.defaultOptions={overrideBrowserDefault:!1,firstDay:-1,languageCode:AJS.$("html").attr("lang")||"en-AU"},AJS.DatePicker.prototype.localisations={"":{dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesMin:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDay:0,isRTL:!1,monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],showMonthAfterYear:!1,yearSuffix:""},af:{dayNames:["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"],dayNamesMin:["Son","Maa","Din","Woe","Don","Vry","Sat"],firstDay:1,isRTL:!1,monthNames:["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember"],showMonthAfterYear:!1,yearSuffix:""},"ar-DZ":{dayNames:["\xd8\xa7\xd9\u201e\xd8\xa3\xd8\xad\xd8\xaf","\xd8\xa7\xd9\u201e\xd8\xa7\xd8\xab\xd9\u2020\xd9\u0160\xd9\u2020","\xd8\xa7\xd9\u201e\xd8\xab\xd9\u201e\xd8\xa7\xd8\xab\xd8\xa7\xd8\xa1","\xd8\xa7\xd9\u201e\xd8\xa3\xd8\xb1\xd8\xa8\xd8\xb9\xd8\xa7\xd8\xa1","\xd8\xa7\xd9\u201e\xd8\xae\xd9\u2026\xd9\u0160\xd8\xb3","\xd8\xa7\xd9\u201e\xd8\xac\xd9\u2026\xd8\xb9\xd8\xa9","\xd8\xa7\xd9\u201e\xd8\xb3\xd8\xa8\xd8\xaa"],dayNamesMin:["\xd8\xa7\xd9\u201e\xd8\xa3\xd8\xad\xd8\xaf","\xd8\xa7\xd9\u201e\xd8\xa7\xd8\xab\xd9\u2020\xd9\u0160\xd9\u2020","\xd8\xa7\xd9\u201e\xd8\xab\xd9\u201e\xd8\xa7\xd8\xab\xd8\xa7\xd8\xa1","\xd8\xa7\xd9\u201e\xd8\xa3\xd8\xb1\xd8\xa8\xd8\xb9\xd8\xa7\xd8\xa1","\xd8\xa7\xd9\u201e\xd8\xae\xd9\u2026\xd9\u0160\xd8\xb3","\xd8\xa7\xd9\u201e\xd8\xac\xd9\u2026\xd8\xb9\xd8\xa9","\xd8\xa7\xd9\u201e\xd8\xb3\xd8\xa8\xd8\xaa"],firstDay:6,isRTL:!0,monthNames:["\xd8\xac\xd8\xa7\xd9\u2020\xd9\x81\xd9\u0160","\xd9\x81\xd9\u0160\xd9\x81\xd8\xb1\xd9\u0160","\xd9\u2026\xd8\xa7\xd8\xb1\xd8\xb3","\xd8\xa3\xd9\x81\xd8\xb1\xd9\u0160\xd9\u201e","\xd9\u2026\xd8\xa7\xd9\u0160","\xd8\xac\xd9\u02c6\xd8\xa7\xd9\u2020","\xd8\xac\xd9\u02c6\xd9\u0160\xd9\u201e\xd9\u0160\xd8\xa9","\xd8\xa3\xd9\u02c6\xd8\xaa","\xd8\xb3\xd8\xa8\xd8\xaa\xd9\u2026\xd8\xa8\xd8\xb1","\xd8\xa3\xd9\u0192\xd8\xaa\xd9\u02c6\xd8\xa8\xd8\xb1","\xd9\u2020\xd9\u02c6\xd9\x81\xd9\u2026\xd8\xa8\xd8\xb1","\xd8\xaf\xd9\u0160\xd8\xb3\xd9\u2026\xd8\xa8\xd8\xb1"],showMonthAfterYear:!1,yearSuffix:""},ar:{dayNames:["\xd8\xa7\xd9\u201e\xd8\xa3\xd8\xad\xd8\xaf","\xd8\xa7\xd9\u201e\xd8\xa7\xd8\xab\xd9\u2020\xd9\u0160\xd9\u2020","\xd8\xa7\xd9\u201e\xd8\xab\xd9\u201e\xd8\xa7\xd8\xab\xd8\xa7\xd8\xa1","\xd8\xa7\xd9\u201e\xd8\xa3\xd8\xb1\xd8\xa8\xd8\xb9\xd8\xa7\xd8\xa1","\xd8\xa7\xd9\u201e\xd8\xae\xd9\u2026\xd9\u0160\xd8\xb3","\xd8\xa7\xd9\u201e\xd8\xac\xd9\u2026\xd8\xb9\xd8\xa9","\xd8\xa7\xd9\u201e\xd8\xb3\xd8\xa8\xd8\xaa"],dayNamesMin:["\xd8\xa7\xd9\u201e\xd8\xa3\xd8\xad\xd8\xaf","\xd8\xa7\xd9\u201e\xd8\xa7\xd8\xab\xd9\u2020\xd9\u0160\xd9\u2020","\xd8\xa7\xd9\u201e\xd8\xab\xd9\u201e\xd8\xa7\xd8\xab\xd8\xa7\xd8\xa1","\xd8\xa7\xd9\u201e\xd8\xa3\xd8\xb1\xd8\xa8\xd8\xb9\xd8\xa7\xd8\xa1","\xd8\xa7\xd9\u201e\xd8\xae\xd9\u2026\xd9\u0160\xd8\xb3","\xd8\xa7\xd9\u201e\xd8\xac\xd9\u2026\xd8\xb9\xd8\xa9","\xd8\xa7\xd9\u201e\xd8\xb3\xd8\xa8\xd8\xaa"],firstDay:6,isRTL:!0,monthNames:["\xd9\u0192\xd8\xa7\xd9\u2020\xd9\u02c6\xd9\u2020 \xd8\xa7\xd9\u201e\xd8\xab\xd8\xa7\xd9\u2020\xd9\u0160","\xd8\xb4\xd8\xa8\xd8\xa7\xd8\xb7","\xd8\xa2\xd8\xb0\xd8\xa7\xd8\xb1","\xd9\u2020\xd9\u0160\xd8\xb3\xd8\xa7\xd9\u2020","\xd9\u2026\xd8\xa7\xd9\u0160\xd9\u02c6","\xd8\xad\xd8\xb2\xd9\u0160\xd8\xb1\xd8\xa7\xd9\u2020","\xd8\xaa\xd9\u2026\xd9\u02c6\xd8\xb2","\xd8\xa2\xd8\xa8","\xd8\xa3\xd9\u0160\xd9\u201e\xd9\u02c6\xd9\u201e","\xd8\xaa\xd8\xb4\xd8\xb1\xd9\u0160\xd9\u2020 \xd8\xa7\xd9\u201e\xd8\xa3\xd9\u02c6\xd9\u201e","\xd8\xaa\xd8\xb4\xd8\xb1\xd9\u0160\xd9\u2020 \xd8\xa7\xd9\u201e\xd8\xab\xd8\xa7\xd9\u2020\xd9\u0160","\xd9\u0192\xd8\xa7\xd9\u2020\xd9\u02c6\xd9\u2020 \xd8\xa7\xd9\u201e\xd8\xa3\xd9\u02c6\xd9\u201e"],showMonthAfterYear:!1,yearSuffix:""},az:{dayNames:["Bazar","Bazar ert\xc9\u2122si","\xc3\u2021\xc9\u2122r\xc5\u0178\xc9\u2122nb\xc9\u2122 ax\xc5\u0178am\xc4\xb1","\xc3\u2021\xc9\u2122r\xc5\u0178\xc9\u2122nb\xc9\u2122","C\xc3\xbcm\xc9\u2122 ax\xc5\u0178am\xc4\xb1","C\xc3\xbcm\xc9\u2122","\xc5\u017e\xc9\u2122nb\xc9\u2122"],dayNamesMin:["B","Be","\xc3\u2021a","\xc3\u2021","Ca","C","\xc5\u017e"],firstDay:1,isRTL:!1,monthNames:["Yanvar","Fevral","Mart","Aprel","May","\xc4\xb0yun","\xc4\xb0yul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],showMonthAfterYear:!1,yearSuffix:""},bg:{dayNames:["\xd0\x9d\xd0\xb5\xd0\xb4\xd0\xb5\xd0\xbb\xd1\x8f","\xd0\u0178\xd0\xbe\xd0\xbd\xd0\xb5\xd0\xb4\xd0\xb5\xd0\xbb\xd0\xbd\xd0\xb8\xd0\xba","\xd0\u2019\xd1\u201a\xd0\xbe\xd1\u20ac\xd0\xbd\xd0\xb8\xd0\xba","\xd0\xa1\xd1\u20ac\xd1\x8f\xd0\xb4\xd0\xb0","\xd0\xa7\xd0\xb5\xd1\u201a\xd0\xb2\xd1\u0160\xd1\u20ac\xd1\u201a\xd1\u0160\xd0\xba","\xd0\u0178\xd0\xb5\xd1\u201a\xd1\u0160\xd0\xba","\xd0\xa1\xd1\u0160\xd0\xb1\xd0\xbe\xd1\u201a\xd0\xb0"],dayNamesMin:["\xd0\x9d\xd0\xb5\xd0\xb4","\xd0\u0178\xd0\xbe\xd0\xbd","\xd0\u2019\xd1\u201a\xd0\xbe","\xd0\xa1\xd1\u20ac\xd1\x8f","\xd0\xa7\xd0\xb5\xd1\u201a","\xd0\u0178\xd0\xb5\xd1\u201a","\xd0\xa1\xd1\u0160\xd0\xb1"],firstDay:1,isRTL:!1,monthNames:["\xd0\xaf\xd0\xbd\xd1\u0192\xd0\xb0\xd1\u20ac\xd0\xb8","\xd0\xa4\xd0\xb5\xd0\xb2\xd1\u20ac\xd1\u0192\xd0\xb0\xd1\u20ac\xd0\xb8","\xd0\u0153\xd0\xb0\xd1\u20ac\xd1\u201a","\xd0\x90\xd0\xbf\xd1\u20ac\xd0\xb8\xd0\xbb","\xd0\u0153\xd0\xb0\xd0\xb9","\xd0\xae\xd0\xbd\xd0\xb8","\xd0\xae\xd0\xbb\xd0\xb8","\xd0\x90\xd0\xb2\xd0\xb3\xd1\u0192\xd1\x81\xd1\u201a","\xd0\xa1\xd0\xb5\xd0\xbf\xd1\u201a\xd0\xb5\xd0\xbc\xd0\xb2\xd1\u20ac\xd0\xb8","\xd0\u017e\xd0\xba\xd1\u201a\xd0\xbe\xd0\xbc\xd0\xb2\xd1\u20ac\xd0\xb8","\xd0\x9d\xd0\xbe\xd0\xb5\xd0\xbc\xd0\xb2\xd1\u20ac\xd0\xb8","\xd0\u201d\xd0\xb5\xd0\xba\xd0\xb5\xd0\xbc\xd0\xb2\xd1\u20ac\xd0\xb8"],showMonthAfterYear:!1,yearSuffix:""},bs:{dayNames:["Nedelja","Ponedeljak","Utorak","Srijeda","\xc4\u0152etvrtak","Petak","Subota"],dayNamesMin:["Ned","Pon","Uto","Sri","\xc4\u0152et","Pet","Sub"],firstDay:1,isRTL:!1,monthNames:["Januar","Februar","Mart","April","Maj","Juni","Juli","August","Septembar","Oktobar","Novembar","Decembar"],showMonthAfterYear:!1,yearSuffix:""},ca:{dayNames:["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"],dayNamesMin:["Dug","Dln","Dmt","Dmc","Djs","Dvn","Dsb"],firstDay:1,isRTL:!1,monthNames:["Gener","Febrer","Mar&ccedil;","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],showMonthAfterYear:!1,yearSuffix:""},cs:{dayNames:["ned\xc4\u203ale","pond\xc4\u203al\xc3\xad","\xc3\xbater\xc3\xbd","st\xc5\u2122eda","\xc4\x8dtvrtek","p\xc3\xa1tek","sobota"],dayNamesMin:["ne","po","\xc3\xbat","st","\xc4\x8dt","p\xc3\xa1","so"],firstDay:1,isRTL:!1,monthNames:["leden","\xc3\xbanor","b\xc5\u2122ezen","duben","kv\xc4\u203aten","\xc4\x8derven","\xc4\x8dervenec","srpen","z\xc3\xa1\xc5\u2122\xc3\xad","\xc5\u2122\xc3\xadjen","listopad","prosinec"],showMonthAfterYear:!1,yearSuffix:""},"cy-GB":{dayNames:["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"],dayNamesMin:["Sul","Llu","Maw","Mer","Iau","Gwe","Sad"],firstDay:1,isRTL:!1,monthNames:["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr"],showMonthAfterYear:!1,yearSuffix:""},da:{dayNames:["S\xc3\xb8ndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","L\xc3\xb8rdag"],dayNamesMin:["S\xc3\xb8n","Man","Tir","Ons","Tor","Fre","L\xc3\xb8r"],firstDay:1,isRTL:!1,monthNames:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],showMonthAfterYear:!1,yearSuffix:""},de:{dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],firstDay:1,isRTL:!1,monthNames:["Januar","Februar","M\xc3\xa4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],showMonthAfterYear:!1,yearSuffix:""},el:{dayNames:["\xce\u0161\xcf\u2026\xcf\x81\xce\xb9\xce\xb1\xce\xba\xce\xae","\xce\u201d\xce\xb5\xcf\u2026\xcf\u201e\xce\xad\xcf\x81\xce\xb1","\xce\xa4\xcf\x81\xce\xaf\xcf\u201e\xce\xb7","\xce\xa4\xce\xb5\xcf\u201e\xce\xac\xcf\x81\xcf\u201e\xce\xb7","\xce \xce\xad\xce\xbc\xcf\u20ac\xcf\u201e\xce\xb7","\xce \xce\xb1\xcf\x81\xce\xb1\xcf\u0192\xce\xba\xce\xb5\xcf\u2026\xce\xae","\xce\xa3\xce\xac\xce\xb2\xce\xb2\xce\xb1\xcf\u201e\xce\xbf"],dayNamesMin:["\xce\u0161\xcf\u2026\xcf\x81","\xce\u201d\xce\xb5\xcf\u2026","\xce\xa4\xcf\x81\xce\xb9","\xce\xa4\xce\xb5\xcf\u201e","\xce \xce\xb5\xce\xbc","\xce \xce\xb1\xcf\x81","\xce\xa3\xce\xb1\xce\xb2"],firstDay:1,isRTL:!1,monthNames:["\xce\u2122\xce\xb1\xce\xbd\xce\xbf\xcf\u2026\xce\xac\xcf\x81\xce\xb9\xce\xbf\xcf\u201a","\xce\xa6\xce\xb5\xce\xb2\xcf\x81\xce\xbf\xcf\u2026\xce\xac\xcf\x81\xce\xb9\xce\xbf\xcf\u201a","\xce\u0153\xce\xac\xcf\x81\xcf\u201e\xce\xb9\xce\xbf\xcf\u201a","\xce\u2018\xcf\u20ac\xcf\x81\xce\xaf\xce\xbb\xce\xb9\xce\xbf\xcf\u201a","\xce\u0153\xce\xac\xce\xb9\xce\xbf\xcf\u201a","\xce\u2122\xce\xbf\xcf\x8d\xce\xbd\xce\xb9\xce\xbf\xcf\u201a","\xce\u2122\xce\xbf\xcf\x8d\xce\xbb\xce\xb9\xce\xbf\xcf\u201a","\xce\u2018\xcf\x8d\xce\xb3\xce\xbf\xcf\u2026\xcf\u0192\xcf\u201e\xce\xbf\xcf\u201a","\xce\xa3\xce\xb5\xcf\u20ac\xcf\u201e\xce\xad\xce\xbc\xce\xb2\xcf\x81\xce\xb9\xce\xbf\xcf\u201a","\xce\u0178\xce\xba\xcf\u201e\xcf\u017d\xce\xb2\xcf\x81\xce\xb9\xce\xbf\xcf\u201a","\xce\x9d\xce\xbf\xce\xad\xce\xbc\xce\xb2\xcf\x81\xce\xb9\xce\xbf\xcf\u201a","\xce\u201d\xce\xb5\xce\xba\xce\xad\xce\xbc\xce\xb2\xcf\x81\xce\xb9\xce\xbf\xcf\u201a"],showMonthAfterYear:!1,yearSuffix:""},"en-AU":{dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesMin:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDay:1,isRTL:!1,monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],showMonthAfterYear:!1,yearSuffix:""},"en-GB":{dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesMin:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDay:1,isRTL:!1,monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],showMonthAfterYear:!1,yearSuffix:""},"en-NZ":{dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesMin:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDay:1,isRTL:!1,monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],showMonthAfterYear:!1,yearSuffix:""},eo:{dayNames:["Diman\xc4\u2030o","Lundo","Mardo","Merkredo","\xc4\xb4a\xc5\xaddo","Vendredo","Sabato"],dayNamesMin:["Dim","Lun","Mar","Mer","\xc4\xb4a\xc5\xad","Ven","Sab"],firstDay:0,isRTL:!1,monthNames:["Januaro","Februaro","Marto","Aprilo","Majo","Junio","Julio","A\xc5\xadgusto","Septembro","Oktobro","Novembro","Decembro"],showMonthAfterYear:!1,yearSuffix:""},es:{dayNames:["Domingo","Lunes","Martes","Mi&eacute;rcoles","Jueves","Viernes","S&aacute;bado"],dayNamesMin:["Dom","Lun","Mar","Mi&eacute;","Juv","Vie","S&aacute;b"],firstDay:1,isRTL:!1,monthNames:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],showMonthAfterYear:!1,yearSuffix:""},et:{dayNames:["P\xc3\xbchap\xc3\xa4ev","Esmasp\xc3\xa4ev","Teisip\xc3\xa4ev","Kolmap\xc3\xa4ev","Neljap\xc3\xa4ev","Reede","Laup\xc3\xa4ev"],dayNamesMin:["P\xc3\xbchap","Esmasp","Teisip","Kolmap","Neljap","Reede","Laup"],firstDay:1,isRTL:!1,monthNames:["Jaanuar","Veebruar","M\xc3\xa4rts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],showMonthAfterYear:!1,yearSuffix:""},eu:{dayNames:["Igandea","Astelehena","Asteartea","Asteazkena","Osteguna","Ostirala","Larunbata"],dayNamesMin:["Iga","Ast","Ast","Ast","Ost","Ost","Lar"],firstDay:1,isRTL:!1,monthNames:["Urtarrila","Otsaila","Martxoa","Apirila","Maiatza","Ekaina","Uztaila","Abuztua","Iraila","Urria","Azaroa","Abendua"],showMonthAfterYear:!1,yearSuffix:""},fa:{dayNames:["\xd9\u0160\xda\xa9\xd8\xb4\xd9\u2020\xd8\xa8\xd9\u2021","\xd8\xaf\xd9\u02c6\xd8\xb4\xd9\u2020\xd8\xa8\xd9\u2021","\xd8\xb3\xd9\u2021\xe2\u20ac\u0152\xd8\xb4\xd9\u2020\xd8\xa8\xd9\u2021","\xda\u2020\xd9\u2021\xd8\xa7\xd8\xb1\xd8\xb4\xd9\u2020\xd8\xa8\xd9\u2021","\xd9\xbe\xd9\u2020\xd8\xac\xd8\xb4\xd9\u2020\xd8\xa8\xd9\u2021","\xd8\xac\xd9\u2026\xd8\xb9\xd9\u2021","\xd8\xb4\xd9\u2020\xd8\xa8\xd9\u2021"],dayNamesMin:["\xd9\u0160","\xd8\xaf","\xd8\xb3","\xda\u2020","\xd9\xbe","\xd8\xac","\xd8\xb4"],firstDay:6,isRTL:!0,monthNames:["\xd9\x81\xd8\xb1\xd9\u02c6\xd8\xb1\xd8\xaf\xd9\u0160\xd9\u2020","\xd8\xa7\xd8\xb1\xd8\xaf\xd9\u0160\xd8\xa8\xd9\u2021\xd8\xb4\xd8\xaa","\xd8\xae\xd8\xb1\xd8\xaf\xd8\xa7\xd8\xaf","\xd8\xaa\xd9\u0160\xd8\xb1","\xd9\u2026\xd8\xb1\xd8\xaf\xd8\xa7\xd8\xaf","\xd8\xb4\xd9\u2021\xd8\xb1\xd9\u0160\xd9\u02c6\xd8\xb1","\xd9\u2026\xd9\u2021\xd8\xb1","\xd8\xa2\xd8\xa8\xd8\xa7\xd9\u2020","\xd8\xa2\xd8\xb0\xd8\xb1","\xd8\xaf\xd9\u0160","\xd8\xa8\xd9\u2021\xd9\u2026\xd9\u2020","\xd8\xa7\xd8\xb3\xd9\x81\xd9\u2020\xd8\xaf"],showMonthAfterYear:!1,yearSuffix:""},fi:{dayNames:["Sunnuntai","Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai","Lauantai"],dayNamesMin:["Su","Ma","Ti","Ke","To","Pe","Su"],firstDay:1,isRTL:!1,monthNames:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kes&auml;kuu","Hein&auml;kuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],showMonthAfterYear:!1,yearSuffix:""},fo:{dayNames:["Sunnudagur","M\xc3\xa1nadagur","T\xc3\xbdsdagur","Mikudagur","H\xc3\xb3sdagur","Fr\xc3\xadggjadagur","Leyardagur"],dayNamesMin:["Sun","M\xc3\xa1n","T\xc3\xbds","Mik","H\xc3\xb3s","Fr\xc3\xad","Ley"],firstDay:0,isRTL:!1,monthNames:["Januar","Februar","Mars","Apr\xc3\xadl","Mei","Juni","Juli","August","September","Oktober","November","Desember"],showMonthAfterYear:!1,yearSuffix:""},"fr-CH":{dayNames:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],dayNamesMin:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],firstDay:1,isRTL:!1,monthNames:["Janvier","F\xc3\xa9vrier","Mars","Avril","Mai","Juin","Juillet","Ao\xc3\xbbt","Septembre","Octobre","Novembre","D\xc3\xa9cembre"],showMonthAfterYear:!1,yearSuffix:""},fr:{dayNames:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],dayNamesMin:["Dim.","Lun.","Mar.","Mer.","Jeu.","Ven.","Sam."],firstDay:1,isRTL:!1,monthNames:["Janvier","F\xc3\xa9vrier","Mars","Avril","Mai","Juin","Juillet","Ao\xc3\xbbt","Septembre","Octobre","Novembre","D\xc3\xa9cembre"],showMonthAfterYear:!1,yearSuffix:""},gl:{dayNames:["Domingo","Luns","Martes","M&eacute;rcores","Xoves","Venres","S&aacute;bado"],dayNamesMin:["Dom","Lun","Mar","M&eacute;r","Xov","Ven","S&aacute;b"],firstDay:1,isRTL:!1,monthNames:["Xaneiro","Febreiro","Marzo","Abril","Maio","Xu\xc3\xb1o","Xullo","Agosto","Setembro","Outubro","Novembro","Decembro"],showMonthAfterYear:!1,yearSuffix:""},he:{dayNames:["\xd7\xa8\xd7\x90\xd7\xa9\xd7\u2022\xd7\u0178","\xd7\xa9\xd7 \xd7\u2122","\xd7\xa9\xd7\u0153\xd7\u2122\xd7\xa9\xd7\u2122","\xd7\xa8\xd7\u2018\xd7\u2122\xd7\xa2\xd7\u2122","\xd7\u2014\xd7\u017e\xd7\u2122\xd7\xa9\xd7\u2122","\xd7\xa9\xd7\u2122\xd7\xa9\xd7\u2122","\xd7\xa9\xd7\u2018\xd7\xaa"],dayNamesMin:["\xd7\x90'","\xd7\u2018'","\xd7\u2019'","\xd7\u201c'","\xd7\u201d'","\xd7\u2022'","\xd7\xa9\xd7\u2018\xd7\xaa"],firstDay:0,isRTL:!0,monthNames:["\xd7\u2122\xd7 \xd7\u2022\xd7\x90\xd7\xa8","\xd7\xa4\xd7\u2018\xd7\xa8\xd7\u2022\xd7\x90\xd7\xa8","\xd7\u017e\xd7\xa8\xd7\xa5","\xd7\x90\xd7\xa4\xd7\xa8\xd7\u2122\xd7\u0153","\xd7\u017e\xd7\x90\xd7\u2122","\xd7\u2122\xd7\u2022\xd7 \xd7\u2122","\xd7\u2122\xd7\u2022\xd7\u0153\xd7\u2122","\xd7\x90\xd7\u2022\xd7\u2019\xd7\u2022\xd7\xa1\xd7\u02dc","\xd7\xa1\xd7\xa4\xd7\u02dc\xd7\u017e\xd7\u2018\xd7\xa8","\xd7\x90\xd7\u2022\xd7\xa7\xd7\u02dc\xd7\u2022\xd7\u2018\xd7\xa8","\xd7 \xd7\u2022\xd7\u2018\xd7\u017e\xd7\u2018\xd7\xa8","\xd7\u201c\xd7\xa6\xd7\u017e\xd7\u2018\xd7\xa8"],showMonthAfterYear:!1,yearSuffix:""},hr:{dayNames:["Nedjelja","Ponedjeljak","Utorak","Srijeda","\xc4\u0152etvrtak","Petak","Subota"],dayNamesMin:["Ned","Pon","Uto","Sri","\xc4\u0152et","Pet","Sub"],firstDay:1,isRTL:!1,monthNames:["Sije\xc4\x8danj","Velja\xc4\x8da","O\xc5\xbeujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],showMonthAfterYear:!1,yearSuffix:""},hu:{dayNames:["Vas\xc3\xa1rnap","H\xc3\xa9tf\xc5\u2018","Kedd","Szerda","Cs\xc3\xbct\xc3\xb6rt\xc3\xb6k","P\xc3\xa9ntek","Szombat"],dayNamesMin:["Vas","H\xc3\xa9t","Ked","Sze","Cs\xc3\xbc","P\xc3\xa9n","Szo"],firstDay:1,isRTL:!1,monthNames:["Janu\xc3\xa1r","Febru\xc3\xa1r","M\xc3\xa1rcius","\xc3\x81prilis","M\xc3\xa1jus","J\xc3\xbanius","J\xc3\xbalius","Augusztus","Szeptember","Okt\xc3\xb3ber","November","December"],showMonthAfterYear:!0,yearSuffix:""},hy:{dayNames:["\xd5\xaf\xd5\xab\xd6\u20ac\xd5\xa1\xd5\xaf\xd5\xab","\xd5\xa5\xd5\xaf\xd5\xb8\xd6\u201a\xd5\xb7\xd5\xa1\xd5\xa2\xd5\xa9\xd5\xab","\xd5\xa5\xd6\u20ac\xd5\xa5\xd6\u201e\xd5\xb7\xd5\xa1\xd5\xa2\xd5\xa9\xd5\xab","\xd5\xb9\xd5\xb8\xd6\u20ac\xd5\xa5\xd6\u201e\xd5\xb7\xd5\xa1\xd5\xa2\xd5\xa9\xd5\xab","\xd5\xb0\xd5\xab\xd5\xb6\xd5\xa3\xd5\xb7\xd5\xa1\xd5\xa2\xd5\xa9\xd5\xab","\xd5\xb8\xd6\u201a\xd6\u20ac\xd5\xa2\xd5\xa1\xd5\xa9","\xd5\xb7\xd5\xa1\xd5\xa2\xd5\xa1\xd5\xa9"],dayNamesMin:["\xd5\xaf\xd5\xab\xd6\u20ac","\xd5\xa5\xd6\u20ac\xd5\xaf","\xd5\xa5\xd6\u20ac\xd6\u201e","\xd5\xb9\xd6\u20ac\xd6\u201e","\xd5\xb0\xd5\xb6\xd5\xa3","\xd5\xb8\xd6\u201a\xd6\u20ac\xd5\xa2","\xd5\xb7\xd5\xa2\xd5\xa9"],firstDay:1,isRTL:!1,monthNames:["\xd5\u20ac\xd5\xb8\xd6\u201a\xd5\xb6\xd5\xbe\xd5\xa1\xd6\u20ac","\xd5\u201c\xd5\xa5\xd5\xbf\xd6\u20ac\xd5\xbe\xd5\xa1\xd6\u20ac","\xd5\u201e\xd5\xa1\xd6\u20ac\xd5\xbf","\xd4\xb1\xd5\xba\xd6\u20ac\xd5\xab\xd5\xac","\xd5\u201e\xd5\xa1\xd5\xb5\xd5\xab\xd5\xbd","\xd5\u20ac\xd5\xb8\xd6\u201a\xd5\xb6\xd5\xab\xd5\xbd","\xd5\u20ac\xd5\xb8\xd6\u201a\xd5\xac\xd5\xab\xd5\xbd","\xd5\u2022\xd5\xa3\xd5\xb8\xd5\xbd\xd5\xbf\xd5\xb8\xd5\xbd","\xd5\x8d\xd5\xa5\xd5\xba\xd5\xbf\xd5\xa5\xd5\xb4\xd5\xa2\xd5\xa5\xd6\u20ac","\xd5\u20ac\xd5\xb8\xd5\xaf\xd5\xbf\xd5\xa5\xd5\xb4\xd5\xa2\xd5\xa5\xd6\u20ac","\xd5\u2020\xd5\xb8\xd5\xb5\xd5\xa5\xd5\xb4\xd5\xa2\xd5\xa5\xd6\u20ac","\xd4\xb4\xd5\xa5\xd5\xaf\xd5\xbf\xd5\xa5\xd5\xb4\xd5\xa2\xd5\xa5\xd6\u20ac"],showMonthAfterYear:!1,yearSuffix:""},id:{dayNames:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],dayNamesMin:["Min","Sen","Sel","Rab","kam","Jum","Sab"],firstDay:0,isRTL:!1,monthNames:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember"],showMonthAfterYear:!1,yearSuffix:""},is:{dayNames:["Sunnudagur","M&aacute;nudagur","&THORN;ri&eth;judagur","Mi&eth;vikudagur","Fimmtudagur","F&ouml;studagur","Laugardagur"],dayNamesMin:["Sun","M&aacute;n","&THORN;ri","Mi&eth;","Fim","F&ouml;s","Lau"],firstDay:0,isRTL:!1,monthNames:["Jan&uacute;ar","Febr&uacute;ar","Mars","Apr&iacute;l","Ma&iacute","J&uacute;n&iacute;","J&uacute;l&iacute;","&Aacute;g&uacute;st","September","Okt&oacute;ber","N&oacute;vember","Desember"],showMonthAfterYear:!1,yearSuffix:""},it:{dayNames:["Domenica","Luned&#236","Marted&#236","Mercoled&#236","Gioved&#236","Venerd&#236","Sabato"],dayNamesMin:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],firstDay:1,isRTL:!1,monthNames:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],showMonthAfterYear:!1,yearSuffix:""},ja:{dayNames:["\xe6\u2014\xa5\xe6\u203a\u0153\xe6\u2014\xa5","\xe6\u0153\u02c6\xe6\u203a\u0153\xe6\u2014\xa5","\xe7\x81\xab\xe6\u203a\u0153\xe6\u2014\xa5","\xe6\xb0\xb4\xe6\u203a\u0153\xe6\u2014\xa5","\xe6\u0153\xa8\xe6\u203a\u0153\xe6\u2014\xa5","\xe9\u2021\u2018\xe6\u203a\u0153\xe6\u2014\xa5","\xe5\u0153\u0178\xe6\u203a\u0153\xe6\u2014\xa5"],dayNamesMin:["\xe6\u2014\xa5","\xe6\u0153\u02c6","\xe7\x81\xab","\xe6\xb0\xb4","\xe6\u0153\xa8","\xe9\u2021\u2018","\xe5\u0153\u0178"],firstDay:0,isRTL:!1,monthNames:["1\xe6\u0153\u02c6","2\xe6\u0153\u02c6","3\xe6\u0153\u02c6","4\xe6\u0153\u02c6","5\xe6\u0153\u02c6","6\xe6\u0153\u02c6","7\xe6\u0153\u02c6","8\xe6\u0153\u02c6","9\xe6\u0153\u02c6","10\xe6\u0153\u02c6","11\xe6\u0153\u02c6","12\xe6\u0153\u02c6"],showMonthAfterYear:!0,yearSuffix:"\xe5\xb9\xb4"},kk:{dayNames:["\xd0\u2013\xd0\xb5\xd0\xba\xd1\x81\xd0\xb5\xd0\xbd\xd0\xb1\xd1\u2013","\xd0\u201d\xd2\xaf\xd0\xb9\xd1\x81\xd0\xb5\xd0\xbd\xd0\xb1\xd1\u2013","\xd0\xa1\xd0\xb5\xd0\xb9\xd1\x81\xd0\xb5\xd0\xbd\xd0\xb1\xd1\u2013","\xd0\xa1\xd3\u2122\xd1\u20ac\xd1\x81\xd0\xb5\xd0\xbd\xd0\xb1\xd1\u2013","\xd0\u2018\xd0\xb5\xd0\xb9\xd1\x81\xd0\xb5\xd0\xbd\xd0\xb1\xd1\u2013","\xd0\u2013\xd2\xb1\xd0\xbc\xd0\xb0","\xd0\xa1\xd0\xb5\xd0\xbd\xd0\xb1\xd1\u2013"],dayNamesMin:["\xd0\xb6\xd0\xba\xd1\x81","\xd0\xb4\xd1\x81\xd0\xbd","\xd1\x81\xd1\x81\xd0\xbd","\xd1\x81\xd1\u20ac\xd1\x81","\xd0\xb1\xd1\x81\xd0\xbd","\xd0\xb6\xd0\xbc\xd0\xb0","\xd1\x81\xd0\xbd\xd0\xb1"],firstDay:1,isRTL:!1,monthNames:["\xd2\u0161\xd0\xb0\xd2\xa3\xd1\u201a\xd0\xb0\xd1\u20ac","\xd0\x90\xd2\u203a\xd0\xbf\xd0\xb0\xd0\xbd","\xd0\x9d\xd0\xb0\xd1\u0192\xd1\u20ac\xd1\u2039\xd0\xb7","\xd0\xa1\xd3\u2122\xd1\u0192\xd1\u2013\xd1\u20ac","\xd0\u0153\xd0\xb0\xd0\xbc\xd1\u2039\xd1\u20ac","\xd0\u0153\xd0\xb0\xd1\u0192\xd1\x81\xd1\u2039\xd0\xbc","\xd0\xa8\xd1\u2013\xd0\xbb\xd0\xb4\xd0\xb5","\xd0\xa2\xd0\xb0\xd0\xbc\xd1\u2039\xd0\xb7","\xd2\u0161\xd1\u2039\xd1\u20ac\xd0\xba\xd2\xaf\xd0\xb9\xd0\xb5\xd0\xba","\xd2\u0161\xd0\xb0\xd0\xb7\xd0\xb0\xd0\xbd","\xd2\u0161\xd0\xb0\xd1\u20ac\xd0\xb0\xd1\u02c6\xd0\xb0","\xd0\u2013\xd0\xb5\xd0\xbb\xd1\u201a\xd0\xbe\xd2\u203a\xd1\x81\xd0\xb0\xd0\xbd"],showMonthAfterYear:!1,yearSuffix:""},ko:{dayNames:["\xec\x9d\xbc","\xec\u203a\u201d","\xed\u2122\u201d","\xec\u02c6\u02dc","\xeb\xaa\xa9","\xea\xb8\u02c6","\xed\u2020 "],dayNamesMin:["\xec\x9d\xbc","\xec\u203a\u201d","\xed\u2122\u201d","\xec\u02c6\u02dc","\xeb\xaa\xa9","\xea\xb8\u02c6","\xed\u2020 "],firstDay:0,isRTL:!1,monthNames:["1\xec\u203a\u201d(JAN)","2\xec\u203a\u201d(FEB)","3\xec\u203a\u201d(MAR)","4\xec\u203a\u201d(APR)","5\xec\u203a\u201d(MAY)","6\xec\u203a\u201d(JUN)","7\xec\u203a\u201d(JUL)","8\xec\u203a\u201d(AUG)","9\xec\u203a\u201d(SEP)","10\xec\u203a\u201d(OCT)","11\xec\u203a\u201d(NOV)","12\xec\u203a\u201d(DEC)"],showMonthAfterYear:!1,yearSuffix:"\xeb\u2026\u201e"},lb:{dayNames:["Sonndeg","M\xc3\xa9indeg","D\xc3\xabnschdeg","M\xc3\xabttwoch","Donneschdeg","Freideg","Samschdeg"],dayNamesMin:["Son","M\xc3\xa9i","D\xc3\xabn","M\xc3\xabt","Don","Fre","Sam"],firstDay:1,isRTL:!1,monthNames:["Januar","Februar","M\xc3\xa4erz","Abr\xc3\xabll","Mee","Juni","Juli","August","September","Oktober","November","Dezember"],showMonthAfterYear:!1,yearSuffix:""},lt:{dayNames:["sekmadienis","pirmadienis","antradienis","tre\xc4\x8diadienis","ketvirtadienis","penktadienis","\xc5\xa1e\xc5\xa1tadienis"],dayNamesMin:["sek","pir","ant","tre","ket","pen","\xc5\xa1e\xc5\xa1"],firstDay:1,isRTL:!1,monthNames:["Sausis","Vasaris","Kovas","Balandis","Gegu\xc5\xbe\xc4\u2014","Bir\xc5\xbeelis","Liepa","Rugpj\xc5\xabtis","Rugs\xc4\u2014jis","Spalis","Lapkritis","Gruodis"],showMonthAfterYear:!1,yearSuffix:""},lv:{dayNames:["sv\xc4\u201ctdiena","pirmdiena","otrdiena","tre\xc5\xa1diena","ceturtdiena","piektdiena","sestdiena"],dayNamesMin:["svt","prm","otr","tre","ctr","pkt","sst"],firstDay:1,isRTL:!1,monthNames:["Janv\xc4\x81ris","Febru\xc4\x81ris","Marts","Apr\xc4\xablis","Maijs","J\xc5\xabnijs","J\xc5\xablijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],showMonthAfterYear:!1,yearSuffix:""},mk:{dayNames:["\xd0\x9d\xd0\xb5\xd0\xb4\xd0\xb5\xd0\xbb\xd0\xb0","\xd0\u0178\xd0\xbe\xd0\xbd\xd0\xb5\xd0\xb4\xd0\xb5\xd0\xbb\xd0\xbd\xd0\xb8\xd0\xba","\xd0\u2019\xd1\u201a\xd0\xbe\xd1\u20ac\xd0\xbd\xd0\xb8\xd0\xba","\xd0\xa1\xd1\u20ac\xd0\xb5\xd0\xb4\xd0\xb0","\xd0\xa7\xd0\xb5\xd1\u201a\xd0\xb2\xd1\u20ac\xd1\u201a\xd0\xbe\xd0\xba","\xd0\u0178\xd0\xb5\xd1\u201a\xd0\xbe\xd0\xba","\xd0\xa1\xd0\xb0\xd0\xb1\xd0\xbe\xd1\u201a\xd0\xb0"],dayNamesMin:["\xd0\x9d\xd0\xb5\xd0\xb4","\xd0\u0178\xd0\xbe\xd0\xbd","\xd0\u2019\xd1\u201a\xd0\xbe","\xd0\xa1\xd1\u20ac\xd0\xb5","\xd0\xa7\xd0\xb5\xd1\u201a","\xd0\u0178\xd0\xb5\xd1\u201a","\xd0\xa1\xd0\xb0\xd0\xb1"],firstDay:1,isRTL:!1,monthNames:["\xd0\u02c6\xd0\xb0\xd0\xbd\xd1\u0192\xd0\xb0\xd1\u20ac\xd0\xb8","\xd0\xa4\xd0\xb5\xd0\xb1\xd1\u20ac\xd1\u0192\xd0\xb0\xd1\u20ac\xd0\xb8","\xd0\u0153\xd0\xb0\xd1\u20ac\xd1\u201a","\xd0\x90\xd0\xbf\xd1\u20ac\xd0\xb8\xd0\xbb","\xd0\u0153\xd0\xb0\xd1\u02dc","\xd0\u02c6\xd1\u0192\xd0\xbd\xd0\xb8","\xd0\u02c6\xd1\u0192\xd0\xbb\xd0\xb8","\xd0\x90\xd0\xb2\xd0\xb3\xd1\u0192\xd1\x81\xd1\u201a","\xd0\xa1\xd0\xb5\xd0\xbf\xd1\u201a\xd0\xb5\xd0\xbc\xd0\xb2\xd1\u20ac\xd0\xb8","\xd0\u017e\xd0\xba\xd1\u201a\xd0\xbe\xd0\xbc\xd0\xb2\xd1\u20ac\xd0\xb8","\xd0\x9d\xd0\xbe\xd0\xb5\xd0\xbc\xd0\xb2\xd1\u20ac\xd0\xb8","\xd0\u201d\xd0\xb5\xd0\xba\xd0\xb5\xd0\xbc\xd0\xb2\xd1\u20ac\xd0\xb8"],showMonthAfterYear:!1,yearSuffix:""},ml:{dayNames:["\xe0\xb4\u017e\xe0\xb4\xbe\xe0\xb4\xaf\xe0\xb4\xb0\xe0\xb5\x8d\xe2\u20ac\x8d","\xe0\xb4\xa4\xe0\xb4\xbf\xe0\xb4\u2122\xe0\xb5\x8d\xe0\xb4\u2022\xe0\xb4\xb3\xe0\xb5\x8d\xe2\u20ac\x8d","\xe0\xb4\u0161\xe0\xb5\u0160\xe0\xb4\xb5\xe0\xb5\x8d\xe0\xb4\xb5","\xe0\xb4\xac\xe0\xb5\x81\xe0\xb4\xa7\xe0\xb4\xa8\xe0\xb5\x8d\xe2\u20ac\x8d","\xe0\xb4\xb5\xe0\xb5\x8d\xe0\xb4\xaf\xe0\xb4\xbe\xe0\xb4\xb4\xe0\xb4\u201a","\xe0\xb4\xb5\xe0\xb5\u2020\xe0\xb4\xb3\xe0\xb5\x8d\xe0\xb4\xb3\xe0\xb4\xbf","\xe0\xb4\xb6\xe0\xb4\xa8\xe0\xb4\xbf"],dayNamesMin:["\xe0\xb4\u017e\xe0\xb4\xbe\xe0\xb4\xaf","\xe0\xb4\xa4\xe0\xb4\xbf\xe0\xb4\u2122\xe0\xb5\x8d\xe0\xb4\u2022","\xe0\xb4\u0161\xe0\xb5\u0160\xe0\xb4\xb5\xe0\xb5\x8d\xe0\xb4\xb5","\xe0\xb4\xac\xe0\xb5\x81\xe0\xb4\xa7","\xe0\xb4\xb5\xe0\xb5\x8d\xe0\xb4\xaf\xe0\xb4\xbe\xe0\xb4\xb4\xe0\xb4\u201a","\xe0\xb4\xb5\xe0\xb5\u2020\xe0\xb4\xb3\xe0\xb5\x8d\xe0\xb4\xb3\xe0\xb4\xbf","\xe0\xb4\xb6\xe0\xb4\xa8\xe0\xb4\xbf"],firstDay:1,isRTL:!1,monthNames:["\xe0\xb4\u0153\xe0\xb4\xa8\xe0\xb5\x81\xe0\xb4\xb5\xe0\xb4\xb0\xe0\xb4\xbf","\xe0\xb4\xab\xe0\xb5\u2020\xe0\xb4\xac\xe0\xb5\x8d\xe0\xb4\xb0\xe0\xb5\x81\xe0\xb4\xb5\xe0\xb4\xb0\xe0\xb4\xbf","\xe0\xb4\xae\xe0\xb4\xbe\xe0\xb4\xb0\xe0\xb5\x8d\xe2\u20ac\x8d\xe0\xb4\u0161\xe0\xb5\x8d\xe0\xb4\u0161\xe0\xb5\x8d","\xe0\xb4\x8f\xe0\xb4\xaa\xe0\xb5\x8d\xe0\xb4\xb0\xe0\xb4\xbf\xe0\xb4\xb2\xe0\xb5\x8d\xe2\u20ac\x8d","\xe0\xb4\xae\xe0\xb5\u2021\xe0\xb4\xaf\xe0\xb5\x8d","\xe0\xb4\u0153\xe0\xb5\u201a\xe0\xb4\xa3\xe0\xb5\x8d\xe2\u20ac\x8d","\xe0\xb4\u0153\xe0\xb5\u201a\xe0\xb4\xb2\xe0\xb5\u02c6","\xe0\xb4\u2020\xe0\xb4\u2014\xe0\xb4\xb8\xe0\xb5\x8d\xe0\xb4\xb1\xe0\xb5\x8d\xe0\xb4\xb1\xe0\xb5\x8d","\xe0\xb4\xb8\xe0\xb5\u2020\xe0\xb4\xaa\xe0\xb5\x8d\xe0\xb4\xb1\xe0\xb5\x8d\xe0\xb4\xb1\xe0\xb4\u201a\xe0\xb4\xac\xe0\xb4\xb0\xe0\xb5\x8d\xe2\u20ac\x8d","\xe0\xb4\u2019\xe0\xb4\u2022\xe0\xb5\x8d\xe0\xb4\u0178\xe0\xb5\u2039\xe0\xb4\xac\xe0\xb4\xb0\xe0\xb5\x8d\xe2\u20ac\x8d","\xe0\xb4\xa8\xe0\xb4\xb5\xe0\xb4\u201a\xe0\xb4\xac\xe0\xb4\xb0\xe0\xb5\x8d\xe2\u20ac\x8d","\xe0\xb4\xa1\xe0\xb4\xbf\xe0\xb4\xb8\xe0\xb4\u201a\xe0\xb4\xac\xe0\xb4\xb0\xe0\xb5\x8d\xe2\u20ac\x8d"],showMonthAfterYear:!1,yearSuffix:""},ms:{dayNames:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"],dayNamesMin:["Aha","Isn","Sel","Rab","kha","Jum","Sab"],firstDay:0,isRTL:!1,monthNames:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],showMonthAfterYear:!1,yearSuffix:""},"nl-BE":{dayNames:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],dayNamesMin:["zon","maa","din","woe","don","vri","zat"],firstDay:1,isRTL:!1,monthNames:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],showMonthAfterYear:!1,yearSuffix:""},nl:{dayNames:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],dayNamesMin:["zon","maa","din","woe","don","vri","zat"],firstDay:1,isRTL:!1,monthNames:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],showMonthAfterYear:!1,yearSuffix:""},no:{dayNames:["s\xc3\xb8ndag","mandag","tirsdag","onsdag","torsdag","fredag","l\xc3\xb8rdag"],dayNamesMin:["s\xc3\xb8n","man","tir","ons","tor","fre","l\xc3\xb8r"],firstDay:1,isRTL:!1,monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],showMonthAfterYear:!1,yearSuffix:""},pl:{dayNames:["Niedziela","Poniedzia\xc5\u201aek","Wtorek","\xc5\u0161roda","Czwartek","Pi\xc4\u2026tek","Sobota"],dayNamesMin:["Nie","Pn","Wt","\xc5\u0161r","Czw","Pt","So"],firstDay:1,isRTL:!1,monthNames:["Stycze\xc5\u201e","Luty","Marzec","Kwiecie\xc5\u201e","Maj","Czerwiec","Lipiec","Sierpie\xc5\u201e","Wrzesie\xc5\u201e","Pa\xc5\xbadziernik","Listopad","Grudzie\xc5\u201e"],showMonthAfterYear:!1,yearSuffix:""},"pt-BR":{dayNames:["Domingo","Segunda-feira","Ter&ccedil;a-feira","Quarta-feira","Quinta-feira","Sexta-feira","S&aacute;bado"],dayNamesMin:["Dom","Seg","Ter","Qua","Qui","Sex","S&aacute;b"],firstDay:0,isRTL:!1,monthNames:["Janeiro","Fevereiro","Mar&ccedil;o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],showMonthAfterYear:!1,yearSuffix:""},pt:{dayNames:["Domingo","Segunda-feira","Ter&ccedil;a-feira","Quarta-feira","Quinta-feira","Sexta-feira","S&aacute;bado"],dayNamesMin:["Dom","Seg","Ter","Qua","Qui","Sex","S&aacute;b"],firstDay:0,isRTL:!1,monthNames:["Janeiro","Fevereiro","Mar&ccedil;o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],showMonthAfterYear:!1,yearSuffix:""},rm:{dayNames:["Dumengia","Glindesdi","Mardi","Mesemna","Gievgia","Venderdi","Sonda"],dayNamesMin:["Dum","Gli","Mar","Mes","Gie","Ven","Som"],firstDay:1,isRTL:!1,monthNames:["Schaner","Favrer","Mars","Avrigl","Matg","Zercladur","Fanadur","Avust","Settember","October","November","December"],showMonthAfterYear:!1,yearSuffix:""},ro:{dayNames:["Duminic\xc4\u0192","Luni","Mar\xc5\xa3i","Miercuri","Joi","Vineri","S\xc3\xa2mb\xc4\u0192t\xc4\u0192"],dayNamesMin:["Dum","Lun","Mar","Mie","Joi","Vin","S\xc3\xa2m"],firstDay:1,isRTL:!1,monthNames:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],showMonthAfterYear:!1,yearSuffix:""},ru:{dayNames:["\xd0\xb2\xd0\xbe\xd1\x81\xd0\xba\xd1\u20ac\xd0\xb5\xd1\x81\xd0\xb5\xd0\xbd\xd1\u0152\xd0\xb5","\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb5\xd0\xb4\xd0\xb5\xd0\xbb\xd1\u0152\xd0\xbd\xd0\xb8\xd0\xba","\xd0\xb2\xd1\u201a\xd0\xbe\xd1\u20ac\xd0\xbd\xd0\xb8\xd0\xba","\xd1\x81\xd1\u20ac\xd0\xb5\xd0\xb4\xd0\xb0","\xd1\u2021\xd0\xb5\xd1\u201a\xd0\xb2\xd0\xb5\xd1\u20ac\xd0\xb3","\xd0\xbf\xd1\x8f\xd1\u201a\xd0\xbd\xd0\xb8\xd1\u2020\xd0\xb0","\xd1\x81\xd1\u0192\xd0\xb1\xd0\xb1\xd0\xbe\xd1\u201a\xd0\xb0"],dayNamesMin:["\xd0\xb2\xd1\x81\xd0\xba","\xd0\xbf\xd0\xbd\xd0\xb4","\xd0\xb2\xd1\u201a\xd1\u20ac","\xd1\x81\xd1\u20ac\xd0\xb4","\xd1\u2021\xd1\u201a\xd0\xb2","\xd0\xbf\xd1\u201a\xd0\xbd","\xd1\x81\xd0\xb1\xd1\u201a"],firstDay:1,isRTL:!1,monthNames:["\xd0\xaf\xd0\xbd\xd0\xb2\xd0\xb0\xd1\u20ac\xd1\u0152","\xd0\xa4\xd0\xb5\xd0\xb2\xd1\u20ac\xd0\xb0\xd0\xbb\xd1\u0152","\xd0\u0153\xd0\xb0\xd1\u20ac\xd1\u201a","\xd0\x90\xd0\xbf\xd1\u20ac\xd0\xb5\xd0\xbb\xd1\u0152","\xd0\u0153\xd0\xb0\xd0\xb9","\xd0\u02dc\xd1\u017d\xd0\xbd\xd1\u0152","\xd0\u02dc\xd1\u017d\xd0\xbb\xd1\u0152","\xd0\x90\xd0\xb2\xd0\xb3\xd1\u0192\xd1\x81\xd1\u201a","\xd0\xa1\xd0\xb5\xd0\xbd\xd1\u201a\xd1\x8f\xd0\xb1\xd1\u20ac\xd1\u0152","\xd0\u017e\xd0\xba\xd1\u201a\xd1\x8f\xd0\xb1\xd1\u20ac\xd1\u0152","\xd0\x9d\xd0\xbe\xd1\x8f\xd0\xb1\xd1\u20ac\xd1\u0152","\xd0\u201d\xd0\xb5\xd0\xba\xd0\xb0\xd0\xb1\xd1\u20ac\xd1\u0152"],showMonthAfterYear:!1,yearSuffix:""},sk:{dayNames:["Nede\xc4\xbea","Pondelok","Utorok","Streda","\xc5 tvrtok","Piatok","Sobota"],dayNamesMin:["Ned","Pon","Uto","Str","\xc5 tv","Pia","Sob"],firstDay:1,isRTL:!1,monthNames:["Janu\xc3\xa1r","Febru\xc3\xa1r","Marec","Apr\xc3\xadl","M\xc3\xa1j","J\xc3\xban","J\xc3\xbal","August","September","Okt\xc3\xb3ber","November","December"],showMonthAfterYear:!1,yearSuffix:""},sl:{dayNames:["Nedelja","Ponedeljek","Torek","Sreda","&#x10C;etrtek","Petek","Sobota"],dayNamesMin:["Ned","Pon","Tor","Sre","&#x10C;et","Pet","Sob"],firstDay:1,isRTL:!1,monthNames:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],showMonthAfterYear:!1,yearSuffix:""},sq:{dayNames:["E Diel","E H\xc3\xabn\xc3\xab","E Mart\xc3\xab","E M\xc3\xabrkur\xc3\xab","E Enjte","E Premte","E Shtune"],dayNamesMin:["Di","H\xc3\xab","Ma","M\xc3\xab","En","Pr","Sh"],firstDay:1,isRTL:!1,monthNames:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","N\xc3\xabntor","Dhjetor"],showMonthAfterYear:!1,yearSuffix:""},"sr-SR":{dayNames:["Nedelja","Ponedeljak","Utorak","Sreda","\xc4\u0152etvrtak","Petak","Subota"],dayNamesMin:["Ned","Pon","Uto","Sre","\xc4\u0152et","Pet","Sub"],firstDay:1,isRTL:!1,monthNames:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],showMonthAfterYear:!1,yearSuffix:""},sr:{dayNames:["\xd0\x9d\xd0\xb5\xd0\xb4\xd0\xb5\xd1\u2122\xd0\xb0","\xd0\u0178\xd0\xbe\xd0\xbd\xd0\xb5\xd0\xb4\xd0\xb5\xd1\u2122\xd0\xb0\xd0\xba","\xd0\xa3\xd1\u201a\xd0\xbe\xd1\u20ac\xd0\xb0\xd0\xba","\xd0\xa1\xd1\u20ac\xd0\xb5\xd0\xb4\xd0\xb0","\xd0\xa7\xd0\xb5\xd1\u201a\xd0\xb2\xd1\u20ac\xd1\u201a\xd0\xb0\xd0\xba","\xd0\u0178\xd0\xb5\xd1\u201a\xd0\xb0\xd0\xba","\xd0\xa1\xd1\u0192\xd0\xb1\xd0\xbe\xd1\u201a\xd0\xb0"],dayNamesMin:["\xd0\x9d\xd0\xb5\xd0\xb4","\xd0\u0178\xd0\xbe\xd0\xbd","\xd0\xa3\xd1\u201a\xd0\xbe","\xd0\xa1\xd1\u20ac\xd0\xb5","\xd0\xa7\xd0\xb5\xd1\u201a","\xd0\u0178\xd0\xb5\xd1\u201a","\xd0\xa1\xd1\u0192\xd0\xb1"],firstDay:1,isRTL:!1,monthNames:["\xd0\u02c6\xd0\xb0\xd0\xbd\xd1\u0192\xd0\xb0\xd1\u20ac","\xd0\xa4\xd0\xb5\xd0\xb1\xd1\u20ac\xd1\u0192\xd0\xb0\xd1\u20ac","\xd0\u0153\xd0\xb0\xd1\u20ac\xd1\u201a","\xd0\x90\xd0\xbf\xd1\u20ac\xd0\xb8\xd0\xbb","\xd0\u0153\xd0\xb0\xd1\u02dc","\xd0\u02c6\xd1\u0192\xd0\xbd","\xd0\u02c6\xd1\u0192\xd0\xbb","\xd0\x90\xd0\xb2\xd0\xb3\xd1\u0192\xd1\x81\xd1\u201a","\xd0\xa1\xd0\xb5\xd0\xbf\xd1\u201a\xd0\xb5\xd0\xbc\xd0\xb1\xd0\xb0\xd1\u20ac","\xd0\u017e\xd0\xba\xd1\u201a\xd0\xbe\xd0\xb1\xd0\xb0\xd1\u20ac","\xd0\x9d\xd0\xbe\xd0\xb2\xd0\xb5\xd0\xbc\xd0\xb1\xd0\xb0\xd1\u20ac","\xd0\u201d\xd0\xb5\xd1\u2020\xd0\xb5\xd0\xbc\xd0\xb1\xd0\xb0\xd1\u20ac"],showMonthAfterYear:!1,yearSuffix:""},sv:{dayNames:["S\xc3\xb6ndag","M\xc3\xa5ndag","Tisdag","Onsdag","Torsdag","Fredag","L\xc3\xb6rdag"],dayNamesMin:["S\xc3\xb6n","M\xc3\xa5n","Tis","Ons","Tor","Fre","L\xc3\xb6r"],firstDay:1,isRTL:!1,monthNames:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],showMonthAfterYear:!1,yearSuffix:""},ta:{dayNames:["\xe0\xae\u017e\xe0\xae\xbe\xe0\xae\xaf\xe0\xae\xbf\xe0\xae\xb1\xe0\xaf\x8d\xe0\xae\xb1\xe0\xaf\x81\xe0\xae\u2022\xe0\xaf\x8d\xe0\xae\u2022\xe0\xae\xbf\xe0\xae\xb4\xe0\xae\xae\xe0\xaf\u02c6","\xe0\xae\xa4\xe0\xae\xbf\xe0\xae\u2122\xe0\xaf\x8d\xe0\xae\u2022\xe0\xae\u0178\xe0\xaf\x8d\xe0\xae\u2022\xe0\xae\xbf\xe0\xae\xb4\xe0\xae\xae\xe0\xaf\u02c6","\xe0\xae\u0161\xe0\xaf\u2020\xe0\xae\xb5\xe0\xaf\x8d\xe0\xae\xb5\xe0\xae\xbe\xe0\xae\xaf\xe0\xaf\x8d\xe0\xae\u2022\xe0\xaf\x8d\xe0\xae\u2022\xe0\xae\xbf\xe0\xae\xb4\xe0\xae\xae\xe0\xaf\u02c6","\xe0\xae\xaa\xe0\xaf\x81\xe0\xae\xa4\xe0\xae\xa9\xe0\xaf\x8d\xe0\xae\u2022\xe0\xae\xbf\xe0\xae\xb4\xe0\xae\xae\xe0\xaf\u02c6","\xe0\xae\xb5\xe0\xae\xbf\xe0\xae\xaf\xe0\xae\xbe\xe0\xae\xb4\xe0\xae\u2022\xe0\xaf\x8d\xe0\xae\u2022\xe0\xae\xbf\xe0\xae\xb4\xe0\xae\xae\xe0\xaf\u02c6","\xe0\xae\xb5\xe0\xaf\u2020\xe0\xae\xb3\xe0\xaf\x8d\xe0\xae\xb3\xe0\xae\xbf\xe0\xae\u2022\xe0\xaf\x8d\xe0\xae\u2022\xe0\xae\xbf\xe0\xae\xb4\xe0\xae\xae\xe0\xaf\u02c6","\xe0\xae\u0161\xe0\xae\xa9\xe0\xae\xbf\xe0\xae\u2022\xe0\xaf\x8d\xe0\xae\u2022\xe0\xae\xbf\xe0\xae\xb4\xe0\xae\xae\xe0\xaf\u02c6"],dayNamesMin:["\xe0\xae\u017e\xe0\xae\xbe\xe0\xae\xaf\xe0\xae\xbf\xe0\xae\xb1\xe0\xaf\x81","\xe0\xae\xa4\xe0\xae\xbf\xe0\xae\u2122\xe0\xaf\x8d\xe0\xae\u2022\xe0\xae\xb3\xe0\xaf\x8d","\xe0\xae\u0161\xe0\xaf\u2020\xe0\xae\xb5\xe0\xaf\x8d\xe0\xae\xb5\xe0\xae\xbe\xe0\xae\xaf\xe0\xaf\x8d","\xe0\xae\xaa\xe0\xaf\x81\xe0\xae\xa4\xe0\xae\xa9\xe0\xaf\x8d","\xe0\xae\xb5\xe0\xae\xbf\xe0\xae\xaf\xe0\xae\xbe\xe0\xae\xb4\xe0\xae\xa9\xe0\xaf\x8d","\xe0\xae\xb5\xe0\xaf\u2020\xe0\xae\xb3\xe0\xaf\x8d\xe0\xae\xb3\xe0\xae\xbf","\xe0\xae\u0161\xe0\xae\xa9\xe0\xae\xbf"],firstDay:1,isRTL:!1,monthNames:["\xe0\xae\xa4\xe0\xaf\u02c6","\xe0\xae\xae\xe0\xae\xbe\xe0\xae\u0161\xe0\xae\xbf","\xe0\xae\xaa\xe0\xae\u2122\xe0\xaf\x8d\xe0\xae\u2022\xe0\xaf\x81\xe0\xae\xa9\xe0\xae\xbf","\xe0\xae\u0161\xe0\xae\xbf\xe0\xae\xa4\xe0\xaf\x8d\xe0\xae\xa4\xe0\xae\xbf\xe0\xae\xb0\xe0\xaf\u02c6","\xe0\xae\xb5\xe0\xaf\u02c6\xe0\xae\u2022\xe0\xae\xbe\xe0\xae\u0161\xe0\xae\xbf","\xe0\xae\u2020\xe0\xae\xa9\xe0\xae\xbf","\xe0\xae\u2020\xe0\xae\u0178\xe0\xae\xbf","\xe0\xae\u2020\xe0\xae\xb5\xe0\xae\xa3\xe0\xae\xbf","\xe0\xae\xaa\xe0\xaf\x81\xe0\xae\xb0\xe0\xae\u0178\xe0\xaf\x8d\xe0\xae\u0178\xe0\xae\xbe\xe0\xae\u0161\xe0\xae\xbf","\xe0\xae\x90\xe0\xae\xaa\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\u0161\xe0\xae\xbf","\xe0\xae\u2022\xe0\xae\xbe\xe0\xae\xb0\xe0\xaf\x8d\xe0\xae\xa4\xe0\xaf\x8d\xe0\xae\xa4\xe0\xae\xbf\xe0\xae\u2022\xe0\xaf\u02c6","\xe0\xae\xae\xe0\xae\xbe\xe0\xae\xb0\xe0\xaf\x8d\xe0\xae\u2022\xe0\xae\xb4\xe0\xae\xbf"],showMonthAfterYear:!1,yearSuffix:""},th:{dayNames:["\xe0\xb8\xad\xe0\xb8\xb2\xe0\xb8\u2014\xe0\xb8\xb4\xe0\xb8\u2022\xe0\xb8\xa2\xe0\xb9\u0152","\xe0\xb8\u02c6\xe0\xb8\xb1\xe0\xb8\u2122\xe0\xb8\u2014\xe0\xb8\xa3\xe0\xb9\u0152","\xe0\xb8\xad\xe0\xb8\xb1\xe0\xb8\u2021\xe0\xb8\u201e\xe0\xb8\xb2\xe0\xb8\xa3","\xe0\xb8\u017e\xe0\xb8\xb8\xe0\xb8\u02dc","\xe0\xb8\u017e\xe0\xb8\xa4\xe0\xb8\xab\xe0\xb8\xb1\xe0\xb8\xaa\xe0\xb8\u0161\xe0\xb8\u201d\xe0\xb8\xb5","\xe0\xb8\xa8\xe0\xb8\xb8\xe0\xb8\x81\xe0\xb8\xa3\xe0\xb9\u0152","\xe0\xb9\u20ac\xe0\xb8\xaa\xe0\xb8\xb2\xe0\xb8\xa3\xe0\xb9\u0152"],dayNamesMin:["\xe0\xb8\xad\xe0\xb8\xb2.","\xe0\xb8\u02c6.","\xe0\xb8\xad.","\xe0\xb8\u017e.","\xe0\xb8\u017e\xe0\xb8\xa4.","\xe0\xb8\xa8.","\xe0\xb8\xaa."],firstDay:0,isRTL:!1,monthNames:["\xe0\xb8\xa1\xe0\xb8\x81\xe0\xb8\xa3\xe0\xb8\xb2\xe0\xb8\u201e\xe0\xb8\xa1","\xe0\xb8\x81\xe0\xb8\xb8\xe0\xb8\xa1\xe0\xb8 \xe0\xb8\xb2\xe0\xb8\u017e\xe0\xb8\xb1\xe0\xb8\u2122\xe0\xb8\u02dc\xe0\xb9\u0152","\xe0\xb8\xa1\xe0\xb8\xb5\xe0\xb8\u2122\xe0\xb8\xb2\xe0\xb8\u201e\xe0\xb8\xa1","\xe0\xb9\u20ac\xe0\xb8\xa1\xe0\xb8\xa9\xe0\xb8\xb2\xe0\xb8\xa2\xe0\xb8\u2122","\xe0\xb8\u017e\xe0\xb8\xa4\xe0\xb8\xa9\xe0\xb8 \xe0\xb8\xb2\xe0\xb8\u201e\xe0\xb8\xa1","\xe0\xb8\xa1\xe0\xb8\xb4\xe0\xb8\u2013\xe0\xb8\xb8\xe0\xb8\u2122\xe0\xb8\xb2\xe0\xb8\xa2\xe0\xb8\u2122","\xe0\xb8\x81\xe0\xb8\xa3\xe0\xb8\x81\xe0\xb8\u017d\xe0\xb8\xb2\xe0\xb8\u201e\xe0\xb8\xa1","\xe0\xb8\xaa\xe0\xb8\xb4\xe0\xb8\u2021\xe0\xb8\xab\xe0\xb8\xb2\xe0\xb8\u201e\xe0\xb8\xa1","\xe0\xb8\x81\xe0\xb8\xb1\xe0\xb8\u2122\xe0\xb8\xa2\xe0\xb8\xb2\xe0\xb8\xa2\xe0\xb8\u2122","\xe0\xb8\u2022\xe0\xb8\xb8\xe0\xb8\xa5\xe0\xb8\xb2\xe0\xb8\u201e\xe0\xb8\xa1","\xe0\xb8\u017e\xe0\xb8\xa4\xe0\xb8\xa8\xe0\xb8\u02c6\xe0\xb8\xb4\xe0\xb8\x81\xe0\xb8\xb2\xe0\xb8\xa2\xe0\xb8\u2122","\xe0\xb8\u02dc\xe0\xb8\xb1\xe0\xb8\u2122\xe0\xb8\xa7\xe0\xb8\xb2\xe0\xb8\u201e\xe0\xb8\xa1"],showMonthAfterYear:!1,yearSuffix:""},tj:{dayNames:["\xd1\x8f\xd0\xba\xd1\u02c6\xd0\xb0\xd0\xbd\xd0\xb1\xd0\xb5","\xd0\xb4\xd1\u0192\xd1\u02c6\xd0\xb0\xd0\xbd\xd0\xb1\xd0\xb5","\xd1\x81\xd0\xb5\xd1\u02c6\xd0\xb0\xd0\xbd\xd0\xb1\xd0\xb5","\xd1\u2021\xd0\xbe\xd1\u20ac\xd1\u02c6\xd0\xb0\xd0\xbd\xd0\xb1\xd0\xb5","\xd0\xbf\xd0\xb0\xd0\xbd\xd2\xb7\xd1\u02c6\xd0\xb0\xd0\xbd\xd0\xb1\xd0\xb5","\xd2\xb7\xd1\u0192\xd0\xbc\xd1\u0160\xd0\xb0","\xd1\u02c6\xd0\xb0\xd0\xbd\xd0\xb1\xd0\xb5"],dayNamesMin:["\xd1\x8f\xd0\xba\xd1\u02c6","\xd0\xb4\xd1\u0192\xd1\u02c6","\xd1\x81\xd0\xb5\xd1\u02c6","\xd1\u2021\xd0\xbe\xd1\u20ac","\xd0\xbf\xd0\xb0\xd0\xbd","\xd2\xb7\xd1\u0192\xd0\xbc","\xd1\u02c6\xd0\xb0\xd0\xbd"],firstDay:1,isRTL:!1,monthNames:["\xd0\xaf\xd0\xbd\xd0\xb2\xd0\xb0\xd1\u20ac","\xd0\xa4\xd0\xb5\xd0\xb2\xd1\u20ac\xd0\xb0\xd0\xbb","\xd0\u0153\xd0\xb0\xd1\u20ac\xd1\u201a","\xd0\x90\xd0\xbf\xd1\u20ac\xd0\xb5\xd0\xbb","\xd0\u0153\xd0\xb0\xd0\xb9","\xd0\u02dc\xd1\u017d\xd0\xbd","\xd0\u02dc\xd1\u017d\xd0\xbb","\xd0\x90\xd0\xb2\xd0\xb3\xd1\u0192\xd1\x81\xd1\u201a","\xd0\xa1\xd0\xb5\xd0\xbd\xd1\u201a\xd1\x8f\xd0\xb1\xd1\u20ac","\xd0\u017e\xd0\xba\xd1\u201a\xd1\x8f\xd0\xb1\xd1\u20ac","\xd0\x9d\xd0\xbe\xd1\x8f\xd0\xb1\xd1\u20ac","\xd0\u201d\xd0\xb5\xd0\xba\xd0\xb0\xd0\xb1\xd1\u20ac"],showMonthAfterYear:!1,yearSuffix:""},tr:{dayNames:["Pazar","Pazartesi","Sal\xc4\xb1","\xc3\u2021ar\xc5\u0178amba","Per\xc5\u0178embe","Cuma","Cumartesi"],dayNamesMin:["Pz","Pt","Sa","\xc3\u2021a","Pe","Cu","Ct"],firstDay:1,isRTL:!1,monthNames:["Ocak","\xc5\u017eubat","Mart","Nisan","May\xc4\xb1s","Haziran","Temmuz","A\xc4\u0178ustos","Eyl\xc3\xbcl","Ekim","Kas\xc4\xb1m","Aral\xc4\xb1k"],showMonthAfterYear:!1,yearSuffix:""},uk:{dayNames:["\xd0\xbd\xd0\xb5\xd0\xb4\xd1\u2013\xd0\xbb\xd1\x8f","\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb5\xd0\xb4\xd1\u2013\xd0\xbb\xd0\xbe\xd0\xba","\xd0\xb2\xd1\u2013\xd0\xb2\xd1\u201a\xd0\xbe\xd1\u20ac\xd0\xbe\xd0\xba","\xd1\x81\xd0\xb5\xd1\u20ac\xd0\xb5\xd0\xb4\xd0\xb0","\xd1\u2021\xd0\xb5\xd1\u201a\xd0\xb2\xd0\xb5\xd1\u20ac","\xd0\xbf\xe2\u20ac\u2122\xd1\x8f\xd1\u201a\xd0\xbd\xd0\xb8\xd1\u2020\xd1\x8f","\xd1\x81\xd1\u0192\xd0\xb1\xd0\xbe\xd1\u201a\xd0\xb0"],dayNamesMin:["\xd0\xbd\xd0\xb5\xd0\xb4","\xd0\xbf\xd0\xbd\xd0\xb4","\xd0\xb2\xd1\u2013\xd0\xb2","\xd1\x81\xd1\u20ac\xd0\xb4","\xd1\u2021\xd1\u201a\xd0\xb2","\xd0\xbf\xd1\u201a\xd0\xbd","\xd1\x81\xd0\xb1\xd1\u201a"],firstDay:1,isRTL:!1,monthNames:["\xd0\xa1\xd1\u2013\xd1\u2021\xd0\xb5\xd0\xbd\xd1\u0152","\xd0\u203a\xd1\u017d\xd1\u201a\xd0\xb8\xd0\xb9","\xd0\u2018\xd0\xb5\xd1\u20ac\xd0\xb5\xd0\xb7\xd0\xb5\xd0\xbd\xd1\u0152","\xd0\u0161\xd0\xb2\xd1\u2013\xd1\u201a\xd0\xb5\xd0\xbd\xd1\u0152","\xd0\xa2\xd1\u20ac\xd0\xb0\xd0\xb2\xd0\xb5\xd0\xbd\xd1\u0152","\xd0\xa7\xd0\xb5\xd1\u20ac\xd0\xb2\xd0\xb5\xd0\xbd\xd1\u0152","\xd0\u203a\xd0\xb8\xd0\xbf\xd0\xb5\xd0\xbd\xd1\u0152","\xd0\xa1\xd0\xb5\xd1\u20ac\xd0\xbf\xd0\xb5\xd0\xbd\xd1\u0152","\xd0\u2019\xd0\xb5\xd1\u20ac\xd0\xb5\xd1\x81\xd0\xb5\xd0\xbd\xd1\u0152","\xd0\u2013\xd0\xbe\xd0\xb2\xd1\u201a\xd0\xb5\xd0\xbd\xd1\u0152","\xd0\u203a\xd0\xb8\xd1\x81\xd1\u201a\xd0\xbe\xd0\xbf\xd0\xb0\xd0\xb4","\xd0\u201c\xd1\u20ac\xd1\u0192\xd0\xb4\xd0\xb5\xd0\xbd\xd1\u0152"],showMonthAfterYear:!1,yearSuffix:""},vi:{dayNames:["Ch\xe1\xbb\xa7 Nh\xe1\xba\xadt","Th\xe1\xbb\xa9 Hai","Th\xe1\xbb\xa9 Ba","Th\xe1\xbb\xa9 T\xc6\xb0","Th\xe1\xbb\xa9 N\xc4\u0192m","Th\xe1\xbb\xa9 S\xc3\xa1u","Th\xe1\xbb\xa9 B\xe1\xba\xa3y"],dayNamesMin:["CN","T2","T3","T4","T5","T6","T7"],firstDay:0,isRTL:!1,monthNames:["Th\xc3\xa1ng M\xe1\xbb\u2122t","Th\xc3\xa1ng Hai","Th\xc3\xa1ng Ba","Th\xc3\xa1ng T\xc6\xb0","Th\xc3\xa1ng N\xc4\u0192m","Th\xc3\xa1ng S\xc3\xa1u","Th\xc3\xa1ng B\xe1\xba\xa3y","Th\xc3\xa1ng T\xc3\xa1m","Th\xc3\xa1ng Ch\xc3\xadn","Th\xc3\xa1ng M\xc6\xb0\xe1\xbb\x9di","Th\xc3\xa1ng M\xc6\xb0\xe1\xbb\x9di M\xe1\xbb\u2122t","Th\xc3\xa1ng M\xc6\xb0\xe1\xbb\x9di Hai"],showMonthAfterYear:!1,yearSuffix:""},"zh-CN":{dayNames:["\xe6\u02dc\u0178\xe6\u0153\u0178\xe6\u2014\xa5","\xe6\u02dc\u0178\xe6\u0153\u0178\xe4\xb8\u20ac","\xe6\u02dc\u0178\xe6\u0153\u0178\xe4\xba\u0152","\xe6\u02dc\u0178\xe6\u0153\u0178\xe4\xb8\u2030","\xe6\u02dc\u0178\xe6\u0153\u0178\xe5\u203a\u203a","\xe6\u02dc\u0178\xe6\u0153\u0178\xe4\xba\u201d","\xe6\u02dc\u0178\xe6\u0153\u0178\xe5\u2026\xad"],dayNamesMin:["\xe5\u2018\xa8\xe6\u2014\xa5","\xe5\u2018\xa8\xe4\xb8\u20ac","\xe5\u2018\xa8\xe4\xba\u0152","\xe5\u2018\xa8\xe4\xb8\u2030","\xe5\u2018\xa8\xe5\u203a\u203a","\xe5\u2018\xa8\xe4\xba\u201d","\xe5\u2018\xa8\xe5\u2026\xad"],firstDay:1,isRTL:!1,monthNames:["\xe4\xb8\u20ac\xe6\u0153\u02c6","\xe4\xba\u0152\xe6\u0153\u02c6","\xe4\xb8\u2030\xe6\u0153\u02c6","\xe5\u203a\u203a\xe6\u0153\u02c6","\xe4\xba\u201d\xe6\u0153\u02c6","\xe5\u2026\xad\xe6\u0153\u02c6","\xe4\xb8\u0192\xe6\u0153\u02c6","\xe5\u2026\xab\xe6\u0153\u02c6","\xe4\xb9\x9d\xe6\u0153\u02c6","\xe5\x8d\x81\xe6\u0153\u02c6","\xe5\x8d\x81\xe4\xb8\u20ac\xe6\u0153\u02c6","\xe5\x8d\x81\xe4\xba\u0152\xe6\u0153\u02c6"],showMonthAfterYear:!0,yearSuffix:"\xe5\xb9\xb4"},"zh-HK":{dayNames:["\xe6\u02dc\u0178\xe6\u0153\u0178\xe6\u2014\xa5","\xe6\u02dc\u0178\xe6\u0153\u0178\xe4\xb8\u20ac","\xe6\u02dc\u0178\xe6\u0153\u0178\xe4\xba\u0152","\xe6\u02dc\u0178\xe6\u0153\u0178\xe4\xb8\u2030","\xe6\u02dc\u0178\xe6\u0153\u0178\xe5\u203a\u203a","\xe6\u02dc\u0178\xe6\u0153\u0178\xe4\xba\u201d","\xe6\u02dc\u0178\xe6\u0153\u0178\xe5\u2026\xad"],dayNamesMin:["\xe5\u2018\xa8\xe6\u2014\xa5","\xe5\u2018\xa8\xe4\xb8\u20ac","\xe5\u2018\xa8\xe4\xba\u0152","\xe5\u2018\xa8\xe4\xb8\u2030","\xe5\u2018\xa8\xe5\u203a\u203a","\xe5\u2018\xa8\xe4\xba\u201d","\xe5\u2018\xa8\xe5\u2026\xad"],firstDay:0,isRTL:!1,monthNames:["\xe4\xb8\u20ac\xe6\u0153\u02c6","\xe4\xba\u0152\xe6\u0153\u02c6","\xe4\xb8\u2030\xe6\u0153\u02c6","\xe5\u203a\u203a\xe6\u0153\u02c6","\xe4\xba\u201d\xe6\u0153\u02c6","\xe5\u2026\xad\xe6\u0153\u02c6","\xe4\xb8\u0192\xe6\u0153\u02c6","\xe5\u2026\xab\xe6\u0153\u02c6","\xe4\xb9\x9d\xe6\u0153\u02c6","\xe5\x8d\x81\xe6\u0153\u02c6","\xe5\x8d\x81\xe4\xb8\u20ac\xe6\u0153\u02c6","\xe5\x8d\x81\xe4\xba\u0152\xe6\u0153\u02c6"],showMonthAfterYear:!0,yearSuffix:"\xe5\xb9\xb4"},"zh-TW":{dayNames:["\xe6\u02dc\u0178\xe6\u0153\u0178\xe6\u2014\xa5","\xe6\u02dc\u0178\xe6\u0153\u0178\xe4\xb8\u20ac","\xe6\u02dc\u0178\xe6\u0153\u0178\xe4\xba\u0152","\xe6\u02dc\u0178\xe6\u0153\u0178\xe4\xb8\u2030","\xe6\u02dc\u0178\xe6\u0153\u0178\xe5\u203a\u203a","\xe6\u02dc\u0178\xe6\u0153\u0178\xe4\xba\u201d","\xe6\u02dc\u0178\xe6\u0153\u0178\xe5\u2026\xad"],dayNamesMin:["\xe5\u2018\xa8\xe6\u2014\xa5","\xe5\u2018\xa8\xe4\xb8\u20ac","\xe5\u2018\xa8\xe4\xba\u0152","\xe5\u2018\xa8\xe4\xb8\u2030","\xe5\u2018\xa8\xe5\u203a\u203a","\xe5\u2018\xa8\xe4\xba\u201d","\xe5\u2018\xa8\xe5\u2026\xad"],firstDay:1,isRTL:!1,monthNames:["\xe4\xb8\u20ac\xe6\u0153\u02c6","\xe4\xba\u0152\xe6\u0153\u02c6","\xe4\xb8\u2030\xe6\u0153\u02c6","\xe5\u203a\u203a\xe6\u0153\u02c6","\xe4\xba\u201d\xe6\u0153\u02c6","\xe5\u2026\xad\xe6\u0153\u02c6","\xe4\xb8\u0192\xe6\u0153\u02c6","\xe5\u2026\xab\xe6\u0153\u02c6","\xe4\xb9\x9d\xe6\u0153\u02c6","\xe5\x8d\x81\xe6\u0153\u02c6","\xe5\x8d\x81\xe4\xb8\u20ac\xe6\u0153\u02c6","\xe5\x8d\x81\xe4\xba\u0152\xe6\u0153\u02c6"],showMonthAfterYear:!0,yearSuffix:"\xe5\xb9\xb4"}},a.fn.datePicker=function(a){return new AJS.DatePicker(this,a) }}(jQuery),AJS.dropDown=function(a,b){var c=null,d=[],e=!1,f=AJS.$(document),g={item:"li:has(a)",activeClass:"active",alignment:"right",displayHandler:function(a){return a.name},escapeHandler:function(){return this.hide("escape"),!1},hideHandler:function(){},moveHandler:function(){},useDisabled:!1};if(AJS.$.extend(g,b),g.alignment={left:"left",right:"right"}[g.alignment.toLowerCase()]||"left",a&&a.jquery)c=a;else if("string"==typeof a)c=AJS.$(a);else{if(!a||a.constructor!=Array)throw new Error("AJS.dropDown function was called with illegal parameter. Should be AJS.$ object, AJS.$ selector or array.");c=AJS("div").addClass("aui-dropdown").toggleClass("hidden",!!g.isHiddenByDefault);for(var h=0,i=a.length;i>h;h++){for(var j=AJS("ol"),k=0,l=a[h].length;l>k;k++){var m=AJS("li"),n=a[h][k];n.href?(m.append(AJS("a").html("<span>"+g.displayHandler(n)+"</span>").attr({href:n.href}).addClass(n.className)),AJS.$.data(AJS.$("a > span",m)[0],"properties",n)):m.html(n.html).addClass(n.className),n.icon&&m.prepend(AJS("img").attr("src",n.icon)),n.insideSpanIcon&&m.children("a").prepend(AJS("span").attr("class","icon")),AJS.$.data(m[0],"properties",n),j.append(m)}h==i-1&&j.addClass("last"),c.append(j)}AJS.$("body").append(c)}var o=function(){q(1)},p=function(){q(-1)},q=function(a){var b=!e,c=AJS.dropDown.current.$[0],d=AJS.dropDown.current.links,f=c.focused;if(e=!0,0!==d.length){if(c.focused="number"==typeof f?f:-1,!AJS.dropDown.current)return AJS.log("move - not current, aborting"),!0;c.focused+=a,c.focused<0?c.focused=d.length-1:c.focused>=d.length&&(c.focused=0),g.moveHandler(AJS.$(d[c.focused]),0>a?"up":"down"),b&&d.length?(AJS.$(d[c.focused]).addClass(g.activeClass),e=!1):d.length||(e=!1)}},r=function(a){if(!AJS.dropDown.current)return!0;var b=a.which,c=AJS.dropDown.current.$[0],d=AJS.dropDown.current.links;switch(AJS.dropDown.current.cleanActive(),b){case 40:o();break;case 38:p();break;case 27:return g.escapeHandler.call(AJS.dropDown.current,a);case 13:return c.focused>=0?g.selectionHandler?g.selectionHandler.call(AJS.dropDown.current,a,AJS.$(d[c.focused])):"a"!=AJS.$(d[c.focused]).attr("nodeName")?AJS.$("a",d[c.focused]).trigger("focus"):AJS.$(d[c.focused]).trigger("focus"):!0;default:return d.length&&AJS.$(d[c.focused]).addClass(g.activeClass),!0}return a.stopPropagation(),a.preventDefault(),!1},s=function(a){a&&a.which&&3==a.which||a&&a.button&&2==a.button||AJS.dropDown.current&&AJS.dropDown.current.hide("click")},t=function(a){return function(){AJS.dropDown.current&&(AJS.dropDown.current.cleanFocus(),this.originalClass=this.className,AJS.$(this).addClass(g.activeClass),AJS.dropDown.current.$[0].focused=a)}},u=function(a){return a.button||a.metaKey||a.ctrlKey||a.shiftKey?!0:(AJS.dropDown.current&&g.selectionHandler&&g.selectionHandler.call(AJS.dropDown.current,a,AJS.$(this)),void 0)},v=function(a){var b=!1;return a.data("events")&&AJS.$.each(a.data("events"),function(a,c){AJS.$.each(c,function(a,c){return u===c?(b=!0,!1):void 0})}),b};return c.each(function(){var a=this,b=AJS.$(this),c={},e={reset:function(){c=AJS.$.extend(c,{$:b,links:AJS.$(g.item||"li:has(a)",a),cleanActive:function(){a.focused+1&&c.links.length&&AJS.$(c.links[a.focused]).removeClass(g.activeClass)},cleanFocus:function(){c.cleanActive(),a.focused=-1},moveDown:o,moveUp:p,moveFocus:r,getFocusIndex:function(){return"number"==typeof a.focused?a.focused:-1}}),c.links.each(function(a){var b=AJS.$(this);v(b)||(b.hover(t(a),c.cleanFocus),b.click(u))})},appear:function(a){a?(b.removeClass("hidden"),b.addClass("aui-dropdown-"+g.alignment)):b.addClass("hidden")},fade:function(a){a?b.fadeIn("fast"):b.fadeOut("fast")},scroll:function(a){a?b.slideDown("fast"):b.slideUp("fast")}};c.reset=e.reset,c.reset(),c.addControlProcess=function(a,b){AJS.$.aop.around({target:this,method:a},b)},c.addCallback=function(a,b){return AJS.$.aop.after({target:this,method:a},b)},c.show=function(b){g.useDisabled&&this.$.closest(".aui-dd-parent").hasClass("disabled")||(this.alignment=g.alignment,s(),AJS.dropDown.current=this,this.method=b||this.method||"appear",this.timer=setTimeout(function(){f.click(s)},0),f.keydown(r),g.firstSelected&&this.links[0]&&t(0).call(this.links[0]),AJS.$(a.offsetParent).css({zIndex:2e3}),e[this.method](!0),AJS.$(document).trigger("showLayer",["dropdown",AJS.dropDown.current]))},c.hide=function(a){return this.method=this.method||"appear",AJS.$(b.get(0).offsetParent).css({zIndex:""}),this.cleanFocus(),e[this.method](!1),f.unbind("click",s).unbind("keydown",r),AJS.$(document).trigger("hideLayer",["dropdown",AJS.dropDown.current]),AJS.dropDown.current=null,a},c.addCallback("reset",function(){g.firstSelected&&this.links[0]&&t(0).call(this.links[0])}),AJS.dropDown.iframes||(AJS.dropDown.iframes=[]),AJS.dropDown.createShims=function(){return AJS.$("iframe").each(function(){var a=this;a.shim||(a.shim=AJS.$("<div />").addClass("shim hidden").appendTo("body"),AJS.dropDown.iframes.push(a))}),arguments.callee}(),c.addCallback("show",function(){AJS.$(AJS.dropDown.iframes).each(function(){var a=AJS.$(this);if(a.is(":visible")){var b=a.offset();b.height=a.height(),b.width=a.width(),this.shim.css({left:b.left+"px",top:b.top+"px",height:b.height+"px",width:b.width+"px"}).removeClass("hidden")}})}),c.addCallback("hide",function(){AJS.$(AJS.dropDown.iframes).each(function(){this.shim.addClass("hidden")}),g.hideHandler()}),AJS.$.browser.msie&&~~AJS.$.browser.version<9&&!function(){var a=function(){this.$.is(":visible")&&(this.iframeShim||(this.iframeShim=AJS.$('<iframe class="dropdown-shim" src="javascript:false;" frameBorder="0" />').insertBefore(this.$)),this.iframeShim.css({display:"block",top:this.$.css("top"),width:this.$.outerWidth()+"px",height:this.$.outerHeight()+"px"}),"left"==g.alignment?this.iframeShim.css({left:"0px"}):this.iframeShim.css({right:"0px"}))};c.addCallback("reset",a),c.addCallback("show",a),c.addCallback("hide",function(){this.iframeShim&&this.iframeShim.css({display:"none"})})}(),d.push(c)}),d},AJS.dropDown.getAdditionalPropertyValue=function(a,b){var c=a[0];c&&"string"==typeof c.tagName&&"li"==c.tagName.toLowerCase()||AJS.log("AJS.dropDown.getAdditionalPropertyValue : item passed in should be an LI element wrapped by jQuery");var d=AJS.$.data(c,"properties");return d?d[b]:null},AJS.dropDown.removeAllAdditionalProperties=function(){},AJS.dropDown.Standard=function(a){var b,c=[],d={selector:".aui-dd-parent",dropDown:".aui-dropdown",trigger:".aui-dd-trigger"};AJS.$.extend(d,a);var e=function(a,b,c,e){AJS.$.extend(e,{trigger:a}),b.addClass("dd-allocated"),c.addClass("hidden"),0==d.isHiddenByDefault&&e.show(),e.addCallback("show",function(){b.addClass("active")}),e.addCallback("hide",function(){b.removeClass("active")})},f=function(a,b,c,d){d!=AJS.dropDown.current&&(c.css({top:b.outerHeight()}),d.show(),a.stopImmediatePropagation()),a.preventDefault()};if(d.useLiveEvents){var g=[],h=[];AJS.$(d.trigger).live("click",function(a){var b,c,i,j,k=AJS.$(this);if((j=AJS.$.inArray(this,g))>=0){var l=h[j];b=l.parent,c=l.dropdown,i=l.ddcontrol}else{if(b=k.closest(d.selector),c=b.find(d.dropDown),0===c.length)return;if(i=AJS.dropDown(c,d)[0],!i)return;g.push(this),l={parent:b,dropdown:c,ddcontrol:i},e(k,b,c,i),h.push(l)}f(a,k,c,i)})}else b=this instanceof AJS.$?this:AJS.$(d.selector),b=b.not(".dd-allocated").filter(":has("+d.dropDown+")").filter(":has("+d.trigger+")"),b.each(function(){var a=AJS.$(this),b=AJS.$(d.dropDown,this),g=AJS.$(d.trigger,this),h=AJS.dropDown(b,d)[0];AJS.$.extend(h,{trigger:g}),e(g,a,b,h),g.click(function(a){f(a,g,b,h)}),c.push(h)});return c},AJS.dropDown.Ajax=function(a){var b,c={cache:!0};return AJS.$.extend(c,a||{}),b=AJS.dropDown.Standard.call(this,c),AJS.$(b).each(function(){var a=this;AJS.$.extend(a,{getAjaxOptions:function(b){var d=function(b){c.formatResults&&(b=c.formatResults(b)),c.cache&&a.cache.set(a.getAjaxOptions(),b),a.refreshSuccess(b)};return c.ajaxOptions?AJS.$.isFunction(c.ajaxOptions)?AJS.$.extend(c.ajaxOptions.call(a),{success:d}):AJS.$.extend(c.ajaxOptions,{success:d}):AJS.$.extend(b,{success:d})},refreshSuccess:function(a){this.$.html(a)},cache:function(){var a={};return{get:function(b){var c=b.data||"";return a[(b.url+c).replace(/[\?\&]/gi,"")]},set:function(b,c){var d=b.data||"";a[(b.url+d).replace(/[\?\&]/gi,"")]=c},reset:function(){a={}}}}(),show:function(b){return function(){c.cache&&a.cache.get(a.getAjaxOptions())?(a.refreshSuccess(a.cache.get(a.getAjaxOptions())),b.call(a)):(AJS.$(AJS.$.ajax(a.getAjaxOptions())).throbber({target:a.$,end:function(){a.reset()}}),b.call(a),a.iframeShim&&a.iframeShim.hide())}}(a.show),resetCache:function(){a.cache.reset()}}),a.addCallback("refreshSuccess",function(){a.reset()})}),b},AJS.$.fn.dropDown=function(a,b){return a=(a||"Standard").replace(/^([a-z])/,function(a){return a.toUpperCase()}),AJS.dropDown[a].call(this,b)},function(a){function b(a){a.preventDefault()}function c(a){if(a.click)a.click();else{var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}function d(b,c){return b===c||a.contains(c,b)}function e(b){b instanceof AJS.$||(b=a(b));var c=b.attr("aria-owns"),d=b.attr("aria-haspopup"),e=document.getElementById(c);if(e)return a(e);if(!c)throw new Error("Dropdown 2 trigger required attribute not set: aria-owns");if(!d)throw new Error("Dropdown 2 trigger required attribute not set: aria-haspopup");if(!e)throw new Error("Dropdown 2 trigger aria-owns attr set to nonexistent id: "+c);throw new Error("Dropdown 2 trigger unknown error. I don't know what you did, but there's smoke everywhere. Consult the documentation.")}var f=a(document),g=AJS.$.browser.msie&&8==parseInt(AJS.$.browser.version,10),h=null,i=function(){function c(b){g||1!==b.which||(g=!0,f.bind("mouseup mouseleave",d),a(this).trigger("aui-button-invoke"))}function d(){f.unbind("mouseup mouseleave",d),setTimeout(function(){g=!1},0)}function e(){g||a(this).trigger("aui-button-invoke")}var g=!1;return"undefined"==typeof document.addEventListener?{click:e,"click selectstart":b,mousedown:function(a){function b(a){switch(a.toElement){case null:case d:case document.body:case document.documentElement:a.returnValue=!1}}var d=this,e=document.activeElement;c.call(this,a),null!==e&&(e.attachEvent("onbeforedeactivate",b),setTimeout(function(){e.detachEvent("onbeforedeactivate",b)},0))}}:{click:e,"click mousedown":b,mousedown:c}}(),j={"aui-button-invoke":function(i,j){function k(b,c){b.each(function(){var b=a(this);b.attr("role",c),b.hasClass("checked")?(b.attr("aria-checked","true"),"radio"==c&&b.closest("ul").attr("role","radiogroup")):b.attr("aria-checked","false")})}function l(){var b=E.offset(),c=E.outerWidth();D.css({left:0,top:0});var d,e=D.outerWidth(),f=a("body").outerWidth(!0),h=Math.max(parseInt(D.css("min-width"),10),c),i=E.data("container")||!1,j="left";g&&(d=parseInt(D.css("border-left-width"),10)+parseInt(D.css("border-right-width"),10),e-=d,h-=d),F||D.css("min-width",h+"px");var k=b.left,l=b.top+E.outerHeight();if(F){var m=3;k=b.left+L.outerWidth()-m,l=b.top}if(k+e>f&&k+c>=e&&(k=b.left+c-e,F&&(k=b.left-e),j="right"),i){var n=(E.closest(i),E.offset().left+E.outerWidth()),o=n+e;h>=e&&(e=h),o>n&&(k=n-e,j="right"),g&&(k-=d)}D.attr({"data-dropdown2-alignment":j,"aria-hidden":"false"}).css({display:"block",left:k+"px",top:l+"px"}),D.appendTo(document.body)}function m(){A(),C("off"),setTimeout(function(){D.css("display","none").css("min-width","").insertAfter(E).attr("aria-hidden","true"),F||E.removeClass("active"),s().removeClass("active"),D.removeClass("aui-dropdown2-in-toolbar"),D.removeClass("aui-dropdown2-in-buttons"),H?D.insertBefore(H):D.appendTo(G),D.trigger("aui-dropdown2-hide")},0)}function n(){m(),F&&L.trigger("aui-dropdown2-hide-all")}function o(a){F&&a.target===L[0]&&m()}function p(a){return!a.is(".disabled, [aria-disabled=true]")}function q(a){return a.hasClass("aui-dropdown2-sub-trigger")}function r(b,c){if(q(b)){c=a.extend({},c,{$menu:K});var d=e(b);d.is(":visible")?d.trigger("aui-dropdown2-select-first"):b.trigger("aui-button-invoke",c)}}function s(){return D.find("a.active")}function t(a){return O&&O[0]===a[0]?!1:(O=a,s().removeClass("active"),p(a)&&a.addClass("active"),D.trigger("aui-dropdown2-item-selected"),B(),!0)}function u(){t(D.find("a:not(.disabled)").first())}function v(a){var b=D.find("> ul > li > a, > .aui-dropdown2-section > ul > li > a").not(".disabled");t(y(b,a,!0))}function w(a){a.length>0&&(n(),a.trigger("aui-button-invoke"))}function x(a){w(y(K.find(".aui-dropdown2-trigger").not(".disabled, [aria-disabled=true], .aui-dropdown2-sub-trigger"),a,!1))}function y(a,b,c){var d=a.index(a.filter(".active"));return d+=0>d&&0>b?1:0,d+=b,c?d%=a.length:0>d&&(d=a.length),a.eq(d)}function z(){w(a(this))}function A(){h===N&&(f.unbind(N),h=null)}function B(){h!==N&&(f.unbind(h),f.bind(N),h=N)}function C(a){var b="bind",c="delegate";"on"!==a&&(b="unbind",c="undelegate"),F?L[b]("aui-dropdown2-hide aui-dropdown2-item-selected aui-dropdown2-step-out",o):(K[c](".aui-dropdown2-trigger:not(.active)","mousemove",z),E[b]("aui-button-invoke",m)),D[b]("aui-dropdown2-hide-all",n),D[c]("a",M),D[b]("aui-dropdown2-hide",B),D[b]("aui-dropdown2-select-first",u)}j=a.extend({selectFirst:!0},j);var D=e(this),E=a(this).addClass("active"),F=E.hasClass("aui-dropdown2-sub-trigger"),G=D.parent()[0],H=D.next()[0],I=a(this).attr("data-dropdown2-hide-location");if(I){var J=document.getElementById(I);if(!J)throw new Error("The specified data-dropdown2-hide-location id doesn't exist");G=a(J),H=void 0}var K=j.$menu||E.closest(".aui-dropdown2-trigger-group");if(F){var L=E.closest(".aui-dropdown2");D.addClass(L.attr("class")).addClass("aui-dropdown2-sub-menu")}var M={click:function(c){var d=a(this);p(d)&&(d.hasClass("interactive")||n(),q(d)&&(r(d,{selectFirst:!1}),b(c)))},mousemove:function(){var b=a(this),c=t(b);c&&r(b,{selectFirst:!1})}},N={"click focusin mousedown":function(a){var b=a.target;(document!==b||"focusin"!==a.type)&&(d(b,D[0])||d(b,E[0])||n())},keydown:function(a){var d;if(a.shiftKey&&9==a.keyCode)v(-1);else switch(a.keyCode){case 13:d=s(),q(d)?r(d):c(d[0]);break;case 27:m();break;case 37:if(d=s(),q(d)){var f=e(d);if(f.is(":visible"))return D.trigger("aui-dropdown2-step-out"),void 0}F?m():x(-1);break;case 38:v(-1);break;case 39:d=s(),q(d)?r(d):x(1);break;case 40:v(1);break;case 9:v(1);break;default:return}b(a)}};E.attr("aria-controls",E.attr("aria-owns")),g&&D.removeClass("aui-dropdown2-tailed"),D.find(".disabled").attr("aria-disabled","true"),D.find("li.hidden > a").addClass("disabled").attr("aria-disabled","true"),k(D.find(".aui-dropdown2-checkbox"),"checkbox"),k(D.find(".aui-dropdown2-radio"),"radio"),l(),E.hasClass("toolbar-trigger")&&D.addClass("aui-dropdown2-in-toolbar"),E.parent().hasClass("aui-buttons")&&D.addClass("aui-dropdown2-in-buttons"),E.parents().hasClass("aui-header")&&D.addClass("aui-dropdown2-in-header"),D.trigger("aui-dropdown2-show",j),j.selectFirst&&u(),C("on");var O=null},mousedown:function(b){1===b.which&&a(this).bind(k)}},k={mouseleave:function(){f.bind(l)},"mouseup mouseleave":function(){a(this).unbind(k)}},l={mouseup:function(b){var d=a(b.target).closest(".aui-dropdown2 a, .aui-dropdown2-trigger")[0];d&&setTimeout(function(){c(d)},0)},"mouseup mouseleave":function(){a(this).unbind(l)}};f.delegate(".aui-dropdown2-trigger",i),f.delegate(".aui-dropdown2-trigger:not(.active):not([aria-disabled=true]),.aui-dropdown2-sub-trigger:not([aria-disabled=true])",j),f.delegate(".aui-dropdown2-checkbox:not(.disabled)","click",function(){var b=a(this);b.hasClass("checked")?(b.removeClass("checked").attr("aria-checked","false"),b.trigger("aui-dropdown2-item-uncheck")):(b.addClass("checked").attr("aria-checked","true"),b.trigger("aui-dropdown2-item-check"))}),f.delegate(".aui-dropdown2-radio:not(.checked):not(.disabled)","click",function(){var b=a(this),c=b.closest("ul").find(".checked");c.removeClass("checked").attr("aria-checked","false").trigger("aui-dropdown2-item-uncheck"),b.addClass("checked").attr("aria-checked","true").trigger("aui-dropdown2-item-check")}),f.delegate(".aui-dropdown2 a.disabled","click",function(a){b(a)})}(AJS.$),AJS.bind=function(a,b,c){try{return"function"==typeof c?AJS.$(window).bind(a,b,c):AJS.$(window).bind(a,b)}catch(d){AJS.log("error while binding: "+d.message)}},AJS.unbind=function(a,b){try{return AJS.$(window).unbind(a,b)}catch(c){AJS.log("error while unbinding: "+c.message)}},AJS.trigger=function(a,b){try{return AJS.$(window).trigger(a,b)}catch(c){AJS.log("error while triggering: "+c.message)}},AJS.warnAboutFirebug=function(){AJS.log("DEPRECATED: please remove all uses of AJS.warnAboutFirebug")},AJS.inlineHelp=function(){AJS.$(".icon-inline-help").click(function(){var a=AJS.$(this).siblings(".field-help");a.hasClass("hidden")?a.removeClass("hidden"):a.addClass("hidden")})},function(a){function b(b){var c=a(b),d=a.extend({left:0,top:0},c.offset());return{left:d.left,top:d.top,width:c.outerWidth(),height:c.outerHeight()}}AJS.InlineDialog=function(b,c,d,e){if(e&&e.getArrowAttributes&&AJS.log("DEPRECATED: getArrowAttributes - See https://ecosystem.atlassian.net/browse/AUI-1362"),e&&e.getArrowPath&&AJS.log("DEPRECATED: getArrowPath - See https://ecosystem.atlassian.net/browse/AUI-1362"),"undefined"==typeof c&&(c=String(Math.random()).replace(".",""),a("#inline-dialog-"+c+", #arrow-"+c+", #inline-dialog-shim-"+c).length))throw"GENERATED_IDENTIFIER_NOT_UNIQUE";var f,g,h,i,j,k=a.extend(!1,AJS.InlineDialog.opts,e),l=function(){return window.Raphael&&e&&(e.getArrowPath||e.getArrowAttributes)},m=!1,n=!1,o=!1,p=a('<div id="inline-dialog-'+c+'" class="aui-inline-dialog"><div class="contents"></div><div id="arrow-'+c+'" class="arrow"></div></div>'),q=a("#arrow-"+c,p),r=p.find(".contents");l()||p.find(".arrow").addClass("aui-css-arrow"),r.css("width",k.width+"px"),r.mouseover(function(){clearTimeout(g),p.unbind("mouseover")}).mouseout(function(){u()});var s=function(){return f||(f={popup:p,hide:function(){u(0)},id:c,show:function(){t()},persistent:k.persistent?!0:!1,reset:function(){function b(b,d){if(b.css(d.popupCss),l()){d.displayAbove&&(d.arrowCss.top-=a.browser.msie?10:9),b.arrowCanvas||(b.arrowCanvas=Raphael("arrow-"+c,16,16));var e=k.getArrowPath,f=a.isFunction(e)?e(d):e;b.arrowCanvas.path(f).attr(k.getArrowAttributes())}else d.displayAbove&&!q.hasClass("aui-bottom-arrow")?q.addClass("aui-bottom-arrow"):d.displayAbove||q.removeClass("aui-bottom-arrow");q.css(d.arrowCss)}var d=k.calculatePositions(p,j,i,k);if(b(p,d),p.fadeIn(k.fadeTime,function(){}),a.browser.msie&&~~a.browser.version<10){var e=a("#inline-dialog-shim-"+c);e.length||a(p).prepend(a('<iframe class = "inline-dialog-shim" id="inline-dialog-shim-'+c+'" frameBorder="0" src="javascript:false;"></iframe>')),e.css({width:r.outerWidth(),height:r.outerHeight()})}}}),f},t=function(){p.is(":visible")||(h=setTimeout(function(){o&&n&&(k.addActiveClass&&a(b).addClass("active"),m=!0,k.persistent||A(),AJS.InlineDialog.current=s(),a(document).trigger("showLayer",["inlineDialog",s()]),s().reset())},k.showDelay))},u=function(c){"undefined"==typeof c&&k.persistent||(n=!1,m&&k.preHideCallback.call(p[0].popup)&&(c=null==c?k.hideDelay:c,clearTimeout(g),clearTimeout(h),null!=c&&(g=setTimeout(function(){B(),k.addActiveClass&&a(b).removeClass("active"),p.fadeOut(k.fadeTime,function(){k.hideCallback.call(p[0].popup)}),p.arrowCanvas&&(p.arrowCanvas.remove(),p.arrowCanvas=null),m=!1,n=!1,a(document).trigger("hideLayer",["inlineDialog",s()]),AJS.InlineDialog.current=null,k.cacheContent||(o=!1,w=!1)},c))))},v=function(b,e){var f=a(e);k.upfrontCallback.call({popup:p,hide:function(){u(0)},id:c,show:function(){t()}}),p.each(function(){"undefined"!=typeof this.popup&&this.popup.hide()}),k.closeOthers&&a(".aui-inline-dialog").each(function(){!this.popup.persistent&&this.popup.hide()}),j={target:f},i=b?{x:b.pageX,y:b.pageY}:{x:f.offset().left,y:f.offset().top},m||clearTimeout(h),n=!0;var l=function(){w=!1,o=!0,k.initCallback.call({popup:p,hide:function(){u(0)},id:c,show:function(){t()}}),t()};return w||(w=!0,a.isFunction(d)?d(r,e,l):a.get(d,function(a,b,d){r.html(k.responseHandler(a,b,d)),o=!0,k.initCallback.call({popup:p,hide:function(){u(0)},id:c,show:function(){t()}}),t()})),clearTimeout(g),m||t(),!1};p[0].popup=s();var w=!1,x=!1,y=function(){x||(a(k.container).append(p),x=!0)},z=a(b);k.onHover?k.useLiveEvents?z.selector?a(document).on("mousemove",z.selector,function(a){y(),v(a,this)}).on("mouseout",z.selector,function(){u()}):AJS.log("Warning: inline dialog trigger elements must have a jQuery selector when the useLiveEvents option is enabled."):z.mousemove(function(a){y(),v(a,this)}).mouseout(function(){u()}):k.noBind||(k.useLiveEvents?z.selector?a(document).on("click",z.selector,function(a){return y(),v(a,this),!1}).on("mouseout",z.selector,function(){u()}):AJS.log("Warning: inline dialog trigger elements must have a jQuery selector when the useLiveEvents option is enabled."):z.click(function(a){return y(),v(a,this),!1}).mouseout(function(){u()}));var A=function(){E(),H()},B=function(){F(),I()},C=!1,D=c+".inline-dialog-check",E=function(){C||(a("body").bind("click."+D,function(b){var d=a(b.target);0===d.closest("#inline-dialog-"+c+" .contents").length&&u(0)}),C=!0)},F=function(){C&&a("body").unbind("click."+D),C=!1},G=function(a){27===a.keyCode&&u(0)},H=function(){a(document).on("keydown",G)},I=function(){a(document).off("keydown",G)};return p.show=function(a){a&&a.stopPropagation(),y(),v(null,b)},p.hide=function(){u(0)},p.refresh=function(){m&&s().reset()},p.getOptions=function(){return k},p},AJS.InlineDialog.opts={onTop:!1,responseHandler:function(a){return a},closeOthers:!0,isRelativeToMouse:!1,addActiveClass:!0,onHover:!1,useLiveEvents:!1,noBind:!1,fadeTime:100,persistent:!1,hideDelay:1e4,showDelay:0,width:300,offsetX:0,offsetY:10,arrowOffsetX:0,container:"body",cacheContent:!0,displayShadow:!0,preHideCallback:function(){return!0},hideCallback:function(){},initCallback:function(){},upfrontCallback:function(){},calculatePositions:function(a,c,d,e){e=e||{};var f=b(window),g=b(c.target),h=b(a),i=b(a.find(".arrow")),j=g.left+g.width/2,k=(window.pageYOffset||document.documentElement.scrollTop)+f.height,l=10;h.top=g.top+g.height+~~e.offsetY,h.left=g.left+~~e.offsetX;var m=f.width-(h.left+h.width+l);i.left=j-h.left+~~e.arrowOffsetX,i.top=-(i.height/2);var n=g.top>h.height,o=h.top+h.height<k,p=!o&&n||n&&e.onTop;if(p&&(h.top=g.top-h.height-i.height/2,i.top=h.height),e.isRelativeToMouse)0>m?(h.right=l,h.left="auto",i.left=d.x-(f.width-h.width)):(h.left=d.x-20,i.left=d.x-h.left);else if(0>m){h.right=l,h.left="auto";var q=f.width-h.right,r=q-h.width;i.right="auto",i.left=j-r-i.width/2}else h.width<=g.width/2&&(i.left=h.width/2,h.left=j-h.width/2);return{displayAbove:p,popupCss:{left:h.left,top:h.top,right:h.right},arrowCss:{left:i.left,top:i.top,right:i.right}}},getArrowPath:function(a){return a.displayAbove?"M0,8L8,16,16,8":"M0,8L8,0,16,8"},getArrowAttributes:function(){return{fill:"#fff",stroke:"#ccc"}}}}(AJS.$),function(){AJS.keyCode={ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}(AJS.$),function(){var a=500,b=5e3,c=100;AJS.messages={setup:function(){AJS.messages.createMessage("generic"),AJS.messages.createMessage("error"),AJS.messages.createMessage("warning"),AJS.messages.createMessage("info"),AJS.messages.createMessage("success"),AJS.messages.createMessage("hint"),AJS.messages.makeCloseable(),AJS.messages.makeFadeout()},makeCloseable:function(a){AJS.$(a||"div.aui-message.closeable").each(function(){var a=AJS.$(this),b=AJS.$('<span class="aui-icon icon-close" role="button" tabindex="0"></span>').click(function(){a.closeMessage()}).keypress(function(b){(b.which===AJS.keyCode.ENTER||b.which===AJS.keyCode.SPACE)&&(a.closeMessage(),b.preventDefault())});a.append(b)})},makeFadeout:function(d,e,f){e="undefined"!=typeof e?e:b,f="undefined"!=typeof f?f:a,AJS.$(d||"div.aui-message.fadeout").each(function(){function a(){g.stop(!0,!1).delay(e).fadeOut(f,function(){g.closeMessage()})}function b(){g.stop(!0,!1).fadeTo(c,1)}function d(){return!h&&!i}var g=AJS.$(this),h=!1,i=!1;g.focusin(function(){h=!0,b()}).focusout(function(){h=!1,d()&&a()}).hover(function(){i=!0,b()},function(){i=!1,d()&&a()}),a()})},template:'<div class="aui-message {type} {closeable} {shadowed} {fadeout}"><p class="title"><span class="aui-icon icon-{type}"></span><strong>{title}</strong></p>{body}<!-- .aui-message --></div>',createMessage:function(a){AJS.messages[a]=function(b,c){var d,e,f=this.template;return c||(c=b,b="#aui-message-bar"),c.closeable=c.closeable!==!1,c.shadowed=c.shadowed!==!1,d=AJS.$(AJS.template(f).fill({type:a,closeable:c.closeable?"closeable":"",shadowed:c.shadowed?"shadowed":"",fadeout:c.fadeout?"fadeout":"",title:c.title||"","body:html":c.body||""}).toString()),c.id&&(/[#\'\"\.\s]/g.test(c.id)?AJS.log("AJS.Messages error: ID rejected, must not include spaces, hashes, dots or quotes."):d.attr("id",c.id)),e=c.insert||"append","prepend"===e?d.prependTo(b):d.appendTo(b),c.closeable&&AJS.messages.makeCloseable(d),c.fadeout&&AJS.messages.makeFadeout(d,c.delay,c.duration),d}}},AJS.$.fn.closeMessage=function(){var a=AJS.$(this);a.hasClass("aui-message","closeable")&&(a.stop(!0),a.trigger("messageClose",[this]).remove(),AJS.$(document).trigger("aui-message-close",[this]))},AJS.$(function(){AJS.messages.setup()})}(),function(){function a(){var a=AJS.$(this);AJS._addID(a),a.attr("role","tab");var b=a.attr("href");AJS.$(b).attr("aria-labelledby",a.attr("id")),a.parent().hasClass(d)?a.attr(f,"true"):a.attr(f,"false")}function b(a){AJS.tabs.change(AJS.$(this),a),a&&a.preventDefault()}var c=/#.*/,d="active-tab",e="active-pane",f="aria-selected",g="aria-hidden";AJS.tabs={setup:function(){var c=AJS.$(".aui-tabs:not(.aui-tabs-disabled)");c.attr("role","application"),c.find(".tabs-pane").each(function(){var a=AJS.$(this);a.attr("role","tabpanel"),a.hasClass(e)?a.attr(g,"false"):a.attr(g,"true")});for(var d=0,f=c.length;f>d;d++){var h=c.eq(d);if(!h.data("aui-tab-events-bound")){var i=h.children("ul.tabs-menu");i.attr("role","tablist"),i.children("li").attr("role","presentation"),i.find("> .menu-item a").each(a),i.delegate("a","click",b),h.data("aui-tab-events-bound",!0)}}AJS.$(".aui-tabs.vertical-tabs").find("a").each(function(){var a=AJS.$(this);if(!a.attr("title")){var b=a.children("strong:first");AJS.isClipped(b)&&a.attr("title",a.text())}})},change:function(a){var b=AJS.$(a.attr("href").match(c)[0]);b.addClass(e).attr(g,"false").siblings(".tabs-pane").removeClass(e).attr(g,"true"),a.parent("li.menu-item").addClass(d).siblings(".menu-item").removeClass(d),a.closest(".tabs-menu").find("a").attr(f,"false"),a.attr(f,"true"),a.trigger("tabSelect",{tab:a,pane:b})}},AJS.$(AJS.tabs.setup)}(),AJS.template=function(a){var b=/\{([^\}]+)\}/g,c=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,d=/([^\\])'/g,e=function(a,b,d,e){var f=d;return b.replace(c,function(a,b,c,d,g){b=b||d,f&&(b+":html"in f?(f=f[b+":html"],e=!0):b in f&&(f=f[b]),g&&"function"==typeof f&&(f=f()))}),(null==f||f==d)&&(f=a),f=String(f),e||(f=i.escape(f)),f},f=function(a){return this.template=this.template.replace(b,function(b,c){return e(b,c,a,!0)}),this},g=function(a){return this.template=this.template.replace(b,function(b,c){return e(b,c,a)}),this},h=function(){return this.template},i=function(a){function b(){return b.template}return b.template=String(a),b.toString=b.valueOf=h,b.fill=g,b.fillHtml=f,b},j={},k=[];return i.load=function(b){return b=String(b),j.hasOwnProperty(b)||(k.length>=1e3&&delete j[k.shift()],k.push(b),j[b]=a("script[title='"+b.replace(d,"$1\\'")+"']")[0].text),this(j[b])},i.escape=AJS.escapeHtml,i}(AJS.$),function(a,b){var c=-1!==navigator.platform.indexOf("Mac"),d=/^(backspace|tab|r(ight|eturn)|s(hift|pace|croll)|c(trl|apslock)|alt|pa(use|ge(up|down))|e(sc|nd)|home|left|up|d(el|own)|insert|f\d\d?|numlock|meta)/i;a.whenIType=function(e){function f(a){!AJS.popup.current&&p&&p.fire(a)}function g(a){a.preventDefault()}function h(a){var c=a&&a.split?b.trim(a).split(" "):[a];b.each(c,function(){j(this)})}function i(a){for(var b=a.length;b--;)if(a[b].length>1&&"space"!==a[b])return!0;return!1}function j(a){var c=a instanceof Array?a:k(a.toString()),d=i(c)?"keydown":"keypress";o.push(c),b(document).bind(d,c,f),b(document).bind(d+" keyup",c,g)}function k(a){for(var b,c,e=[],f="";a.length;)(b=a.match(/^(ctrl|meta|shift|alt)\+/i))?(f+=b[0],a=a.substring(b[0].length)):(c=a.match(d))?(e.push(f+c[0]),a=a.substring(c[0].length),f=""):(e.push(f+a[0]),a=a.substring(1),f="");return e}function l(a){for(var d=b(a),e=d.attr("title")||"",f=o.slice(),g=d.data("kbShortcutAppended")||"",h=!g,i=h?e:e.substring(0,e.length-g.length);f.length;)g=n(f.shift().slice(),g,h),h=!1;c&&(g=g.replace(/Meta/gi,"\u2318").replace(/Shift/gi,"\u21e7")),d.attr("title",i+g),d.data("kbShortcutAppended",g)}function m(a){var c=b(a),d=c.data("kbShortcutAppended");if(d){var e=c.attr("title");c.attr("title",e.replace(d,"")),c.removeData("kbShortcutAppended")}}function n(a,c,d){return d?c+=" ("+AJS.I18n.getText("aui.keyboard.shortcut.type.x",a.shift()):(c=c.replace(/\)$/,""),c+=AJS.I18n.getText("aui.keyboard.shortcut.or.x",a.shift())),b.each(a,function(){c+=" "+AJS.I18n.getText("aui.keyboard.shortcut.then.x",this)}),c+=")"}var o=[],p=b.Callbacks();return h(e),a.whenIType.makeShortcut({executor:p,bindKeys:h,addShortcutsToTitle:l,removeShortcutsFromTitle:m,keypressHandler:f,defaultPreventionHandler:g})},a.whenIType.makeShortcut=function(a){function c(a){return function(c,e){e=e||{};var f=e.focusedClass||"focused",g=e.hasOwnProperty("wrapAround")?e.wrapAround:!0,h=e.hasOwnProperty("escToCancel")?e.escToCancel:!0;return d.add(function(){var d=b(c),e=d.filter("."+f),i=0===e.length?void 0:{transition:!0};h&&b(document).one("keydown",function(a){a.keyCode===AJS.keyCode.ESCAPE&&e&&e.removeClass(f)}),e.length&&e.removeClass(f),e=a(e,d,g),e&&e.length>0&&(e.addClass(f),e.moveTo(i),e.is("a")?e.focus():e.find("a:first").focus())}),this}}var d=a.executor,e=a.bindKeys,f=a.addShortcutsToTitle,g=a.removeShortcutsFromTitle,h=a.keypressHandler,i=a.defaultPreventionHandler,j=[];return{moveToNextItem:c(function(a,c,d){var e;return d&&0===a.length?c.eq(0):(e=b.inArray(a.get(0),c),e<c.length-1?(e+=1,c.eq(e)):d?c.eq(0):a)}),moveToPrevItem:c(function(a,c,d){var e;return d&&0===a.length?c.filter(":last"):(e=b.inArray(a.get(0),c),e>0?(e-=1,c.eq(e)):d?c.filter(":last"):a)}),click:function(a){return j.push(a),f(a),d.add(function(){var c=b(a);c.length>0&&c.click()}),this},goTo:function(a){return d.add(function(){window.location.href=a}),this},followLink:function(a){return j.push(a),f(a),d.add(function(){var c=b(a)[0];c&&{a:!0,link:!0}[c.nodeName.toLowerCase()]&&(window.location.href=c.href)}),this},execute:function(a){var b=this;return d.add(function(){a.apply(b,arguments)}),this},evaluate:function(a){a.call(this)},moveToAndClick:function(a){return j.push(a),f(a),d.add(function(){var c=b(a);c.length>0&&(c.click(),c.moveTo())}),this},moveToAndFocus:function(a){return j.push(a),f(a),d.add(function(b){var c=AJS.$(a);c.length>0&&(c.focus(),c.moveTo&&c.moveTo(),c.is(":input")&&b.preventDefault())}),this},or:function(a){return e(a),this},unbind:function(){b(document).unbind("keydown keypress",h).unbind("keydown keypress keyup",i);for(var a=0,c=j.length;c>a;a++)g(j[a]);j=[]}}},a.whenIType.fromJSON=function(a,d){var e=[];return a&&b.each(a,function(a,f){var g,h=f.op,i=f.param;if("execute"===h||"evaluate"===h)g=[new Function(i)];else if(/^\[[^\]\[]*,[^\]\[]*\]$/.test(i)){try{g=JSON.parse(i)}catch(j){AJS.error("When using a parameter array, array must be in strict JSON format: "+i)}b.isArray(g)||AJS.error("Badly formatted shortcut parameter. String or JSON Array of parameters required: "+i) }else g=[i];b.each(f.keys,function(){var a=this;d&&c&&(a=b.map(this,function(a){return a.replace(/ctrl/i,"meta")}));var f=AJS.whenIType(a);f[h].apply(f,g),e.push(f)})}),e},b(document).bind("iframeAppended",function(a,c){b(c).load(function(){var a=b(c).contents();a.bind("keyup keydown keypress",function(a){b.browser.safari&&"keypress"===a.type||b(a.target).is(":input")||b.event.trigger(a,arguments,document,!0)})})})}(AJS,AJS.$),function(a){AJS.responsiveheader={},AJS.responsiveheader.setup=function(){function b(b,c){function d(a){var b;if(e(),!(n>o)){k.show(),b=n-q;for(var c=0;b>=0;c++)b-=m[c].itemWidth;return c-=1,h(c,a),g(c,l,a),c}i(a)}function e(){var b=0!==j.length?j.position().left:a(window).width(),c=p.position().left+p.outerWidth(!0)+s;n=b-c}function f(b){var c=a("<li>"+aui.dropdown2.trigger({menu:{id:"aui-responsive-header-dropdown-content-"+b},text:AJS.I18n.getText("aui.words.more"),extraAttributes:{href:"#"},id:"aui-responsive-header-dropdown-trigger-"+b})+"</li>");c.append(aui.dropdown2.contents({id:"aui-responsive-header-dropdown-content-"+b,extraClasses:"aui-style-default",content:aui.dropdown2.section({content:"<ul id='aui-responsive-header-dropdown-list-"+b+"'></ul>"})})),0===s?c.appendTo(r(".aui-nav")):c.insertBefore(r(".aui-nav > li > .aui-button").first().parent()),k=c,q=k.outerWidth(!0)}function g(b,c,d){if(!(0>b||0>c||b===c)){var e,f,g=a("#aui-responsive-header-dropdown-trigger-"+d),h=g.parent();g.hasClass("active")&&g.trigger("aui-button-invoke");for(var i=r(".aui-nav > li > a:not(.aui-button):not(#aui-responsive-header-dropdown-trigger-"+d+")").length;b>c;)e=m[c],e&&e.itemElement&&(f=e.itemElement,0===i?f.prependTo(r(".aui-nav")):f.insertBefore(h),f.children("a").removeClass("aui-dropdown2-sub-trigger active"),c+=1,i+=1)}}function h(b,c){if(!(0>b))for(var d=a("#aui-responsive-header-dropdown-list-"+c),e=b;e<m.length;e++){m[e].itemElement.appendTo(d);var f=m[e].itemElement.children("a");f.hasClass("aui-dropdown2-trigger")&&f.addClass("aui-dropdown2-sub-trigger")}}function i(a){k.hide(),g(m.length,l,a)}var j=b.find(".aui-header-secondary .aui-nav").first();a(".aui-header").attr("data-aui-responsive","true");var k,l,m=[],n=0,o=0,p=b.find("#logo"),q=0,r=function(){var a=b.find(".aui-header-primary").first();return function(b){return a.find(b)}}(),s=0;r(".aui-button").parent().each(function(b,c){s+=a(c).outerWidth(!0)}),r(".aui-nav > li > a:not(.aui-button)").each(function(b,c){var d=a(c).parent(),e=d.outerWidth(!0);m.push({itemElement:d,itemWidth:e}),o+=e}),l=m.length,a(window).resize(function(){l=d(c)}),f(c);var t=p.find("img");0!==t.length&&(t.attr("data-aui-responsive-header-index",c),t.load(function(){l=d(c)})),l=d(c),r(".aui-nav").css("width","auto")}var c=a(".aui-header");c.length&&c.each(function(c,d){b(a(d),c)})}}(AJS.$),AJS.$(AJS.responsiveheader.setup),function(a){function b(a,b){return"function"==typeof a?a.call(b):a}function c(a){for(;a=a.parentNode;)if(a==document)return!0;return!1}function d(){var a=f++;return"tipsyuid"+a}function e(b,c){this.$element=a(b),this.options=c,this.enabled=!0,this.fixTitle()}var f=0;e.prototype={show:function(){function c(){h.hoverTooltip=!0}function e(){if("in"!=h.hoverState&&(h.hoverTooltip=!1,"manual"!=h.options.trigger)){var a="hover"==h.options.trigger?"mouseleave.tipsy":"blur.tipsy";h.$element.trigger(a)}}var f=this.getTitle();if(f&&this.enabled){var g=this.tip();g.find(".tipsy-inner")[this.options.html?"html":"text"](f),g[0].className="tipsy",g.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);var h=this;this.options.hoverable&&g.hover(c,e);var i,j=a.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight}),k=g[0].offsetWidth,l=g[0].offsetHeight,m=b(this.options.gravity,this.$element[0]);switch(m.charAt(0)){case"n":i={top:j.top+j.height+this.options.offset,left:j.left+j.width/2-k/2};break;case"s":i={top:j.top-l-this.options.offset,left:j.left+j.width/2-k/2};break;case"e":i={top:j.top+j.height/2-l/2,left:j.left-k-this.options.offset};break;case"w":i={top:j.top+j.height/2-l/2,left:j.left+j.width+this.options.offset}}if(2==m.length&&(i.left="w"==m.charAt(1)?j.left+j.width/2-15:j.left+j.width/2-k+15),g.css(i).addClass("tipsy-"+m),g.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+m.charAt(0),this.options.className&&g.addClass(b(this.options.className,this.$element[0])),this.options.fade?g.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity}):g.css({visibility:"visible",opacity:this.options.opacity}),this.options.aria){var n=d();g.attr("id",n),this.$element.attr("aria-describedby",n)}}},hide:function(){this.options.fade?this.tip().stop().fadeOut(function(){a(this).remove()}):this.tip().remove(),this.options.aria&&this.$element.removeAttr("aria-describedby")},fixTitle:function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("original-title"))&&a.attr("original-title",a.attr("title")||"").removeAttr("title")},getTitle:function(){var a,b=this.$element,c=this.options;this.fixTitle();var a,c=this.options;return"string"==typeof c.title?a=b.attr("title"==c.title?"original-title":c.title):"function"==typeof c.title&&(a=c.title.call(b[0])),a=(""+a).replace(/(^\s*|\s*$)/,""),a||c.fallback},tip:function(){return this.$tip||(this.$tip=a('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>').attr("role","tooltip"),this.$tip.data("tipsy-pointee",this.$element[0])),this.$tip},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled}},a.fn.tipsy=function(b){function c(c){var d=a.data(c,"tipsy");return d||(d=new e(c,a.fn.tipsy.elementOptions(c,b)),a.data(c,"tipsy",d)),d}function d(){var a=c(this);a.hoverState="in",0==b.delayIn?a.show():(a.fixTitle(),setTimeout(function(){"in"==a.hoverState&&a.show()},b.delayIn))}function f(){var a=c(this);a.hoverState="out",0==b.delayOut?a.hide():setTimeout(function(){"out"!=a.hoverState||a.hoverTooltip||a.hide()},b.delayOut)}if(b===!0)return this.data("tipsy");if("string"==typeof b){var g=this.data("tipsy");return g&&g[b](),this}if(b=a.extend({},a.fn.tipsy.defaults,b),b.hoverable&&(b.delayOut=b.delayOut||20),b.live||this.each(function(){c(this)}),"manual"!=b.trigger){var h="hover"==b.trigger?"mouseenter.tipsy":"focus.tipsy",i="hover"==b.trigger?"mouseleave.tipsy":"blur.tipsy";b.live?a(this.context).on(h,this.selector,d).on(i,this.selector,f):this.bind(h,d).bind(i,f)}return this},a.fn.tipsy.defaults={aria:!1,className:null,delayIn:0,delayOut:0,fade:!1,fallback:"",gravity:"n",html:!1,live:!1,hoverable:!1,offset:0,opacity:.8,title:"title",trigger:"hover"},a.fn.tipsy.revalidate=function(){a(".tipsy").each(function(){var b=a.data(this,"tipsy-pointee");b&&c(b)||a(this).remove()})},a.fn.tipsy.elementOptions=function(b,c){return a.metadata?a.extend({},c,a(b).metadata()):c},a.fn.tipsy.autoNS=function(){return a(this).offset().top>a(document).scrollTop()+a(window).height()/2?"s":"n"},a.fn.tipsy.autoWE=function(){return a(this).offset().left>a(document).scrollLeft()+a(window).width()/2?"e":"w"},a.fn.tipsy.autoBounds=function(b,c){return function(){var d={ns:c[0],ew:c.length>1?c[1]:!1},e=a(document).scrollTop()+b,f=a(document).scrollLeft()+b,g=a(this);return g.offset().top<e&&(d.ns="n"),g.offset().left<f&&(d.ew="w"),a(window).width()+a(document).scrollLeft()-g.offset().left<b&&(d.ew="e"),a(window).height()+a(document).scrollTop()-g.offset().top<b&&(d.ns="s"),d.ns+(d.ew?d.ew:"")}}}(jQuery),!function(a){"use strict";a.extend({tablesorter:new function(){function b(a){"undefined"!=typeof console&&"undefined"!=typeof console.log?console.log(a):alert(a)}function c(a,c){b(a+" ("+((new Date).getTime()-c.getTime())+"ms)")}function d(b,c,d){if(!c)return"";var e=b.config,f=e.textExtraction,g="";return g="simple"===f?e.supportsTextContent?c.textContent:a(c).text():"function"==typeof f?f(c,b,d):"object"==typeof f&&f.hasOwnProperty(d)?f[d](c,b,d):e.supportsTextContent?c.textContent:a(c).text(),a.trim(g)}function e(a,c,e,f){for(var g,h=w.parsers.length,i=!1,j="",k=!0;""===j&&k;)e++,c[e]?(i=c[e].cells[f],j=d(a,i,f),a.config.debug&&b("Checking if value was empty on row "+e+", column: "+f+': "'+j+'"')):k=!1;for(;--h>=0;)if(g=w.parsers[h],g&&"text"!==g.id&&g.is&&g.is(j,a,i))return g;return w.getParserById("text")}function f(a){var c,d,f,g,h,i,j,k=a.config,l=k.$tbodies=k.$table.children("tbody:not(."+k.cssInfoBlock+")"),m="";if(0===l.length)return k.debug?b("*Empty table!* Not building a parser cache"):"";if(c=l[0].rows,c[0])for(d=[],f=c[0].cells.length,g=0;f>g;g++)h=k.$headers.filter(":not([colspan])"),h=h.add(k.$headers.filter('[colspan="1"]')).filter('[data-column="'+g+'"]:last'),i=k.headers[g],j=w.getParserById(w.getData(h,i,"sorter")),k.empties[g]=w.getData(h,i,"empty")||k.emptyTo||(k.emptyToBottom?"bottom":"top"),k.strings[g]=w.getData(h,i,"string")||k.stringTo||"max",j||(j=e(a,c,-1,g)),k.debug&&(m+="column:"+g+"; parser:"+j.id+"; string:"+k.strings[g]+"; empty: "+k.empties[g]+"\n"),d.push(j);k.debug&&b(m),k.parsers=d}function g(e){var f,g,h,i,j,k,l,m,n,o,p=e.tBodies,q=e.config,r=q.parsers,s=[];if(q.cache={},!r)return q.debug?b("*Empty table!* Not building a cache"):"";for(q.debug&&(o=new Date),q.showProcessing&&w.isProcessing(e,!0),l=0;l<p.length;l++)if(q.cache[l]={row:[],normalized:[]},!a(p[l]).hasClass(q.cssInfoBlock)){for(f=p[l]&&p[l].rows.length||0,g=p[l].rows[0]&&p[l].rows[0].cells.length||0,j=0;f>j;++j)if(m=a(p[l].rows[j]),n=[],m.hasClass(q.cssChildRow))q.cache[l].row[q.cache[l].row.length-1]=q.cache[l].row[q.cache[l].row.length-1].add(m);else{for(q.cache[l].row.push(m),k=0;g>k;++k)h=d(e,m[0].cells[k],k),i=r[k].format(h,e,m[0].cells[k],k),n.push(i),"numeric"===(r[k].type||"").toLowerCase()&&(s[k]=Math.max(Math.abs(i)||0,s[k]||0));n.push(q.cache[l].normalized.length),q.cache[l].normalized.push(n)}q.cache[l].colMax=s}q.showProcessing&&w.isProcessing(e),q.debug&&c("Building cache for "+f+" rows",o)}function h(b,d){var e,f,g,h,i,j,k,l,m,n,o,p,q=b.config,r=b.tBodies,s=[],t=q.cache;if(t[0]){for(q.debug&&(p=new Date),m=0;m<r.length;m++)if(i=a(r[m]),i.length&&!i.hasClass(q.cssInfoBlock)){for(j=w.processTbody(b,i,!0),e=t[m].row,f=t[m].normalized,g=f.length,h=g?f[0].length-1:0,k=0;g>k;k++)if(o=f[k][h],s.push(e[o]),!q.appender||!q.removeRows)for(n=e[o].length,l=0;n>l;l++)j.append(e[o][l]);w.processTbody(b,j,!1)}q.appender&&q.appender(b,s),q.debug&&c("Rebuilt table",p),d||w.applyWidget(b),a(b).trigger("sortEnd",b)}}function i(b){var c,d,e,f,g,h,i,j,k,l,m,n,o=[],p={},q=0,r=a(b).find("thead:eq(0), tfoot").children("tr");for(c=0;c<r.length;c++)for(h=r[c].cells,d=0;d<h.length;d++){for(g=h[d],i=g.parentNode.rowIndex,j=i+"-"+g.cellIndex,k=g.rowSpan||1,l=g.colSpan||1,"undefined"==typeof o[i]&&(o[i]=[]),e=0;e<o[i].length+1;e++)if("undefined"==typeof o[i][e]){m=e;break}for(p[j]=m,q=Math.max(m,q),a(g).attr({"data-column":m}),e=i;i+k>e;e++)for("undefined"==typeof o[e]&&(o[e]=[]),n=o[e],f=m;m+l>f;f++)n[f]="x"}return b.config.columns=q,p}function j(a){return/^d/i.test(a)||1===a}function k(d){var e,f,g,h,k,l,n,o=i(d),p=d.config;p.headerList=[],p.headerContent=[],p.debug&&(n=new Date),h=p.cssIcon?'<i class="'+p.cssIcon+'"></i>':"",p.$headers=a(d).find(p.selectorHeaders).each(function(b){f=a(this),e=p.headers[b],p.headerContent[b]=this.innerHTML,k=p.headerTemplate.replace(/\{content\}/g,this.innerHTML).replace(/\{icon\}/g,h),p.onRenderTemplate&&(g=p.onRenderTemplate.apply(f,[b,k]),g&&"string"==typeof g&&(k=g)),this.innerHTML='<div class="tablesorter-header-inner">'+k+"</div>",p.onRenderHeader&&p.onRenderHeader.apply(f,[b]),this.column=o[this.parentNode.rowIndex+"-"+this.cellIndex],this.order=j(w.getData(f,e,"sortInitialOrder")||p.sortInitialOrder)?[1,0,2]:[0,1,2],this.count=-1,this.lockedOrder=!1,l=w.getData(f,e,"lockedOrder")||!1,"undefined"!=typeof l&&l!==!1&&(this.order=this.lockedOrder=j(l)?[1,1,1]:[0,0,0]),f.addClass(p.cssHeader),p.headerList[b]=this,f.parent().addClass(p.cssHeaderRow),f.attr("tabindex",0)}),m(d),p.debug&&(c("Built headers:",n),b(p.$headers))}function l(a,b,c){var d=a.config;d.$table.find(d.selectorRemove).remove(),f(a),g(a),u(d.$table,b,c)}function m(b){var c,d=b.config;d.$headers.each(function(b,e){c="false"===w.getData(e,d.headers[b],"sorter"),e.sortDisabled=c,a(e)[c?"addClass":"removeClass"]("sorter-false")})}function n(b){var c,d,e,f,g=b.config,h=g.sortList,i=[g.cssAsc,g.cssDesc],j=a(b).find("tfoot tr").children().removeClass(i.join(" "));for(g.$headers.removeClass(i.join(" ")),f=h.length,d=0;f>d;d++)if(2!==h[d][1]&&(c=g.$headers.not(".sorter-false").filter('[data-column="'+h[d][0]+'"]'+(1===f?":last":"")),c.length))for(e=0;e<c.length;e++)c[e].sortDisabled||(c.eq(e).addClass(i[h[d][1]]),j.length&&j.filter('[data-column="'+h[d][0]+'"]').eq(e).addClass(i[h[d][1]]))}function o(b){if(b.config.widthFixed&&0===a(b).find("colgroup").length){var c=a("<colgroup>"),d=a(b).width();a(b.tBodies[0]).find("tr:first").children("td").each(function(){c.append(a("<col>").css("width",parseInt(a(this).width()/d*1e3,10)/10+"%"))}),a(b).prepend(c)}}function p(b,c){var d,e,f,g=b.config,h=c||g.sortList;g.sortList=[],a.each(h,function(b,c){d=[parseInt(c[0],10),parseInt(c[1],10)],f=g.headerList[d[0]],f&&(g.sortList.push(d),e=a.inArray(d[1],f.order),f.count=e>=0?e:d[1]%(g.sortReset?3:2))})}function q(a,b){return a&&a[b]?a[b].type||"":""}function r(b,c,d){var e,f,g,i,j,k=b.config,l=!d[k.sortMultiSortKey],m=a(b);if(m.trigger("sortStart",b),c.count=d[k.sortResetKey]?2:(c.count+1)%(k.sortReset?3:2),k.sortRestart&&(f=c,k.$headers.each(function(){this===f||!l&&a(this).is("."+k.cssDesc+",."+k.cssAsc)||(this.count=-1)})),f=c.column,l){if(k.sortList=[],null!==k.sortForce)for(e=k.sortForce,g=0;g<e.length;g++)e[g][0]!==f&&k.sortList.push(e[g]);if(i=c.order[c.count],2>i&&(k.sortList.push([f,i]),c.colSpan>1))for(g=1;g<c.colSpan;g++)k.sortList.push([f+g,i])}else if(k.sortAppend&&k.sortList.length>1&&w.isValueInArray(k.sortAppend[0][0],k.sortList)&&k.sortList.pop(),w.isValueInArray(f,k.sortList))for(g=0;g<k.sortList.length;g++)j=k.sortList[g],i=k.headerList[j[0]],j[0]===f&&(j[1]=i.order[i.count],2===j[1]&&(k.sortList.splice(g,1),i.count=-1));else if(i=c.order[c.count],2>i&&(k.sortList.push([f,i]),c.colSpan>1))for(g=1;g<c.colSpan;g++)k.sortList.push([f+g,i]);if(null!==k.sortAppend)for(e=k.sortAppend,g=0;g<e.length;g++)e[g][0]!==f&&k.sortList.push(e[g]);m.trigger("sortBegin",b),setTimeout(function(){n(b),s(b),h(b)},1)}function s(b){var d,e,f,g,h,i,j,k,l,m,n=0,o=b.config,p=o.sortList,r=p.length,s=b.tBodies.length;if(!o.serverSideSorting&&o.cache[0]){for(o.debug&&(d=new Date),f=0;s>f;f++)h=o.cache[f].colMax,i=o.cache[f].normalized,j=i.length,m=i&&i[0]?i[0].length-1:0,i.sort(function(c,d){for(e=0;r>e;e++){g=p[e][0],l=p[e][1],k=/n/i.test(q(o.parsers,g))?"Numeric":"Text",k+=0===l?"":"Desc",/Numeric/.test(k)&&o.strings[g]&&(n="boolean"==typeof o.string[o.strings[g]]?(0===l?1:-1)*(o.string[o.strings[g]]?-1:1):o.strings[g]?o.string[o.strings[g]]||0:0);var f=a.tablesorter["sort"+k](b,c[g],d[g],g,h[g],n);if(f)return f}return c[m]-d[m]});o.debug&&c("Sorting on "+p.toString()+" and dir "+l+" time",d)}}function t(a,b){a.trigger("updateComplete"),"function"==typeof b&&b(a[0])}function u(a,b,c){b===!1||a[0].isProcessing?t(a,c):a.trigger("sorton",[a[0].config.sortList,function(){t(a,c)}])}function v(b){var c,e,i=b.config,j=i.$table;i.$headers.find(i.selectorSort).add(i.$headers.filter(i.selectorSort)).unbind("mousedown.tablesorter mouseup.tablesorter sort.tablesorter keypress.tablesorter").bind("mousedown.tablesorter mouseup.tablesorter sort.tablesorter keypress.tablesorter",function(c,d){if(1!==(c.which||c.button)&&!/sort|keypress/.test(c.type)||"keypress"===c.type&&13!==c.which)return!1;if("mouseup"===c.type&&d!==!0&&(new Date).getTime()-e>250)return!1;if("mousedown"===c.type)return e=(new Date).getTime(),"INPUT"===c.target.tagName?"":!i.cancelSelection;i.delayInit&&!i.cache&&g(b);var f=/TH|TD/.test(this.tagName)?a(this):a(this).parents("th, td").filter(":first"),h=f[0];h.sortDisabled||r(b,h,c)}),i.cancelSelection&&i.$headers.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"}),j.unbind("sortReset update updateRows updateCell updateAll addRows sorton appendCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave ".split(" ").join(".tablesorter ")).bind("sortReset.tablesorter",function(a){a.stopPropagation(),i.sortList=[],n(b),s(b),h(b)}).bind("updateAll.tablesorter",function(a,c,d){a.stopPropagation(),w.refreshWidgets(b,!0,!0),w.restoreHeaders(b),k(b),v(b),l(b,c,d)}).bind("update.tablesorter updateRows.tablesorter",function(a,c,d){a.stopPropagation(),m(b),l(b,c,d)}).bind("updateCell.tablesorter",function(c,e,f,g){c.stopPropagation(),j.find(i.selectorRemove).remove();var h,k,l,m=j.find("tbody"),n=m.index(a(e).parents("tbody").filter(":first")),o=a(e).parents("tr").filter(":first");e=a(e)[0],m.length&&n>=0&&(k=m.eq(n).find("tr").index(o),l=e.cellIndex,h=i.cache[n].normalized[k].length-1,i.cache[n].row[b.config.cache[n].normalized[k][h]]=o,i.cache[n].normalized[k][l]=i.parsers[l].format(d(b,e,l),b,e,l),u(j,f,g))}).bind("addRows.tablesorter",function(a,e,g,h){a.stopPropagation();var k,l=e.filter("tr").length,m=[],n=e[0].cells.length,o=j.find("tbody").index(e.parents("tbody").filter(":first"));for(i.parsers||f(b),k=0;l>k;k++){for(c=0;n>c;c++)m[c]=i.parsers[c].format(d(b,e[k].cells[c],c),b,e[k].cells[c],c);m.push(i.cache[o].row.length),i.cache[o].row.push([e[k]]),i.cache[o].normalized.push(m),m=[]}u(j,g,h)}).bind("sorton.tablesorter",function(a,c,d,e){a.stopPropagation(),j.trigger("sortStart",this),p(b,c),n(b),j.trigger("sortBegin",this),s(b),h(b,e),"function"==typeof d&&d(b)}).bind("appendCache.tablesorter",function(a,c,d){a.stopPropagation(),h(b,d),"function"==typeof c&&c(b)}).bind("applyWidgetId.tablesorter",function(a,c){a.stopPropagation(),w.getWidgetById(c).format(b,i,i.widgetOptions)}).bind("applyWidgets.tablesorter",function(a,c){a.stopPropagation(),w.applyWidget(b,c)}).bind("refreshWidgets.tablesorter",function(a,c,d){a.stopPropagation(),w.refreshWidgets(b,c,d)}).bind("destroy.tablesorter",function(a,c,d){a.stopPropagation(),w.destroy(b,c,d)})}var w=this;w.version="2.10.8",w.parsers=[],w.widgets=[],w.defaults={theme:"default",widthFixed:!1,showProcessing:!1,headerTemplate:"{content}",onRenderTemplate:null,onRenderHeader:null,cancelSelection:!0,dateFormat:"mmddyyyy",sortMultiSortKey:"shiftKey",sortResetKey:"ctrlKey",usNumberFormat:!0,delayInit:!1,serverSideSorting:!1,headers:{},ignoreCase:!0,sortForce:null,sortList:[],sortAppend:null,sortInitialOrder:"asc",sortLocaleCompare:!1,sortReset:!1,sortRestart:!1,emptyTo:"bottom",stringTo:"max",textExtraction:"simple",textSorter:null,widgets:[],widgetOptions:{zebra:["even","odd"]},initWidgets:!0,initialized:null,tableClass:"tablesorter",cssAsc:"tablesorter-headerAsc",cssChildRow:"tablesorter-childRow",cssDesc:"tablesorter-headerDesc",cssHeader:"tablesorter-header",cssHeaderRow:"tablesorter-headerRow",cssIcon:"tablesorter-icon",cssInfoBlock:"tablesorter-infoOnly",cssProcessing:"tablesorter-processing",selectorHeaders:"> thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[]},w.log=b,w.benchmark=c,w.construct=function(c){return this.each(function(){if(!this.tHead||0===this.tBodies.length||this.hasInitialized===!0)return this.config&&this.config.debug?b("stopping initialization! No thead, tbody or tablesorter has already been initialized"):"";var d,e=a(this),h=this,i="",j=a.metadata;h.hasInitialized=!1,h.isProcessing=!0,h.config={},d=a.extend(!0,h.config,w.defaults,c),a.data(h,"tablesorter",d),d.debug&&a.data(h,"startoveralltimer",new Date),d.supportsTextContent="x"===a("<span>x</span>")[0].textContent,d.supportsDataObject=parseFloat(a.fn.jquery)>=1.4,d.string={max:1,min:-1,"max+":1,"max-":-1,zero:0,none:0,"null":0,top:!0,bottom:!1},/tablesorter\-/.test(e.attr("class"))||(i=""!==d.theme?" tablesorter-"+d.theme:""),d.$table=e.addClass(d.tableClass+i),d.$tbodies=e.children("tbody:not(."+d.cssInfoBlock+")"),k(h),o(h),f(h),d.delayInit||g(h),v(h),d.supportsDataObject&&"undefined"!=typeof e.data().sortlist?d.sortList=e.data().sortlist:j&&e.metadata()&&e.metadata().sortlist&&(d.sortList=e.metadata().sortlist),w.applyWidget(h,!0),d.sortList.length>0?e.trigger("sorton",[d.sortList,{},!d.initWidgets]):d.initWidgets&&w.applyWidget(h),d.showProcessing&&e.unbind("sortBegin.tablesorter sortEnd.tablesorter").bind("sortBegin.tablesorter sortEnd.tablesorter",function(a){w.isProcessing(h,"sortBegin"===a.type)}),h.hasInitialized=!0,h.isProcessing=!1,d.debug&&w.benchmark("Overall initialization time",a.data(h,"startoveralltimer")),e.trigger("tablesorter-initialized",h),"function"==typeof d.initialized&&d.initialized(h)})},w.isProcessing=function(b,c,d){b=a(b);var e=b[0].config,f=d||b.find("."+e.cssHeader);c?(e.sortList.length>0&&(f=f.filter(function(){return this.sortDisabled?!1:w.isValueInArray(parseFloat(a(this).attr("data-column")),e.sortList)})),f.addClass(e.cssProcessing)):f.removeClass(e.cssProcessing)},w.processTbody=function(b,c,d){var e;return d?(b.isProcessing=!0,c.before('<span class="tablesorter-savemyplace"/>'),e=a.fn.detach?c.detach():c.remove()):(e=a(b).find("span.tablesorter-savemyplace"),c.insertAfter(e),e.remove(),b.isProcessing=!1,void 0)},w.clearTableBody=function(b){a(b)[0].config.$tbodies.empty()},w.restoreHeaders=function(b){var c=b.config;c.$table.find(c.selectorHeaders).each(function(b){a(this).find(".tablesorter-header-inner").length&&a(this).html(c.headerContent[b])})},w.destroy=function(b,c,d){if(b=a(b)[0],b.hasInitialized){w.refreshWidgets(b,!0,!0);var e=a(b),f=b.config,g=e.find("thead:first"),h=g.find("tr."+f.cssHeaderRow).removeClass(f.cssHeaderRow),i=e.find("tfoot:first > tr").children("th, td");g.find("tr").not(h).remove(),e.removeData("tablesorter").unbind("sortReset update updateAll updateRows updateCell addRows sorton appendCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd ".split(" ").join(".tablesorter ")),f.$headers.add(i).removeClass(f.cssHeader+" "+f.cssAsc+" "+f.cssDesc).removeAttr("data-column"),h.find(f.selectorSort).unbind("mousedown.tablesorter mouseup.tablesorter keypress.tablesorter"),w.restoreHeaders(b),c!==!1&&e.removeClass(f.tableClass+" tablesorter-"+f.theme),b.hasInitialized=!1,"function"==typeof d&&d(b)}},w.regex=[/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,/^0x[0-9a-f]+$/i],w.sortText=function(a,b,c,d){if(b===c)return 0;var e,f,g,h,i,j,k,l,m=a.config,n=m.string[m.empties[d]||m.emptyTo],o=w.regex;if(""===b&&0!==n)return"boolean"==typeof n?n?-1:1:-n||-1;if(""===c&&0!==n)return"boolean"==typeof n?n?1:-1:n||1;if("function"==typeof m.textSorter)return m.textSorter(b,c,a,d);if(e=b.replace(o[0],"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0"),g=c.replace(o[0],"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0"),f=parseInt(b.match(o[2]),16)||1!==e.length&&b.match(o[1])&&Date.parse(b),h=parseInt(c.match(o[2]),16)||f&&c.match(o[1])&&Date.parse(c)||null){if(h>f)return-1;if(f>h)return 1}for(l=Math.max(e.length,g.length),k=0;l>k;k++){if(i=isNaN(e[k])?e[k]||0:parseFloat(e[k])||0,j=isNaN(g[k])?g[k]||0:parseFloat(g[k])||0,isNaN(i)!==isNaN(j))return isNaN(i)?1:-1;if(typeof i!=typeof j&&(i+="",j+=""),j>i)return-1;if(i>j)return 1}return 0},w.sortTextDesc=function(a,b,c,d){if(b===c)return 0;var e=a.config,f=e.string[e.empties[d]||e.emptyTo];return""===b&&0!==f?"boolean"==typeof f?f?-1:1:f||1:""===c&&0!==f?"boolean"==typeof f?f?1:-1:-f||-1:"function"==typeof e.textSorter?e.textSorter(c,b,a,d):w.sortText(a,c,b)},w.getTextValue=function(a,b,c){if(b){var d,e=a?a.length:0,f=b+c;for(d=0;e>d;d++)f+=a.charCodeAt(d);return c*f}return 0},w.sortNumeric=function(a,b,c,d,e,f){if(b===c)return 0;var g=a.config,h=g.string[g.empties[d]||g.emptyTo];return""===b&&0!==h?"boolean"==typeof h?h?-1:1:-h||-1:""===c&&0!==h?"boolean"==typeof h?h?1:-1:h||1:(isNaN(b)&&(b=w.getTextValue(b,e,f)),isNaN(c)&&(c=w.getTextValue(c,e,f)),b-c)},w.sortNumericDesc=function(a,b,c,d,e,f){if(b===c)return 0;var g=a.config,h=g.string[g.empties[d]||g.emptyTo];return""===b&&0!==h?"boolean"==typeof h?h?-1:1:h||1:""===c&&0!==h?"boolean"==typeof h?h?1:-1:-h||-1:(isNaN(b)&&(b=w.getTextValue(b,e,f)),isNaN(c)&&(c=w.getTextValue(c,e,f)),c-b)},w.characterEquivalents={a:"\xe1\xe0\xe2\xe3\xe4\u0105\xe5",A:"\xc1\xc0\xc2\xc3\xc4\u0104\xc5",c:"\xe7\u0107\u010d",C:"\xc7\u0106\u010c",e:"\xe9\xe8\xea\xeb\u011b\u0119",E:"\xc9\xc8\xca\xcb\u011a\u0118",i:"\xed\xec\u0130\xee\xef\u0131",I:"\xcd\xcc\u0130\xce\xcf",o:"\xf3\xf2\xf4\xf5\xf6",O:"\xd3\xd2\xd4\xd5\xd6",ss:"\xdf",SS:"\u1e9e",u:"\xfa\xf9\xfb\xfc\u016f",U:"\xda\xd9\xdb\xdc\u016e"},w.replaceAccents=function(a){var b,c="[",d=w.characterEquivalents;if(!w.characterRegex){w.characterRegexArray={};for(b in d)"string"==typeof b&&(c+=d[b],w.characterRegexArray[b]=new RegExp("["+d[b]+"]","g"));w.characterRegex=new RegExp(c+"]")}if(w.characterRegex.test(a))for(b in d)"string"==typeof b&&(a=a.replace(w.characterRegexArray[b],b));return a},w.isValueInArray=function(a,b){var c,d=b.length;for(c=0;d>c;c++)if(b[c][0]===a)return!0;return!1},w.addParser=function(a){var b,c=w.parsers.length,d=!0;for(b=0;c>b;b++)w.parsers[b].id.toLowerCase()===a.id.toLowerCase()&&(d=!1);d&&w.parsers.push(a)},w.getParserById=function(a){var b,c=w.parsers.length;for(b=0;c>b;b++)if(w.parsers[b].id.toLowerCase()===a.toString().toLowerCase())return w.parsers[b];return!1},w.addWidget=function(a){w.widgets.push(a)},w.getWidgetById=function(a){var b,c,d=w.widgets.length;for(b=0;d>b;b++)if(c=w.widgets[b],c&&c.hasOwnProperty("id")&&c.id.toLowerCase()===a.toLowerCase())return c},w.applyWidget=function(b,d){b=a(b)[0];var e,f,g,h=b.config,i=h.widgetOptions,j=[];h.debug&&(e=new Date),h.widgets.length&&(h.widgets=a.grep(h.widgets,function(b,c){return a.inArray(b,h.widgets)===c}),a.each(h.widgets||[],function(a,b){g=w.getWidgetById(b),g&&g.id&&(g.priority||(g.priority=10),j[a]=g)}),j.sort(function(a,b){return a.priority<b.priority?-1:a.priority===b.priority?0:1}),a.each(j,function(c,e){e&&(d?(e.hasOwnProperty("options")&&(i=b.config.widgetOptions=a.extend(!0,{},e.options,i)),e.hasOwnProperty("init")&&e.init(b,e,h,i)):!d&&e.hasOwnProperty("format")&&e.format(b,h,i,!1))})),h.debug&&(f=h.widgets.length,c("Completed "+(d===!0?"initializing ":"applying ")+f+" widget"+(1!==f?"s":""),e))},w.refreshWidgets=function(c,d,e){c=a(c)[0];var f,g=c.config,h=g.widgets,i=w.widgets,j=i.length;for(f=0;j>f;f++)i[f]&&i[f].id&&(d||a.inArray(i[f].id,h)<0)&&(g.debug&&b("Refeshing widgets: Removing "+i[f].id),i[f].hasOwnProperty("remove")&&i[f].remove(c,g,g.widgetOptions));e!==!0&&w.applyWidget(c,d)},w.getData=function(b,c,d){var e,f,g="",h=a(b);return h.length?(e=a.metadata?h.metadata():!1,f=" "+(h.attr("class")||""),"undefined"!=typeof h.data(d)||"undefined"!=typeof h.data(d.toLowerCase())?g+=h.data(d)||h.data(d.toLowerCase()):e&&"undefined"!=typeof e[d]?g+=e[d]:c&&"undefined"!=typeof c[d]?g+=c[d]:" "!==f&&f.match(" "+d+"-")&&(g=f.match(new RegExp("\\s"+d+"-([\\w-]+)"))[1]||""),a.trim(g)):""},w.formatFloat=function(b,c){if("string"!=typeof b||""===b)return b;var d,e=c&&c.config?c.config.usNumberFormat!==!1:"undefined"!=typeof c?c:!0;return b=e?b.replace(/,/g,""):b.replace(/[\s|\.]/g,"").replace(/,/g,"."),/^\s*\([.\d]+\)/.test(b)&&(b=b.replace(/^\s*\(/,"-").replace(/\)/,"")),d=parseFloat(b),isNaN(d)?a.trim(b):d},w.isDigit=function(a){return isNaN(a)?/^[\-+(]?\d+[)]?$/.test(a.toString().replace(/[,.'"\s]/g,"")):!0}}});var b=a.tablesorter;a.fn.extend({tablesorter:b.construct}),b.addParser({id:"text",is:function(){return!0},format:function(c,d){var e=d.config;return c&&(c=a.trim(e.ignoreCase?c.toLocaleLowerCase():c),c=e.sortLocaleCompare?b.replaceAccents(c):c),c},type:"text"}),b.addParser({id:"digit",is:function(a){return b.isDigit(a)},format:function(c,d){var e=b.formatFloat((c||"").replace(/[^\w,. \-()]/g,""),d);return c&&"number"==typeof e?e:c?a.trim(c&&d.config.ignoreCase?c.toLocaleLowerCase():c):c},type:"numeric"}),b.addParser({id:"currency",is:function(a){return/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/.test((a||"").replace(/[,. ]/g,""))},format:function(c,d){var e=b.formatFloat((c||"").replace(/[^\w,. \-()]/g,""),d);return c&&"number"==typeof e?e:c?a.trim(c&&d.config.ignoreCase?c.toLocaleLowerCase():c):c},type:"numeric"}),b.addParser({id:"ipAddress",is:function(a){return/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(a)},format:function(a,c){var d,e=a?a.split("."):"",f="",g=e.length;for(d=0;g>d;d++)f+=("00"+e[d]).slice(-3);return a?b.formatFloat(f,c):a},type:"numeric"}),b.addParser({id:"url",is:function(a){return/^(https?|ftp|file):\/\//.test(a)},format:function(b){return b?a.trim(b.replace(/(https?|ftp|file):\/\//,"")):b},type:"text"}),b.addParser({id:"isoDate",is:function(a){return/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/.test(a)},format:function(a,c){return a?b.formatFloat(""!==a?new Date(a.replace(/-/g,"/")).getTime()||"":"",c):a},type:"numeric"}),b.addParser({id:"percent",is:function(a){return/(\d\s*?%|%\s*?\d)/.test(a)&&a.length<15},format:function(a,c){return a?b.formatFloat(a.replace(/%/g,""),c):a},type:"numeric"}),b.addParser({id:"usLongDate",is:function(a){return/^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i.test(a)||/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i.test(a)},format:function(a,c){return a?b.formatFloat(new Date(a.replace(/(\S)([AP]M)$/i,"$1 $2")).getTime()||"",c):a},type:"numeric"}),b.addParser({id:"shortDate",is:function(a){return/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/.test((a||"").replace(/\s+/g," ").replace(/[\-.,]/g,"/"))},format:function(a,c,d,e){if(a){var f=c.config,g=f.headerList[e],h=g.dateFormat||b.getData(g,f.headers[e],"dateFormat")||f.dateFormat;a=a.replace(/\s+/g," ").replace(/[\-.,]/g,"/"),"mmddyyyy"===h?a=a.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$1/$2"):"ddmmyyyy"===h?a=a.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$2/$1"):"yyyymmdd"===h&&(a=a.replace(/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,"$1/$2/$3"))}return a?b.formatFloat(new Date(a).getTime()||"",c):a},type:"numeric"}),b.addParser({id:"time",is:function(a){return/^(([0-2]?\d:[0-5]\d)|([0-1]?\d:[0-5]\d\s?([AP]M)))$/i.test(a)},format:function(a,c){return a?b.formatFloat(new Date("2000/01/01 "+a.replace(/(\S)([AP]M)$/i,"$1 $2")).getTime()||"",c):a},type:"numeric"}),b.addParser({id:"metadata",is:function(){return!1},format:function(b,c,d){var e=c.config,f=e.parserMetadataName?e.parserMetadataName:"sortValue";return a(d).metadata()[f]},type:"numeric"}),b.addWidget({id:"zebra",priority:90,format:function(c,d,e){var f,g,h,i,j,k,l,m,n=new RegExp(d.cssChildRow,"i"),o=d.$tbodies;for(d.debug&&(k=new Date),l=0;l<o.length;l++)f=o.eq(l),m=f.children("tr").length,m>1&&(i=0,g=f.children("tr:visible"),g.each(function(){h=a(this),n.test(this.className)||i++,j=i%2===0,h.removeClass(e.zebra[j?1:0]).addClass(e.zebra[j?0:1])}));d.debug&&b.benchmark("Applying Zebra widget",k)},remove:function(b,c,d){var e,f,g=c.$tbodies,h=(d.zebra||["even","odd"]).join(" ");for(e=0;e<g.length;e++)f=a.tablesorter.processTbody(b,g.eq(e),!0),f.children().removeClass(h),a.tablesorter.processTbody(b,f,!1)}})}(jQuery),!function(a,b,c){function d(a,c){var d,e=b.createElement(a||"div");for(d in c)e[d]=c[d];return e}function e(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function f(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=k.substring(0,k.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return m[e]||(n.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",n.cssRules.length),m[e]=1),e }function g(a,b){var d,e,f=a.style;if(f[b]!==c)return b;for(b=b.charAt(0).toUpperCase()+b.slice(1),e=0;e<l.length;e++)if(d=l[e]+b,f[d]!==c)return d}function h(a,b){for(var c in b)a.style[g(a,c)||c]=b[c];return a}function i(a){for(var b=1;b<arguments.length;b++){var d=arguments[b];for(var e in d)a[e]===c&&(a[e]=d[e])}return a}function j(a){for(var b={x:a.offsetLeft,y:a.offsetTop};a=a.offsetParent;)b.x+=a.offsetLeft,b.y+=a.offsetTop;return b}var k,l=["webkit","Moz","ms","O"],m={},n=function(){var a=d("style",{type:"text/css"});return e(b.getElementsByTagName("head")[0],a),a.sheet||a.styleSheet}(),o={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"auto",left:"auto",position:"relative"},p=function q(a){return this.spin?(this.opts=i(a||{},q.defaults,o),void 0):new q(a)};p.defaults={},i(p.prototype,{spin:function(a){this.stop();var b,c,e=this,f=e.opts,g=e.el=h(d(0,{className:f.className}),{position:f.position,width:0,zIndex:f.zIndex}),i=f.radius+f.length+f.width;if(a&&(a.insertBefore(g,a.firstChild||null),c=j(a),b=j(g),h(g,{left:("auto"==f.left?c.x-b.x+(a.offsetWidth>>1):parseInt(f.left,10)+i)+"px",top:("auto"==f.top?c.y-b.y+(a.offsetHeight>>1):parseInt(f.top,10)+i)+"px"})),g.setAttribute("aria-role","progressbar"),e.lines(g,e.opts),!k){var l=0,m=f.fps,n=m/f.speed,o=(1-f.opacity)/(n*f.trail/100),p=n/f.lines;!function q(){l++;for(var a=f.lines;a;a--){var b=Math.max(1-(l+a*p)%n*o,f.opacity);e.opacity(g,f.lines-a,b,f)}e.timeout=e.el&&setTimeout(q,~~(1e3/m))}()}return e},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=c),this},lines:function(a,b){function c(a,c){return h(d(),{position:"absolute",width:b.length+b.width+"px",height:b.width+"px",background:a,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/b.lines*i+b.rotate)+"deg) translate("+b.radius+"px,0)",borderRadius:(b.corners*b.width>>1)+"px"})}for(var g,i=0;i<b.lines;i++)g=h(d(),{position:"absolute",top:1+~(b.width/2)+"px",transform:b.hwaccel?"translate3d(0,0,0)":"",opacity:b.opacity,animation:k&&f(b.opacity,b.trail,i,b.lines)+" "+1/b.speed+"s linear infinite"}),b.shadow&&e(g,h(c("#000","0 0 4px #000"),{top:"2px"})),e(a,e(g,c(b.color,"0 0 1px rgba(0,0,0,.1)")));return a},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}}),function(){function a(a,b){return d("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',b)}var b=h(d("group"),{behavior:"url(#default#VML)"});!g(b,"transform")&&b.adj?(n.addRule(".spin-vml","behavior:url(#default#VML)"),p.prototype.lines=function(b,c){function d(){return h(a("group",{coordsize:j+" "+j,coordorigin:-i+" "+-i}),{width:j,height:j})}function f(b,f,g){e(l,e(h(d(),{rotation:360/c.lines*b+"deg",left:~~f}),e(h(a("roundrect",{arcsize:c.corners}),{width:i,height:c.width,left:c.radius,top:-c.width>>1,filter:g}),a("fill",{color:c.color,opacity:c.opacity}),a("stroke",{opacity:0}))))}var g,i=c.length+c.width,j=2*i,k=2*-(c.width+c.length)+"px",l=h(d(),{position:"absolute",top:k,left:k});if(c.shadow)for(g=1;g<=c.lines;g++)f(g,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(g=1;g<=c.lines;g++)f(g);return e(b,l)},p.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}):k=g(b,"animation")}(),"function"==typeof define&&define.amd?define(function(){return p}):a.Spinner=p}(window,document),function(a){a.fn.spin=function(b,c){var d,e;if("string"==typeof b){if(!b in a.fn.spin.presets)throw new Error("Preset '"+b+"' isn't defined");d=a.fn.spin.presets[b],e=c||{}}else{if(c)throw new Error("Invalid arguments. Accepted arguments:\n$.spin([String preset[, Object options]]),\n$.spin(Object options),\n$.spin(Boolean shouldSpin)");d=a.fn.spin.presets.small,e=a.isPlainObject(b)?b:{}}if(window.Spinner)return this.each(function(){var c=a(this),f=c.data();f.spinner&&(f.spinner.stop(),delete f.spinner),b!==!1&&(e=a.extend({color:c.css("color")},d,e),f.spinner=new Spinner(e).spin(this))});throw"Spinner class not available."},a.fn.spin.presets={small:{lines:12,length:3,width:2,radius:3,trail:60,speed:1.5},medium:{lines:12,length:5,width:3,radius:8,trail:60,speed:1.5},large:{lines:12,length:8,width:4,radius:10,trail:60,speed:1.5}},a.fn.spinStop=function(){if(window.Spinner)return this.each(function(){var b=a(this),c=b.data();c.spinner&&(c.spinner.stop(),delete c.spinner)});throw"Spinner class not available."}}(jQuery),function(a){"undefined"==typeof a.fn.each2&&a.extend(a.fn,{each2:function(b){for(var c=a([0]),d=-1,e=this.length;++d<e&&(c.context=c[0]=this[d])&&b.call(c[0],d,c)!==!1;);return this}})}(jQuery),function(a,b){"use strict";function c(a){var b,c,d,e;if(!a||a.length<1)return a;for(b="",c=0,d=a.length;d>c;c++)e=a.charAt(c),b+=N[e]||e;return b}function d(a,b){for(var c=0,d=b.length;d>c;c+=1)if(f(a,b[c]))return c;return-1}function e(){var b=a(M);b.appendTo("body");var c={width:b.width()-b[0].clientWidth,height:b.height()-b[0].clientHeight};return b.remove(),c}function f(a,c){return a===c?!0:a===b||c===b?!1:null===a||null===c?!1:a.constructor===String?a+""==c+"":c.constructor===String?c+""==a+"":!1}function g(b,c){var d,e,f;if(null===b||b.length<1)return[];for(d=b.split(c),e=0,f=d.length;f>e;e+=1)d[e]=a.trim(d[e]);return d}function h(a){return a.outerWidth(!1)-a.width()}function i(c){var d="keyup-change-value";c.on("keydown",function(){a.data(c,d)===b&&a.data(c,d,c.val())}),c.on("keyup",function(){var e=a.data(c,d);e!==b&&c.val()!==e&&(a.removeData(c,d),c.trigger("keyup-change"))})}function j(c){c.on("mousemove",function(c){var d=L;(d===b||d.x!==c.pageX||d.y!==c.pageY)&&a(c.target).trigger("mousemove-filtered",c)})}function k(a,c,d){d=d||b;var e;return function(){var b=arguments;window.clearTimeout(e),e=window.setTimeout(function(){c.apply(d,b)},a)}}function l(a){var b,c=!1;return function(){return c===!1&&(b=a(),c=!0),b}}function m(a,b){var c=k(a,function(a){b.trigger("scroll-debounced",a)});b.on("scroll",function(a){d(a.target,b.get())>=0&&c(a)})}function n(a){a[0]!==document.activeElement&&window.setTimeout(function(){var b,c=a[0],d=a.val().length;a.focus(),a.is(":visible")&&c===document.activeElement&&(c.setSelectionRange?c.setSelectionRange(d,d):c.createTextRange&&(b=c.createTextRange(),b.collapse(!1),b.select()))},0)}function o(b){b=a(b)[0];var c=0,d=0;if("selectionStart"in b)c=b.selectionStart,d=b.selectionEnd-c;else if("selection"in document){b.focus();var e=document.selection.createRange();d=document.selection.createRange().text.length,e.moveStart("character",-b.value.length),c=e.text.length-d}return{offset:c,length:d}}function p(a){a.preventDefault(),a.stopPropagation()}function q(a){a.preventDefault(),a.stopImmediatePropagation()}function r(b){if(!I){var c=b[0].currentStyle||window.getComputedStyle(b[0],null);I=a(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:c.fontSize,fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight,letterSpacing:c.letterSpacing,textTransform:c.textTransform,whiteSpace:"nowrap"}),I.attr("class","select2-sizer"),a("body").append(I)}return I.text(b.val()),I.width()}function s(b,c,d){var e,f,g=[];e=b.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0===this.indexOf("select2-")&&g.push(this)})),e=c.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0!==this.indexOf("select2-")&&(f=d(this),f&&g.push(f))})),b.attr("class",g.join(" "))}function t(a,b,d,e){var f=c(a.toUpperCase()).indexOf(c(b.toUpperCase())),g=b.length;return 0>f?(d.push(e(a)),void 0):(d.push(e(a.substring(0,f))),d.push("<span class='select2-match'>"),d.push(e(a.substring(f,f+g))),d.push("</span>"),d.push(e(a.substring(f+g,a.length))),void 0)}function u(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})}function v(c){var d,e=null,f=c.quietMillis||100,g=c.url,h=this;return function(i){window.clearTimeout(d),d=window.setTimeout(function(){var d=c.data,f=g,j=c.transport||a.fn.select2.ajaxDefaults.transport,k={type:c.type||"GET",cache:c.cache||!1,jsonpCallback:c.jsonpCallback||b,dataType:c.dataType||"json"},l=a.extend({},a.fn.select2.ajaxDefaults.params,k);d=d?d.call(h,i.term,i.page,i.context):null,f="function"==typeof f?f.call(h,i.term,i.page,i.context):f,e&&e.abort(),c.params&&(a.isFunction(c.params)?a.extend(l,c.params.call(h)):a.extend(l,c.params)),a.extend(l,{url:f,dataType:c.dataType,data:d,success:function(a){var b=c.results(a,i.page);i.callback(b)}}),e=j.call(h,l)},f)}}function w(b){var c,d,e=b,f=function(a){return""+a.text};a.isArray(e)&&(d=e,e={results:d}),a.isFunction(e)===!1&&(d=e,e=function(){return d});var g=e();return g.text&&(f=g.text,a.isFunction(f)||(c=g.text,f=function(a){return a[c]})),function(b){var c,d=b.term,g={results:[]};return""===d?(b.callback(e()),void 0):(c=function(e,g){var h,i;if(e=e[0],e.children){h={};for(i in e)e.hasOwnProperty(i)&&(h[i]=e[i]);h.children=[],a(e.children).each2(function(a,b){c(b,h.children)}),(h.children.length||b.matcher(d,f(h),e))&&g.push(h)}else b.matcher(d,f(e),e)&&g.push(e)},a(e().results).each2(function(a,b){c(b,g.results)}),b.callback(g),void 0)}}function x(c){var d=a.isFunction(c);return function(e){var f=e.term,g={results:[]};a(d?c():c).each(function(){var a=this.text!==b,c=a?this.text:this;(""===f||e.matcher(f,c))&&g.results.push(a?this:{id:this,text:this})}),e.callback(g)}}function y(b,c){if(a.isFunction(b))return!0;if(!b)return!1;throw new Error(c+" must be a function or a falsy value")}function z(b){return a.isFunction(b)?b():b}function A(b){var c=0;return a.each(b,function(a,b){b.children?c+=A(b.children):c++}),c}function B(a,c,d,e){var g,h,i,j,k,l=a,m=!1;if(!e.createSearchChoice||!e.tokenSeparators||e.tokenSeparators.length<1)return b;for(;;){for(h=-1,i=0,j=e.tokenSeparators.length;j>i&&(k=e.tokenSeparators[i],h=a.indexOf(k),!(h>=0));i++);if(0>h)break;if(g=a.substring(0,h),a=a.substring(h+k.length),g.length>0&&(g=e.createSearchChoice.call(this,g,c),g!==b&&null!==g&&e.id(g)!==b&&null!==e.id(g))){for(m=!1,i=0,j=c.length;j>i;i++)if(f(e.id(g),e.id(c[i]))){m=!0;break}m||d(g)}}return l!==a?a:void 0}function C(b,c){var d=function(){};return d.prototype=new b,d.prototype.constructor=d,d.prototype.parent=b.prototype,d.prototype=a.extend(d.prototype,c),d}if(window.Select2===b){var D,E,F,G,H,I,J,K,L={x:0,y:0},D={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(a){switch(a=a.which?a.which:a){case D.LEFT:case D.RIGHT:case D.UP:case D.DOWN:return!0}return!1},isControl:function(a){var b=a.which;switch(b){case D.SHIFT:case D.CTRL:case D.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a}},M="<div class='select2-measure-scrollbar'></div>",N={"\u24b6":"A",\uff21:"A",\u00c0:"A",\u00c1:"A",\u00c2:"A",\u1ea6:"A",\u1ea4:"A",\u1eaa:"A",\u1ea8:"A",\u00c3:"A",\u0100:"A",\u0102:"A",\u1eb0:"A",\u1eae:"A",\u1eb4:"A",\u1eb2:"A",\u0226:"A",\u01e0:"A",\u00c4:"A",\u01de:"A",\u1ea2:"A",\u00c5:"A",\u01fa:"A",\u01cd:"A",\u0200:"A",\u0202:"A",\u1ea0:"A",\u1eac:"A",\u1eb6:"A",\u1e00:"A",\u0104:"A",\u023a:"A",\u2c6f:"A",\ua732:"AA",\u00c6:"AE",\u01fc:"AE",\u01e2:"AE",\ua734:"AO",\ua736:"AU",\ua738:"AV",\ua73a:"AV",\ua73c:"AY","\u24b7":"B",\uff22:"B",\u1e02:"B",\u1e04:"B",\u1e06:"B",\u0243:"B",\u0182:"B",\u0181:"B","\u24b8":"C",\uff23:"C",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u00c7:"C",\u1e08:"C",\u0187:"C",\u023b:"C",\ua73e:"C","\u24b9":"D",\uff24:"D",\u1e0a:"D",\u010e:"D",\u1e0c:"D",\u1e10:"D",\u1e12:"D",\u1e0e:"D",\u0110:"D",\u018b:"D",\u018a:"D",\u0189:"D",\ua779:"D",\u01f1:"DZ",\u01c4:"DZ",\u01f2:"Dz",\u01c5:"Dz","\u24ba":"E",\uff25:"E",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u1ec0:"E",\u1ebe:"E",\u1ec4:"E",\u1ec2:"E",\u1ebc:"E",\u0112:"E",\u1e14:"E",\u1e16:"E",\u0114:"E",\u0116:"E",\u00cb:"E",\u1eba:"E",\u011a:"E",\u0204:"E",\u0206:"E",\u1eb8:"E",\u1ec6:"E",\u0228:"E",\u1e1c:"E",\u0118:"E",\u1e18:"E",\u1e1a:"E",\u0190:"E",\u018e:"E","\u24bb":"F",\uff26:"F",\u1e1e:"F",\u0191:"F",\ua77b:"F","\u24bc":"G",\uff27:"G",\u01f4:"G",\u011c:"G",\u1e20:"G",\u011e:"G",\u0120:"G",\u01e6:"G",\u0122:"G",\u01e4:"G",\u0193:"G","\ua7a0":"G",\ua77d:"G",\ua77e:"G","\u24bd":"H",\uff28:"H",\u0124:"H",\u1e22:"H",\u1e26:"H",\u021e:"H",\u1e24:"H",\u1e28:"H",\u1e2a:"H",\u0126:"H",\u2c67:"H",\u2c75:"H","\ua78d":"H","\u24be":"I",\uff29:"I",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u0128:"I",\u012a:"I",\u012c:"I",\u0130:"I",\u00cf:"I",\u1e2e:"I",\u1ec8:"I",\u01cf:"I",\u0208:"I",\u020a:"I",\u1eca:"I",\u012e:"I",\u1e2c:"I",\u0197:"I","\u24bf":"J",\uff2a:"J",\u0134:"J",\u0248:"J","\u24c0":"K",\uff2b:"K",\u1e30:"K",\u01e8:"K",\u1e32:"K",\u0136:"K",\u1e34:"K",\u0198:"K",\u2c69:"K",\ua740:"K",\ua742:"K",\ua744:"K","\ua7a2":"K","\u24c1":"L",\uff2c:"L",\u013f:"L",\u0139:"L",\u013d:"L",\u1e36:"L",\u1e38:"L",\u013b:"L",\u1e3c:"L",\u1e3a:"L",\u0141:"L",\u023d:"L",\u2c62:"L",\u2c60:"L",\ua748:"L",\ua746:"L",\ua780:"L",\u01c7:"LJ",\u01c8:"Lj","\u24c2":"M",\uff2d:"M",\u1e3e:"M",\u1e40:"M",\u1e42:"M",\u2c6e:"M",\u019c:"M","\u24c3":"N",\uff2e:"N",\u01f8:"N",\u0143:"N",\u00d1:"N",\u1e44:"N",\u0147:"N",\u1e46:"N",\u0145:"N",\u1e4a:"N",\u1e48:"N",\u0220:"N",\u019d:"N","\ua790":"N","\ua7a4":"N",\u01ca:"NJ",\u01cb:"Nj","\u24c4":"O",\uff2f:"O",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u1ed2:"O",\u1ed0:"O",\u1ed6:"O",\u1ed4:"O",\u00d5:"O",\u1e4c:"O",\u022c:"O",\u1e4e:"O",\u014c:"O",\u1e50:"O",\u1e52:"O",\u014e:"O",\u022e:"O",\u0230:"O",\u00d6:"O",\u022a:"O",\u1ece:"O",\u0150:"O",\u01d1:"O",\u020c:"O",\u020e:"O",\u01a0:"O",\u1edc:"O",\u1eda:"O",\u1ee0:"O",\u1ede:"O",\u1ee2:"O",\u1ecc:"O",\u1ed8:"O",\u01ea:"O",\u01ec:"O",\u00d8:"O",\u01fe:"O",\u0186:"O",\u019f:"O",\ua74a:"O",\ua74c:"O",\u01a2:"OI",\ua74e:"OO",\u0222:"OU","\u24c5":"P",\uff30:"P",\u1e54:"P",\u1e56:"P",\u01a4:"P",\u2c63:"P",\ua750:"P",\ua752:"P",\ua754:"P","\u24c6":"Q",\uff31:"Q",\ua756:"Q",\ua758:"Q",\u024a:"Q","\u24c7":"R",\uff32:"R",\u0154:"R",\u1e58:"R",\u0158:"R",\u0210:"R",\u0212:"R",\u1e5a:"R",\u1e5c:"R",\u0156:"R",\u1e5e:"R",\u024c:"R",\u2c64:"R",\ua75a:"R","\ua7a6":"R",\ua782:"R","\u24c8":"S",\uff33:"S",\u1e9e:"S",\u015a:"S",\u1e64:"S",\u015c:"S",\u1e60:"S",\u0160:"S",\u1e66:"S",\u1e62:"S",\u1e68:"S",\u0218:"S",\u015e:"S","\u2c7e":"S","\ua7a8":"S",\ua784:"S","\u24c9":"T",\uff34:"T",\u1e6a:"T",\u0164:"T",\u1e6c:"T",\u021a:"T",\u0162:"T",\u1e70:"T",\u1e6e:"T",\u0166:"T",\u01ac:"T",\u01ae:"T",\u023e:"T",\ua786:"T",\ua728:"TZ","\u24ca":"U",\uff35:"U",\u00d9:"U",\u00da:"U",\u00db:"U",\u0168:"U",\u1e78:"U",\u016a:"U",\u1e7a:"U",\u016c:"U",\u00dc:"U",\u01db:"U",\u01d7:"U",\u01d5:"U",\u01d9:"U",\u1ee6:"U",\u016e:"U",\u0170:"U",\u01d3:"U",\u0214:"U",\u0216:"U",\u01af:"U",\u1eea:"U",\u1ee8:"U",\u1eee:"U",\u1eec:"U",\u1ef0:"U",\u1ee4:"U",\u1e72:"U",\u0172:"U",\u1e76:"U",\u1e74:"U",\u0244:"U","\u24cb":"V",\uff36:"V",\u1e7c:"V",\u1e7e:"V",\u01b2:"V",\ua75e:"V",\u0245:"V",\ua760:"VY","\u24cc":"W",\uff37:"W",\u1e80:"W",\u1e82:"W",\u0174:"W",\u1e86:"W",\u1e84:"W",\u1e88:"W",\u2c72:"W","\u24cd":"X",\uff38:"X",\u1e8a:"X",\u1e8c:"X","\u24ce":"Y",\uff39:"Y",\u1ef2:"Y",\u00dd:"Y",\u0176:"Y",\u1ef8:"Y",\u0232:"Y",\u1e8e:"Y",\u0178:"Y",\u1ef6:"Y",\u1ef4:"Y",\u01b3:"Y",\u024e:"Y",\u1efe:"Y","\u24cf":"Z",\uff3a:"Z",\u0179:"Z",\u1e90:"Z",\u017b:"Z",\u017d:"Z",\u1e92:"Z",\u1e94:"Z",\u01b5:"Z",\u0224:"Z","\u2c7f":"Z",\u2c6b:"Z",\ua762:"Z","\u24d0":"a",\uff41:"a",\u1e9a:"a",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u1ea7:"a",\u1ea5:"a",\u1eab:"a",\u1ea9:"a",\u00e3:"a",\u0101:"a",\u0103:"a",\u1eb1:"a",\u1eaf:"a",\u1eb5:"a",\u1eb3:"a",\u0227:"a",\u01e1:"a",\u00e4:"a",\u01df:"a",\u1ea3:"a",\u00e5:"a",\u01fb:"a",\u01ce:"a",\u0201:"a",\u0203:"a",\u1ea1:"a",\u1ead:"a",\u1eb7:"a",\u1e01:"a",\u0105:"a",\u2c65:"a",\u0250:"a",\ua733:"aa",\u00e6:"ae",\u01fd:"ae",\u01e3:"ae",\ua735:"ao",\ua737:"au",\ua739:"av",\ua73b:"av",\ua73d:"ay","\u24d1":"b",\uff42:"b",\u1e03:"b",\u1e05:"b",\u1e07:"b",\u0180:"b",\u0183:"b",\u0253:"b","\u24d2":"c",\uff43:"c",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u00e7:"c",\u1e09:"c",\u0188:"c",\u023c:"c",\ua73f:"c",\u2184:"c","\u24d3":"d",\uff44:"d",\u1e0b:"d",\u010f:"d",\u1e0d:"d",\u1e11:"d",\u1e13:"d",\u1e0f:"d",\u0111:"d",\u018c:"d",\u0256:"d",\u0257:"d",\ua77a:"d",\u01f3:"dz",\u01c6:"dz","\u24d4":"e",\uff45:"e",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u1ec1:"e",\u1ebf:"e",\u1ec5:"e",\u1ec3:"e",\u1ebd:"e",\u0113:"e",\u1e15:"e",\u1e17:"e",\u0115:"e",\u0117:"e",\u00eb:"e",\u1ebb:"e",\u011b:"e",\u0205:"e",\u0207:"e",\u1eb9:"e",\u1ec7:"e",\u0229:"e",\u1e1d:"e",\u0119:"e",\u1e19:"e",\u1e1b:"e",\u0247:"e",\u025b:"e",\u01dd:"e","\u24d5":"f",\uff46:"f",\u1e1f:"f",\u0192:"f",\ua77c:"f","\u24d6":"g",\uff47:"g",\u01f5:"g",\u011d:"g",\u1e21:"g",\u011f:"g",\u0121:"g",\u01e7:"g",\u0123:"g",\u01e5:"g",\u0260:"g","\ua7a1":"g",\u1d79:"g",\ua77f:"g","\u24d7":"h",\uff48:"h",\u0125:"h",\u1e23:"h",\u1e27:"h",\u021f:"h",\u1e25:"h",\u1e29:"h",\u1e2b:"h",\u1e96:"h",\u0127:"h",\u2c68:"h",\u2c76:"h",\u0265:"h",\u0195:"hv","\u24d8":"i",\uff49:"i",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u0129:"i",\u012b:"i",\u012d:"i",\u00ef:"i",\u1e2f:"i",\u1ec9:"i",\u01d0:"i",\u0209:"i",\u020b:"i",\u1ecb:"i",\u012f:"i",\u1e2d:"i",\u0268:"i",\u0131:"i","\u24d9":"j",\uff4a:"j",\u0135:"j",\u01f0:"j",\u0249:"j","\u24da":"k",\uff4b:"k",\u1e31:"k",\u01e9:"k",\u1e33:"k",\u0137:"k",\u1e35:"k",\u0199:"k",\u2c6a:"k",\ua741:"k",\ua743:"k",\ua745:"k","\ua7a3":"k","\u24db":"l",\uff4c:"l",\u0140:"l",\u013a:"l",\u013e:"l",\u1e37:"l",\u1e39:"l",\u013c:"l",\u1e3d:"l",\u1e3b:"l",\u017f:"l",\u0142:"l",\u019a:"l",\u026b:"l",\u2c61:"l",\ua749:"l",\ua781:"l",\ua747:"l",\u01c9:"lj","\u24dc":"m",\uff4d:"m",\u1e3f:"m",\u1e41:"m",\u1e43:"m",\u0271:"m",\u026f:"m","\u24dd":"n",\uff4e:"n",\u01f9:"n",\u0144:"n",\u00f1:"n",\u1e45:"n",\u0148:"n",\u1e47:"n",\u0146:"n",\u1e4b:"n",\u1e49:"n",\u019e:"n",\u0272:"n",\u0149:"n","\ua791":"n","\ua7a5":"n",\u01cc:"nj","\u24de":"o",\uff4f:"o",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u1ed3:"o",\u1ed1:"o",\u1ed7:"o",\u1ed5:"o",\u00f5:"o",\u1e4d:"o",\u022d:"o",\u1e4f:"o",\u014d:"o",\u1e51:"o",\u1e53:"o",\u014f:"o",\u022f:"o",\u0231:"o",\u00f6:"o",\u022b:"o",\u1ecf:"o",\u0151:"o",\u01d2:"o",\u020d:"o",\u020f:"o",\u01a1:"o",\u1edd:"o",\u1edb:"o",\u1ee1:"o",\u1edf:"o",\u1ee3:"o",\u1ecd:"o",\u1ed9:"o",\u01eb:"o",\u01ed:"o",\u00f8:"o",\u01ff:"o",\u0254:"o",\ua74b:"o",\ua74d:"o",\u0275:"o",\u01a3:"oi",\u0223:"ou",\ua74f:"oo","\u24df":"p",\uff50:"p",\u1e55:"p",\u1e57:"p",\u01a5:"p",\u1d7d:"p",\ua751:"p",\ua753:"p",\ua755:"p","\u24e0":"q",\uff51:"q",\u024b:"q",\ua757:"q",\ua759:"q","\u24e1":"r",\uff52:"r",\u0155:"r",\u1e59:"r",\u0159:"r",\u0211:"r",\u0213:"r",\u1e5b:"r",\u1e5d:"r",\u0157:"r",\u1e5f:"r",\u024d:"r",\u027d:"r",\ua75b:"r","\ua7a7":"r",\ua783:"r","\u24e2":"s",\uff53:"s",\u00df:"s",\u015b:"s",\u1e65:"s",\u015d:"s",\u1e61:"s",\u0161:"s",\u1e67:"s",\u1e63:"s",\u1e69:"s",\u0219:"s",\u015f:"s",\u023f:"s","\ua7a9":"s",\ua785:"s",\u1e9b:"s","\u24e3":"t",\uff54:"t",\u1e6b:"t",\u1e97:"t",\u0165:"t",\u1e6d:"t",\u021b:"t",\u0163:"t",\u1e71:"t",\u1e6f:"t",\u0167:"t",\u01ad:"t",\u0288:"t",\u2c66:"t",\ua787:"t",\ua729:"tz","\u24e4":"u",\uff55:"u",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u0169:"u",\u1e79:"u",\u016b:"u",\u1e7b:"u",\u016d:"u",\u00fc:"u",\u01dc:"u",\u01d8:"u",\u01d6:"u",\u01da:"u",\u1ee7:"u",\u016f:"u",\u0171:"u",\u01d4:"u",\u0215:"u",\u0217:"u",\u01b0:"u",\u1eeb:"u",\u1ee9:"u",\u1eef:"u",\u1eed:"u",\u1ef1:"u",\u1ee5:"u",\u1e73:"u",\u0173:"u",\u1e77:"u",\u1e75:"u",\u0289:"u","\u24e5":"v",\uff56:"v",\u1e7d:"v",\u1e7f:"v",\u028b:"v",\ua75f:"v",\u028c:"v",\ua761:"vy","\u24e6":"w",\uff57:"w",\u1e81:"w",\u1e83:"w",\u0175:"w",\u1e87:"w",\u1e85:"w",\u1e98:"w",\u1e89:"w",\u2c73:"w","\u24e7":"x",\uff58:"x",\u1e8b:"x",\u1e8d:"x","\u24e8":"y",\uff59:"y",\u1ef3:"y",\u00fd:"y",\u0177:"y",\u1ef9:"y",\u0233:"y",\u1e8f:"y",\u00ff:"y",\u1ef7:"y",\u1e99:"y",\u1ef5:"y",\u01b4:"y",\u024f:"y",\u1eff:"y","\u24e9":"z",\uff5a:"z",\u017a:"z",\u1e91:"z",\u017c:"z",\u017e:"z",\u1e93:"z",\u1e95:"z",\u01b6:"z",\u0225:"z",\u0240:"z",\u2c6c:"z",\ua763:"z"};J=a(document),H=function(){var a=1;return function(){return a++}}(),J.on("mousemove",function(a){L.x=a.pageX,L.y=a.pageY}),E=C(Object,{bind:function(a){var b=this;return function(){a.apply(b,arguments)}},init:function(c){var d,f,g=".select2-results";this.opts=c=this.prepareOpts(c),this.id=c.id,c.element.data("select2")!==b&&null!==c.element.data("select2")&&c.element.data("select2").destroy(),this.container=this.createContainer(),this.containerId="s2id_"+(c.element.attr("id")||"autogen"+H()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=l(function(){return c.element.closest("body")}),s(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",c.element.attr("style")),this.container.css(z(c.containerCss)),this.container.addClass(z(c.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",p),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),s(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(z(c.dropdownCssClass)),this.dropdown.data("select2",this),this.dropdown.on("click",p),this.results=d=this.container.find(g),this.search=f=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",p),j(this.results),this.dropdown.on("mousemove-filtered touchstart touchmove touchend",g,this.bind(this.highlightUnderEvent)),m(80,this.results),this.dropdown.on("scroll-debounced",g,this.bind(this.loadMoreIfNeeded)),a(this.container).on("change",".select2-input",function(a){a.stopPropagation()}),a(this.dropdown).on("change",".select2-input",function(a){a.stopPropagation()}),a.fn.mousewheel&&d.mousewheel(function(a,b,c,e){var f=d.scrollTop();e>0&&0>=f-e?(d.scrollTop(0),p(a)):0>e&&d.get(0).scrollHeight-d.scrollTop()+e<=d.height()&&(d.scrollTop(d.get(0).scrollHeight-d.height()),p(a))}),i(f),f.on("keyup-change input paste",this.bind(this.updateResults)),f.on("focus",function(){f.addClass("select2-focused")}),f.on("blur",function(){f.removeClass("select2-focused")}),this.dropdown.on("mouseup",g,this.bind(function(b){a(b.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(b),this.selectHighlighted(b))})),this.dropdown.on("click mouseup mousedown",function(a){a.stopPropagation()}),a.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==c.maximumInputLength&&this.search.attr("maxlength",c.maximumInputLength);var h=c.element.prop("disabled");h===b&&(h=!1),this.enable(!h);var k=c.element.prop("readonly");k===b&&(k=!1),this.readonly(k),K=K||e(),this.autofocus=c.element.prop("autofocus"),c.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.nextSearchTerm=b},destroy:function(){var a=this.opts.element,c=a.data("select2");this.close(),this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),c!==b&&(c.container.remove(),c.dropdown.remove(),a.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?a.attr({tabindex:this.elementTabIndex}):a.removeAttr("tabindex"),a.show())},optionToData:function(a){return a.is("option")?{id:a.prop("value"),text:a.text(),element:a.get(),css:a.attr("class"),disabled:a.prop("disabled"),locked:f(a.attr("locked"),"locked")||f(a.data("locked"),!0)}:a.is("optgroup")?{text:a.attr("label"),children:[],element:a.get(),css:a.attr("class")}:void 0},prepareOpts:function(c){var d,e,h,i,j=this;if(d=c.element,"select"===d.get(0).tagName.toLowerCase()&&(this.select=e=c.element),e&&a.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in c)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),c=a.extend({},{populateResults:function(d,e,f){var g,h=this.opts.id;g=function(d,e,i){var k,l,m,n,o,p,q,r,s,t;for(d=c.sortResults(d,e,f),k=0,l=d.length;l>k;k+=1)m=d[k],o=m.disabled===!0,n=!o&&h(m)!==b,p=m.children&&m.children.length>0,q=a("<li></li>"),q.addClass("select2-results-dept-"+i),q.addClass("select2-result"),q.addClass(n?"select2-result-selectable":"select2-result-unselectable"),o&&q.addClass("select2-disabled"),p&&q.addClass("select2-result-with-children"),q.addClass(j.opts.formatResultCssClass(m)),r=a(document.createElement("div")),r.addClass("select2-result-label"),t=c.formatResult(m,r,f,j.opts.escapeMarkup),t!==b&&r.html(t),q.append(r),p&&(s=a("<ul></ul>"),s.addClass("select2-result-sub"),g(m.children,s,i+1),q.append(s)),q.data("select2-data",m),e.append(q)},g(e,d,0)}},a.fn.select2.defaults,c),"function"!=typeof c.id&&(h=c.id,c.id=function(a){return a[h]}),a.isArray(c.element.data("select2Tags"))){if("tags"in c)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+c.element.attr("id");c.tags=c.element.data("select2Tags")}if(e?(c.query=this.bind(function(a){var c,e,f,g={results:[],more:!1},h=a.term;f=function(b,c){var d;b.is("option")?a.matcher(h,b.text(),b)&&c.push(j.optionToData(b)):b.is("optgroup")&&(d=j.optionToData(b),b.children().each2(function(a,b){f(b,d.children)}),d.children.length>0&&c.push(d))},c=d.children(),this.getPlaceholder()!==b&&c.length>0&&(e=this.getPlaceholderOption(),e&&(c=c.not(e))),c.each2(function(a,b){f(b,g.results)}),a.callback(g)}),c.id=function(a){return a.id},c.formatResultCssClass=function(a){return a.css}):"query"in c||("ajax"in c?(i=c.element.data("ajax-url"),i&&i.length>0&&(c.ajax.url=i),c.query=v.call(c.element,c.ajax)):"data"in c?c.query=w(c.data):"tags"in c&&(c.query=x(c.tags),c.createSearchChoice===b&&(c.createSearchChoice=function(b){return{id:a.trim(b),text:a.trim(b)}}),c.initSelection===b&&(c.initSelection=function(b,d){var e=[];a(g(b.val(),c.separator)).each(function(){var b={id:this,text:this},d=c.tags;a.isFunction(d)&&(d=d()),a(d).each(function(){return f(this.id,b.id)?(b=this,!1):void 0}),e.push(b)}),d(e)}))),"function"!=typeof c.query)throw"query function not defined for Select2 "+c.element.attr("id");return c},monitorSource:function(){var a,c,d=this.opts.element;d.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),a=this.bind(function(){var a=d.prop("disabled");a===b&&(a=!1),this.enable(!a);var c=d.prop("readonly");c===b&&(c=!1),this.readonly(c),s(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(z(this.opts.containerCssClass)),s(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(z(this.opts.dropdownCssClass))}),d.on("propertychange.select2",a),this.mutationCallback===b&&(this.mutationCallback=function(b){b.forEach(a)}),c=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,c!==b&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new c(this.mutationCallback),this.propertyObserver.observe(d.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(b){var c=a.Event("select2-selecting",{val:this.id(b),object:b});return this.opts.element.trigger(c),!c.isDefaultPrevented()},triggerChange:function(b){b=b||{},b=a.extend({},b,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(b),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var a=this._enabled&&!this._readonly,b=!a;return a===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",b),this.close(),this.enabledInterface=a,!0)},enable:function(a){a===b&&(a=!0),this._enabled!==a&&(this._enabled=a,this.opts.element.prop("disabled",!a),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(a){return a===b&&(a=!1),this._readonly===a?!1:(this._readonly=a,this.opts.element.prop("readonly",a),this.enableInterface(),!0)},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var b,c,d,e,f,g=this.dropdown,h=this.container.offset(),i=this.container.outerHeight(!1),j=this.container.outerWidth(!1),k=g.outerHeight(!1),l=a(window),m=l.width(),n=l.height(),o=l.scrollLeft()+m,p=l.scrollTop()+n,q=h.top+i,r=h.left,s=p>=q+k,t=h.top-k>=this.body().scrollTop(),u=g.outerWidth(!1),v=o>=r+u,w=g.hasClass("select2-drop-above");w?(c=!0,!t&&s&&(d=!0,c=!1)):(c=!1,!s&&t&&(d=!0,c=!0)),d&&(g.hide(),h=this.container.offset(),i=this.container.outerHeight(!1),j=this.container.outerWidth(!1),k=g.outerHeight(!1),o=l.scrollLeft()+m,p=l.scrollTop()+n,q=h.top+i,r=h.left,u=g.outerWidth(!1),v=o>=r+u,g.show()),this.opts.dropdownAutoWidth?(f=a(".select2-results",g)[0],g.addClass("select2-drop-auto-width"),g.css("width",""),u=g.outerWidth(!1)+(f.scrollHeight===f.clientHeight?0:K.width),u>j?j=u:u=j,v=o>=r+u):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body().css("position")&&(b=this.body().offset(),q-=b.top,r-=b.left),v||(r=h.left+j-u),e={left:r,width:j},c?(e.bottom=n-h.top,e.top="auto",this.container.addClass("select2-drop-above"),g.addClass("select2-drop-above")):(e.top=q,e.bottom="auto",this.container.removeClass("select2-drop-above"),g.removeClass("select2-drop-above")),e=a.extend(e,z(this.opts.dropdownCss)),g.css(e)},shouldOpen:function(){var b;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(b=a.Event("select2-opening"),this.opts.element.trigger(b),!b.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),!0):!1},opening:function(){var b,c=this.containerId,d="scroll."+c,e="resize."+c,f="orientationchange."+c;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),b=a("#select2-drop-mask"),0==b.length&&(b=a(document.createElement("div")),b.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),b.hide(),b.appendTo(this.body()),b.on("mousedown touchstart click",function(b){var c,d=a("#select2-drop");d.length>0&&(c=d.data("select2"),c.opts.selectOnBlur&&c.selectHighlighted({noFocus:!0}),c.close({focus:!0}),b.preventDefault(),b.stopPropagation())})),this.dropdown.prev()[0]!==b[0]&&this.dropdown.before(b),a("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),b.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var g=this;this.container.parents().add(window).each(function(){a(this).on(e+" "+d+" "+f,function(){g.positionDropdown()})})},close:function(){if(this.opened()){var b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.parents().add(window).each(function(){a(this).off(c).off(d).off(e)}),this.clearDropdownAlignmentPreference(),a("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(a.Event("select2-close"))}},externalSearch:function(a){this.open(),this.search.val(a),this.updateResults(!1) },clearSearch:function(){},getMaximumSelectionSize:function(){return z(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var b,c,d,e,f,g,h,i=this.results;if(c=this.highlight(),!(0>c)){if(0==c)return i.scrollTop(0),void 0;b=this.findHighlightableChoices().find(".select2-result-label"),d=a(b[c]),e=d.offset().top+d.outerHeight(!0),c===b.length-1&&(h=i.find("li.select2-more-results"),h.length>0&&(e=h.offset().top+h.outerHeight(!0))),f=i.offset().top+i.outerHeight(!0),e>f&&i.scrollTop(i.scrollTop()+(e-f)),g=d.offset().top-i.offset().top,0>g&&"none"!=d.css("display")&&i.scrollTop(i.scrollTop()+g)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled, .select2-selected)")},moveHighlight:function(b){for(var c=this.findHighlightableChoices(),d=this.highlight();d>-1&&d<c.length;){d+=b;var e=a(c[d]);if(e.hasClass("select2-result-selectable")&&!e.hasClass("select2-disabled")&&!e.hasClass("select2-selected")){this.highlight(d);break}}},highlight:function(b){var c,e,f=this.findHighlightableChoices();return 0===arguments.length?d(f.filter(".select2-highlighted")[0],f.get()):(b>=f.length&&(b=f.length-1),0>b&&(b=0),this.removeHighlight(),c=a(f[b]),c.addClass("select2-highlighted"),this.ensureHighlightVisible(),e=c.data("select2-data"),e&&this.opts.element.trigger({type:"select2-highlight",val:this.id(e),choice:e}),void 0)},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(b){var c=a(b.target).closest(".select2-result-selectable");if(c.length>0&&!c.is(".select2-highlighted")){var d=this.findHighlightableChoices();this.highlight(d.index(c))}else 0==c.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var a,b=this.results,c=b.find("li.select2-more-results"),d=this.resultsPage+1,e=this,f=this.search.val(),g=this.context;0!==c.length&&(a=c.offset().top-b.offset().top-b.height(),a<=this.opts.loadMorePadding&&(c.addClass("select2-active"),this.opts.query({element:this.opts.element,term:f,page:d,context:g,matcher:this.opts.matcher,callback:this.bind(function(a){e.opened()&&(e.opts.populateResults.call(this,b,a.results,{term:f,page:d,context:g}),e.postprocessResults(a,!1,!1),a.more===!0?(c.detach().appendTo(b).text(e.opts.formatLoadMore(d+1)),window.setTimeout(function(){e.loadMoreIfNeeded()},10)):c.remove(),e.positionDropdown(),e.resultsPage=d,e.context=a.context,this.opts.element.trigger({type:"select2-loaded",items:a}))})})))},tokenize:function(){},updateResults:function(c){function d(){j.removeClass("select2-active"),m.positionDropdown()}function e(a){k.html(a),d()}var g,h,i,j=this.search,k=this.results,l=this.opts,m=this,n=j.val(),o=a.data(this.container,"select2-last-term");if((c===!0||!o||!f(n,o))&&(a.data(this.container,"select2-last-term",n),c===!0||this.showSearchInput!==!1&&this.opened())){i=++this.queryCount;var p=this.getMaximumSelectionSize();if(p>=1&&(g=this.data(),a.isArray(g)&&g.length>=p&&y(l.formatSelectionTooBig,"formatSelectionTooBig")))return e("<li class='select2-selection-limit'>"+l.formatSelectionTooBig(p)+"</li>"),void 0;if(j.val().length<l.minimumInputLength)return y(l.formatInputTooShort,"formatInputTooShort")?e("<li class='select2-no-results'>"+l.formatInputTooShort(j.val(),l.minimumInputLength)+"</li>"):e(""),c&&this.showSearch&&this.showSearch(!0),void 0;if(l.maximumInputLength&&j.val().length>l.maximumInputLength)return y(l.formatInputTooLong,"formatInputTooLong")?e("<li class='select2-no-results'>"+l.formatInputTooLong(j.val(),l.maximumInputLength)+"</li>"):e(""),void 0;l.formatSearching&&0===this.findHighlightableChoices().length&&e("<li class='select2-searching'>"+l.formatSearching()+"</li>"),j.addClass("select2-active"),this.removeHighlight(),h=this.tokenize(),h!=b&&null!=h&&j.val(h),this.resultsPage=1,l.query({element:l.element,term:j.val(),page:this.resultsPage,context:null,matcher:l.matcher,callback:this.bind(function(g){var h;if(i==this.queryCount){if(!this.opened())return this.search.removeClass("select2-active"),void 0;if(this.context=g.context===b?null:g.context,this.opts.createSearchChoice&&""!==j.val()&&(h=this.opts.createSearchChoice.call(m,j.val(),g.results),h!==b&&null!==h&&m.id(h)!==b&&null!==m.id(h)&&0===a(g.results).filter(function(){return f(m.id(this),m.id(h))}).length&&g.results.unshift(h)),0===g.results.length&&y(l.formatNoMatches,"formatNoMatches"))return e("<li class='select2-no-results'>"+l.formatNoMatches(j.val())+"</li>"),void 0;k.empty(),m.opts.populateResults.call(this,k,g.results,{term:j.val(),page:this.resultsPage,context:null}),g.more===!0&&y(l.formatLoadMore,"formatLoadMore")&&(k.append("<li class='select2-more-results'>"+m.opts.escapeMarkup(l.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){m.loadMoreIfNeeded()},10)),this.postprocessResults(g,c),d(),this.opts.element.trigger({type:"select2-loaded",items:g})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){n(this.search)},selectHighlighted:function(a){var b=this.highlight(),c=this.results.find(".select2-highlighted"),d=c.closest(".select2-result").data("select2-data");d?(this.highlight(b),this.onSelect(d,a)):a&&a.noFocus&&this.close()},getPlaceholder:function(){var a;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((a=this.getPlaceholderOption())!==b?a.text():b)},getPlaceholderOption:function(){if(this.select){var a=this.select.children("option").first();if(this.opts.placeholderOption!==b)return"first"===this.opts.placeholderOption&&a||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===a.text()&&""===a.val())return a}},initContainerWidth:function(){function c(){var c,d,e,f,g,h;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(c=this.opts.element.attr("style"),c!==b)for(d=c.split(";"),f=0,g=d.length;g>f;f+=1)if(h=d[f].replace(/\s/g,""),e=h.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==e&&e.length>=1)return e[1];return"resolve"===this.opts.width?(c=this.opts.element.css("width"),c.indexOf("%")>0?c:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return a.isFunction(this.opts.width)?this.opts.width():this.opts.width}var d=c.call(this);null!==d&&this.container.css("width",d)}}),F=C(E,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span class='select2-chosen'>&nbsp;</span><abbr class='select2-search-choice-close'></abbr>"," <span class='select2-arrow'><b></b></span>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return b},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var c,d,e;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.search.focus(),c=this.search.get(0),c.createTextRange?(d=c.createTextRange(),d.collapse(!1),d.select()):c.setSelectionRange&&(e=this.search.val().length,c.setSelectionRange(e,e)),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(a.Event("select2-open"))},close:function(a){this.opened()&&(this.parent.close.apply(this,arguments),a=a||{focus:!0},this.focusser.removeAttr("disabled"),a.focus&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},destroy:function(){a("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments)},initContainer:function(){var b,c=this.container,d=this.dropdown;this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=b=c.find(".select2-choice"),this.focusser=c.find(".select2-focusser"),this.focusser.attr("id","s2id_autogen"+H()),a("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.focusser.attr("id")),this.focusser.attr("tabindex",this.elementTabIndex),this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){if(a.which===D.PAGE_UP||a.which===D.PAGE_DOWN)return p(a),void 0;switch(a.which){case D.UP:case D.DOWN:return this.moveHighlight(a.which===D.UP?-1:1),p(a),void 0;case D.ENTER:return this.selectHighlighted(),p(a),void 0;case D.TAB:return this.selectHighlighted({noFocus:!0}),void 0;case D.ESC:return this.cancel(a),p(a),void 0}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body().get(0)&&window.setTimeout(this.bind(function(){this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()&&a.which!==D.TAB&&!D.isControl(a)&&!D.isFunctionKey(a)&&a.which!==D.ESC){if(this.opts.openOnEnter===!1&&a.which===D.ENTER)return p(a),void 0;if(a.which==D.DOWN||a.which==D.UP||a.which==D.ENTER&&this.opts.openOnEnter){if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return;return this.open(),p(a),void 0}return a.which==D.DELETE||a.which==D.BACKSPACE?(this.opts.allowClear&&this.clear(),p(a),void 0):void 0}})),i(this.focusser),this.focusser.on("keyup-change input",this.bind(function(a){if(this.opts.minimumResultsForSearch>=0){if(a.stopPropagation(),this.opened())return;this.open()}})),b.on("mousedown","abbr",this.bind(function(a){this.isInterfaceEnabled()&&(this.clear(),q(a),this.close(),this.selection.focus())})),b.on("mousedown",this.bind(function(b){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),p(b)})),d.on("mousedown",this.bind(function(){this.search.focus()})),b.on("focus",this.bind(function(a){p(a)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(a.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(b){var c=this.selection.data("select2-data");if(c){var d=a.Event("select2-clearing");if(this.opts.element.trigger(d),d.isDefaultPrevented())return;var e=this.getPlaceholderOption();this.opts.element.val(e?e.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),b!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(c),choice:c}),this.triggerChange({removed:c}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var a=this;this.opts.initSelection.call(null,this.opts.element,function(c){c!==b&&null!==c&&(a.updateSelection(c),a.close(),a.setPlaceholder())})}},isPlaceholderOptionSelected:function(){var a;return this.getPlaceholder()?(a=this.getPlaceholderOption())!==b&&a.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===b||null===this.opts.element.val():!1},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=a.find("option").filter(function(){return this.selected});b(c.optionToData(d))}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=c.val(),g=null;b.query({matcher:function(a,c,d){var h=f(e,b.id(d));return h&&(g=d),h},callback:a.isFunction(d)?function(){d(g)}:a.noop})}),b},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===b?b:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var a=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&a!==b){if(this.select&&this.getPlaceholderOption()===b)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(a)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(a,b,c){var d=0,e=this;if(this.findHighlightableChoices().each2(function(a,b){return f(e.id(b.data("select2-data")),e.opts.element.val())?(d=a,!1):void 0}),c!==!1&&(b===!0&&d>=0?this.highlight(d):this.highlight(0)),b===!0){var g=this.opts.minimumResultsForSearch;g>=0&&this.showSearch(A(a.results)>=g)}},showSearch:function(b){this.showSearchInput!==b&&(this.showSearchInput=b,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!b),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!b),a(this.dropdown,this.container).toggleClass("select2-with-searchbox",b))},onSelect:function(a,b){if(this.triggerSelect(a)){var c=this.opts.element.val(),d=this.data();this.opts.element.val(this.id(a)),this.updateSelection(a),this.opts.element.trigger({type:"select2-selected",val:this.id(a),choice:a}),this.nextSearchTerm=this.opts.nextSearchTerm(a,this.search.val()),this.close(),b&&b.noFocus||this.focusser.focus(),f(c,this.id(a))||this.triggerChange({added:a,removed:d})}},updateSelection:function(a){var c,d,e=this.selection.find(".select2-chosen");this.selection.data("select2-data",a),e.empty(),null!==a&&(c=this.opts.formatSelection(a,e,this.opts.escapeMarkup)),c!==b&&e.append(c),d=this.opts.formatSelectionCssClass(a,e),d!==b&&e.addClass(d),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.container.addClass("select2-allowclear")},val:function(){var a,c=!1,d=null,e=this,f=this.data();if(0===arguments.length)return this.opts.element.val();if(a=arguments[0],arguments.length>1&&(c=arguments[1]),this.select)this.select.val(a).find("option").filter(function(){return this.selected}).each2(function(a,b){return d=e.optionToData(b),!1}),this.updateSelection(d),this.setPlaceholder(),c&&this.triggerChange({added:d,removed:f});else{if(!a&&0!==a)return this.clear(c),void 0;if(this.opts.initSelection===b)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(a),this.opts.initSelection(this.opts.element,function(a){e.opts.element.val(a?e.id(a):""),e.updateSelection(a),e.setPlaceholder(),c&&e.triggerChange({added:a,removed:f})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(a){var c,d=!1;return 0===arguments.length?(c=this.selection.data("select2-data"),c==b&&(c=null),c):(arguments.length>1&&(d=arguments[1]),a?(c=this.data(),this.opts.element.val(a?this.id(a):""),this.updateSelection(a),d&&this.triggerChange({added:a,removed:c})):this.clear(d),void 0)}}),G=C(E,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return b},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=[];a.find("option").filter(function(){return this.selected}).each2(function(a,b){d.push(c.optionToData(b))}),b(d)}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=g(c.val(),b.separator),h=[];b.query({matcher:function(c,d,g){var i=a.grep(e,function(a){return f(a,b.id(g))}).length;return i&&h.push(g),i},callback:a.isFunction(d)?function(){for(var a=[],c=0;c<e.length;c++)for(var g=e[c],i=0;i<h.length;i++){var j=h[i];if(f(g,b.id(j))){a.push(j),h.splice(i,1);break}}d(a)}:a.noop})}),b},selectChoice:function(a){var b=this.container.find(".select2-search-choice-focus");b.length&&a&&a[0]==b[0]||(b.length&&this.opts.element.trigger("choice-deselected",b),b.removeClass("select2-search-choice-focus"),a&&a.length&&(this.close(),a.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",a)))},destroy:function(){a("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments)},initContainer:function(){var b,c=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=b=this.container.find(c);var d=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(){d.search[0].focus(),d.selectChoice(a(this))}),this.search.attr("id","s2id_autogen"+H()),a("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){++this.keydowns;var c=b.find(".select2-search-choice-focus"),d=c.prev(".select2-search-choice:not(.select2-locked)"),e=c.next(".select2-search-choice:not(.select2-locked)"),f=o(this.search);if(c.length&&(a.which==D.LEFT||a.which==D.RIGHT||a.which==D.BACKSPACE||a.which==D.DELETE||a.which==D.ENTER)){var g=c;return a.which==D.LEFT&&d.length?g=d:a.which==D.RIGHT?g=e.length?e:null:a.which===D.BACKSPACE?(this.unselect(c.first()),this.search.width(10),g=d.length?d:e):a.which==D.DELETE?(this.unselect(c.first()),this.search.width(10),g=e.length?e:null):a.which==D.ENTER&&(g=null),this.selectChoice(g),p(a),g&&g.length||this.open(),void 0}if((a.which===D.BACKSPACE&&1==this.keydowns||a.which==D.LEFT)&&0==f.offset&&!f.length)return this.selectChoice(b.find(".select2-search-choice:not(.select2-locked)").last()),p(a),void 0;if(this.selectChoice(null),this.opened())switch(a.which){case D.UP:case D.DOWN:return this.moveHighlight(a.which===D.UP?-1:1),p(a),void 0;case D.ENTER:return this.selectHighlighted(),p(a),void 0;case D.TAB:return this.selectHighlighted({noFocus:!0}),this.close(),void 0;case D.ESC:return this.cancel(a),p(a),void 0}if(a.which!==D.TAB&&!D.isControl(a)&&!D.isFunctionKey(a)&&a.which!==D.BACKSPACE&&a.which!==D.ESC){if(a.which===D.ENTER){if(this.opts.openOnEnter===!1)return;if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return}this.open(),(a.which===D.PAGE_UP||a.which===D.PAGE_DOWN)&&p(a),a.which===D.ENTER&&p(a)}}})),this.search.on("keyup",this.bind(function(){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(b){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),b.stopImmediatePropagation(),this.opts.element.trigger(a.Event("select2-blur"))})),this.container.on("click",c,this.bind(function(b){this.isInterfaceEnabled()&&(a(b.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.open(),this.focusSearch(),b.preventDefault()))})),this.container.on("focus",c,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var a=this;this.opts.initSelection.call(null,this.opts.element,function(c){c!==b&&null!==c&&(a.updateSelection(c),a.close(),a.clearSearch())})}},clearSearch:function(){var a=this.getPlaceholder(),c=this.getMaxSearchWidth();a!==b&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(a).addClass("select2-default"),this.search.width(c>0?c:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),this.updateResults(!0),this.search.focus(),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(b){var c=[],e=[],f=this;a(b).each(function(){d(f.id(this),c)<0&&(c.push(f.id(this)),e.push(this))}),b=e,this.selection.find(".select2-search-choice").remove(),a(b).each(function(){f.addSelectedChoice(this)}),f.postprocessResults()},tokenize:function(){var a=this.search.val();a=this.opts.tokenizer.call(this,a,this.data(),this.bind(this.onSelect),this.opts),null!=a&&a!=b&&(this.search.val(a),a.length>0&&this.open())},onSelect:function(a,b){this.triggerSelect(a)&&(this.addSelectedChoice(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(a,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:a}),b&&b.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(c){var d,e,f=!c.locked,g=a("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),h=a("<li class='select2-search-choice select2-locked'><div></div></li>"),i=f?g:h,j=this.id(c),k=this.getVal();d=this.opts.formatSelection(c,i.find("div"),this.opts.escapeMarkup),d!=b&&i.find("div").replaceWith("<div>"+d+"</div>"),e=this.opts.formatSelectionCssClass(c,i.find("div")),e!=b&&i.addClass(e),f&&i.find(".select2-search-choice-close").on("mousedown",p).on("click dblclick",this.bind(function(b){this.isInterfaceEnabled()&&(a(b.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(a(b.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),p(b))})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),i.data("select2-data",c),i.insertBefore(this.searchContainer),k.push(j),this.setVal(k)},unselect:function(b){var c,e,f=this.getVal();if(b=b.closest(".select2-search-choice"),0===b.length)throw"Invalid argument: "+b+". Must be .select2-search-choice";if(c=b.data("select2-data")){for(;(e=d(this.id(c),f))>=0;)f.splice(e,1),this.setVal(f),this.select&&this.postprocessResults();var g=a.Event("select2-removing");g.val=this.id(c),g.choice=c,this.opts.element.trigger(g),g.isDefaultPrevented()||(this.opts.element.trigger({type:"select2-removed",val:this.id(c),choice:c}),this.triggerChange({removed:c}))}},postprocessResults:function(a,b,c){var e=this.getVal(),f=this.results.find(".select2-result"),g=this.results.find(".select2-result-with-children"),h=this;f.each2(function(a,b){var c=h.id(b.data("select2-data"));d(c,e)>=0&&(b.addClass("select2-selected"),b.find(".select2-result-selectable").addClass("select2-selected"))}),g.each2(function(a,b){b.is(".select2-result-selectable")||0!==b.find(".select2-result-selectable:not(.select2-selected)").length||b.addClass("select2-selected")}),-1==this.highlight()&&c!==!1&&h.highlight(0),!this.opts.createSearchChoice&&!f.filter(".select2-result:not(.select2-selected)").length>0&&(!a||a&&!a.more&&0===this.results.find(".select2-no-results").length)&&y(h.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+h.opts.formatNoMatches(h.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-h(this.search)},resizeSearch:function(){var a,b,c,d,e,f=h(this.search);a=r(this.search)+10,b=this.search.offset().left,c=this.selection.width(),d=this.selection.offset().left,e=c-(b-d)-f,a>e&&(e=c-f),40>e&&(e=c-f),0>=e&&(e=a),this.search.width(Math.floor(e))},getVal:function(){var a;return this.select?(a=this.select.val(),null===a?[]:a):(a=this.opts.element.val(),g(a,this.opts.separator))},setVal:function(b){var c;this.select?this.select.val(b):(c=[],a(b).each(function(){d(this,c)<0&&c.push(this)}),this.opts.element.val(0===c.length?"":c.join(this.opts.separator)))},buildChangeDetails:function(a,b){for(var b=b.slice(0),a=a.slice(0),c=0;c<b.length;c++)for(var d=0;d<a.length;d++)f(this.opts.id(b[c]),this.opts.id(a[d]))&&(b.splice(c,1),c--,a.splice(d,1),d--);return{added:b,removed:a}},val:function(c,d){var e,f=this;if(0===arguments.length)return this.getVal();if(e=this.data(),e.length||(e=[]),!c&&0!==c)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),d&&this.triggerChange({added:this.data(),removed:e}),void 0;if(this.setVal(c),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),d&&this.triggerChange(this.buildChangeDetails(e,this.data()));else{if(this.opts.initSelection===b)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(b){var c=a.map(b,f.id);f.setVal(c),f.updateSelection(b),f.clearSearch(),d&&f.triggerChange(f.buildChangeDetails(e,f.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var b=[],c=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){b.push(c.opts.id(a(this).data("select2-data")))}),this.setVal(b),this.triggerChange()},data:function(b,c){var d,e,f=this;return 0===arguments.length?this.selection.find(".select2-search-choice").map(function(){return a(this).data("select2-data")}).get():(e=this.data(),b||(b=[]),d=a.map(b,function(a){return f.opts.id(a)}),this.setVal(d),this.updateSelection(b),this.clearSearch(),c&&this.triggerChange(this.buildChangeDetails(e,this.data())),void 0)}}),a.fn.select2=function(){var c,e,f,g,h,i=Array.prototype.slice.call(arguments,0),j=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],k=["opened","isFocused","container","dropdown"],l=["val","data"],m={search:"externalSearch"};return this.each(function(){if(0===i.length||"object"==typeof i[0])c=0===i.length?{}:a.extend({},i[0]),c.element=a(this),"select"===c.element.get(0).tagName.toLowerCase()?h=c.element.prop("multiple"):(h=c.multiple||!1,"tags"in c&&(c.multiple=h=!0)),e=h?new G:new F,e.init(c);else{if("string"!=typeof i[0])throw"Invalid arguments to select2 plugin: "+i;if(d(i[0],j)<0)throw"Unknown method: "+i[0];if(g=b,e=a(this).data("select2"),e===b)return;if(f=i[0],"container"===f?g=e.container:"dropdown"===f?g=e.dropdown:(m[f]&&(f=m[f]),g=e[f].apply(e,i.slice(1))),d(i[0],k)>=0||d(i[0],l)&&1==i.length)return!1}}),g===b?this:g},a.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(a,b,c,d){var e=[];return t(a.text,c.term,e,d),e.join("")},formatSelection:function(a,c,d){return a?d(a.text):b},sortResults:function(a){return a},formatResultCssClass:function(){return b},formatSelectionCssClass:function(){return b},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(a,b){var c=b-a.length;return"Please enter "+c+" more character"+(1==c?"":"s")},formatInputTooLong:function(a,b){var c=a.length-b;return"Please delete "+c+" character"+(1==c?"":"s")},formatSelectionTooBig:function(a){return"You can only select "+a+" item"+(1==a?"":"s")},formatLoadMore:function(){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(a){return a.id},matcher:function(a,b){return c(""+b).toUpperCase().indexOf(c(""+a).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:B,escapeMarkup:u,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(a){return a},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return b}},a.fn.select2.ajaxDefaults={transport:a.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:v,local:w,tags:x},util:{debounce:k,markMatch:t,escapeMarkup:u,stripDiacritics:c},"class":{"abstract":E,single:F,multi:G}}}}(jQuery),function(a){"use strict";a.fn.tooltip=function(b){var c=a.extend({},a.fn.tooltip.defaults,b),d=this.tipsy(c);if(c.hideOnClick&&("hover"==c.trigger||!c.trigger&&"hover"==this.tipsy.defaults.trigger)){var e=function(){a(this).tipsy("hide")};c.live?a(this.context).on("click.tipsy",this.selector,e):this.bind("click.tipsy",e)}return d},a.fn.tooltip.defaults={opacity:1,offset:1,delayIn:500,hoverable:!0,hideOnClick:!0}}(AJS.$),function(){function a(a){var c=b;a.find("th").each(function(a,b){var d=AJS.$(b);c.headers[a]={},d.hasClass("aui-table-column-unsortable")?c.headers[a].sorter=!1:(d.attr("tabindex","0"),d.wrapInner("<span class='aui-table-header-content'/>"),d.hasClass("aui-table-column-issue-key")&&(c.headers[a].sorter="issue-key"))}),a.tablesorter(c)}var b={sortMultiSortKey:"",headers:{},debug:!1};AJS.tablessortable={setup:function(){AJS.$.tablesorter.addParser({id:"issue-key",is:function(){return!1},format:function(a){var b=a.split("-"),c=b[0],d=b[1],e="..........",f="000000",g=(c+e).slice(0,e.length); return g+=(f+d).slice(-f.length)},type:"text"}),AJS.$(".aui-table-sortable").each(function(){a(AJS.$(this))})},setTableSortable:function(b){a(b)}},AJS.$(AJS.tablessortable.setup)}(),function(a){var b=a(document),c=function(c){var d={};return d.$trigger=a(c.currentTarget),d.$content=b.find("#"+d.$trigger.attr("aria-controls")),d.triggerIsParent=0!==d.$content.parent().filter(d.$trigger).length,d.$shortContent=d.triggerIsParent?d.$trigger.find(".aui-expander-short-content"):null,d.height=d.$content.css("min-height"),d.isCollapsible=d.$trigger.data("collapsible")!==!1,d.replaceText=d.$trigger.attr("data-replace-text"),d.replaceSelector=d.$trigger.data("replace-selector"),d},d=function(a){if(a.replaceText){var b=a.replaceSelector?a.$trigger.find(a.replaceSelector):a.$trigger;a.$trigger.attr("data-replace-text",b.text()),b.text(a.replaceText)}},e={"aui-expander-invoke":function(c){var d=a(c.currentTarget),e=b.find("#"+d.attr("aria-controls")),f=d.data("collapsible")!==!1;"true"==e.attr("aria-expanded")&&f?d.trigger("aui-expander-collapse"):d.trigger("aui-expander-expand")},"aui-expander-expand":function(a){var b=c(a);b.$content.attr("aria-expanded","true"),"0px"!=b.height?b.$content.css("height","auto"):b.$content.attr("aria-hidden","false"),d(b),b.triggerIsParent&&b.$shortContent.hide(),b.$trigger.trigger("aui-expander-expanded")},"aui-expander-collapse":function(a){{var b=c(a);parseInt(b.$content.css("line-height"),10),b.$content.children().first().height()}"0px"!=b.height?b.$content.css("height",0):b.$content.attr("aria-hidden","true"),d(b),b.$content.attr("aria-expanded","false"),b.triggerIsParent&&b.$shortContent.show(),b.$trigger.trigger("aui-expander-collapsed")},"click.aui-expander":function(b){var c=a(b.currentTarget);c.trigger("aui-expander-invoke",b.currentTarget)}};b.on(e,".aui-expander-trigger")}(jQuery),function(){function a(a,b,c){window.setTimeout(function(){a.css("width",100*c+"%"),b.attr("data-value",c)},0)}AJS.progressBars={update:function(b,c){var d=AJS.$(b).first(),e=d.children(".aui-progress-indicator-value"),f=e.attr("data-value")||0,g="aui-progress-indicator-after-update",h="aui-progress-indicator-before-update",i="transitionend webkitTransitionEnd",j=!d.attr("data-value");if(j&&e.detach().css("width",0).appendTo(d),"number"==typeof c&&1>=c&&c>=0){d.trigger(h,[f,c]);var k=document.body||document.documentElement,l=k.style;"string"==typeof l.transition||"string"==typeof l.WebkitTransition?(e.one(i,function(){d.trigger(g,[f,c])}),a(e,d,c)):(a(e,d,c),d.trigger(g,[f,c]))}return d},setIndeterminate:function(a){var b=AJS.$(a).first(),c=b.children(".aui-progress-indicator-value");b.removeAttr("data-value"),c.css("width","100%")}}}(),function(a){var b=a.fn.select2,c="aui-select2-container",d="aui-select2-drop aui-dropdown2 aui-style-default",e="aui-has-avatar";a.fn.auiSelect2=function(f){var g;if(a.isPlainObject(f)){var h=a.extend({},f),i=h.hasAvatar?" "+e:"";h.containerCssClass=c+i+(h.containerCssClass?" "+h.containerCssClass:""),h.dropdownCssClass=d+i+(h.dropdownCssClass?" "+h.dropdownCssClass:""),g=Array.prototype.slice.call(arguments,1),g.unshift(h)}else g=arguments.length?arguments:[{containerCssClass:c,dropdownCssClass:d}];return b.apply(this,g)}}(AJS.$);var goog=goog||{};goog.inherits=function(a,b){function c(){}c.prototype=b.prototype,a.superClass_=b.prototype,a.prototype=new c,a.prototype.constructor=a},goog.userAgent||(goog.userAgent=function(){var a="";"undefined"!=typeof navigator&&navigator&&"string"==typeof navigator.userAgent&&(a=navigator.userAgent);var b=0==a.indexOf("Opera");return{HAS_JSCRIPT:"string"in this,IS_OPERA:b,IS_IE:!b&&-1!=a.indexOf("MSIE"),IS_WEBKIT:!b&&-1!=a.indexOf("WebKit")}}()),goog.asserts||(goog.asserts={fail:function(){}}),goog.dom||(goog.dom={},goog.dom.DomHelper=function(a){this.document_=a||document},goog.dom.DomHelper.prototype.getDocument=function(){return this.document_},goog.dom.DomHelper.prototype.createElement=function(a){return this.document_.createElement(a)},goog.dom.DomHelper.prototype.createDocumentFragment=function(){return this.document_.createDocumentFragment()}),goog.format||(goog.format={insertWordBreaks:function(a,b){a=String(a);for(var c=[],d=0,e=!1,f=!1,g=0,h=0,i=0,j=a.length;j>i;++i){var k=a.charCodeAt(i);if(g>=b&&32!=k&&(c[d++]=a.substring(h,i),h=i,c[d++]=goog.format.WORD_BREAK,g=0),e)62==k&&(e=!1);else if(f)switch(k){case 59:f=!1,++g;break;case 60:f=!1,e=!0;break;case 32:f=!1,g=0}else switch(k){case 60:e=!0;break;case 38:f=!0;break;case 32:g=0;break;default:++g}}return c[d++]=a.substring(h),c.join("")},WORD_BREAK:goog.userAgent.IS_WEBKIT?"<wbr></wbr>":goog.userAgent.IS_OPERA?"&shy;":"<wbr>"}),goog.i18n||(goog.i18n={bidi:{detectRtlDirectionality:function(a,b){return a=soyshim.$$bidiStripHtmlIfNecessary_(a,b),soyshim.$$bidiRtlWordRatio_(a)>soyshim.$$bidiRtlDetectionThreshold_}}}),goog.i18n.bidi.Dir={RTL:-1,UNKNOWN:0,LTR:1},goog.i18n.bidi.toDir=function(a){return"number"==typeof a?a>0?goog.i18n.bidi.Dir.LTR:0>a?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.UNKNOWN:a?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR},goog.i18n.BidiFormatter=function(a){this.dir_=goog.i18n.bidi.toDir(a)},goog.i18n.BidiFormatter.prototype.dirAttr=function(a,b){var c=soy.$$bidiTextDir(a,b);return c&&c!=this.dir_?0>c?"dir=rtl":"dir=ltr":""},goog.i18n.BidiFormatter.prototype.endEdge=function(){return this.dir_<0?"left":"right"},goog.i18n.BidiFormatter.prototype.mark=function(){return this.dir_>0?"\u200e":this.dir_<0?"\u200f":""},goog.i18n.BidiFormatter.prototype.markAfter=function(a,b){var c=soy.$$bidiTextDir(a,b);return soyshim.$$bidiMarkAfterKnownDir_(this.dir_,c,a,b)},goog.i18n.BidiFormatter.prototype.spanWrap=function(a){a=String(a);var b=soy.$$bidiTextDir(a,!0),c=soyshim.$$bidiMarkAfterKnownDir_(this.dir_,b,a,!0);return b>0&&this.dir_<=0?a="<span dir=ltr>"+a+"</span>":0>b&&this.dir_>=0&&(a="<span dir=rtl>"+a+"</span>"),a+c},goog.i18n.BidiFormatter.prototype.startEdge=function(){return this.dir_<0?"right":"left"},goog.i18n.BidiFormatter.prototype.unicodeWrap=function(a){a=String(a);var b=soy.$$bidiTextDir(a,!0),c=soyshim.$$bidiMarkAfterKnownDir_(this.dir_,b,a,!0);return b>0&&this.dir_<=0?a="\u202a"+a+"\u202c":0>b&&this.dir_>=0&&(a="\u202b"+a+"\u202c"),a+c},goog.string={newLineToBr:function(a,b){return a=String(a),goog.string.NEWLINE_TO_BR_RE_.test(a)?a.replace(/(\r\n|\r|\n)/g,b?"<br />":"<br>"):a},urlEncode:encodeURIComponent,NEWLINE_TO_BR_RE_:/[\r\n]/},goog.string.StringBuffer=function(a){this.buffer_=goog.userAgent.HAS_JSCRIPT?[]:"",null!=a&&this.append.apply(this,arguments)},goog.string.StringBuffer.prototype.bufferLength_=0,goog.string.StringBuffer.prototype.append=function(a,b){if(goog.userAgent.HAS_JSCRIPT)if(null==b)this.buffer_[this.bufferLength_++]=a;else{var c=this.buffer_;c.push.apply(c,arguments),this.bufferLength_=this.buffer_.length}else if(this.buffer_+=a,null!=b)for(var d=1;d<arguments.length;d++)this.buffer_+=arguments[d];return this},goog.string.StringBuffer.prototype.clear=function(){goog.userAgent.HAS_JSCRIPT?(this.buffer_.length=0,this.bufferLength_=0):this.buffer_=""},goog.string.StringBuffer.prototype.toString=function(){if(goog.userAgent.HAS_JSCRIPT){var a=this.buffer_.join("");return this.clear(),a&&this.append(a),a}return this.buffer_},goog.soy||(goog.soy={renderAsElement:function(a,b,c,d){return soyshim.$$renderWithWrapper_(a,b,d,!0,c)},renderAsFragment:function(a,b,c,d){return soyshim.$$renderWithWrapper_(a,b,d,!1,c)},renderElement:function(a,b,c,d){a.innerHTML=b(c,null,d)}});var soy={esc:{}},soydata={},soyshim={$$DEFAULT_TEMPLATE_DATA_:{}};if(soyshim.$$renderWithWrapper_=function(a,b,c,d,e){var f=c||document,g=f.createElement("div");if(g.innerHTML=a(b||soyshim.$$DEFAULT_TEMPLATE_DATA_,void 0,e),1==g.childNodes.length){var h=g.firstChild;if(!d||1==h.nodeType)return h}if(d)return g;for(var i=f.createDocumentFragment();g.firstChild;)i.appendChild(g.firstChild);return i},soyshim.$$bidiMarkAfterKnownDir_=function(a,b,c,d){return a>0&&(0>b||soyshim.$$bidiIsRtlExitText_(c,d))?"\u200e":0>a&&(b>0||soyshim.$$bidiIsLtrExitText_(c,d))?"\u200f":""},soyshim.$$bidiStripHtmlIfNecessary_=function(a,b){return b?a.replace(soyshim.$$BIDI_HTML_SKIP_RE_," "):a},soyshim.$$BIDI_HTML_SKIP_RE_=/<[^>]*>|&[^;]+;/g,soyshim.$$bidiLtrChars_="A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u0300-\u0590\u0800-\u1fff\u2c00-\ufb1c\ufdfe-\ufe6f\ufefd-\uffff",soyshim.$$bidiNeutralChars_="\x00- !-@[-`{-\xbf\xd7\xf7\u02b9-\u02ff\u2000-\u2bff",soyshim.$$bidiRtlChars_="\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc",soyshim.$$bidiRtlDirCheckRe_=new RegExp("^[^"+soyshim.$$bidiLtrChars_+"]*["+soyshim.$$bidiRtlChars_+"]"),soyshim.$$bidiNeutralDirCheckRe_=new RegExp("^["+soyshim.$$bidiNeutralChars_+"]*$|^http://"),soyshim.$$bidiIsRtlText_=function(a){return soyshim.$$bidiRtlDirCheckRe_.test(a)},soyshim.$$bidiIsNeutralText_=function(a){return soyshim.$$bidiNeutralDirCheckRe_.test(a)},soyshim.$$bidiRtlDetectionThreshold_=.4,soyshim.$$bidiRtlWordRatio_=function(a){for(var b=0,c=0,d=a.split(" "),e=0;e<d.length;e++)soyshim.$$bidiIsRtlText_(d[e])?(b++,c++):soyshim.$$bidiIsNeutralText_(d[e])||c++;return 0==c?0:b/c},soyshim.$$bidiLtrExitDirCheckRe_=new RegExp("["+soyshim.$$bidiLtrChars_+"][^"+soyshim.$$bidiRtlChars_+"]*$"),soyshim.$$bidiRtlExitDirCheckRe_=new RegExp("["+soyshim.$$bidiRtlChars_+"][^"+soyshim.$$bidiLtrChars_+"]*$"),soyshim.$$bidiIsLtrExitText_=function(a,b){return a=soyshim.$$bidiStripHtmlIfNecessary_(a,b),soyshim.$$bidiLtrExitDirCheckRe_.test(a)},soyshim.$$bidiIsRtlExitText_=function(a,b){return a=soyshim.$$bidiStripHtmlIfNecessary_(a,b),soyshim.$$bidiRtlExitDirCheckRe_.test(a)},soy.StringBuilder=goog.string.StringBuffer,soydata.SanitizedContentKind={HTML:0,JS_STR_CHARS:1,URI:2,HTML_ATTRIBUTE:3},soydata.SanitizedContent=function(a){this.content=a},soydata.SanitizedContent.prototype.contentKind,soydata.SanitizedContent.prototype.toString=function(){return this.content},soydata.SanitizedHtml=function(a){soydata.SanitizedContent.call(this,a)},goog.inherits(soydata.SanitizedHtml,soydata.SanitizedContent),soydata.SanitizedHtml.prototype.contentKind=soydata.SanitizedContentKind.HTML,soydata.SanitizedJsStrChars=function(a){soydata.SanitizedContent.call(this,a)},goog.inherits(soydata.SanitizedJsStrChars,soydata.SanitizedContent),soydata.SanitizedJsStrChars.prototype.contentKind=soydata.SanitizedContentKind.JS_STR_CHARS,soydata.SanitizedUri=function(a){soydata.SanitizedContent.call(this,a)},goog.inherits(soydata.SanitizedUri,soydata.SanitizedContent),soydata.SanitizedUri.prototype.contentKind=soydata.SanitizedContentKind.URI,soydata.SanitizedHtmlAttribute=function(a){soydata.SanitizedContent.call(this,a)},goog.inherits(soydata.SanitizedHtmlAttribute,soydata.SanitizedContent),soydata.SanitizedHtmlAttribute.prototype.contentKind=soydata.SanitizedContentKind.HTML_ATTRIBUTE,soy.renderElement=goog.soy.renderElement,soy.renderAsFragment=function(a,b,c,d){return goog.soy.renderAsFragment(a,b,d,new goog.dom.DomHelper(c))},soy.renderAsElement=function(a,b,c,d){return goog.soy.renderAsElement(a,b,d,new goog.dom.DomHelper(c))},soy.$$augmentData=function(a,b){function c(){}c.prototype=a;var d=new c;for(var e in b)d[e]=b[e];return d},soy.$$getMapKeys=function(a){var b=[];for(var c in a)b.push(c);return b},soy.$$getDelegateId=function(a){return a},soy.$$DELEGATE_REGISTRY_PRIORITIES_={},soy.$$DELEGATE_REGISTRY_FUNCTIONS_={},soy.$$registerDelegateFn=function(a,b,c){var d="key_"+a,e=soy.$$DELEGATE_REGISTRY_PRIORITIES_[d];if(void 0===e||b>e)soy.$$DELEGATE_REGISTRY_PRIORITIES_[d]=b,soy.$$DELEGATE_REGISTRY_FUNCTIONS_[d]=c;else if(b==e)throw Error('Encountered two active delegates with same priority (id/name "'+a+'").')},soy.$$getDelegateFn=function(a){var b=soy.$$DELEGATE_REGISTRY_FUNCTIONS_["key_"+a];return b?b:soy.$$EMPTY_TEMPLATE_FN_},soy.$$EMPTY_TEMPLATE_FN_=function(){return""},soy.$$escapeHtml=function(a){return"object"==typeof a&&a&&a.contentKind===soydata.SanitizedContentKind.HTML?a.content:soy.esc.$$escapeHtmlHelper(a)},soy.$$escapeHtmlRcdata=function(a){return"object"==typeof a&&a&&a.contentKind===soydata.SanitizedContentKind.HTML?soy.esc.$$normalizeHtmlHelper(a.content):soy.esc.$$escapeHtmlHelper(a)},soy.$$stripHtmlTags=function(a){return String(a).replace(soy.esc.$$HTML_TAG_REGEX_,"")},soy.$$escapeHtmlAttribute=function(a){return"object"==typeof a&&a&&a.contentKind===soydata.SanitizedContentKind.HTML?soy.esc.$$normalizeHtmlHelper(soy.$$stripHtmlTags(a.content)):soy.esc.$$escapeHtmlHelper(a)},soy.$$escapeHtmlAttributeNospace=function(a){return"object"==typeof a&&a&&a.contentKind===soydata.SanitizedContentKind.HTML?soy.esc.$$normalizeHtmlNospaceHelper(soy.$$stripHtmlTags(a.content)):soy.esc.$$escapeHtmlNospaceHelper(a)},soy.$$filterHtmlAttribute=function(a){return"object"==typeof a&&a&&a.contentKind===soydata.SanitizedContentKind.HTML_ATTRIBUTE?a.content.replace(/=([^"']*)$/,'="$1"'):soy.esc.$$filterHtmlAttributeHelper(a)},soy.$$filterHtmlElementName=function(a){return soy.esc.$$filterHtmlElementNameHelper(a)},soy.$$escapeJs=function(a){return soy.$$escapeJsString(a)},soy.$$escapeJsString=function(a){return"object"==typeof a&&a.contentKind===soydata.SanitizedContentKind.JS_STR_CHARS?a.content:soy.esc.$$escapeJsStringHelper(a)},soy.$$escapeJsValue=function(a){if(null==a)return" null ";switch(typeof a){case"boolean":case"number":return" "+a+" ";default:return"'"+soy.esc.$$escapeJsStringHelper(String(a))+"'"}},soy.$$escapeJsRegex=function(a){return soy.esc.$$escapeJsRegexHelper(a)},soy.$$problematicUriMarks_=/['()]/g,soy.$$pctEncode_=function(a){return"%"+a.charCodeAt(0).toString(16)},soy.$$escapeUri=function(a){if("object"==typeof a&&a.contentKind===soydata.SanitizedContentKind.URI)return soy.$$normalizeUri(a);var b=soy.esc.$$escapeUriHelper(a);return soy.$$problematicUriMarks_.lastIndex=0,soy.$$problematicUriMarks_.test(b)?b.replace(soy.$$problematicUriMarks_,soy.$$pctEncode_):b},soy.$$normalizeUri=function(a){return soy.esc.$$normalizeUriHelper(a)},soy.$$filterNormalizeUri=function(a){return soy.esc.$$filterNormalizeUriHelper(a)},soy.$$escapeCssString=function(a){return soy.esc.$$escapeCssStringHelper(a)},soy.$$filterCssValue=function(a){return null==a?"":soy.esc.$$filterCssValueHelper(a)},soy.$$changeNewlineToBr=function(a){return goog.string.newLineToBr(String(a),!1)},soy.$$insertWordBreaks=function(a,b){return goog.format.insertWordBreaks(String(a),b)},soy.$$truncate=function(a,b,c){return a=String(a),a.length<=b?a:(c&&(b>3?b-=3:c=!1),soy.$$isHighSurrogate_(a.charAt(b-1))&&soy.$$isLowSurrogate_(a.charAt(b))&&(b-=1),a=a.substring(0,b),c&&(a+="..."),a)},soy.$$isHighSurrogate_=function(a){return a>=55296&&56319>=a},soy.$$isLowSurrogate_=function(a){return a>=56320&&57343>=a},soy.$$bidiFormatterCache_={},soy.$$getBidiFormatterInstance_=function(a){return soy.$$bidiFormatterCache_[a]||(soy.$$bidiFormatterCache_[a]=new goog.i18n.BidiFormatter(a))},soy.$$bidiTextDir=function(a,b){return a?goog.i18n.bidi.detectRtlDirectionality(a,b)?-1:1:0},soy.$$bidiDirAttr=function(a,b,c){return new soydata.SanitizedHtmlAttribute(soy.$$getBidiFormatterInstance_(a).dirAttr(b,c))},soy.$$bidiMarkAfter=function(a,b,c){var d=soy.$$getBidiFormatterInstance_(a);return d.markAfter(b,c)},soy.$$bidiSpanWrap=function(a,b){var c=soy.$$getBidiFormatterInstance_(a);return c.spanWrap(b+"",!0)},soy.$$bidiUnicodeWrap=function(a,b){var c=soy.$$getBidiFormatterInstance_(a);return c.unicodeWrap(b+"",!0)},soy.esc.$$escapeUriHelper=function(a){return encodeURIComponent(String(a))},soy.esc.$$ESCAPE_MAP_FOR_ESCAPE_HTML__AND__NORMALIZE_HTML__AND__ESCAPE_HTML_NOSPACE__AND__NORMALIZE_HTML_NOSPACE_={"\x00":"&#0;",'"':"&quot;","&":"&amp;","'":"&#39;","<":"&lt;",">":"&gt;"," ":"&#9;","\n":"&#10;"," ":"&#11;","\f":"&#12;","\r":"&#13;"," ":"&#32;","-":"&#45;","/":"&#47;","=":"&#61;","`":"&#96;","\x85":"&#133;","\xa0":"&#160;","\u2028":"&#8232;","\u2029":"&#8233;"},soy.esc.$$REPLACER_FOR_ESCAPE_HTML__AND__NORMALIZE_HTML__AND__ESCAPE_HTML_NOSPACE__AND__NORMALIZE_HTML_NOSPACE_=function(a){return soy.esc.$$ESCAPE_MAP_FOR_ESCAPE_HTML__AND__NORMALIZE_HTML__AND__ESCAPE_HTML_NOSPACE__AND__NORMALIZE_HTML_NOSPACE_[a]},soy.esc.$$ESCAPE_MAP_FOR_ESCAPE_JS_STRING__AND__ESCAPE_JS_REGEX_={"\x00":"\\x00","\b":"\\x08"," ":"\\t","\n":"\\n"," ":"\\x0b","\f":"\\f","\r":"\\r",'"':"\\x22","&":"\\x26","'":"\\x27","/":"\\/","<":"\\x3c","=":"\\x3d",">":"\\x3e","\\":"\\\\","\x85":"\\x85","\u2028":"\\u2028","\u2029":"\\u2029",$:"\\x24","(":"\\x28",")":"\\x29","*":"\\x2a","+":"\\x2b",",":"\\x2c","-":"\\x2d",".":"\\x2e",":":"\\x3a","?":"\\x3f","[":"\\x5b","]":"\\x5d","^":"\\x5e","{":"\\x7b","|":"\\x7c","}":"\\x7d"},soy.esc.$$REPLACER_FOR_ESCAPE_JS_STRING__AND__ESCAPE_JS_REGEX_=function(a){return soy.esc.$$ESCAPE_MAP_FOR_ESCAPE_JS_STRING__AND__ESCAPE_JS_REGEX_[a]},soy.esc.$$ESCAPE_MAP_FOR_ESCAPE_CSS_STRING_={"\x00":"\\0 ","\b":"\\8 "," ":"\\9 ","\n":"\\a "," ":"\\b ","\f":"\\c ","\r":"\\d ",'"':"\\22 ","&":"\\26 ","'":"\\27 ","(":"\\28 ",")":"\\29 ","*":"\\2a ","/":"\\2f ",":":"\\3a ",";":"\\3b ","<":"\\3c ","=":"\\3d ",">":"\\3e ","@":"\\40 ","\\":"\\5c ","{":"\\7b ","}":"\\7d ","\x85":"\\85 ","\xa0":"\\a0 ","\u2028":"\\2028 ","\u2029":"\\2029 "},soy.esc.$$REPLACER_FOR_ESCAPE_CSS_STRING_=function(a){return soy.esc.$$ESCAPE_MAP_FOR_ESCAPE_CSS_STRING_[a]},soy.esc.$$ESCAPE_MAP_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_={"\x00":"%00","":"%01","":"%02","":"%03","":"%04","":"%05","":"%06","":"%07","\b":"%08"," ":"%09","\n":"%0A"," ":"%0B","\f":"%0C","\r":"%0D","":"%0E","":"%0F","":"%10","":"%11","":"%12","":"%13","":"%14","":"%15","":"%16","":"%17","":"%18","":"%19","":"%1A","":"%1B","":"%1C","":"%1D","":"%1E","":"%1F"," ":"%20",'"':"%22","'":"%27","(":"%28",")":"%29","<":"%3C",">":"%3E","\\":"%5C","{":"%7B","}":"%7D","":"%7F","\x85":"%C2%85","\xa0":"%C2%A0","\u2028":"%E2%80%A8","\u2029":"%E2%80%A9","\uff01":"%EF%BC%81","\uff03":"%EF%BC%83","\uff04":"%EF%BC%84","\uff06":"%EF%BC%86","\uff07":"%EF%BC%87","\uff08":"%EF%BC%88","\uff09":"%EF%BC%89","\uff0a":"%EF%BC%8A","\uff0b":"%EF%BC%8B","\uff0c":"%EF%BC%8C","\uff0f":"%EF%BC%8F","\uff1a":"%EF%BC%9A","\uff1b":"%EF%BC%9B","\uff1d":"%EF%BC%9D","\uff1f":"%EF%BC%9F","\uff20":"%EF%BC%A0","\uff3b":"%EF%BC%BB","\uff3d":"%EF%BC%BD"},soy.esc.$$REPLACER_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_=function(a){return soy.esc.$$ESCAPE_MAP_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_[a]},soy.esc.$$MATCHER_FOR_ESCAPE_HTML_=/[\x00\x22\x26\x27\x3c\x3e]/g,soy.esc.$$MATCHER_FOR_NORMALIZE_HTML_=/[\x00\x22\x27\x3c\x3e]/g,soy.esc.$$MATCHER_FOR_ESCAPE_HTML_NOSPACE_=/[\x00\x09-\x0d \x22\x26\x27\x2d\/\x3c-\x3e`\x85\xa0\u2028\u2029]/g,soy.esc.$$MATCHER_FOR_NORMALIZE_HTML_NOSPACE_=/[\x00\x09-\x0d \x22\x27\x2d\/\x3c-\x3e`\x85\xa0\u2028\u2029]/g,soy.esc.$$MATCHER_FOR_ESCAPE_JS_STRING_=/[\x00\x08-\x0d\x22\x26\x27\/\x3c-\x3e\\\x85\u2028\u2029]/g,soy.esc.$$MATCHER_FOR_ESCAPE_JS_REGEX_=/[\x00\x08-\x0d\x22\x24\x26-\/\x3a\x3c-\x3f\x5b-\x5e\x7b-\x7d\x85\u2028\u2029]/g,soy.esc.$$MATCHER_FOR_ESCAPE_CSS_STRING_=/[\x00\x08-\x0d\x22\x26-\x2a\/\x3a-\x3e@\\\x7b\x7d\x85\xa0\u2028\u2029]/g,soy.esc.$$MATCHER_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_=/[\x00- \x22\x27-\x29\x3c\x3e\\\x7b\x7d\x7f\x85\xa0\u2028\u2029\uff01\uff03\uff04\uff06-\uff0c\uff0f\uff1a\uff1b\uff1d\uff1f\uff20\uff3b\uff3d]/g,soy.esc.$$FILTER_FOR_FILTER_CSS_VALUE_=/^(?!-*(?:expression|(?:moz-)?binding))(?:[.#]?-?(?:[_a-z0-9-]+)(?:-[_a-z0-9-]+)*-?|-?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[a-z]{1,2}|%)?|!important|)$/i,soy.esc.$$FILTER_FOR_FILTER_NORMALIZE_URI_=/^(?:(?:https?|mailto):|[^&:\/?#]*(?:[\/?#]|$))/i,soy.esc.$$FILTER_FOR_FILTER_HTML_ATTRIBUTE_=/^(?!style|on|action|archive|background|cite|classid|codebase|data|dsync|href|longdesc|src|usemap)(?:[a-z0-9_$:-]*)$/i,soy.esc.$$FILTER_FOR_FILTER_HTML_ELEMENT_NAME_=/^(?!script|style|title|textarea|xmp|no)[a-z0-9_$:-]*$/i,soy.esc.$$escapeHtmlHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_ESCAPE_HTML_,soy.esc.$$REPLACER_FOR_ESCAPE_HTML__AND__NORMALIZE_HTML__AND__ESCAPE_HTML_NOSPACE__AND__NORMALIZE_HTML_NOSPACE_)},soy.esc.$$normalizeHtmlHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_NORMALIZE_HTML_,soy.esc.$$REPLACER_FOR_ESCAPE_HTML__AND__NORMALIZE_HTML__AND__ESCAPE_HTML_NOSPACE__AND__NORMALIZE_HTML_NOSPACE_)},soy.esc.$$escapeHtmlNospaceHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_ESCAPE_HTML_NOSPACE_,soy.esc.$$REPLACER_FOR_ESCAPE_HTML__AND__NORMALIZE_HTML__AND__ESCAPE_HTML_NOSPACE__AND__NORMALIZE_HTML_NOSPACE_)},soy.esc.$$normalizeHtmlNospaceHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_NORMALIZE_HTML_NOSPACE_,soy.esc.$$REPLACER_FOR_ESCAPE_HTML__AND__NORMALIZE_HTML__AND__ESCAPE_HTML_NOSPACE__AND__NORMALIZE_HTML_NOSPACE_)},soy.esc.$$escapeJsStringHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_ESCAPE_JS_STRING_,soy.esc.$$REPLACER_FOR_ESCAPE_JS_STRING__AND__ESCAPE_JS_REGEX_)},soy.esc.$$escapeJsRegexHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_ESCAPE_JS_REGEX_,soy.esc.$$REPLACER_FOR_ESCAPE_JS_STRING__AND__ESCAPE_JS_REGEX_)},soy.esc.$$escapeCssStringHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_ESCAPE_CSS_STRING_,soy.esc.$$REPLACER_FOR_ESCAPE_CSS_STRING_)},soy.esc.$$filterCssValueHelper=function(a){var b=String(a);return soy.esc.$$FILTER_FOR_FILTER_CSS_VALUE_.test(b)?b:"zSoyz"},soy.esc.$$normalizeUriHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_,soy.esc.$$REPLACER_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_)},soy.esc.$$filterNormalizeUriHelper=function(a){var b=String(a);return soy.esc.$$FILTER_FOR_FILTER_NORMALIZE_URI_.test(b)?b.replace(soy.esc.$$MATCHER_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_,soy.esc.$$REPLACER_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_):"zSoyz"},soy.esc.$$filterHtmlAttributeHelper=function(a){var b=String(a);return soy.esc.$$FILTER_FOR_FILTER_HTML_ATTRIBUTE_.test(b)?b:"zSoyz"},soy.esc.$$filterHtmlElementNameHelper=function(a){var b=String(a);return soy.esc.$$FILTER_FOR_FILTER_HTML_ELEMENT_NAME_.test(b)?b:"zSoyz"},soy.esc.$$HTML_TAG_REGEX_=/<(?:!|\/?[a-zA-Z])(?:[^>'"]|"[^"]*"|'[^']*')*>/g,"undefined"==typeof aui)var aui={};if(aui.renderExtraAttributes=function(a,b){var c=b||new soy.StringBuilder;if(null!=a&&a.extraAttributes)if("[object Object]"===Object.prototype.toString.call(a.extraAttributes))for(var d=soy.$$getMapKeys(a.extraAttributes),e=d.length,f=0;e>f;f++){var g=d[f];c.append(" ",soy.$$escapeHtml(g),'="',soy.$$escapeHtml(a.extraAttributes[g]),'"')}else c.append(" ",a.extraAttributes);return b?"":c.toString()},aui.renderExtraClasses=function(a,b){var c=b||new soy.StringBuilder;if(null!=a&&a.extraClasses)if(a.extraClasses instanceof Array)for(var d=a.extraClasses,e=d.length,f=0;e>f;f++){var g=d[f];c.append(" ",soy.$$escapeHtml(g))}else c.append(" ",soy.$$escapeHtml(a.extraClasses));return b?"":c.toString()},"undefined"==typeof aui)var aui={};if("undefined"==typeof aui.avatar&&(aui.avatar={}),aui.avatar.avatar=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"span"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-avatar aui-avatar-',soy.$$escapeHtml(a.size),soy.$$escapeHtml(a.isProject?" aui-avatar-project":""),soy.$$escapeHtml(a.badgeContent?" aui-avatar-badged":"")),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append('><span class="aui-avatar-inner"><img src="',soy.$$escapeHtml(a.avatarImageUrl),'"',a.accessibilityText?' alt="'+soy.$$escapeHtml(a.accessibilityText)+'"':"",a.title?' title="'+soy.$$escapeHtml(a.title)+'"':"",a.imageClasses?' class="'+soy.$$escapeHtml(a.imageClasses)+'"':""," /></span>",a.badgeContent?a.badgeContent:"","</",soy.$$escapeHtml(a.tagName?a.tagName:"span"),">"),b?"":d.toString()},"undefined"==typeof aui)var aui={};if("undefined"==typeof aui.badges&&(aui.badges={}),aui.badges.badge=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"span"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-badge'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",soy.$$escapeHtml(a.text),"</",soy.$$escapeHtml(a.tagName?a.tagName:"span"),">"),b?"":d.toString()},"undefined"==typeof aui)var aui={};if("undefined"==typeof aui.buttons&&(aui.buttons={}),aui.buttons.button=function(a,b,c){var d=b||new soy.StringBuilder;return a.href?(d.append('<a href="',soy.$$escapeHtml(a.href),'"'),aui.buttons.buttonAttributes(a,d,c),d.append(">"),aui.buttons.buttonIcon(a,d,c),d.append(soy.$$escapeHtml(a.text),"</a>")):"input"==a.tagName?(d.append('<input type="',soy.$$escapeHtml(a.inputType?a.inputType:"button"),'" '),aui.buttons.buttonAttributes(a,d,c),d.append(' value="',soy.$$escapeHtml(a.text),'" />')):(d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"button")),aui.buttons.buttonAttributes(a,d,c),d.append(">"),aui.buttons.buttonIcon(a,d,c),d.append(soy.$$escapeHtml(a.text),"</",soy.$$escapeHtml(a.tagName?a.tagName:"button"),">")),b?"":d.toString()},aui.buttons.buttons=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<div",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-buttons'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</div>"),b?"":d.toString()},aui.buttons.buttonAttributes=function(a,b,c){var d=b||new soy.StringBuilder;switch(d.append(a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-button',"main"==a.splitButtonType?" aui-button-split-main":"",a.dropdown2Target?" aui-dropdown2-trigger"+("more"==a.splitButtonType?" aui-button-split-more":""):""),a.type){case"primary":d.append(" aui-button-primary");break;case"link":d.append(" aui-button-link");break;case"subtle":d.append(" aui-button-subtle")}return aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(a.isPressed?' aria-pressed="'+soy.$$escapeHtml(a.isPressed)+'"':"",a.isDisabled?' aria-disabled="'+soy.$$escapeHtml(a.isDisabled)+'"'+(1==a.isDisabled?"button"==a.tagName||"input"==a.tagName?' disabled="disabled" ':"":""):"",a.dropdown2Target?' aria-owns="'+soy.$$escapeHtml(a.dropdown2Target)+'" aria-haspopup="true"':"","a"==a.tagName?' tabindex="0"':""),b?"":d.toString()},aui.buttons.buttonIcon=function(a,b){var c=b||new soy.StringBuilder;return c.append(a.iconType?'<span class="'+("aui"==a.iconType?"aui-icon":"")+(a.iconClass?" "+soy.$$escapeHtml(a.iconClass):"")+'">'+(a.iconText?soy.$$escapeHtml(a.iconText)+" ":"")+"</span>":""),b?"":c.toString()},aui.buttons.splitButton=function(a,b,c){var d=b||new soy.StringBuilder;return aui.buttons.button(soy.$$augmentData(a.splitButtonMain,{splitButtonType:"main"}),d,c),aui.buttons.button(soy.$$augmentData(a.splitButtonMore,{splitButtonType:"more"}),d,c),b?"":d.toString()},"undefined"==typeof aui)var aui={};if("undefined"==typeof aui.dialog&&(aui.dialog={}),aui.dialog.dialog2=function(a,b,c){var d=b||new soy.StringBuilder,e=new soy.StringBuilder;return aui.dialog.dialog2Content(a,e,c),aui.dialog.dialog2Chrome({id:a.id,titleId:a.id?a.id+"-dialog-title":null,modal:a.modal,removeOnHide:a.removeOnHide,visible:a.visible,size:a.size,extraClasses:a.extraClasses,extraAttributes:a.extraAttributes,content:e.toString()},d,c),b?"":d.toString()},aui.dialog.dialog2Chrome=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<section",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",a.titleId?' aria-labelledby="'+soy.$$escapeHtml(a.titleId)+'"':"",' role="dialog" class=" aui-layer aui-dialog2 aui-dialog2-',soy.$$escapeHtml(a.size?a.size:"medium")),aui.renderExtraClasses(a,d,c),d.append('"',a.modal?'data-aui-modal="true"':"",a.removeOnHide?'data-aui-remove-on-hide="true"':"",1!=a.visible?'aria-hidden="true"':""),aui.renderExtraAttributes(a,d,c),d.append(">",a.content?a.content:"","</section>"),b?"":d.toString()},aui.dialog.dialog2Content=function(a,b,c){var d=b||new soy.StringBuilder;return aui.dialog.dialog2Header({titleId:a.id?a.id+"-dialog-title":null,titleText:a.titleText,titleContent:a.titleContent,actionContent:a.headerActionContent,secondaryContent:a.headerSecondaryContent,modal:a.modal},d,c),aui.dialog.dialog2Panel(a,d,c),aui.dialog.dialog2Footer({hintText:a.footerHintText,hintContent:a.footerHintContent,actionContent:a.footerActionContent},d,c),b?"":d.toString()},aui.dialog.dialog2Header=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<header",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-dialog2-header'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append("><h1 ",a.titleId?' id="'+soy.$$escapeHtml(a.titleId)+'"':"",' class="aui-dialog2-header-main">',a.titleText?soy.$$escapeHtml(a.titleText):"",a.titleContent?a.titleContent:"","</h1>",a.actionContent?'<div class="aui-dialog2-header-actions">'+a.actionContent+"</div>":"",a.secondaryContent?'<div class="aui-dialog2-header-secondary">'+a.secondaryContent+"</div>":"",1!=a.modal?'<a class="aui-dialog2-header-close"><span class="aui-icon aui-icon-small aui-iconfont-close-dialog">'+soy.$$escapeHtml("Close")+"</span></a>":"","</header>"),b?"":d.toString()},aui.dialog.dialog2Footer=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<footer",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-dialog2-footer'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.actionContent?'<div class="aui-dialog2-footer-actions">'+a.actionContent+"</div>":"",a.hintText||a.hintContent?'<div class="aui-dialog2-footer-hint">'+(a.hintText?soy.$$escapeHtml(a.hintText):"")+(a.hintContent?a.hintContent:"")+"</div>":"","</footer>"),b?"":d.toString()},aui.dialog.dialog2Panel=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<div",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-dialog2-content'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content?a.content:"","</div>"),b?"":d.toString()},"undefined"==typeof aui)var aui={};if("undefined"==typeof aui.dropdown&&(aui.dropdown={}),aui.dropdown.trigger=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<a",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-dd-trigger'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append('><span class="dropdown-text">',a.accessibilityText?soy.$$escapeHtml(a.accessibilityText):"","</span>",0!=a.showIcon?'<span class="icon icon-dropdown"></span>':"","</a>"),b?"":d.toString()},aui.dropdown.menu=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"ul"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-dropdown hidden'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</",soy.$$escapeHtml(a.tagName?a.tagName:"ul"),">"),b?"":d.toString()},aui.dropdown.parent=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"div"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-dd-parent'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</",soy.$$escapeHtml(a.tagName?a.tagName:"div"),">"),b?"":d.toString()},aui.dropdown.item=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"li"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="dropdown-item'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append('><a href="',soy.$$escapeHtml(a.url?a.url:"#"),'">',soy.$$escapeHtml(a.text),"</a></",soy.$$escapeHtml(a.tagName?a.tagName:"li"),">"),b?"":d.toString()},"undefined"==typeof aui)var aui={};if("undefined"==typeof aui.dropdown2&&(aui.dropdown2={}),aui.dropdown2.dropdown2=function(a,b,c){var d=b||new soy.StringBuilder;return aui.dropdown2.trigger(soy.$$augmentData(a.trigger,{menu:a.menu}),d,c),aui.dropdown2.contents(a.menu,d,c),b?"":d.toString() },aui.dropdown2.trigger=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"a"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-dropdown2-trigger'),aui.renderExtraClasses(a,d,c),d.append('" aria-owns="',soy.$$escapeHtml(a.menu.id),'" aria-haspopup="true"',a.title?' title="'+soy.$$escapeHtml(a.title)+'"':"",a.container?' data-container="'+soy.$$escapeHtml(a.container)+'"':"",a.tagName&&"a"!=a.tagName||a.extraAttributes&&("[object Object]"!==Object.prototype.toString.call(a.extraAttributes)||a.extraAttributes.href||a.extraAttributes.tabindex)?"":' tabindex="0"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content?a.content:"",a.text?soy.$$escapeHtml(a.text):"",0!=a.showIcon?'<span class="icon '+soy.$$escapeHtml(a.iconClasses?a.iconClasses:"aui-icon-dropdown")+'">'+(a.iconText?soy.$$escapeHtml(a.iconText):"")+"</span>":"","</",soy.$$escapeHtml(a.tagName?a.tagName:"a"),">"),b?"":d.toString()},aui.dropdown2.contents=function(a,b,c){var d=b||new soy.StringBuilder;return d.append('<div id="',soy.$$escapeHtml(a.id),'" class="aui-dropdown2'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content?a.content:"","</div>"),b?"":d.toString()},aui.dropdown2.section=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<div",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-dropdown2-section'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.label?"<strong>"+soy.$$escapeHtml(a.label)+"</strong>":"",a.content,"</div>"),b?"":d.toString()},"undefined"==typeof aui)var aui={};if("undefined"==typeof aui.expander&&(aui.expander={}),aui.expander.content=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<div",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-expander-content'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(a.initiallyExpanded?' aria-expanded="'+soy.$$escapeHtml(a.initiallyExpanded)+'"':"",">",a.content?a.content:"","</div>"),b?"":d.toString()},aui.expander.trigger=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tag?a.tag:"div"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",a.replaceText?' data-replace-text="'+soy.$$escapeHtml(a.replaceText)+'"':"",a.replaceSelector?' data-replace-selector="'+soy.$$escapeHtml(a.replaceSelector)+'"':"",' class="aui-expander-trigger'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(' aria-controls="',soy.$$escapeHtml(a.contentId),'"',a.collapsible?' data-collapsible="'+soy.$$escapeHtml(a.collapsible)+'"':"",">",a.content?a.content:"","</",soy.$$escapeHtml(a.tag?a.tag:"div"),">"),b?"":d.toString()},aui.expander.revealText=function(a,b,c){var d=b||new soy.StringBuilder,e=new soy.StringBuilder(soy.$$escapeHtml(a.contentContent));return aui.expander.trigger({id:a.triggerId,contentId:a.contentId,tag:"a",content:"<span class='reveal-text-trigger-text'>Show more</span>",replaceSelector:".reveal-text-trigger-text",replaceText:"Show less",extraAttributes:a.triggerExtraAttributes,extraClasses:(a.triggerExtraClasses?soy.$$escapeHtml(a.triggerExtraClasses)+" ":"")+" aui-expander-reveal-text"},e,c),aui.expander.content({id:a.contentId,content:e.toString(),extraAttributes:a.contentExtraAttributes,extraClasses:a.contentExtraClasses},d,c),b?"":d.toString()},"undefined"==typeof aui)var aui={};if("undefined"==typeof aui.form&&(aui.form={}),aui.form.form=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<form",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui',a.isUnsectioned?" unsectioned":"",a.isLongLabels?" long-label":"",a.isTopLabels?" top-label":""),aui.renderExtraClasses(a,d,c),d.append('" action="',soy.$$escapeHtml(a.action),'" method="',soy.$$escapeHtml(a.method?a.method:"post"),'"',a.enctype?'enctype="'+soy.$$escapeHtml(a.enctype)+'"':""),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</form>"),b?"":d.toString()},aui.form.formDescription=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<div",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="field-group'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</div>"),b?"":d.toString()},aui.form.fieldset=function(a,b,c){var d=b||new soy.StringBuilder,e=a.isInline||a.isDateSelect||a.isGroup||a.extraClasses;return d.append("<fieldset",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':""),e&&(d.append(' class="',soy.$$escapeHtml(a.isInline?"inline":a.isDateSelect?"date-select":a.isGroup?"group":"")),aui.renderExtraClasses(a,d,c),d.append('"')),aui.renderExtraAttributes(a,d,c),d.append("><legend><span>",a.legendContent,"</span></legend>",a.content,"</fieldset>"),b?"":d.toString()},aui.form.fieldGroup=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<div",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="field-group'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</div>"),b?"":d.toString()},aui.form.buttons=function(a,b){var c=b||new soy.StringBuilder;return c.append('<div class="buttons-container',a.alignment?" "+soy.$$escapeHtml(a.alignment):"",'"><div class="buttons">',a.content,"</div></div>"),b?"":c.toString()},aui.form.label=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<label",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' for="',soy.$$escapeHtml(a.forField),'"'),a.extraClasses&&(d.append(' class="'),aui.renderExtraClasses(a,d,c),d.append('"')),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,a.isRequired?'<span class="aui-icon icon-required"></span>':"","</label>"),b?"":d.toString()},aui.form.input=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<input",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="',soy.$$escapeHtml("password"==a.type?"text":"submit"==a.type?"button":a.type)),aui.renderExtraClasses(a,d,c),d.append('" type="',soy.$$escapeHtml(a.type),'" name="',a.name?soy.$$escapeHtml(a.name):soy.$$escapeHtml(a.id),'"',a.value?' value="'+soy.$$escapeHtml(a.value)+'"':"","checkbox"!=a.type&&"radio"!=a.type||!a.isChecked?"":' checked="checked"',"text"==a.type&&a.maxLength?' maxlength="'+soy.$$escapeHtml(a.maxLength)+'"':"","text"==a.type&&a.size?' size="'+soy.$$escapeHtml(a.size)+'"':"","text"!=a.type&&"password"!=a.type||!a.autocomplete?"":' autocomplete="'+soy.$$escapeHtml(a.autocomplete)+'"',a.isDisabled?" disabled":"",a.isAutofocus?" autofocus":""),aui.renderExtraAttributes(a,d,c),d.append("/>"),b?"":d.toString()},aui.form.submit=function(a,b,c){var d=b||new soy.StringBuilder,e=new soy.StringBuilder(a.name?'name="'+soy.$$escapeHtml(a.name)+'"':"");return aui.renderExtraAttributes(a,e,c),aui.buttons.button({id:a.id,tagName:"input",inputType:"submit",text:a.text,type:a.type,href:a.href,isDisabled:a.isDisabled,isPressed:a.isPressed,iconType:a.iconType,iconText:a.iconText,iconClass:a.iconClass,dropdown2Target:a.dropdown2Target,splitButtonType:a.splitButtonType,extraClasses:a.extraClasses,extraAttributes:e.toString()},d,c),b?"":d.toString()},aui.form.button=function(a,b,c){var d=b||new soy.StringBuilder,e=new soy.StringBuilder(a.name?'name="'+soy.$$escapeHtml(a.name)+'"':"");return aui.renderExtraAttributes(a,e,c),aui.buttons.button({id:a.id,tagName:a.tagName,inputType:a.inputType,text:a.text,type:a.type,href:a.href,isDisabled:a.isDisabled,isPressed:a.isPressed,iconType:a.iconType,iconText:a.iconText,iconClass:a.iconClass,dropdown2Target:a.dropdown2Target,splitButtonType:a.splitButtonType,extraClasses:a.extraClasses,extraAttributes:e.toString()},d,c),b?"":d.toString()},aui.form.linkButton=function(a,b,c){var d=b||new soy.StringBuilder,e=new soy.StringBuilder("cancel");aui.renderExtraClasses(a,e,c);var f=new soy.StringBuilder(a.name?'name="'+soy.$$escapeHtml(a.name)+'"':"");return aui.renderExtraAttributes(a,f,c),aui.buttons.button({id:a.id,tagName:"a",inputType:a.inputType,text:a.text,type:"link",href:a.href?a.href:a.url,isDisabled:a.isDisabled,isPressed:a.isPressed,iconType:a.iconType,iconText:a.iconText,iconClass:a.iconClass,dropdown2Target:a.dropdown2Target,splitButtonType:a.splitButtonType,extraClasses:e.toString(),extraAttributes:f.toString()},d,c),b?"":d.toString()},aui.form.textarea=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<textarea",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' name="',a.name?soy.$$escapeHtml(a.name):soy.$$escapeHtml(a.id),'" class="textarea'),aui.renderExtraClasses(a,d,c),d.append('"',a.rows?' rows="'+soy.$$escapeHtml(a.rows)+'"':"",a.cols?' cols="'+soy.$$escapeHtml(a.cols)+'"':"",a.autocomplete?' autocomplete="'+soy.$$escapeHtml(a.autocomplete)+'"':"",a.isDisabled?" disabled":"",a.isAutofocus?" autofocus":""),aui.renderExtraAttributes(a,d,c),d.append(">",a.value?soy.$$escapeHtml(a.value):"","</textarea>"),b?"":d.toString()},aui.form.select=function(a,b,c){var d=b||new soy.StringBuilder;d.append("<select",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' name="',a.name?soy.$$escapeHtml(a.name):soy.$$escapeHtml(a.id),'" class="',soy.$$escapeHtml(a.isMultiple?"multi-select":"select")),aui.renderExtraClasses(a,d,c),d.append('"',a.size?' size="'+soy.$$escapeHtml(a.size)+'"':"",a.isDisabled?" disabled":"",a.isAutofocus?" autofocus":"",a.isMultiple?" multiple":""),aui.renderExtraAttributes(a,d,c),d.append(">");for(var e=a.options,f=e.length,g=0;f>g;g++){var h=e[g];aui.form.optionOrOptgroup(h,d,c)}return d.append("</select>"),b?"":d.toString()},aui.form.optionOrOptgroup=function(a,b,c){var d=b||new soy.StringBuilder;if(a.options){d.append('<optgroup label="',soy.$$escapeHtml(a.text),'">');for(var e=a.options,f=e.length,g=0;f>g;g++){var h=e[g];aui.form.optionOrOptgroup(h,d,c)}d.append("</optgroup>")}else d.append('<option value="',soy.$$escapeHtml(a.value),'" ',a.selected?"selected":"",">",soy.$$escapeHtml(a.text),"</option>");return b?"":d.toString()},aui.form.value=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<span",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="field-value'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</span>"),b?"":d.toString()},aui.form.field=function(a,b,c){var d=b||new soy.StringBuilder,e="checkbox"==a.type||"radio"==a.type,f=a.fieldWidth?a.fieldWidth+"-field":"";switch(d.append('<div class="',e?soy.$$escapeHtml(a.type):"field-group"),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">"),a.labelContent&&!e&&aui.form.label({forField:a.id,isRequired:a.isRequired,content:a.labelContent},d,c),a.type){case"textarea":aui.form.textarea({id:a.id,name:a.name,value:a.value,rows:a.rows,cols:a.cols,autocomplete:a.autocomplete,isDisabled:a.isDisabled?!0:!1,isAutofocus:a.isAutofocus,extraClasses:f},d,c);break;case"select":aui.form.select({id:a.id,name:a.name,options:a.options,isMultiple:a.isMultiple,size:a.size,isDisabled:a.isDisabled?!0:!1,isAutofocus:a.isAutofocus,extraClasses:f},d,c);break;case"value":aui.form.value({id:a.id,content:soy.$$escapeHtml(a.value)},d,c);break;case"text":case"password":case"file":case"radio":case"checkbox":case"button":case"submit":case"reset":aui.form.input({id:a.id,name:a.name,type:a.type,value:a.value,maxLength:a.maxLength,size:a.size,autocomplete:a.autocomplete,isChecked:a.isChecked,isDisabled:a.isDisabled?!0:!1,isAutofocus:a.isAutofocus,extraClasses:f},d,c)}if(a.labelContent&&e&&aui.form.label({forField:a.id,isRequired:a.isRequired,content:a.labelContent},d,c),a.descriptionText&&aui.form.fieldDescription({message:a.descriptionText},d,c),a.errorTexts)for(var g=a.errorTexts,h=g.length,i=0;h>i;i++){var j=g[i];aui.form.fieldError({message:j},d,c)}return d.append("</div>"),b?"":d.toString()},aui.form.fieldError=function(a,b,c){var d=b||new soy.StringBuilder;return d.append('<div class="error'),aui.renderExtraClasses(a,d,c),d.append('">',soy.$$escapeHtml(a.message),"</div>"),b?"":d.toString()},aui.form.fieldDescription=function(a,b,c){var d=b||new soy.StringBuilder;return d.append('<div class="description'),aui.renderExtraClasses(a,d,c),d.append('">',soy.$$escapeHtml(a.message),"</div>"),b?"":d.toString()},aui.form.textField=function(a,b,c){var d=b||new soy.StringBuilder;return aui.form.field({id:a.id,name:a.name,type:"text",labelContent:a.labelContent,value:a.value,maxLength:a.maxLength,size:a.size,autocomplete:a.autocomplete,isRequired:a.isRequired,isDisabled:a.isDisabled,isAutofocus:a.isAutofocus,descriptionText:a.descriptionText,errorTexts:a.errorTexts,extraClasses:a.extraClasses,extraAttributes:a.extraAttributes,fieldWidth:a.fieldWidth},d,c),b?"":d.toString()},aui.form.textareaField=function(a,b,c){var d=b||new soy.StringBuilder;return aui.form.field({id:a.id,name:a.name,type:"textarea",labelContent:a.labelContent,value:a.value,rows:a.rows,cols:a.cols,autocomplete:a.autocomplete,isRequired:a.isRequired,isDisabled:a.isDisabled,isAutofocus:a.isAutofocus,descriptionText:a.descriptionText,errorTexts:a.errorTexts,extraClasses:a.extraClasses,extraAttributes:a.extraAttributes,fieldWidth:a.fieldWidth},d,c),b?"":d.toString()},aui.form.passwordField=function(a,b,c){var d=b||new soy.StringBuilder;return aui.form.field({id:a.id,name:a.name,type:"password",labelContent:a.labelContent,value:a.value,autocomplete:a.autocomplete,isRequired:a.isRequired,isDisabled:a.isDisabled,isAutofocus:a.isAutofocus,descriptionText:a.descriptionText,errorTexts:a.errorTexts,extraClasses:a.extraClasses,extraAttributes:a.extraAttributes,fieldWidth:a.fieldWidth},d,c),b?"":d.toString()},aui.form.fileField=function(a,b,c){var d=b||new soy.StringBuilder;return aui.form.field({id:a.id,name:a.name,type:"file",labelContent:a.labelContent,value:a.value,isRequired:a.isRequired,isDisabled:a.isDisabled,isAutofocus:a.isAutofocus,descriptionText:a.descriptionText,errorTexts:a.errorTexts,extraClasses:a.extraClasses,extraAttributes:a.extraAttributes},d,c),b?"":d.toString()},aui.form.selectField=function(a,b,c){var d=b||new soy.StringBuilder;return aui.form.field({id:a.id,name:a.name,type:"select",labelContent:a.labelContent,options:a.options,isMultiple:a.isMultiple,size:a.size,isRequired:a.isRequired,isDisabled:a.isDisabled,isAutofocus:a.isAutofocus,descriptionText:a.descriptionText,errorTexts:a.errorTexts,extraClasses:a.extraClasses,extraAttributes:a.extraAttributes,fieldWidth:a.fieldWidth},d,c),b?"":d.toString()},aui.form.checkboxField=function(a,b,c){for(var d=b||new soy.StringBuilder,e=new soy.StringBuilder(a.isMatrix?'<div class="matrix">':""),f=a.fields,g=f.length,h=0;g>h;h++){var i=f[h];aui.form.field(soy.$$augmentData(i,{type:"checkbox",id:i.id,name:i.name,labelContent:soy.$$escapeHtml(i.labelText),isChecked:i.isChecked,isDisabled:i.isDisabled,isAutofocus:i.isAutofocus,descriptionText:i.descriptionText,errorTexts:i.errorTexts,extraClasses:i.extraClasses,extraAttributes:i.extraAttributes}),e,c)}return e.append(a.isMatrix?"</div>":""),(a.descriptionText||a.errorTexts&&a.errorTexts.length)&&aui.form.field({descriptionText:a.descriptionText,errorTexts:a.errorTexts,isDisabled:!1},e,c),aui.form.fieldset({legendContent:a.legendContent+(a.isRequired?'<span class="aui-icon icon-required"></span>':""),isGroup:!0,id:a.id,extraClasses:a.extraClasses,extraAttributes:a.extraAttributes,content:e.toString()},d,c),b?"":d.toString()},aui.form.radioField=function(a,b,c){for(var d=b||new soy.StringBuilder,e=new soy.StringBuilder(a.isMatrix?'<div class="matrix">':""),f=a.fields,g=f.length,h=0;g>h;h++){var i=f[h];aui.form.field(soy.$$augmentData(i,{type:"radio",name:a.name?a.name:a.id,value:i.value,id:i.id,labelContent:soy.$$escapeHtml(i.labelText),isChecked:i.isChecked,isDisabled:i.isDisabled,isAutofocus:i.isAutofocus,descriptionText:i.descriptionText,errorTexts:i.errorTexts,extraClasses:i.extraClasses,extraAttributes:i.extraAttributes}),e,c)}return e.append(a.isMatrix?"</div>":""),(a.descriptionText||a.errorTexts&&a.errorTexts.length)&&aui.form.field({descriptionText:a.descriptionText,errorTexts:a.errorTexts,isDisabled:!1},e,c),aui.form.fieldset({legendContent:a.legendContent+(a.isRequired?'<span class="aui-icon icon-required"></span>':""),isGroup:!0,id:a.id,extraClasses:a.extraClasses,extraAttributes:a.extraAttributes,content:e.toString()},d,c),b?"":d.toString()},aui.form.valueField=function(a,b,c){var d=b||new soy.StringBuilder;return aui.form.field({id:a.id,type:"value",value:a.value,labelContent:a.labelContent,isRequired:a.isRequired,descriptionText:a.descriptionText,errorTexts:a.errorTexts,extraClasses:a.extraClasses,extraAttributes:a.extraAttributes},d,c),b?"":d.toString()},"undefined"==typeof aui)var aui={};if("undefined"==typeof aui.group&&(aui.group={}),aui.group.group=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"div"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-group',a.isSplit?" aui-group-split":""),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</",soy.$$escapeHtml(a.tagName?a.tagName:"div"),">"),b?"":d.toString()},aui.group.item=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"div"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-item'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</",soy.$$escapeHtml(a.tagName?a.tagName:"div"),">"),b?"":d.toString()},"undefined"==typeof aui)var aui={};if("undefined"==typeof aui.icons&&(aui.icons={}),aui.icons.icon=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"span"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-icon',a.useIconFont?" aui-icon-"+soy.$$escapeHtml(a.size?a.size:"small"):""," aui",soy.$$escapeHtml(a.useIconFont?"-iconfont":"-icon"),soy.$$escapeHtml(a.iconFontSet?"-"+a.iconFontSet:""),"-",soy.$$escapeHtml(a.icon)),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.accessibilityText?soy.$$escapeHtml(a.accessibilityText):"","</",soy.$$escapeHtml(a.tagName?a.tagName:"span"),">"),b?"":d.toString()},"undefined"==typeof aui)var aui={};if("undefined"==typeof aui.labels&&(aui.labels={}),aui.labels.label=function(a,b,c){var d=b||new soy.StringBuilder;return a.url&&1==a.isCloseable?(d.append("<span",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-label aui-label-closeable aui-label-split'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append('><a class="aui-label-split-main" href="',soy.$$escapeHtml(a.url),'">',soy.$$escapeHtml(a.text),'</a><span class="aui-label-split-close" >'),aui.labels.closeIcon(a,d,c),d.append("</span></span>")):(d.append("<",soy.$$escapeHtml(a.url?"a":"span"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-label',a.isCloseable?" aui-label-closeable":""),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(a.url?' href="'+soy.$$escapeHtml(a.url)+'"':"",">",soy.$$escapeHtml(a.text)),a.isCloseable&&aui.labels.closeIcon(a,d,c),d.append("</",soy.$$escapeHtml(a.url?"a":"span"),">")),b?"":d.toString()},aui.labels.closeIcon=function(a,b,c){var d=b||new soy.StringBuilder;return d.append('<span tabindex="0" class="aui-icon aui-icon-close"'),0!=a.hasTitle&&(d.append(' title="'),aui.labels.closeIconText(a,d,c),d.append('"')),d.append(">"),aui.labels.closeIconText(a,d,c),d.append("</span>"),b?"":d.toString()},aui.labels.closeIconText=function(a,b){var c=b||new soy.StringBuilder;return c.append(a.closeIconText?soy.$$escapeHtml(a.closeIconText):"("+soy.$$escapeHtml("Remove")+" "+soy.$$escapeHtml(a.text)+")"),b?"":c.toString()},"undefined"==typeof aui)var aui={};if("undefined"==typeof aui.message&&(aui.message={}),aui.message.info=function(a,b,c){var d=b||new soy.StringBuilder;return aui.message.message(soy.$$augmentData(a,{type:"info"}),d,c),b?"":d.toString()},aui.message.warning=function(a,b,c){var d=b||new soy.StringBuilder;return aui.message.message(soy.$$augmentData(a,{type:"warning"}),d,c),b?"":d.toString()},aui.message.error=function(a,b,c){var d=b||new soy.StringBuilder;return aui.message.message(soy.$$augmentData(a,{type:"error"}),d,c),b?"":d.toString()},aui.message.success=function(a,b,c){var d=b||new soy.StringBuilder;return aui.message.message(soy.$$augmentData(a,{type:"success"}),d,c),b?"":d.toString()},aui.message.hint=function(a,b,c){var d=b||new soy.StringBuilder;return aui.message.message(soy.$$augmentData(a,{type:"hint"}),d,c),b?"":d.toString()},aui.message.generic=function(a,b,c){var d=b||new soy.StringBuilder;return aui.message.message(soy.$$augmentData(a,{type:"generic"}),d,c),b?"":d.toString()},aui.message.message=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"div"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-message ',soy.$$escapeHtml(a.type?a.type:"generic"),a.isCloseable?" closeable":"",a.isShadowed?" shadowed":""),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.titleContent?'<p class="title"><strong>'+a.titleContent+"</strong></p>":"",a.content,'<span class="aui-icon icon-',soy.$$escapeHtml(a.type?a.type:"generic"),'"></span>',a.isCloseable?'<span class="aui-icon icon-close" role="button" tabindex="0"></span>':"","</",soy.$$escapeHtml(a.tagName?a.tagName:"div"),">"),b?"":d.toString()},"undefined"==typeof aui)var aui={};if("undefined"==typeof aui.page&&(aui.page={}),aui.page.document=function(a,b,c){var d=b||new soy.StringBuilder;return d.append('<!DOCTYPE html><html lang="',soy.$$escapeHtml(c.language?c.language:"en"),'"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>',soy.$$escapeHtml(a.windowTitle),"</title>",a.headContent?a.headContent:"","</head><body"),a.pageType?"generic"==a.pageType?a.extraClasses&&(d.append(' class="'),aui.renderExtraClasses(a,d,c),d.append('"')):"focused"==a.pageType?(d.append(' class="aui-page-focused aui-page-focused-',soy.$$escapeHtml(a.focusedPageSize?a.focusedPageSize:"xlarge")),aui.renderExtraClasses(a,d,c),d.append('"')):(d.append(' class="aui-page-',soy.$$escapeHtml(a.pageType)),aui.renderExtraClasses(a,d,c),d.append('"')):(d.append(' class="'),aui.renderExtraClasses(a,d,c),d.append('"')),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</body></html>"),b?"":d.toString()},aui.page.page=function(a,b){var c=b||new soy.StringBuilder;return c.append('<div id="page"><header id="header" role="banner">',a.headerContent,'</header><!-- #header --><section id="content" role="main">',a.contentContent,'</section><!-- #content --><footer id="footer" role="contentinfo">',a.footerContent,"</footer><!-- #footer --></div><!-- #page -->"),b?"":c.toString()},aui.page.header=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<nav",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-header aui-dropdown2-trigger-group'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(' role="navigation"><div class="aui-header-inner">',a.headerBeforeContent?'<div class="aui-header-before">'+a.headerBeforeContent+"</div>":"",'<div class="aui-header-primary"><h1 id="logo" class="aui-header-logo',a.headerLogoImageUrl?" aui-header-logo-custom":a.logo?" aui-header-logo-"+soy.$$escapeHtml(a.logo):"",'"><a href="',soy.$$escapeHtml(a.headerLink?a.headerLink:"/"),'">',a.headerLogoImageUrl?'<img src="'+soy.$$escapeHtml(a.headerLogoImageUrl)+'" alt="'+soy.$$escapeHtml(a.headerLogoText)+'" />':'<span class="aui-header-logo-device">'+soy.$$escapeHtml(a.headerLogoText?a.headerLogoText:"")+"</span>",a.headerText?'<span class="aui-header-logo-text">'+soy.$$escapeHtml(a.headerText)+"</span>":"","</a></h1>",a.primaryNavContent?a.primaryNavContent:"","</div>",a.secondaryNavContent?'<div class="aui-header-secondary">'+a.secondaryNavContent+"</div>":"",a.headerAfterContent?'<div class="aui-header-after">'+a.headerAfterContent+"</div>":"","</div><!-- .aui-header-inner--></nav><!-- .aui-header -->"),b?"":d.toString()},aui.page.pagePanel=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"div"),' class="aui-page-panel'),aui.renderExtraClasses(a,d,c),d.append('"',a.id?' id="'+soy.$$escapeHtml(a.id)+'"':""),aui.renderExtraAttributes(a,d,c),d.append('><div class="aui-page-panel-inner">',a.content,"</div><!-- .aui-page-panel-inner --></",soy.$$escapeHtml(a.tagName?a.tagName:"div"),"><!-- .aui-page-panel -->"),b?"":d.toString()},aui.page.pagePanelNav=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"div"),' class="aui-page-panel-nav'),aui.renderExtraClasses(a,d,c),d.append('"',a.id?' id="'+soy.$$escapeHtml(a.id)+'"':""),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</",soy.$$escapeHtml(a.tagName?a.tagName:"div"),"><!-- .aui-page-panel-nav -->"),b?"":d.toString()},aui.page.pagePanelContent=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"section"),' class="aui-page-panel-content'),aui.renderExtraClasses(a,d,c),d.append('"',a.id?' id="'+soy.$$escapeHtml(a.id)+'"':""),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</",soy.$$escapeHtml(a.tagName?a.tagName:"section"),"><!-- .aui-page-panel-content -->"),b?"":d.toString()},aui.page.pagePanelSidebar=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"aside"),' class="aui-page-panel-sidebar'),aui.renderExtraClasses(a,d,c),d.append('"',a.id?' id="'+soy.$$escapeHtml(a.id)+'"':""),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</",soy.$$escapeHtml(a.tagName?a.tagName:"aside"),"><!-- .aui-page-panel-sidebar -->"),b?"":d.toString()},aui.page.pagePanelItem=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"section"),' class="aui-page-panel-item'),aui.renderExtraClasses(a,d,c),d.append('"',a.id?' id="'+soy.$$escapeHtml(a.id)+'"':""),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</",soy.$$escapeHtml(a.tagName?a.tagName:"section"),"><!-- .aui-page-panel-item -->"),b?"":d.toString()},aui.page.pageHeader=function(a,b,c){var d=b||new soy.StringBuilder;return d.append('<header class="aui-page-header'),aui.renderExtraClasses(a,d,c),d.append('"',a.id?' id="'+soy.$$escapeHtml(a.id)+'"':""),aui.renderExtraAttributes(a,d,c),d.append('><div class="aui-page-header-inner">',a.content,"</div><!-- .aui-page-header-inner --></header><!-- .aui-page-header -->"),b?"":d.toString()},aui.page.pageHeaderImage=function(a,b,c){var d=b||new soy.StringBuilder;return d.append('<div class="aui-page-header-image'),aui.renderExtraClasses(a,d,c),d.append('"',a.id?' id="'+soy.$$escapeHtml(a.id)+'"':""),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</div><!-- .aui-page-header-image -->"),b?"":d.toString()},aui.page.pageHeaderMain=function(a,b,c){var d=b||new soy.StringBuilder;return d.append('<div class="aui-page-header-main'),aui.renderExtraClasses(a,d,c),d.append('"',a.id?' id="'+soy.$$escapeHtml(a.id)+'"':""),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</div><!-- .aui-page-header-main -->"),b?"":d.toString()},aui.page.pageHeaderActions=function(a,b,c){var d=b||new soy.StringBuilder;return d.append('<div class="aui-page-header-actions'),aui.renderExtraClasses(a,d,c),d.append('"',a.id?' id="'+soy.$$escapeHtml(a.id)+'"':""),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</div><!-- .aui-page-header-actions -->"),b?"":d.toString()},"undefined"==typeof aui)var aui={};if(aui.panel=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"div"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-panel'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</",soy.$$escapeHtml(a.tagName?a.tagName:"div"),">"),b?"":d.toString()},"undefined"==typeof aui)var aui={};if("undefined"==typeof aui.progressTracker&&(aui.progressTracker={}),aui.progressTracker.progressTracker=function(a,b,c){var d=b||new soy.StringBuilder;d.append("<ol",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-progress-tracker',a.isInverted?" aui-progress-tracker-inverted":""),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">");for(var e=new soy.StringBuilder,f=a.steps,g=f.length,h=0;g>h;h++){var i=f[h];if(i.isCurrent)for(var j=a.steps,k=j.length,l=0;k>l;l++){var m=j[l];aui.progressTracker.step(soy.$$augmentData(m,{width:Math.round(100/a.steps.length*1e4)/1e4,href:h>l?m.href:null}),e,c)}}return aui.progressTracker.content({steps:a.steps,content:e.toString()},d,c),d.append("</ol>"),b?"":d.toString()},aui.progressTracker.content=function(a,b,c){var d=b||new soy.StringBuilder;if(""!=a.content)d.append(a.content);else for(var e=a.steps,f=e.length,g=0;f>g;g++){var h=e[g];aui.progressTracker.step(soy.$$augmentData(h,{isCurrent:0==g,width:Math.round(100/a.steps.length*1e4)/1e4,href:null}),d,c)}return b?"":d.toString()},aui.progressTracker.step=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<li",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-progress-tracker-step',a.isCurrent?" aui-progress-tracker-step-current":""),aui.renderExtraClasses(a,d,c),d.append('" style="width: ',soy.$$escapeHtml(a.width),'%;"'),aui.renderExtraAttributes(a,d,c),d.append("><",soy.$$escapeHtml(a.href?"a":"span"),a.href?' href="'+soy.$$escapeHtml(a.href)+'"':"",">",soy.$$escapeHtml(a.text),"</",soy.$$escapeHtml(a.href?"a":"span"),"></li>"),b?"":d.toString()},"undefined"==typeof aui)var aui={};if(aui.table=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<table",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.columnsContent?a.columnsContent:"",a.captionContent?"<caption>"+a.captionContent+"</caption>":"",a.theadContent?"<thead>"+a.theadContent+"</thead>":"",a.tfootContent?"<tfoot>"+a.tfootContent+"</tfoot>":"",a.contentIncludesTbody?"":"<tbody>",a.content,a.contentIncludesTbody?"":"</tbody>","</table>"),b?"":d.toString()},"undefined"==typeof aui)var aui={};if(aui.tabs=function(a,b,c){var d=b||new soy.StringBuilder;d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"div"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-tabs ',soy.$$escapeHtml(a.isVertical?"vertical-tabs":"horizontal-tabs"),a.isDisabled?" aui-tabs-disabled":""),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append('><ul class="tabs-menu">');for(var e=a.menuItems,f=e.length,g=0;f>g;g++){var h=e[g];aui.tabMenuItem(h,d,c)}return d.append("</ul>",a.paneContent,"</",soy.$$escapeHtml(a.tagName?a.tagName:"div"),">"),b?"":d.toString()},aui.tabMenuItem=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<li",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="menu-item',a.isActive?" active-tab":""),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append('><a href="',soy.$$escapeHtml(a.url),'"><strong>',soy.$$escapeHtml(a.text),"</strong></a></li>"),b?"":d.toString()},aui.tabPane=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"div"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="tabs-pane',a.isActive?" active-pane":""),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</",soy.$$escapeHtml(a.tagName?a.tagName:"div"),">"),b?"":d.toString()},"undefined"==typeof aui)var aui={};if("undefined"==typeof aui.toolbar&&(aui.toolbar={}),aui.toolbar.toolbar=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"div"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-toolbar'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</",soy.$$escapeHtml(a.tagName?a.tagName:"div"),">"),b?"":d.toString() },aui.toolbar.split=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<",soy.$$escapeHtml(a.tagName?a.tagName:"div"),a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="toolbar-split toolbar-split-',soy.$$escapeHtml(a.split)),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</",soy.$$escapeHtml(a.tagName?a.tagName:"div"),">"),b?"":d.toString()},aui.toolbar.group=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<ul",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="toolbar-group'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</ul>"),b?"":d.toString()},aui.toolbar.item=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<li ",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="toolbar-item',a.isPrimary?" primary":"",a.isActive?" active":""),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</li>"),b?"":d.toString()},aui.toolbar.trigger=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<a",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="toolbar-trigger'),aui.renderExtraClasses(a,d,c),d.append('" href="',soy.$$escapeHtml(a.url?a.url:"#"),'"',a.title?' title="'+soy.$$escapeHtml(a.title)+'"':""),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</a>"),b?"":d.toString()},aui.toolbar.button=function(a,b,c){var d=b||new soy.StringBuilder;if(null==a)d.append("Either $text or both $title and $iconClass must be provided.");else{var e=new soy.StringBuilder;aui.toolbar.trigger({url:a.url,title:a.title,content:(a.iconClass?'<span class="icon '+soy.$$escapeHtml(a.iconClass)+'"></span>':"")+(a.text?'<span class="trigger-text">'+soy.$$escapeHtml(a.text)+"</span>":"")},e,c),aui.toolbar.item({isActive:a.isActive,isPrimary:a.isPrimary,id:a.id,extraClasses:a.extraClasses,extraAttributes:a.extraAttributes,content:e.toString()},d,c)}return b?"":d.toString()},aui.toolbar.link=function(a,b,c){var d=b||new soy.StringBuilder,e=new soy.StringBuilder("toolbar-item-link");aui.renderExtraClasses(a,e,c);var f=new soy.StringBuilder;return aui.toolbar.trigger({url:a.url,content:soy.$$escapeHtml(a.text)},f,c),aui.toolbar.item({id:a.id,extraClasses:e.toString(),extraAttributes:a.extraAttributes,content:f.toString()},d,c),b?"":d.toString()},aui.toolbar.dropdownInternal=function(a,b,c){var d=b||new soy.StringBuilder,e=new soy.StringBuilder(a.itemClass);aui.renderExtraClasses(a,e,c);var f=new soy.StringBuilder(a.splitButtonContent?a.splitButtonContent:""),g=new soy.StringBuilder;return aui.dropdown.trigger({extraClasses:"toolbar-trigger",accessibilityText:a.text},g,c),aui.dropdown.menu({content:a.dropdownItemsContent},g,c),aui.dropdown.parent({content:g.toString()},f,c),aui.toolbar.item({isPrimary:a.isPrimary,id:a.id,extraClasses:e.toString(),extraAttributes:a.extraAttributes,content:f.toString()},d,c),b?"":d.toString()},aui.toolbar.dropdown=function(a,b,c){var d=b||new soy.StringBuilder;return aui.toolbar.dropdownInternal({isPrimary:a.isPrimary,id:a.id,itemClass:"toolbar-dropdown",extraClasses:a.extraClasses,extraAttributes:a.extraAttributes,text:a.text,dropdownItemsContent:a.dropdownItemsContent},d,c),b?"":d.toString()},aui.toolbar.splitButton=function(a,b,c){var d=b||new soy.StringBuilder,e=new soy.StringBuilder;return aui.toolbar.trigger({url:a.url,content:soy.$$escapeHtml(a.text)},e,c),aui.toolbar.dropdownInternal({isPrimary:a.isPrimary,id:a.id,itemClass:"toolbar-splitbutton",extraClasses:a.extraClasses,extraAttributes:a.extraAttributes,dropdownItemsContent:a.dropdownItemsContent,splitButtonContent:e.toString()},d,c),b?"":d.toString()},"undefined"==typeof aui)var aui={};"undefined"==typeof aui.toolbar2&&(aui.toolbar2={}),aui.toolbar2.toolbar2=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<div",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-toolbar2'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(' role="toolbar"><div class="aui-toolbar2-inner">',a.content,"</div></div>"),b?"":d.toString()},aui.toolbar2.item=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<div",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-toolbar2-',soy.$$escapeHtml(a.item)),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</div>"),b?"":d.toString()},aui.toolbar2.group=function(a,b,c){var d=b||new soy.StringBuilder;return d.append("<div",a.id?' id="'+soy.$$escapeHtml(a.id)+'"':"",' class="aui-toolbar2-group'),aui.renderExtraClasses(a,d,c),d.append('"'),aui.renderExtraAttributes(a,d,c),d.append(">",a.content,"</div>"),b?"":d.toString()};
src/index.js
Sharlaan/selfchat
import { deepOrange, lightBlue } from '@material-ui/core/colors'; import { createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles'; import React from 'react'; import { render } from 'react-dom'; import App from './App'; import './index.css'; // Default theme values: https://material-ui.com/customization/default-theme/ const customTheme = createMuiTheme({ typography: { fontFamily: 'Raleway, sans-serif', }, palette: { primary: { main: lightBlue[500], }, secondary: { main: deepOrange[400], }, // text: { // color: blueGrey[700], // }, }, overrides: { MuiCheckbox: { root: { '&$checked': { color: deepOrange[400], }, }, // boxColor: blueGrey[500], }, // svgIcon: { // color: blueGrey[500], // }, }, }); render( <MuiThemeProvider theme={customTheme}> <App /> </MuiThemeProvider>, document.getElementById('root'), );
public/vendors/select2/docs/vendor/js/jquery.min.js
ashi9422/Chumps
/*! jQuery v1.11.2 | (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.2",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)+1>=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"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),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-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","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)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){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 gb(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(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(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 hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(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 mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(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 pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.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",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(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(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="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))&&(jb(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(".#.+[+~]")}),jb(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))&&jb(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 lb(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?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.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 gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.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},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.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=gb.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=gb.selectors={cacheLength:50,createPseudo:ib,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]||gb.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]&&gb.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("(^|"+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=gb.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()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(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:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(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:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.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:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(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]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=new qb,g=gb.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?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(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 tb(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 ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(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 wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(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=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(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=[sb(tb(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 wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(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=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.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)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(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}),gb}(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(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,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.removeChild(i)),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=m.event&&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._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.attachEvent&&a.attachEvent("onunload",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.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),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});
6.0.0-rc.1/examples/react-widgets/dist/bundle.js
erikras/redux-form-docs
!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="/dist/",t(0)}([function(e,t,n){n(322),e.exports=n(321)},function(e,t,n){var r=n(5),o=n(34),i=n(18),a=n(20),u=n(39),s="prototype",l=function(e,t,n){var c,p,f,d,A=e&l.F,h=e&l.G,v=e&l.S,m=e&l.P,y=e&l.B,g=h?r:v?r[t]||(r[t]={}):(r[t]||{})[s],b=h?o:o[t]||(o[t]={}),w=b[s]||(b[s]={});h&&(n=t);for(c in n)p=!A&&g&&void 0!==g[c],f=(p?g:n)[c],d=y&&p?u(f,r):m&&"function"==typeof f?u(Function.call,f):f,g&&a(g,c,f,e&l.U),b[c]!=f&&i(b,c,d),m&&w[c]!=f&&(w[c]=f)};r.core=o,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){"use strict";function r(e,t,n,r,o,i,a,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,i,a,u],c=0;s=new Error(t.replace(/%s/g,function(){return l[c++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}e.exports=r},function(e,t,n){var r=n(8);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";var r=n(30),o=r;e.exports=o},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){"use strict";e.exports=n(645)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(100)("wks"),o=n(66),i=n(5).Symbol,a="function"==typeof i,u=e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))};u.store=r},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;10>n;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}}var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,a,u=n(e),s=1;s<arguments.length;s++){r=Object(arguments[s]);for(var l in r)o.call(r,l)&&(u[l]=r[l]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var c=0;c<a.length;c++)i.call(r,a[c])&&(u[a[c]]=r[a[c]])}}return u}},function(e,t,n){e.exports=!n(6)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(3),o=n(207),i=n(36),a=Object.defineProperty;t.f=n(11)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(u){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";function r(e){for(var t;t=e._renderedComponent;)e=t;return e}function o(e,t){var n=r(e);n._nativeNode=t,t[h]=n}function i(e){var t=e._nativeNode;t&&(delete t[h],e._nativeNode=null)}function a(e,t){if(!(e._flags&A.hasCachedChildNodes)){var n=e._renderedChildren,i=t.firstChild;e:for(var a in n)if(n.hasOwnProperty(a)){var u=n[a],s=r(u)._domID;if(null!=s){for(;null!==i;i=i.nextSibling)if(1===i.nodeType&&i.getAttribute(d)===String(s)||8===i.nodeType&&i.nodeValue===" react-text: "+s+" "||8===i.nodeType&&i.nodeValue===" react-empty: "+s+" "){o(u,i);continue e}f(!1)}}e._flags|=A.hasCachedChildNodes}}function u(e){if(e[h])return e[h];for(var t=[];!e[h];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,r;e&&(r=e[h]);e=t.pop())n=r,t.length&&a(r,e);return n}function s(e){var t=u(e);return null!=t&&t._nativeNode===e?t:null}function l(e){if(void 0===e._nativeNode?f(!1):void 0,e._nativeNode)return e._nativeNode;for(var t=[];!e._nativeNode;)t.push(e),e._nativeParent?void 0:f(!1),e=e._nativeParent;for(;t.length;e=t.pop())a(e,e._nativeNode);return e._nativeNode}var c=n(69),p=n(286),f=n(2),d=c.ID_ATTRIBUTE_NAME,A=p,h="__reactInternalInstance$"+Math.random().toString(36).slice(2),v={getClosestInstanceFromNode:u,getInstanceFromNode:s,getNodeFromInstance:l,precacheChildNodes:a,precacheNode:o,uncacheNode:i};e.exports=v},function(e,t,n){var r=n(50),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(28);e.exports=function(e){return Object(r(e))}},function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};e.exports=r},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(12),o=n(49);e.exports=n(11)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},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(5),o=n(18),i=n(17),a=n(66)("src"),u="toString",s=Function[u],l=(""+s).split(u);n(34).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,u){var s="function"==typeof n;s&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(s&&(i(n,a)||o(n,a,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:u?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,u,function(){return"function"==typeof this&&this[a]||s.call(this)})},function(e,t,n){var r=n(1),o=n(6),i=n(28),a=/"/g,u=function(e,t,n,r){var o=String(i(e)),u="<"+t;return""!==n&&(u+=" "+n+'="'+String(r).replace(a,"&quot;")+'"'),u+">"+o+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(u),r(r.P+r.F*o(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){var r=n(79),o=n(28);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(80),o=n(49),i=n(22),a=n(36),u=n(17),s=n(207),l=Object.getOwnPropertyDescriptor;t.f=n(11)?l:function(e,t){if(e=i(e),t=a(t,!0),s)try{return l(e,t)}catch(n){}return u(e,t)?o(!r.f.call(e,t),e[t]):void 0}},function(e,t,n){var r=n(17),o=n(15),i=n(140)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){(function(t){var r=n(558),o=r("object"==typeof t&&t),i=r("object"==typeof self&&self),a=r("object"==typeof this&&this),u=o||i||a||Function("return this")();e.exports=u}).call(t,function(){return this}())},function(e,t,n){"use strict";var r=n(665);e.exports={debugTool:r}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},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(6);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};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){"use strict";function n(e,t){return e?Object.prototype.hasOwnProperty.call(e,t):!1}function r(e,t){return e===t}function o(e,t){if(null==e||null==t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;for(var a=0;a<o.length;a++)if(!n(t,o[a])||!r(e[o[a]],t[o[a]]))return!1;return!0}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=0,u=e.exports={has:n,result:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},isShallowEqual:function(e,t){return e===t?!0:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():"object"!==("undefined"==typeof e?"undefined":i(e))&&"object"!==("undefined"==typeof t?"undefined":i(t))?e===t:("undefined"==typeof e?"undefined":i(e))!==("undefined"==typeof t?"undefined":i(t))?!1:o(e,t)},transform:function(e,t,n){return u.each(e,t.bind(null,n=n||(Array.isArray(e)?[]:{}))),n},each:function(e,t,r){if(Array.isArray(e))return e.forEach(t,r);for(var o in e)n(e,o)&&t.call(r,e[o],o,e)},pick:function(e,t){return t=[].concat(t),u.transform(e,function(e,n,r){-1!==t.indexOf(r)&&(e[r]=n)},{})},omit:function(e,t){return t=[].concat(t),u.transform(e,function(e,n,r){-1===t.indexOf(r)&&(e[r]=n)},{})},find:function(e,t,r){var o;if(Array.isArray(e))return e.every(function(n,i){return t.call(r,n,i,e)?(o=n,!1):!0}),o;for(var i in e)if(n(e,i)&&t.call(r,e[i],i,e))return e[i]},chunk:function(e,t){var n=0,r=e?e.length:0,o=[];for(t=Math.max(+t||1,1);r>n;)o.push(e.slice(n,n+=t));return o},splat:function(e){return null==e?[]:[].concat(e)},noop:function(){},uniqueId:function(e){return""+((null==e?"":e)+ ++a)}}},function(e,t,n){"use strict";var r=n(10),o=n(57),i=(n(4),n(185),"function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103),a={key:!0,ref:!0,__self:!0,__source:!0},u=function(e,t,n,r,o,a,u){var s={$$typeof:i,type:e,key:t,ref:n,props:u,_owner:a};return s};u.createElement=function(e,t,n){var r,i={},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(r in t)t.hasOwnProperty(r)&&!a.hasOwnProperty(r)&&(i[r]=t[r])}var f=arguments.length-2;if(1===f)i.children=n;else if(f>1){for(var d=Array(f),A=0;f>A;A++)d[A]=arguments[A+2];i.children=d}if(e&&e.defaultProps){var h=e.defaultProps;for(r in h)void 0===i[r]&&(i[r]=h[r])}return u(e,s,l,c,p,o.current,i)},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.cloneElement=function(e,t,n){var i,s=r({},e.props),l=e.key,c=e.ref,p=e._self,f=e._source,d=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,d=o.current),void 0!==t.key&&(l=""+t.key);var A;e.type&&e.type.defaultProps&&(A=e.type.defaultProps);for(i in t)t.hasOwnProperty(i)&&!a.hasOwnProperty(i)&&(void 0===t[i]&&void 0!==A?s[i]=A[i]:s[i]=t[i])}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,f,d,s)},u.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},e.exports=u},function(e,t,n){var r=n(39),o=n(79),i=n(15),a=n(14),u=n(325);e.exports=function(e,t){var n=1==e,s=2==e,l=3==e,c=4==e,p=6==e,f=5==e||p,d=t||u;return function(t,u,A){for(var h,v,m=i(t),y=o(m),g=r(u,A,3),b=a(y.length),w=0,_=n?d(t,b):s?d(t,0):void 0;b>w;w++)if((f||w in y)&&(h=y[w],v=g(h,w,m),e))if(n)_[w]=v;else if(v)switch(e){case 3:return!0;case 5:return h;case 6:return w;case 2:_.push(h)}else if(c)return!1;return p?-1:l||c?c:_}}},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(1),o=n(34),i=n(6);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(e,t,n){var r=n(8);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";function r(){P.ReactReconcileTransaction&&w?void 0:v(!1)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=p.getPooled(),this.reconcileTransaction=P.ReactReconcileTransaction.getPooled(!0)}function i(e,t,n,o,i,a){r(),w.batchedUpdates(e,t,n,o,i,a)}function a(e,t){return e._mountOrder-t._mountOrder}function u(e){var t=e.dirtyComponentsLength;t!==m.length?v(!1):void 0,m.sort(a),y++;for(var n=0;t>n;n++){var r=m[n],o=r._pendingCallbacks;r._pendingCallbacks=null;var i;if(d.logTopLevelRenders){var u=r;r._currentElement.props===r._renderedComponent._currentElement&&(u=r._renderedComponent),i="React update: "+u.getName(),console.time(i)}if(A.performUpdateIfNecessary(r,e.reconcileTransaction,y),i&&console.timeEnd(i),o)for(var s=0;s<o.length;s++)e.callbackQueue.enqueue(o[s],r.getPublicInstance())}}function s(e){return r(),w.isBatchingUpdates?(m.push(e),void(null==e._updateBatchNumber&&(e._updateBatchNumber=y+1))):void w.batchedUpdates(s,e)}function l(e,t){w.isBatchingUpdates?void 0:v(!1),g.enqueue(e,t),b=!0}var c=n(10),p=n(280),f=n(56),d=n(290),A=(n(26),n(78)),h=n(123),v=n(2),m=[],y=0,g=p.getPooled(),b=!1,w=null,_={initialize:function(){this.dirtyComponentsLength=m.length},close:function(){this.dirtyComponentsLength!==m.length?(m.splice(0,this.dirtyComponentsLength),C()):m.length=0}},E={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},x=[_,E];c(o.prototype,h.Mixin,{getTransactionWrappers:function(){return x},destructor:function(){this.dirtyComponentsLength=null,p.release(this.callbackQueue),this.callbackQueue=null,P.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)}}),f.addPoolingTo(o);var C=function(){for(;m.length||b;){if(m.length){var e=o.getPooled();e.perform(u,null,e),o.release(e)}if(b){b=!1;var t=g;g=p.getPooled(),t.notifyAll(),p.release(t)}}},S={injectReconcileTransaction:function(e){e?void 0:v(!1),P.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e?void 0:v(!1),"function"!=typeof e.batchedUpdates?v(!1):void 0,"boolean"!=typeof e.isBatchingUpdates?v(!1):void 0,w=e}},P={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:s,flushBatchedUpdates:C,injection:S,asap:l};e.exports=P},function(e,t,n){var r=n(19);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,n){var r=n(222),o=n(1),i=n(100)("metadata"),a=i.store||(i.store=new(n(225))),u=function(e,t,n){var o=a.get(e);if(!o){if(!n)return;a.set(e,o=new r)}var i=o.get(t);if(!i){if(!n)return;o.set(t,i=new r)}return i},s=function(e,t,n){var r=u(t,n,!1);return void 0===r?!1:r.has(e)},l=function(e,t,n){var r=u(t,n,!1);return void 0===r?void 0:r.get(e)},c=function(e,t,n,r){u(n,r,!0).set(e,t)},p=function(e,t){var n=u(e,t,!1),r=[];return n&&n.forEach(function(e,t){r.push(t)}),r},f=function(e){return void 0===e||"symbol"==typeof e?e:String(e)},d=function(e){o(o.S,"Reflect",e)};e.exports={store:a,map:u,has:s,get:l,set:c,keys:p,key:f,exp:d}},function(e,t,n){"use strict";if(n(11)){var r=n(59),o=n(5),i=n(6),a=n(1),u=n(101),s=n(147),l=n(39),c=n(47),p=n(49),f=n(18),d=n(63),A=(n(134),n(50)),h=n(14),v=n(65),m=n(36),y=n(17),g=n(219),b=n(71),w=n(8),_=n(15),E=n(132),x=n(60),C=n(24),S=n(61).f,P=(n(332),n(149)),T=n(66),O=n(9),M=n(33),I=n(90),k=n(141),R=n(150),N=n(58),D=n(96),F=n(64),j=n(125),L=n(200),U=n(12),B=n(23),V=U.f,Q=B.f,z=o.RangeError,W=o.TypeError,K=o.Uint8Array,q="ArrayBuffer",G="Shared"+q,H="BYTES_PER_ELEMENT",Y="prototype",J=Array[Y],Z=s.ArrayBuffer,X=s.DataView,$=M(0),ee=M(2),te=M(3),ne=M(4),re=M(5),oe=M(6),ie=I(!0),ae=I(!1),ue=R.values,se=R.keys,le=R.entries,ce=J.lastIndexOf,pe=J.reduce,fe=J.reduceRight,de=J.join,Ae=J.sort,he=J.slice,ve=J.toString,me=J.toLocaleString,ye=O("iterator"),ge=O("toStringTag"),be=T("typed_constructor"),we=T("def_constructor"),_e=u.CONSTR,Ee=u.TYPED,xe=u.VIEW,Ce="Wrong length!",Se=M(1,function(e,t){return ke(k(e,e[we]),t)}),Pe=i(function(){return 1===new K(new Uint16Array([1]).buffer)[0]}),Te=!!K&&!!K[Y].set&&i(function(){new K(1).set({})}),Oe=function(e,t){if(void 0===e)throw W(Ce);var n=+e,r=h(e);if(t&&!g(n,r))throw z(Ce);return r},Me=function(e,t){var n=A(e);if(0>n||n%t)throw z("Wrong offset!");return n},Ie=function(e){if(w(e)&&Ee in e)return e;throw W(e+" is not a typed array!")},ke=function(e,t){if(!(w(e)&&be in e))throw W("It is not a typed array constructor!");return new e(t)},Re=function(e,t){return Ne(k(e,e[we]),t)},Ne=function(e,t){for(var n=0,r=t.length,o=ke(e,r);r>n;)o[n]=t[n++];return o},De=function(e,t,n){V(e,t,{get:function(){return this._d[n]}})},Fe=function(e){var t,n,r,o,i,a,u=_(e),s=arguments.length,c=s>1?arguments[1]:void 0,p=void 0!==c,f=P(u);if(void 0!=f&&!E(f)){for(a=f.call(u),r=[],t=0;!(i=a.next()).done;t++)r.push(i.value);u=r}for(p&&s>2&&(c=l(c,arguments[2],2)),t=0,n=h(u.length),o=ke(this,n);n>t;t++)o[t]=p?c(u[t],t):u[t];return o},je=function(){for(var e=0,t=arguments.length,n=ke(this,t);t>e;)n[e]=arguments[e++];return n},Le=!!K&&i(function(){me.call(new K(1))}),Ue=function(){return me.apply(Le?he.call(Ie(this)):Ie(this),arguments)},Be={copyWithin:function(e,t){return L.call(Ie(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return ne(Ie(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return j.apply(Ie(this),arguments)},filter:function(e){return Re(this,ee(Ie(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return re(Ie(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return oe(Ie(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){$(Ie(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ae(Ie(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return ie(Ie(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return de.apply(Ie(this),arguments)},lastIndexOf:function(e){return ce.apply(Ie(this),arguments)},map:function(e){return Se(Ie(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return pe.apply(Ie(this),arguments)},reduceRight:function(e){return fe.apply(Ie(this),arguments)},reverse:function(){for(var e,t=this,n=Ie(t).length,r=Math.floor(n/2),o=0;r>o;)e=t[o],t[o++]=t[--n],t[n]=e;return t},some:function(e){return te(Ie(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return Ae.call(Ie(this),e)},subarray:function(e,t){var n=Ie(this),r=n.length,o=v(e,r);return new(k(n,n[we]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,h((void 0===t?r:v(t,r))-o))}},Ve=function(e,t){return Re(this,he.call(Ie(this),e,t))},Qe=function(e){Ie(this);var t=Me(arguments[1],1),n=this.length,r=_(e),o=h(r.length),i=0;if(o+t>n)throw z(Ce);for(;o>i;)this[t+i]=r[i++]},ze={entries:function(){return le.call(Ie(this))},keys:function(){return se.call(Ie(this))},values:function(){return ue.call(Ie(this))}},We=function(e,t){return w(e)&&e[Ee]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},Ke=function(e,t){return We(e,t=m(t,!0))?p(2,e[t]):Q(e,t)},qe=function(e,t,n){return!(We(e,t=m(t,!0))&&w(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?V(e,t,n):(e[t]=n.value,e)};_e||(B.f=Ke,U.f=qe),a(a.S+a.F*!_e,"Object",{getOwnPropertyDescriptor:Ke,defineProperty:qe}),i(function(){ve.call({})})&&(ve=me=function(){return de.call(this)});var Ge=d({},Be);d(Ge,ze),f(Ge,ye,ze.values),d(Ge,{slice:Ve,set:Qe,constructor:function(){},toString:ve,toLocaleString:Ue}),De(Ge,"buffer","b"),De(Ge,"byteOffset","o"),De(Ge,"byteLength","l"),De(Ge,"length","e"),V(Ge,ge,{get:function(){return this[Ee]}}),e.exports=function(e,t,n,s){s=!!s;var l=e+(s?"Clamped":"")+"Array",p="Uint8Array"!=l,d="get"+e,A="set"+e,v=o[l],m=v||{},y=v&&C(v),g=!v||!u.ABV,_={},E=v&&v[Y],P=function(e,n){var r=e._d;return r.v[d](n*t+r.o,Pe)},T=function(e,n,r){var o=e._d;s&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),o.v[A](n*t+o.o,r,Pe)},O=function(e,t){V(e,t,{get:function(){return P(this,t)},set:function(e){return T(this,t,e)},enumerable:!0})};g?(v=n(function(e,n,r,o){c(e,v,l,"_d");var i,a,u,s,p=0,d=0;if(w(n)){if(!(n instanceof Z||(s=b(n))==q||s==G))return Ee in n?Ne(v,n):Fe.call(v,n);i=n,d=Me(r,t);var A=n.byteLength;if(void 0===o){if(A%t)throw z(Ce);if(a=A-d,0>a)throw z(Ce)}else if(a=h(o)*t,a+d>A)throw z(Ce);u=a/t}else u=Oe(n,!0),a=u*t,i=new Z(a);for(f(e,"_d",{b:i,o:d,l:a,e:u,v:new X(i)});u>p;)O(e,p++)}),E=v[Y]=x(Ge),f(E,"constructor",v)):D(function(e){new v(null),new v(e)},!0)||(v=n(function(e,n,r,o){c(e,v,l);var i;return w(n)?n instanceof Z||(i=b(n))==q||i==G?void 0!==o?new m(n,Me(r,t),o):void 0!==r?new m(n,Me(r,t)):new m(n):Ee in n?Ne(v,n):Fe.call(v,n):new m(Oe(n,p))}),$(y!==Function.prototype?S(m).concat(S(y)):S(m),function(e){e in v||f(v,e,m[e])}),v[Y]=E,r||(E.constructor=v));var M=E[ye],I=!!M&&("values"==M.name||void 0==M.name),k=ze.values;f(v,be,!0),f(E,Ee,l),f(E,xe,!0),f(E,we,v),(s?new v(1)[ge]==l:ge in E)||V(E,ge,{get:function(){return l}}),_[l]=v,a(a.G+a.W+a.F*(v!=m),_),a(a.S,l,{BYTES_PER_ELEMENT:t,from:Fe,of:je}),H in E||f(E,H,t),a(a.P,l,Be),F(l),a(a.P+a.F*Te,l,{set:Qe}),a(a.P+a.F*!I,l,ze),a(a.P+a.F*(E.toString!=ve),l,{toString:ve}),a(a.P+a.F*i(function(){new v(1).slice()}),l,{slice:Ve}),a(a.P+a.F*(i(function(){return[1,2].toLocaleString()!=new v([1,2]).toLocaleString()})||!i(function(){E.toLocaleString.call([1,2])})),l,{toLocaleString:Ue}),N[l]=I?M:k,r||I||f(E,ye,k)}}else e.exports=function(){}},function(e,t,n){"use strict";function r(e,t){var n=e;return"function"==typeof t?n=t(e):null==e?n=e:"string"==typeof t&&"object"===("undefined"==typeof e?"undefined":l(e))&&t in e&&(n=e[t]),n}function o(e,t){return t&&e&&(0,c.has)(e,t)?e[t]:e}function i(e,t){var n=r(e,t);return null==n?"":n+""}function a(e,t,n){for(var r=-1,o=e.length,i=function(e){return u(t,e,n)};++r<o;)if(i(e[r]))return r;return-1}function u(e,t,n){return(0,c.isShallowEqual)(o(e,n),o(t,n))}function s(e,t,n){var r,i=e[0];return(0,c.has)(t,n)||("undefined"==typeof i?"undefined":l(i))===("undefined"==typeof t?"undefined":l(t))?t:(r=a(e,o(t,n),n),-1!==r?e[r]:t)}t.__esModule=!0;var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.dataValue=o,t.dataText=i,t.dataIndexOf=a,t.valueMatcher=u,t.dataItem=s;var c=n(31)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=[a.PropTypes.bool,a.PropTypes.oneOf([e])],n=a.PropTypes.oneOfType(t);return n.acceptsArray=a.PropTypes.oneOfType(t.concat(a.PropTypes.array)),n}function i(e){function t(t,n,r,o,i){return o=o||"<<anonymous>>",null!=n[r]?e(n,r,o,i):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}var a=n(7),u=r(a),s=n(635),l=r(s),c=n(175),p=r(c),f=Object.keys(p["default"]).filter(function(e){return"filter"!==e});e.exports={elementType:i(function(e,t,n){if("function"!=typeof e[t]){if(u["default"].isValidElement(e[t]))return new Error("Invalid prop `"+t+"` specified in `"+n+"`. Expected an Element `type`, not an actual Element");if("string"!=typeof e[t])return new Error("Invalid prop `"+t+"` specified in `"+n+"`. Expected an Element `type` such as a tag name or return value of React.createClass(...)")}return null}),numberFormat:i(function(){var e;return(e=l["default"].number).propType.apply(e,arguments)}),dateFormat:i(function(){var e;return(e=l["default"].date).propType.apply(e,arguments)}),disabled:o("disabled"),readOnly:o("readOnly"),accessor:u["default"].PropTypes.oneOfType([u["default"].PropTypes.string,u["default"].PropTypes.func]),message:u["default"].PropTypes.oneOfType([u["default"].PropTypes.node,u["default"].PropTypes.string]),filter:u["default"].PropTypes.oneOfType([u["default"].PropTypes.func,u["default"].PropTypes.bool,u["default"].PropTypes.oneOf(f)])}},function(e,t,n){"use strict";var r=n(104),o=r({bubbled:null,captured:null}),i=r({topAbort:null,topAnimationEnd:null,topAnimationIteration:null,topAnimationStart: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,topInvalid: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,topTransitionEnd:null,topVolumeChange:null,topWaiting:null,topWheel:null}),a={topLevelTypes:i,PropagationPhases:o};e.exports=a},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var o=this.constructor.Interface;for(var i in o)if(o.hasOwnProperty(i)){var u=o[i];u?this[i]=u(n):"target"===i?this.target=r:this[i]=n[i]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return s?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var o=n(10),i=n(56),a=n(30),u=(n(4),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),s={type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};o(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(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;for(var n=0;n<u.length;n++)this[u[n]]=null}}),r.Interface=s,r.augmentClass=function(e,t){var n=this,r=function(){};r.prototype=n.prototype;var a=new r;o(a,e.prototype),e.prototype=a,e.prototype.constructor=e,e.Interface=o({},n.Interface,t),e.augmentClass=n.augmentClass,i.addPoolingTo(e,i.fourArgumentPooler)},i.addPoolingTo(r,i.fourArgumentPooler),e.exports=r},function(e,t,n){var r,o;/*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===o)for(var a in r)i.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=n:(r=[],o=function(){return n}.apply(t,r),!(void 0!==o&&(e.exports=o)))}()},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(66)("meta"),o=n(8),i=n(17),a=n(12).f,u=0,s=Object.isExtensible||function(){return!0},l=!n(6)(function(){return s(Object.preventExtensions({}))}),c=function(e){a(e,r,{value:{i:"O"+ ++u,w:{}}})},p=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!s(e))return"F";if(!t)return"E";c(e)}return e[r].i},f=function(e,t){if(!i(e,r)){if(!s(e))return!0;if(!t)return!1;c(e)}return e[r].w},d=function(e){return l&&A.NEED&&s(e)&&!i(e,r)&&c(e),e},A=e.exports={KEY:r,NEED:!1,fastKey:p,getWeak:f,onFreeze:d}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){"use strict";var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=n},function(e,t,n){"use strict";var r=function(e,t,n,r,o,i,a,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,i,a,u],c=0;s=new Error(t.replace(/%s/g,function(){return l[c++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}};e.exports=r},function(e,t){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(7),i=r(o),a=n(271),u=r(a),s=i["default"].version.split(".").map(parseFloat);e.exports={version:function(){return s},findDOMNode:function(e){return u["default"].findDOMNode(e)},batchedUpdates:function(e){u["default"].unstable_batchedUpdates(e)}}},function(e,t,n){"use strict";function r(e){return e.disabled===!0||"disabled"===e.disabled}function o(e){return e.readOnly===!0||"readOnly"===e.readOnly}function i(e,t){return r(t)||u(e,t.disabled,t.valueField)}function a(e,t){return o(t)||u(e,t.readOnly,t.valueField)}function u(e,t,n){return Array.isArray(t)?t.some(function(t){return(0,c.valueMatcher)(e,t,n)}):(0,c.valueMatcher)(e,t,n)}function s(e,t,n,r){for(var o=function(e){return i(e,n)||a(e,n)},u="next"===e?r.last():r.first(),s=r[e](t);s!==u&&o(s);)s=r[e](s);return o(s)?t:s}function l(e){function t(t){return function(){for(var n=arguments.length,i=Array(n),a=0;n>a;a++)i[a]=arguments[a];return r(this.props)||!e&&o(this.props)?void 0:t.apply(this,i)}}return function(e,n,r){return r.initializer?!function(){var e=r.initializer;r.initializer=function(){return t(e())}}():r.value=t(r.value),r}}t.__esModule=!0,t.widgetEditable=t.widgetEnabled=void 0,t.isDisabled=r,t.isReadOnly=o,t.isDisabledItem=i,t.isReadOnlyItem=a,t.contains=u,t.move=s;var c=n(42);t.widgetEnabled=l(!0),t.widgetEditable=l(!1)},function(e,t,n){"use strict";var r=n(2),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)},u=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},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)},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,f=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||p,n.poolSize||(n.poolSize=c),n.release=l,n},d={addPoolingTo:f,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:u,fiveArgumentPooler:s};e.exports=d},function(e,t){"use strict";var n={current:null};e.exports=n},function(e,t){e.exports={}},function(e,t){e.exports=!1},function(e,t,n){var r=n(3),o=n(212),i=n(128),a=n(140)("IE_PROTO"),u=function(){},s="prototype",l=function(){var e,t=n(127)("iframe"),r=i.length,o=">";for(t.style.display="none",n(130).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object</script"+o),e.close(),l=e.F;r--;)delete l[s][i[r]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(u[s]=r(e),n=new u,u[s]=null,n[a]=e):n=l(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(214),o=n(128).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(214),o=n(128);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(20);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){"use strict";var r=n(5),o=n(12),i=n(11),a=n(9)("species");e.exports=function(e){var t=r[e];i&&t&&!t[a]&&o.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(50),o=Math.max,i=Math.min;e.exports=function(e,t){return e=r(e),0>e?o(e+t,0):i(e,t)}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";function r(e,t){e&&e.apply(null,[].concat(t))}function o(e){var t=arguments.length<=1||void 0===arguments[1]?"":arguments[1];return e.__id||(e.__id=(0,a.uniqueId)("rw_")),(e.props.id||e.__id)+t}function i(e){return e._firstFocus||e.state.focused&&(e._firstFocus=!0)}t.__esModule=!0,t.notify=r,t.instanceId=o,t.isFirstFocusedRender=i;var a=n(31)},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=n(2),i={MUST_USE_PROPERTY:1,HAS_SIDE_EFFECTS:2,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(e){var t=i,n=e.Properties||{},a=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 f=p.toLowerCase(),d=n[p],A={attributeName:f,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseProperty:r(d,t.MUST_USE_PROPERTY),hasSideEffects:r(d,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(d,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(d,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(d,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(d,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(!A.mustUseProperty&&A.hasSideEffects?o(!1):void 0,A.hasBooleanValue+A.hasNumericValue+A.hasOverloadedBooleanValue<=1?void 0:o(!1),s.hasOwnProperty(p)){var h=s[p];A.attributeName=h}a.hasOwnProperty(p)&&(A.attributeNamespace=a[p]),l.hasOwnProperty(p)&&(A.propertyName=l[p]),c.hasOwnProperty(p)&&(A.mutationMethod=c[p]),u.properties[p]=A}}},a=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",u={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:a,ATTRIBUTE_NAME_CHAR:a+"\\-.0-9\\uB7\\u0300-\\u036F\\u203F-\\u2040",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},injection:i};e.exports=u},function(e,t,n){var r=n(9)("unscopables"),o=Array.prototype;void 0==o[r]&&n(18)(o,r,{}),e.exports=function(e){o[r][e]=!0}},function(e,t,n){var r=n(27),o=n(9)("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(n){}};e.exports=function(e){var t,n,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=a(t=Object(e),o))?n:i?r(t):"Object"==(u=r(t))&&"function"==typeof t.callee?"Arguments":u}},function(e,t,n){var r=n(39),o=n(208),i=n(132),a=n(3),u=n(14),s=n(149),l={},c={},t=e.exports=function(e,t,n,p,f){var d,A,h,v,m=f?function(){return e}:s(e),y=r(n,p,t?2:1),g=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(i(m)){for(d=u(e.length);d>g;g++)if(v=t?y(a(A=e[g])[0],A[1]):y(e[g]),v===l||v===c)return v}else for(h=m.call(e);!(A=h.next()).done;)if(v=o(h,y,A.value,t),v===l||v===c)return v};t.BREAK=l,t.RETURN=c},function(e,t,n){var r=n(12).f,o=n(17),i=n(9)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(1),o=n(28),i=n(6),a=n(145),u="["+a+"]",s="​…",l=RegExp("^"+u+u+"*"),c=RegExp(u+u+"*$"),p=function(e,t,n){var o={},u=i(function(){return!!a[e]()||s[e]()!=s}),l=o[e]=u?t(f):a[e];n&&(o[n]=l),r(r.P+r.F*u,"String",o)},f=p.trim=function(e,t){return e=String(o(e)),1&t&&(e=e.replace(l,"")),2&t&&(e=e.replace(c,"")),e};e.exports=p},function(e,t,n){function r(e,t){var n=i(e,t);return o(n)?n:void 0}var o=n(550),i=n(572);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return t}function i(e,t,n){var r="function"==typeof t?t(n):"string"==typeof t?n.refs[t]:n;r&&(e?l["default"].findDOMNode(r).setAttribute("aria-activedescendant",e):l["default"].findDOMNode(r).removeAttribute("aria-activedescendant"))}t.__esModule=!0,t["default"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?o:arguments[1];return{propTypes:{ariaActiveDescendantKey:u["default"].PropTypes.string.isRequired},contextTypes:{activeDescendants:c},childContextTypes:{activeDescendants:c},ariaActiveDescendant:function(n){var r=arguments.length<=1||void 0===arguments[1]?this.props.ariaActiveDescendantKey:arguments[1],o=this.context.activeDescendants,a=this.__ariaActiveDescendantId;return void 0===n?a:(n=t.call(this,r,n),void 0===n?n=a:(this.__ariaActiveDescendantId=n,i(n,e,this)),void(o&&o.reconcile(r,n)))},getChildContext:function(){var e=this;return this._context||(this._context={activeDescendants:{reconcile:function(t,n){return e.ariaActiveDescendant(n,t)}}})}}};var a=n(7),u=r(a),s=n(54),l=r(s),c=u["default"].PropTypes.shape({reconcile:u["default"].PropTypes.func});e.exports=t["default"]},function(e,t,n){"use strict";function r(e){if(h){var t=e.node,n=e.children;if(n.length)for(var r=0;r<n.length;r++)v(t,n[r],null);else null!=e.html?t.innerHTML=e.html:null!=e.text&&f(t,e.text)}}function o(e,t){e.parentNode.replaceChild(t.node,e),r(t)}function i(e,t){h?e.children.push(t):e.node.appendChild(t.node)}function a(e,t){h?e.html=t:e.node.innerHTML=t}function u(e,t){h?e.text=t:f(e.node,t)}function s(){return this.node.nodeName}function l(e){return{node:e,children:[],html:null,text:null,toString:s}}var c=n(281),p=n(186),f=n(307),d=1,A=11,h="undefined"!=typeof document&&"number"==typeof document.documentMode||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent),v=p(function(e,t,n){t.node.nodeType===A||t.node.nodeType===d&&"object"===t.node.nodeName.toLowerCase()&&(null==t.node.namespaceURI||t.node.namespaceURI===c.html)?(r(t),e.insertBefore(t.node,n)):(e.insertBefore(t.node,n),r(t))});l.insertTreeBefore=v,l.replaceChildWithTree=o,l.queueChild=i,l.queueHTML=a,l.queueText=u,e.exports=l},function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=n(675),i=(n(26),n(2)),a={mountComponent:function(e,t,n,o,i){var a=e.mountComponent(t,n,o,i);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(r,e),a},getNativeNode:function(e){return e.getNativeNode()},unmountComponent:function(e,t){o.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,i){var a=e._currentElement;if(t!==a||i!==e._context){var u=o.shouldUpdateRefs(a,t);u&&o.detachRefs(e,a),e.receiveComponent(t,n,i),u&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t,n){return e._updateBatchNumber!==n?void(null!=e._updateBatchNumber&&e._updateBatchNumber!==n+1?i(!1):void 0):void e.performUpdateIfNecessary(t)}};e.exports=a},function(e,t,n){var r=n(27);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){"use strict";e.exports=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(e,t){function n(e,t){for(var n=-1,o=e.length,i=0,a=[];++n<o;){var u=e[n];u!==t&&u!==r||(e[n]=r,a[i++]=n)}return a}var r="__lodash_placeholder__";e.exports=n},function(e,t,n){function r(e){if("string"==typeof e||o(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}var o=n(84),i=1/0;e.exports=r},function(e,t,n){function r(e){return"symbol"==typeof e||o(e)&&u.call(e)==i}var o=n(67),i="[object Symbol]",a=Object.prototype,u=a.toString;e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.connect=t.Provider=void 0;var o=n(624),i=r(o),a=n(625),u=r(a);t.Provider=i["default"],t.connect=u["default"]},function(e,t,n){"use strict";var r=n(118),o=n(179),i=n(183),a=n(301),u=n(302),s=n(2),l={},c=null,p=function(e,t){e&&(o.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},f=function(e){return p(e,!0)},d=function(e){return p(e,!1)},A={injection:{injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?s(!1):void 0;var o=l[t]||(l[t]={});o[e._rootNodeID]=n;var i=r.registrationNameModules[t];i&&i.didPutListener&&i.didPutListener(e,t,n)},getListener:function(e,t){var n=l[t];return n&&n[e._rootNodeID]},deleteListener:function(e,t){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var o=l[t];o&&delete o[e._rootNodeID]},deleteAllListeners:function(e){for(var t in l)if(l[t][e._rootNodeID]){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete l[t][e._rootNodeID]}},extractEvents:function(e,t,n,o){for(var i,u=r.plugins,s=0;s<u.length;s++){var l=u[s];if(l){var c=l.extractEvents(e,t,n,o);c&&(i=a(i,c))}}return i},enqueueEvents:function(e){e&&(c=a(c,e))},processEventQueue:function(e){var t=c;c=null,e?u(t,f):u(t,d),c?s(!1):void 0,i.rethrowCaughtError()},__purge:function(){l={}},__getListenerBank:function(){return l}};e.exports=A},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return g(e,r)}function o(e,t,n){var o=t?y.bubbled:y.captured,i=r(e,n,o);i&&(n._dispatchListeners=v(n._dispatchListeners,i),n._dispatchInstances=v(n._dispatchInstances,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.traverseTwoPhase(e._targetInst,o,e)}function a(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?h.getParentInstance(t):null;h.traverseTwoPhase(n,o,e)}}function u(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=g(e,r);o&&(n._dispatchListeners=v(n._dispatchListeners,o),n._dispatchInstances=v(n._dispatchInstances,e))}}function s(e){e&&e.dispatchConfig.registrationName&&u(e._targetInst,null,e)}function l(e){m(e,i)}function c(e){m(e,a)}function p(e,t,n,r){h.traverseEnterLeave(n,r,u,e,t)}function f(e){m(e,s)}var d=n(44),A=n(86),h=n(179),v=n(301),m=n(302),y=(n(4),d.PropagationPhases),g=A.getListener,b={accumulateTwoPhaseDispatches:l,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:f,accumulateEnterLeaveDispatches:p};e.exports=b},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(45),i=n(189),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),e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(617),i=r(o),a=n(727),u=r(a),s=n(316),l=r(s),c=n(726),p=r(c),f=n(724),d=r(f),A=n(725),h=r(A),v={empty:{},getIn:l["default"],setIn:p["default"],deepEqual:d["default"],deleteIn:h["default"],fromJS:function(e){return e},size:function(e){return e?e.length:0},some:i["default"],splice:u["default"]};t["default"]=v},function(e,t,n){var r=n(22),o=n(14),i=n(65);e.exports=function(e){return function(t,n,a){var u,s=r(t),l=o(s.length),c=i(a,l);if(e&&n!=n){for(;l>c;)if(u=s[c++],u!=u)return!0}else for(;l>c;c++)if((e||c in s)&&s[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){"use strict";var r=n(5),o=n(1),i=n(20),a=n(63),u=n(48),s=n(72),l=n(47),c=n(8),p=n(6),f=n(96),d=n(73),A=n(131);e.exports=function(e,t,n,h,v,m){var y=r[e],g=y,b=v?"set":"add",w=g&&g.prototype,_={},E=function(e){var t=w[e];i(w,e,"delete"==e?function(e){return m&&!c(e)?!1:t.call(this,0===e?0:e)}:"has"==e?function(e){return m&&!c(e)?!1:t.call(this,0===e?0:e)}:"get"==e?function(e){return m&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof g&&(m||w.forEach&&!p(function(){(new g).entries().next()}))){var x=new g,C=x[b](m?{}:-0,1)!=x,S=p(function(){x.has(1)}),P=f(function(e){new g(e)}),T=!m&&p(function(){for(var e=new g,t=5;t--;)e[b](t,t);return!e.has(-0)});P||(g=t(function(t,n){l(t,g,e);var r=A(new y,t,g);return void 0!=n&&s(n,v,r[b],r),r}),g.prototype=w,w.constructor=g),(S||T)&&(E("delete"),E("has"),v&&E("get")),(T||C)&&E(b),m&&w.clear&&delete w.clear}else g=h.getConstructor(t,e,v,b),a(g.prototype,n),u.NEED=!0;return d(g,e),_[e]=g,o(o.G+o.W+o.F*(g!=y),_),m||h.setStrong(g,e,v),g}},function(e,t,n){"use strict";var r=n(18),o=n(20),i=n(6),a=n(28),u=n(9);e.exports=function(e,t,n){var s=u(e),l=n(a,s,""[e]),c=l[0],p=l[1];i(function(){var t={};return t[s]=function(){return 7},7!=""[e](t)})&&(o(String.prototype,e,c),r(RegExp.prototype,s,2==t?function(e,t){return p.call(e,this,t)}:function(e){return p.call(e,this)}))}},function(e,t,n){"use strict";var r=n(3);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(8),o=n(27),i=n(9)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(9)("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,function(){throw 2})}catch(a){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(u){}return n}},function(e,t,n){e.exports=n(59)||!n(6)(function(){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete n(5)[e]})},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(8),o=n(3),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(39)(Function.call,n(23).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(o){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},function(e,t,n){var r=n(5),o="__core-js_shared__",i=r[o]||(r[o]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,n){for(var r,o=n(5),i=n(18),a=n(66),u=a("typed_array"),s=a("view"),l=!(!o.ArrayBuffer||!o.DataView),c=l,p=0,f=9,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f>p;)(r=o[d[p++]])?(i(r.prototype,u,!0),i(r.prototype,s,!0)):c=!1;e.exports={ABV:l,CONSTR:c,TYPED:u,VIEW:s}},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={};e.exports=r},function(e,t,n){"use strict";var r=n(2),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};e.exports=o},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(585),i=n(586),a=n(587),u=n(588),s=n(589);r.prototype.clear=o,r.prototype["delete"]=i,r.prototype.get=a,r.prototype.has=u,r.prototype.set=s,e.exports=r},function(e,t,n){function r(e,t){for(var n=e.length;n--;)if(o(e[n][0],t))return n;return-1}var o=n(264);e.exports=r},function(e,t,n){function r(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=o(e.prototype),r=e.apply(n,t);return i(r)?r:n}}var o=n(159),i=n(53);e.exports=r},function(e,t){function n(e){var t=e;return t.placeholder}e.exports=n},function(e,t,n){function r(e,t){var n=e.__data__;return o(t)?n["string"==typeof t?"string":"hash"]:n.map}var o=n(581);e.exports=r},function(e,t){function n(e,t){return t=null==t?r:t,!!t&&("number"==typeof e||o.test(e))&&e>-1&&e%1==0&&t>e}var r=9007199254740991,o=/^(?:0|[1-9]\d*)$/;e.exports=n},function(e,t,n){function r(e,t){if(o(e))return!1;var n=typeof e;return"number"==n||"symbol"==n||"boolean"==n||null==e||i(e)?!0:u.test(e)||!a.test(e)||null!=t&&e in Object(t)}var o=n(37),i=n(84),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;e.exports=r},function(e,t,n){var r=n(75),o=r(Object,"create");e.exports=o},function(e,t,n){function r(e){return null!=e&&a(o(e))&&!i(e)}var o=n(569),i=n(164),a=n(114);e.exports=r},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=n(254),o=n(108),i=n(82),a=n(269),u=32,s=a(function(e,t){var n=i(t,o(s));return r(e,u,void 0,t,n)});s.placeholder={},e.exports=s},function(e,t,n){function r(e){return a(e)?o(e,l):u(e)?[e]:i(s(e))}var o=n(544),i=n(162),a=n(37),u=n(84),s=n(262),l=n(83);e.exports=r},function(e,t){"use strict";var n={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0},r={getNativeProps:function(e,t){if(!t.disabled)return t;var r={};for(var o in t)!n[o]&&t.hasOwnProperty(o)&&(r[o]=t[o]);return r}};e.exports=r},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:a(!1),!l.plugins[n]){t.extractEvents?void 0:a(!1),l.plugins[n]=t;var r=t.eventTypes;for(var i in r)o(r[i],t,i)?void 0:a(!1)}}}function o(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?a(!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];i(u,t,n)}return!0}return e.registrationName?(i(e.registrationName,t,n),!0):!1}function i(e,t,n){l.registrationNameModules[e]?a(!1):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(2),u=null,s={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){u?a(!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]?a(!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]}};e.exports=l},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,v)||(e[v]=A++,f[e[v]]={}),f[e[v]]}var o,i=n(10),a=n(44),u=n(118),s=n(668),l=n(300),c=n(696),p=n(191),f={},d=!1,A=0,h={topAbort:"abort",topAnimationEnd:c("animationend")||"animationend",topAnimationIteration:c("animationiteration")||"animationiteration",topAnimationStart:c("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:c("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},v="_reactListenersID"+String(Math.random()).slice(2),m=i({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(m.handleTopLevel),m.ReactEventListener=e}},setEnabled:function(e){m.ReactEventListener&&m.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!m.ReactEventListener||!m.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,o=r(n),i=u.registrationNameDependencies[e],s=a.topLevelTypes,l=0;l<i.length;l++){var c=i[l];o.hasOwnProperty(c)&&o[c]||(c===s.topWheel?p("wheel")?m.ReactEventListener.trapBubbledEvent(s.topWheel,"wheel",n):p("mousewheel")?m.ReactEventListener.trapBubbledEvent(s.topWheel,"mousewheel",n):m.ReactEventListener.trapBubbledEvent(s.topWheel,"DOMMouseScroll",n):c===s.topScroll?p("scroll",!0)?m.ReactEventListener.trapCapturedEvent(s.topScroll,"scroll",n):m.ReactEventListener.trapBubbledEvent(s.topScroll,"scroll",m.ReactEventListener.WINDOW_HANDLE):c===s.topFocus||c===s.topBlur?(p("focus",!0)?(m.ReactEventListener.trapCapturedEvent(s.topFocus,"focus",n),m.ReactEventListener.trapCapturedEvent(s.topBlur,"blur",n)):p("focusin")&&(m.ReactEventListener.trapBubbledEvent(s.topFocus,"focusin",n),m.ReactEventListener.trapBubbledEvent(s.topBlur,"focusout",n)),o[s.topBlur]=!0,o[s.topFocus]=!0):h.hasOwnProperty(c)&&m.ReactEventListener.trapBubbledEvent(c,h[c],n),o[c]=!0)}},trapBubbledEvent:function(e,t,n){return m.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return m.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(void 0===o&&(o=document.createEvent&&"pageX"in document.createEvent("MouseEvent")),!o&&!d){var e=l.refreshScrollValues;m.ReactEventListener.monitorScrollValue(e),d=!0}}});e.exports=m},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=n(104),o=r({prop:null,context:null,childContext:null});e.exports=o},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(88),i=n(300),a=n(188),u={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,u),e.exports=r},function(e,t,n){"use strict";var r=n(2),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,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,i,a,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]=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){this.isInTransaction()?void 0:r(!1);for(var t=this.transactionWrappers,n=e;n<t.length;n++){var o,a=t[n],u=this.wrapperInitData[n];try{o=!0,u!==i.OBSERVED_ERROR&&a.close&&a.close.call(this,u),o=!1}finally{if(o)try{this.closeAll(n+1)}catch(s){}}}this.wrapperInitData.length=0}},i={Mixin:o,OBSERVED_ERROR:{}};e.exports=i},function(e,t){"use strict";function n(e){return o[e]}function r(e){return(""+e).replace(i,n)}var o={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},i=/[&><"']/g;e.exports=r},function(e,t,n){"use strict";var r=n(15),o=n(65),i=n(14);e.exports=function(e){for(var t=r(this),n=i(t.length),a=arguments.length,u=o(a>1?arguments[1]:void 0,n),s=a>2?arguments[2]:void 0,l=void 0===s?n:o(s,n);l>u;)t[u++]=e;return t}},function(e,t,n){"use strict";var r=n(12),o=n(49);e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},function(e,t,n){var r=n(8),o=n(5).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(9)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(o){}}return!0}},function(e,t,n){e.exports=n(5).document&&document.documentElement},function(e,t,n){var r=n(8),o=n(99).set;e.exports=function(e,t,n){var i,a=t.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(e,i),e}},function(e,t,n){var r=n(58),o=n(9)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){var r=n(27);e.exports=Array.isArray||function(e){ return"Array"==r(e)}},function(e,t,n){var r=n(8),o=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&o(e)===e}},function(e,t,n){"use strict";var r=n(60),o=n(49),i=n(73),a={};n(18)(a,n(9)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){"use strict";var r=n(59),o=n(1),i=n(20),a=n(18),u=n(17),s=n(58),l=n(135),c=n(73),p=n(24),f=n(9)("iterator"),d=!([].keys&&"next"in[].keys()),A="@@iterator",h="keys",v="values",m=function(){return this};e.exports=function(e,t,n,y,g,b,w){l(n,t,y);var _,E,x,C=function(e){if(!d&&e in O)return O[e];switch(e){case h:return function(){return new n(this,e)};case v:return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",P=g==v,T=!1,O=e.prototype,M=O[f]||O[A]||g&&O[g],I=M||C(g),k=g?P?C("entries"):I:void 0,R="Array"==t?O.entries||M:M;if(R&&(x=p(R.call(new e)),x!==Object.prototype&&(c(x,S,!0),r||u(x,f)||a(x,f,m))),P&&M&&M.name!==v&&(T=!0,I=function(){return M.call(this)}),r&&!w||!d&&!T&&O[f]||a(O,f,I),s[t]=I,s[S]=m,g)if(_={values:P?I:C(v),keys:b?I:C(h),entries:k},w)for(E in _)E in O||i(O,E,_[E]);else o(o.P+o.F*(d||T),t,_);return _}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&1e-6>e?e+e*e/2:Math.exp(e)-1}:n},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:0>e?-1:1}},function(e,t,n){var r=n(5),o=n(146).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,u=r.Promise,s="process"==n(27)(a);e.exports=function(){var e,t,n,l=function(){var r,o;for(s&&(r=a.domain)&&r.exit();e;){o=e.fn,e=e.next;try{o()}catch(i){throw e?n():t=void 0,i}}t=void 0,r&&r.enter()};if(s)n=function(){a.nextTick(l)};else if(i){var c=!0,p=document.createTextNode("");new i(l).observe(p,{characterData:!0}),n=function(){p.data=c=!c}}else if(u&&u.resolve){var f=u.resolve();n=function(){f.then(l)}}else n=function(){o.call(r,l)};return function(r){var o={fn:r,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},function(e,t,n){var r=n(100)("keys"),o=n(66);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(3),o=n(19),i=n(9)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[i])?t:o(n)}},function(e,t,n){var r=n(50),o=n(28);e.exports=function(e){return function(t,n){var i,a,u=String(o(t)),s=r(n),l=u.length;return 0>s||s>=l?e?"":void 0:(i=u.charCodeAt(s),55296>i||i>56319||s+1===l||(a=u.charCodeAt(s+1))<56320||a>57343?e?u.charAt(s):i:e?u.slice(s,s+2):(i-55296<<10)+(a-56320)+65536)}}},function(e,t,n){var r=n(95),o=n(28);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(e))}},function(e,t,n){"use strict";var r=n(50),o=n(28);e.exports=function(e){var t=String(o(this)),n="",i=r(e);if(0>i||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t){e.exports=" \n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(e,t,n){var r,o,i,a=n(39),u=n(94),s=n(130),l=n(127),c=n(5),p=c.process,f=c.setImmediate,d=c.clearImmediate,A=c.MessageChannel,h=0,v={},m="onreadystatechange",y=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},g=function(e){y.call(e.data)};f&&d||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++h]=function(){u("function"==typeof e?e:Function(e),t)},r(h),h},d=function(e){delete v[e]},"process"==n(27)(p)?r=function(e){p.nextTick(a(y,e,1))}:A?(o=new A,i=o.port2,o.port1.onmessage=g,r=a(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",g,!1)):r=m in l("script")?function(e){s.appendChild(l("script"))[m]=function(){s.removeChild(this),y.call(e)}}:function(e){setTimeout(a(y,e,1),0)}),e.exports={set:f,clear:d}},function(e,t,n){"use strict";var r=n(5),o=n(11),i=n(59),a=n(101),u=n(18),s=n(63),l=n(6),c=n(47),p=n(50),f=n(14),d=n(61).f,A=n(12).f,h=n(125),v=n(73),m="ArrayBuffer",y="DataView",g="prototype",b="Wrong length!",w="Wrong index!",_=r[m],E=r[y],x=r.Math,C=(r.parseInt,r.RangeError),S=r.Infinity,P=_,T=x.abs,O=x.pow,M=(x.min,x.floor),I=x.log,k=x.LN2,R="buffer",N="byteLength",D="byteOffset",F=o?"_b":R,j=o?"_l":N,L=o?"_o":D,U=function(e,t,n){var r,o,i,a=Array(n),u=8*n-t-1,s=(1<<u)-1,l=s>>1,c=23===t?O(2,-24)-O(2,-77):0,p=0,f=0>e||0===e&&0>1/e?1:0;for(e=T(e),e!=e||e===S?(o=e!=e?1:0,r=s):(r=M(I(e)/k),e*(i=O(2,-r))<1&&(r--,i*=2),e+=r+l>=1?c/i:c*O(2,1-l),e*i>=2&&(r++,i/=2),r+l>=s?(o=0,r=s):r+l>=1?(o=(e*i-1)*O(2,t),r+=l):(o=e*O(2,l-1)*O(2,t),r=0));t>=8;a[p++]=255&o,o/=256,t-=8);for(r=r<<t|o,u+=t;u>0;a[p++]=255&r,r/=256,u-=8);return a[--p]|=128*f,a},B=function(e,t,n){var r,o=8*n-t-1,i=(1<<o)-1,a=i>>1,u=o-7,s=n-1,l=e[s--],c=127&l;for(l>>=7;u>0;c=256*c+e[s],s--,u-=8);for(r=c&(1<<-u)-1,c>>=-u,u+=t;u>0;r=256*r+e[s],s--,u-=8);if(0===c)c=1-a;else{if(c===i)return r?NaN:l?-S:S;r+=O(2,t),c-=a}return(l?-1:1)*r*O(2,c-t)},V=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Q=function(e){return[255&e]},z=function(e){return[255&e,e>>8&255]},W=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},K=function(e){return U(e,52,8)},q=function(e){return U(e,23,4)},G=function(e,t,n){A(e[g],t,{get:function(){return this[n]}})},H=function(e,t,n,r){var o=+n,i=p(o);if(o!=i||0>i||i+t>e[j])throw C(w);var a=e[F]._b,u=i+e[L],s=a.slice(u,u+t);return r?s:s.reverse()},Y=function(e,t,n,r,o,i){var a=+n,u=p(a);if(a!=u||0>u||u+t>e[j])throw C(w);for(var s=e[F]._b,l=u+e[L],c=r(+o),f=0;t>f;f++)s[l+f]=c[i?f:t-f-1]},J=function(e,t){c(e,_,m);var n=+t,r=f(n);if(n!=r)throw C(b);return r};if(a.ABV){if(!l(function(){new _})||!l(function(){new _(.5)})){_=function(e){return new P(J(this,e))};for(var Z,X=_[g]=P[g],$=d(P),ee=0;$.length>ee;)(Z=$[ee++])in _||u(_,Z,P[Z]);i||(X.constructor=_)}var te=new E(new _(2)),ne=E[g].setInt8;te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||s(E[g],{setInt8:function(e,t){ne.call(this,e,t<<24>>24)},setUint8:function(e,t){ne.call(this,e,t<<24>>24)}},!0)}else _=function(e){var t=J(this,e);this._b=h.call(Array(t),0),this[j]=t},E=function(e,t,n){c(this,E,y),c(e,_,y);var r=e[j],o=p(t);if(0>o||o>r)throw C("Wrong offset!");if(n=void 0===n?r-o:f(n),o+n>r)throw C(b);this[F]=e,this[L]=o,this[j]=n},o&&(G(_,N,"_l"),G(E,R,"_b"),G(E,N,"_l"),G(E,D,"_o")),s(E[g],{getInt8:function(e){return H(this,1,e)[0]<<24>>24},getUint8:function(e){return H(this,1,e)[0]},getInt16:function(e){var t=H(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=H(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return V(H(this,4,e,arguments[1]))},getUint32:function(e){return V(H(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return B(H(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return B(H(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){Y(this,1,e,Q,t)},setUint8:function(e,t){Y(this,1,e,Q,t)},setInt16:function(e,t){Y(this,2,e,z,t,arguments[2])},setUint16:function(e,t){Y(this,2,e,z,t,arguments[2])},setInt32:function(e,t){Y(this,4,e,W,t,arguments[2])},setUint32:function(e,t){Y(this,4,e,W,t,arguments[2])},setFloat32:function(e,t){Y(this,4,e,q,t,arguments[2])},setFloat64:function(e,t){Y(this,8,e,K,t,arguments[2])}});v(_,m),v(E,y),u(E[g],a.VIEW,!0),t[m]=_,t[y]=E},function(e,t,n){var r=n(5),o=n(34),i=n(59),a=n(221),u=n(12).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||u(t,e,{value:a.f(e)})}},function(e,t,n){var r=n(71),o=n(9)("iterator"),i=n(58);e.exports=n(34).getIteratorMethod=function(e){return void 0!=e?e[o]||e["@@iterator"]||i[r(e)]:void 0}},function(e,t,n){"use strict";var r=n(70),o=n(209),i=n(58),a=n(22);e.exports=n(136)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var r=n(228),o=n(102);e.exports=function(e,t){var n=o(e);return n?n.innerHeight:t?e.clientHeight:r(e).height}},function(e,t,n){"use strict";var r=n(153),o=n(516),i=n(512),a=n(513),u=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s="",l=t;if("string"==typeof t){if(void 0===n)return e.style[r(t)]||i(e).getPropertyValue(o(t));(l={})[t]=n}for(var c in l)u.call(l,c)&&(l[c]||0===l[c]?s+=o(c)+":"+l[c]+";":a(e,o(c)));e.style.cssText+=";"+s}},function(e,t,n){"use strict";var r=n(515),o=/^-ms-/;e.exports=function(e){return r(e.replace(o,"ms-"))}},function(e,t){"use strict";function n(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function r(e,t){if(n(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var a=0;a<r.length;a++)if(!o.call(t,r[a])||!n(e[r[a]],t[r[a]]))return!1;return!0}var o=Object.prototype.hasOwnProperty;e.exports=r},function(e,t){function n(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}e.exports=n},function(e,t,n){function r(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=a,this.__views__=[]}var o=n(159),i=n(161),a=4294967295;r.prototype=o(i.prototype),r.prototype.constructor=r,e.exports=r},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(590),i=n(591),a=n(592),u=n(593),s=n(594);r.prototype.clear=o,r.prototype["delete"]=i,r.prototype.get=a,r.prototype.has=u,r.prototype.set=s,e.exports=r},function(e,t){function n(e,t,n){var r=n.length;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}e.exports=n},function(e,t,n){function r(e){return o(e)?i(e):{}}var o=n(53),i=Object.create;e.exports=r},function(e,t,n){function r(e,t,n,u,s){return e===t?!0:null==e||null==t||!i(e)&&!a(t)?e!==e&&t!==t:o(e,t,r,n,u,s)}var o=n(548),i=n(53),a=n(67);e.exports=r},function(e,t){function n(){}e.exports=n},function(e,t){function n(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}e.exports=n},function(e,t){function n(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}e.exports=n},function(e,t,n){function r(e){var t=o(e)?s.call(e):"";return t==i||t==a}var o=n(53),i="[object Function]",a="[object GeneratorFunction]",u=Object.prototype,s=u.toString;e.exports=r},function(e,t,n){function r(e){if(!a(e)||f.call(e)!=u||i(e))return!1;var t=o(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==p}var o=n(257),i=n(163),a=n(67),u="[object Object]",s=Object.prototype,l=Function.prototype.toString,c=s.hasOwnProperty,p=l.call(Object),f=s.toString;e.exports=r},function(e,t,n){function r(e){var t=l(e);if(!t&&!u(e))return i(e);var n=a(e),r=!!n,c=n||[],p=c.length;for(var f in e)!o(e,f)||r&&("length"==f||s(f,p))||t&&"constructor"==f||c.push(f);return c}var o=n(245),i=n(551),a=n(579),u=n(113),s=n(110),l=n(584);e.exports=r},function(e,t,n){function r(e,t){var n={};return t=i(t,3),o(e,function(e,r,o){n[r]=t(e,r,o)}),n}var o=n(243),i=n(246);e.exports=r},function(e,t,n){e.exports=n(700)},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}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},a=n(7),u=r(a),s=n(171),l=r(s),c=n(43),p=r(c),f=n(54),d=r(f),A=n(46),h=r(A),v=n(31),m=r(v),y=n(42),g=n(68),b=n(55),w=function(e,t){return e+"__option__"+t};t["default"]=u["default"].createClass({displayName:"List",mixins:[n(276),n(76)()],propTypes:{data:u["default"].PropTypes.array,onSelect:u["default"].PropTypes.func,onMove:u["default"].PropTypes.func,optionComponent:p["default"].elementType,itemComponent:p["default"].elementType,selected:u["default"].PropTypes.any,focused:u["default"].PropTypes.any,valueField:p["default"].accessor,textField:p["default"].accessor,disabled:p["default"].disabled.acceptsArray,readOnly:p["default"].readOnly.acceptsArray,messages:u["default"].PropTypes.shape({emptyList:p["default"].message})},getDefaultProps:function(){return{onSelect:function(){},optionComponent:l["default"],ariaActiveDescendantKey:"list",data:[],messages:{emptyList:"There are no items in this list"}}},componentDidMount:function(){this.move()},componentDidUpdate:function(){var e=this.props,t=e.data,n=e.focused,r=t.indexOf(n),o=w((0,g.instanceId)(this),r);this.ariaActiveDescendant(-1!==r?o:null),this.move()},render:function(){var e,t=this.props,n=t.className,r=t.role,a=t.data,s=t.textField,l=t.valueField,c=t.focused,p=t.selected,f=t.messages,d=t.onSelect,A=t.itemComponent,v=t.optionComponent,_=o(t,["className","role","data","textField","valueField","focused","selected","messages","onSelect","itemComponent","optionComponent"]),E=(0,g.instanceId)(this);return e=a.length?a.map(function(e,t){var n=w(E,t),r=(0,b.isDisabledItem)(e,_),o=(0,b.isReadOnlyItem)(e,_);return u["default"].createElement(v,{key:"item_"+t,id:n,dataItem:e,disabled:r,readOnly:o,focused:c===e,selected:p===e,onClick:r||o?void 0:d.bind(null,e)},A?u["default"].createElement(A,{item:e,value:(0,y.dataValue)(e,l),text:(0,y.dataText)(e,s),disabled:r,readOnly:o}):(0,y.dataText)(e,s))}):u["default"].createElement("li",{className:"rw-list-empty"},m["default"].result(f.emptyList,this.props)),u["default"].createElement("ul",i({id:E,tabIndex:"-1",className:(0,h["default"])(n,"rw-list"),role:void 0===r?"listbox":r},_),e)},_data:function(){return this.props.data},move:function(){var e=d["default"].findDOMNode(this),t=this._data().indexOf(this.props.focused),n=e.children[t];n&&(0,g.notify)(this.props.onMove,[n,e,this.props.focused])}}),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}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},a=n(7),u=r(a),s=n(171),l=r(s),c=n(43),p=r(c),f=n(54),d=r(f),A=n(46),h=r(A),v=n(31),m=r(v),y=n(743),g=r(y),b=n(42),w=n(68),_=n(55),E=function(e,t){return e+"__option__"+t};t["default"]=u["default"].createClass({displayName:"List",mixins:[n(276),n(76)()],propTypes:{data:u["default"].PropTypes.array,onSelect:u["default"].PropTypes.func,onMove:u["default"].PropTypes.func,optionComponent:p["default"].elementType,itemComponent:p["default"].elementType,groupComponent:p["default"].elementType,selected:u["default"].PropTypes.any,focused:u["default"].PropTypes.any,valueField:p["default"].accessor,textField:p["default"].accessor,disabled:p["default"].disabled.acceptsArray,readOnly:p["default"].readOnly.acceptsArray,groupBy:p["default"].accessor,messages:u["default"].PropTypes.shape({emptyList:p["default"].message})},getDefaultProps:function(){return{onSelect:function(){},data:[],optionComponent:l["default"],ariaActiveDescendantKey:"groupedList",messages:{emptyList:"There are no items in this list"}}},getInitialState:function(){var e=[];return{groups:this._group(this.props.groupBy,this.props.data,e),sortedKeys:e}},componentWillReceiveProps:function(e){var t=[];e.data===this.props.data&&e.groupBy===this.props.groupBy||this.setState({groups:this._group(e.groupBy,e.data,t),sortedKeys:t})},componentDidMount:function(){this.move()},componentDidUpdate:function(){this.ariaActiveDescendant(this._currentActiveID),this.move()},render:function(){var e=this,t=this.props,n=t.className,r=t.role,a=t.data,s=t.messages,l=o(t,["className","role","data","messages"]),c=(0,w.instanceId)(this),p=this.state,f=p.sortedKeys,d=p.groups;delete l.onSelect;var A=[],v=-1,y=void 0;return this._currentActiveID=null,A=a.length?f.reduce(function(t,n){y=d[n],t.push(e._renderGroupHeader(n));for(var r=0;r<y.length;r++)t.push(e._renderItem(n,y[r],++v));return t},[]):u["default"].createElement("li",{className:"rw-list-empty"},m["default"].result(s.emptyList,this.props)),u["default"].createElement("ul",i({ref:"scrollable",id:c,tabIndex:"-1",className:(0,h["default"])(n,"rw-list","rw-list-grouped"),role:void 0===r?"listbox":r},l),A)},_renderGroupHeader:function(e){var t=this.props.groupComponent,n=(0,w.instanceId)(this);return u["default"].createElement("li",{key:"item_"+e,tabIndex:"-1",role:"separator",id:n+"_group_"+e,className:"rw-list-optgroup"},t?u["default"].createElement(t,{item:e}):e)},_renderItem:function(e,t,n){var r=this.props,o=r.focused,i=r.selected,a=r.onSelect,s=r.textField,l=r.valueField,c=r.itemComponent,p=r.optionComponent,f=E((0,w.instanceId)(this),n),d=(0,_.isDisabledItem)(t,this.props),A=(0,_.isReadOnlyItem)(t,this.props);return o===t&&(this._currentActiveID=f),u["default"].createElement(p,{key:"item_"+e+"_"+n,id:f,dataItem:t,focused:o===t,selected:i===t,disabled:d,readOnly:A,onClick:d||A?void 0:a.bind(null,t)},c?u["default"].createElement(c,{item:t,value:(0,b.dataValue)(t,l),text:(0,b.dataText)(t,s),disabled:d,readOnly:A}):(0,b.dataText)(t,s))},_isIndexOf:function(e,t){return this.props.data[e]===t},_group:function(e,t,n){var r="function"==typeof e?e:function(t){return t[e]};return n=n||[],(0,g["default"])("string"!=typeof e||!t.length||m["default"].has(t[0],e),"[React Widgets] You are seem to be trying to group this list by a "+("property `"+e+"` that doesn't exist in the dataset items, this may be a typo")),t.reduce(function(e,t){var o=r(t);return m["default"].has(e,o)?e[o].push(t):(n.push(o),e[o]=[t]),e},{})},_data:function(){var e=this.state.groups;return this.state.sortedKeys.reduce(function(t,n){return t.concat(e[n])},[])},move:function(){var e=this.getItemDOMNode(this.props.focused);e&&(0,w.notify)(this.props.onMove,[e,d["default"].findDOMNode(this),this.props.focused])},getItemDOMNode:function(e){var t,n,r=d["default"].findDOMNode(this),o=this.state.groups,i=-1;return this.state.sortedKeys.some(function(a){return t=o[a].indexOf(e),i++,-1!==t?!!(n=r.children[i+t+1]):void(i+=o[a].length)}),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){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;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},a=n(7),u=r(a),s=n(46),l=r(s),c=u["default"].createClass({displayName:"ListOption",propTypes:{dataItem:u["default"].PropTypes.any,focused:u["default"].PropTypes.bool,selected:u["default"].PropTypes.bool,disabled:u["default"].PropTypes.bool,readOnly:u["default"].PropTypes.bool},render:function(){var e=this.props,t=e.className,n=e.children,r=e.focused,a=e.selected,s=e.disabled,c=e.readOnly,p=o(e,["className","children","focused","selected","disabled","readOnly"]),f={"rw-state-focus":r,"rw-state-selected":a,"rw-state-disabled":s,"rw-state-readonly":c};return u["default"].createElement("li",i({role:"option",tabIndex:s||c?void 0:"-1","aria-selected":!!a,className:(0,l["default"])("rw-list-option",t,f)},p),n)}});t["default"]=c,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){var i={};return Object.keys(r).forEach(function(e){i[e]=r[e]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,t,i),i=null),i}function i(e){function t(e,t,n){var o=e.props[t?"onFocus":"onBlur"];o&&n&&n.persist(),r&&r.call(e,t,n)===!1||e.setTimeout("focus",function(){l["default"].batchedUpdates(function(){i&&i.call(e,t,n),t!==e.state.focused&&((0,a.notify)(o,n),e.isMounted()&&e.setState({focused:t}))})})}var n,r=e.willHandle,i=e.didHandle;return n={handleBlur:function(e){t(this,!1,e)},handleFocus:function(e){t(this,!0,e)}},o(n,"handleBlur",[u.widgetEnabled],Object.getOwnPropertyDescriptor(n,"handleBlur"),n),o(n,"handleFocus",[u.widgetEnabled],Object.getOwnPropertyDescriptor(n,"handleFocus"),n),n}t.__esModule=!0,t["default"]=i;var a=n(68),u=n(55),s=n(54),l=r(s);e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7);e.exports={propTypes:{isRtl:r.PropTypes.bool},contextTypes:{isRtl:r.PropTypes.bool},childContextTypes:{isRtl:r.PropTypes.bool},getChildContext:function(){return{isRtl:this.props.isRtl||this.context&&this.context.isRtl}},isRtl:function(){return!!(this.props.isRtl||this.context&&this.context.isRtl)}}},function(e,t,n){"use strict";var r=n(31),o=r.has;e.exports={componentWillUnmount:function(){var e=this._timers||{};this._unmounted=!0;for(var t in e)o(e,t)&&this.clearTimeout(t)},clearTimeout:function(e){var t=this._timers||{};window.clearTimeout(t[e])},setTimeout:function(e,t,n){var r=this,o=this._timers||(this._timers=Object.create(null));this._unmounted||(this.clearTimeout(e),o[e]=window.setTimeout(function(){r._unmounted||t()},n))}}},function(e,t){"use strict";t.__esModule=!0;var n={eq:function(e,t){return e===t},neq:function(e,t){return e!==t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t},lt:function(e,t){return t>e},lte:function(e,t){return t>=e},contains:function(e,t){return-1!==e.indexOf(t)},startsWith:function(e,t){return 0===e.lastIndexOf(t,0)},endsWith:function(e,t){var n=e.length-t.length,r=e.indexOf(t,n);return-1!==r&&r===n}};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.__esModule=!0,t["default"]=o;var i=n(52);r(i);e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function o(e,t,n){c.insertTreeBefore(e,t,n)}function i(e,t,n){Array.isArray(t)?u(e,t[0],t[1],n):v(e,t,n)}function a(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],s(e,t,n),e.removeChild(n)}e.removeChild(t)}function u(e,t,n,r){for(var o=t;;){var i=o.nextSibling;if(v(e,o,r),o===n)break;o=i}}function s(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}function l(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&v(r,document.createTextNode(n),o):n?(h(o,n),s(r,o,t)):s(r,e,t)}var c=n(77),p=n(640),f=n(293),d=(n(13),n(26),n(186)),A=n(192),h=n(307),v=d(function(e,t,n){e.insertBefore(t,n)}),m=p.dangerouslyReplaceNodeWithMarkup,y={dangerouslyReplaceNodeWithMarkup:m,replaceDelimitedText:l,processUpdates:function(e,t){for(var n=0;n<t.length;n++){var u=t[n];switch(u.type){case f.INSERT_MARKUP:o(e,u.content,r(e,u.afterNode));break;case f.MOVE_EXISTING:i(e,u.fromNode,r(e,u.afterNode));break;case f.SET_MARKUP:A(e,u.content);break;case f.TEXT_CONTENT:h(e,u.content);break;case f.REMOVE_NODE:a(e,u.fromNode)}}}};e.exports=y},function(e,t,n){"use strict";function r(e){return l.hasOwnProperty(e)?!0:s.hasOwnProperty(e)?!1:u.test(e)?(l[e]=!0,!0):(s[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 i=n(69),a=(n(13),n(658),n(26),n(698)),u=(n(4),new RegExp("^["+i.ATTRIBUTE_NAME_START_CHAR+"]["+i.ATTRIBUTE_NAME_CHAR+"]*$")),s={},l={},c={createMarkupForID:function(e){return i.ID_ATTRIBUTE_NAME+"="+a(e)},setAttributeForID:function(e,t){e.setAttribute(i.ID_ATTRIBUTE_NAME,t)},createMarkupForRoot:function(){return i.ROOT_ATTRIBUTE_NAME+'=""'},setAttributeForRoot:function(e){e.setAttribute(i.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(e,t){var n=i.properties.hasOwnProperty(e)?i.properties[e]:null;if(n){if(o(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+a(t)}return i.isCustomAttribute(e)?null==t?"":e+"="+a(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+a(t):""},setValueForProperty:function(e,t,n){var r=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(r){var a=r.mutationMethod;if(a)a(e,n);else{if(o(r,n))return void this.deleteValueForProperty(e,t);if(r.mustUseProperty){var u=r.propertyName;r.hasSideEffects&&""+e[u]==""+n||(e[u]=n)}else{var s=r.attributeName,l=r.attributeNamespace;l?e.setAttributeNS(l,s,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(s,""):e.setAttribute(s,""+n)}}}else if(i.isCustomAttribute(t))return void c.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){if(r(t)){null==n?e.removeAttribute(t):e.setAttribute(t,""+n)}},deleteValueForProperty:function(e,t){var n=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseProperty){var o=n.propertyName;n.hasBooleanValue?e[o]=!1:n.hasSideEffects&&""+e[o]==""||(e[o]="")}else e.removeAttribute(n.attributeName)}else i.isCustomAttribute(t)&&e.removeAttribute(t)}};e.exports=c},function(e,t,n){"use strict";function r(e){return e===y.topMouseUp||e===y.topTouchEnd||e===y.topTouchCancel}function o(e){return e===y.topMouseMove||e===y.topTouchMove}function i(e){return e===y.topMouseDown||e===y.topTouchStart}function a(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=g.getNodeFromInstance(r),t?h.invokeGuardedCallbackWithCatch(o,n,e):h.invokeGuardedCallback(o,n,e),e.currentTarget=null}function u(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)a(e,t,n[o],r[o]);else n&&a(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null}function s(e){var t=e._dispatchListeners,n=e._dispatchInstances;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._dispatchInstances=null,e._dispatchListeners=null,t}function c(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.isArray(t)?v(!1):void 0,e.currentTarget=t?g.getNodeFromInstance(n):null;var r=t?t(e):null;return e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,r}function p(e){return!!e._dispatchListeners}var f,d,A=n(44),h=n(183),v=n(2),m=(n(4),{injectComponentTree:function(e){f=e},injectTreeTraversal:function(e){d=e}}),y=A.topLevelTypes,g={isEndish:r,isMoveish:o,isStartish:i,executeDirectDispatch:c,executeDispatchesInOrder:u,executeDispatchesInOrderStopAtTrue:l,hasDispatches:p,getInstanceFromNode:function(e){return f.getInstanceFromNode(e)},getNodeFromInstance:function(e){return f.getNodeFromInstance(e)},isAncestor:function(e,t){return d.isAncestor(e,t)},getLowestCommonAncestor:function(e,t){return d.getLowestCommonAncestor(e,t)},getParentInstance:function(e){return d.getParentInstance(e)},traverseTwoPhase:function(e,t,n){return d.traverseTwoPhase(e,t,n)},traverseEnterLeave:function(e,t,n,r,o){return d.traverseEnterLeave(e,t,n,r,o)},injection:m};e.exports=g},function(e,t){"use strict";function n(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function r(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var o={escape:n,unescape:r};e.exports=o},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 i(e){r(e),null!=e.checked||null!=e.onChange?l(!1):void 0}function a(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var u=n(297),s=n(121),l=n(2),c=(n(4),{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},f={},d={checkPropTypes:function(e,t,n){for(var r in p){if(p.hasOwnProperty(r))var o=p[r](t,r,e,s.prop);if(o instanceof Error&&!(o.message in f)){f[o.message]=!0;a(n)}}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(i(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(i(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=d},function(e,t,n){"use strict";var r=n(2),o=!1,i={unmountIDFromEnvironment:null,replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o?r(!1):void 0,i.unmountIDFromEnvironment=e.unmountIDFromEnvironment,i.replaceNodeWithMarkup=e.replaceNodeWithMarkup,i.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};e.exports=i},function(e,t,n){"use strict";function r(e,t,n,r){try{return t(n,r)}catch(i){return void(null===o&&(o=i))}}var o=null,i={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(o){var e=o;throw o=null,e}}};e.exports=i},function(e,t){"use strict";var n={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}};e.exports=n},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e};e.exports=n},function(e,t){"use strict";function n(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}e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return r?!!n[r]:!1}function r(e){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[o]);return"function"==typeof t?t:void 0}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=n},function(e,t,n){"use strict";/** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */ function r(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=n(16);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t,n){"use strict";var r=n(16),o=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=n(186),u=a(function(e,t){e.innerHTML=t});if(r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(u=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&i.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}),s=null}e.exports=u},function(e,t){"use strict";function n(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}e.exports=n},function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?l.escape(e.key):t.toString(36)}function o(e,t,n,i){var f=typeof e;if("undefined"!==f&&"boolean"!==f||(e=null),null===e||"string"===f||"number"===f||a.isValidElement(e))return n(i,e,""===t?c+r(e,0):t),1;var d,A,h=0,v=""===t?c:t+p;if(Array.isArray(e))for(var m=0;m<e.length;m++)d=e[m],A=v+r(d,m),h+=o(d,A,n,i);else{var y=u(e);if(y){var g,b=y.call(e);if(y!==e.entries)for(var w=0;!(g=b.next()).done;)d=g.value,A=v+r(d,w++),h+=o(d,A,n,i);else for(;!(g=b.next()).done;){var _=g.value;_&&(d=_[1],A=v+l.escape(_[0])+p+r(d,0),h+=o(d,A,n,i))}}else if("object"===f){String(e);s(!1)}}return h}function i(e,t,n){return null==e?0:o(e,"",t,n)}var a=(n(57),n(32)),u=n(190),s=n(2),l=n(180),c=(n(4),"."),p=":";e.exports=i},function(e,t,n){"use strict";var r=(n(10),n(30)),o=(n(4),r);e.exports=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ARRAY_INSERT="redux-form/ARRAY_INSERT",t.ARRAY_MOVE="redux-form/ARRAY_MOVE",t.ARRAY_POP="redux-form/ARRAY_POP",t.ARRAY_PUSH="redux-form/ARRAY_PUSH",t.ARRAY_REMOVE="redux-form/ARRAY_REMOVE",t.ARRAY_REMOVE_ALL="redux-form/ARRAY_REMOVE_ALL",t.ARRAY_SHIFT="redux-form/ARRAY_SHIFT",t.ARRAY_SPLICE="redux-form/ARRAY_SPLICE",t.ARRAY_UNSHIFT="redux-form/ARRAY_UNSHIFT",t.ARRAY_SWAP="redux-form/ARRAY_SWAP",t.BLUR="redux-form/BLUR",t.CHANGE="redux-form/CHANGE",t.DESTROY="redux-form/DESTROY",t.FOCUS="redux-form/FOCUS",t.INITIALIZE="redux-form/INITIALIZE",t.REGISTER_FIELD="redux-form/REGISTER_FIELD",t.RESET="redux-form/RESET",t.SET_SUBMIT_FAILED="redux-form/SET_SUBMIT_FAILED",t.START_ASYNC_VALIDATION="redux-form/START_ASYNC_VALIDATION",t.START_SUBMIT="redux-form/START_SUBMIT",t.STOP_ASYNC_VALIDATION="redux-form/STOP_ASYNC_VALIDATION",t.STOP_SUBMIT="redux-form/STOP_SUBMIT",t.TOUCH="redux-form/TOUCH",t.UNREGISTER_FIELD="redux-form/UNREGISTER_FIELD",t.UNTOUCH="redux-form/UNTOUCH"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var o=n(318),i=r(o),a=n(732),u=r(a),s=n(731),l=r(s),c=n(730),p=r(c),f=n(317),d=r(f),A=n(319);r(A);t.createStore=i["default"],t.combineReducers=u["default"],t.bindActionCreators=l["default"],t.applyMiddleware=p["default"],t.compose=d["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.isMounted()&&e.forceUpdate()}t.__esModule=!0;var i=n(738),a=r(i),u={shouldComponentUpdate:function(){return!this._notifying}};t["default"]=(0,a["default"])([u],o),e.exports=t["default"]},function(e,t,n){var r=n(27);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){"use strict";var r=n(15),o=n(65),i=n(14);e.exports=[].copyWithin||function(e,t){var n=r(this),a=i(n.length),u=o(e,a),s=o(t,a),l=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===l?a:o(l,a))-s,a-u),p=1;for(u>s&&s+c>u&&(p=-1,s+=c-1,u+=c-1);c-- >0;)s in n?n[u]=n[s]:delete n[u],u+=p,s+=p;return n}},function(e,t,n){var r=n(72);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t,n){var r=n(19),o=n(15),i=n(79),a=n(14);e.exports=function(e,t,n,u,s){r(t);var l=o(e),c=i(l),p=a(l.length),f=s?p-1:0,d=s?-1:1;if(2>n)for(;;){if(f in c){u=c[f],f+=d;break}if(f+=d,s?0>f:f>=p)throw TypeError("Reduce of empty array with no initial value")}for(;s?f>=0:p>f;f+=d)f in c&&(u=t(u,c[f],f,l));return u}},function(e,t,n){"use strict";var r=n(19),o=n(8),i=n(94),a=[].slice,u={},s=function(e,t,n){if(!(t in u)){for(var r=[],o=0;t>o;o++)r[o]="a["+o+"]";u[t]=Function("F,a","return new F("+r.join(",")+")")}return u[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=a.call(arguments,1),u=function(){var r=n.concat(a.call(arguments));return this instanceof u?s(t,r.length,r):i(t,r,e)};return o(t.prototype)&&(u.prototype=t.prototype),u}},function(e,t,n){"use strict";var r=n(12).f,o=n(60),i=(n(18),n(63)),a=n(39),u=n(47),s=n(28),l=n(72),c=n(136),p=n(209),f=n(64),d=n(11),A=n(48).fastKey,h=d?"_s":"size",v=function(e,t){var n,r=A(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,c){var p=e(function(e,r){u(e,p,t,"_i"),e._i=o(null),e._f=void 0,e._l=void 0,e[h]=0,void 0!=r&&l(r,n,e[c],e)});return i(p.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[h]=0},"delete":function(e){var t=this,n=v(t,e);if(n){var r=n.n,o=n.p;delete t._i[n.i],n.r=!0,o&&(o.n=r),r&&(r.p=o),t._f==n&&(t._f=r),t._l==n&&(t._l=o),t[h]--}return!!n},forEach:function(e){u(this,p,"forEach");for(var t,n=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!v(this,e)}}),d&&r(p.prototype,"size",{get:function(){return s(this[h])}}),p},def:function(e,t,n){var r,o,i=v(e,t);return i?i.v=n:(e._l=i={i:o=A(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=i),r&&(r.n=i),e[h]++,"F"!==o&&(e._i[o]=i)),e},getEntry:v,setStrong:function(e,t,n){c(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?p(0,n.k):"values"==t?p(0,n.v):p(0,[n.k,n.v]):(e._t=void 0,p(1))},n?"entries":"values",!n,!0),f(t)}}},function(e,t,n){var r=n(71),o=n(201);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return o(this)}}},function(e,t,n){"use strict";var r=n(63),o=n(48).getWeak,i=n(3),a=n(8),u=n(47),s=n(72),l=n(33),c=n(17),p=l(5),f=l(6),d=0,A=function(e){return e._l||(e._l=new h)},h=function(){this.a=[]},v=function(e,t){return p(e.a,function(e){return e[0]===t})};h.prototype={get:function(e){var t=v(this,e);return t?t[1]:void 0},has:function(e){return!!v(this,e)},set:function(e,t){var n=v(this,e);n?n[1]=t:this.a.push([e,t])},"delete":function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,i){var l=e(function(e,r){u(e,l,t,"_i"),e._i=d++,e._l=void 0,void 0!=r&&s(r,n,e[i],e)});return r(l.prototype,{"delete":function(e){if(!a(e))return!1;var t=o(e);return t===!0?A(this)["delete"](e):t&&c(t,this._i)&&delete t[this._i]},has:function(e){if(!a(e))return!1;var t=o(e);return t===!0?A(this).has(e):t&&c(t,this._i)}}),l},def:function(e,t,n){var r=o(i(t),!0);return r===!0?A(e).set(t,n):r[e._i]=n,e},ufstore:A}},function(e,t,n){e.exports=!n(11)&&!n(6)(function(){return 7!=Object.defineProperty(n(127)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(3);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(i){var a=e["return"];throw void 0!==a&&r(a.call(e)),i}}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&1e-8>e?e-e*e/2:Math.log(1+e)}},function(e,t,n){"use strict";var r=n(62),o=n(98),i=n(80),a=n(15),u=n(79),s=Object.assign;e.exports=!s||n(6)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=s({},e)[n]||Object.keys(s({},t)).join("")!=r})?function(e,t){for(var n=a(e),s=arguments.length,l=1,c=o.f,p=i.f;s>l;)for(var f,d=u(arguments[l++]),A=c?r(d).concat(c(d)):r(d),h=A.length,v=0;h>v;)p.call(d,f=A[v++])&&(n[f]=d[f]);return n}:s},function(e,t,n){var r=n(12),o=n(3),i=n(62);e.exports=n(11)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),u=a.length,s=0;u>s;)r.f(e,n=a[s++],t[n]);return e}},function(e,t,n){var r=n(22),o=n(61).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(e){try{return o(e)}catch(t){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?u(e):o(r(e))}},function(e,t,n){var r=n(17),o=n(22),i=n(90)(!1),a=n(140)("IE_PROTO");e.exports=function(e,t){var n,u=o(e),s=0,l=[];for(n in u)n!=a&&r(u,n)&&l.push(n);for(;t.length>s;)r(u,n=t[s++])&&(~i(l,n)||l.push(n));return l}},function(e,t,n){var r=n(62),o=n(22),i=n(80).f;e.exports=function(e){return function(t){for(var n,a=o(t),u=r(a),s=u.length,l=0,c=[];s>l;)i.call(a,n=u[l++])&&c.push(e?[n,a[n]]:a[n]);return c}}},function(e,t,n){var r=n(61),o=n(98),i=n(3),a=n(5).Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.f(i(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(5).parseFloat,o=n(74).trim;e.exports=1/r(n(145)+"-0")!==-(1/0)?function(e){var t=o(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){var r=n(5).parseInt,o=n(74).trim,i=n(145),a=/^[\-+]?0[xX]/;e.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(e,t){var n=o(String(e),3);return r(n,t>>>0||(a.test(n)?16:10))}:r},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(14),o=n(144),i=n(28);e.exports=function(e,t,n,a){var u=String(i(e)),s=u.length,l=void 0===n?" ":String(n),c=r(t);if(s>=c||""==l)return u;var p=c-s,f=o.call(l,Math.ceil(p/l.length));return f.length>p&&(f=f.slice(0,p)),a?f+u:u+f}},function(e,t,n){t.f=n(9)},function(e,t,n){"use strict";var r=n(204);e.exports=n(91)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(this,e);return t&&t.v},set:function(e,t){return r.def(this,0===e?0:e,t)}},r,!0)},function(e,t,n){n(11)&&"g"!=/./g.flags&&n(12).f(RegExp.prototype,"flags",{configurable:!0,get:n(93)})},function(e,t,n){"use strict";var r=n(204);e.exports=n(91)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r,o=n(33)(0),i=n(20),a=n(48),u=n(211),s=n(206),l=n(8),c=(n(17),a.getWeak),p=Object.isExtensible,f=s.ufstore,d={},A=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},h={get:function(e){if(l(e)){var t=c(e);return t===!0?f(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return s.def(this,e,t)}},v=e.exports=n(91)("WeakMap",A,h,s,!0,!0);7!=(new v).set((Object.freeze||Object)(d),7).get(d)&&(r=s.getConstructor(A),u(r.prototype,h),a.NEED=!0,o(["delete","has","get","set"],function(e){var t=v.prototype,n=t[e];i(t,e,function(t,o){if(l(t)&&!p(t)){this._f||(this._f=new r);var i=this._f[e](t,o);return"set"==e?this:i}return n.call(this,t,o)})}))},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,n){"use strict";var r=n(81),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";var r=n(227),o=n(102),i=n(226);e.exports=function(e){var t=i(e),n=o(t),a=t&&t.documentElement,u={top:0,left:0,height:0,width:0};if(t)return r(a,e)?(void 0!==e.getBoundingClientRect&&(u=e.getBoundingClientRect()),(u.width||u.height)&&(u={top:u.top+(n.pageYOffset||a.scrollTop)-(a.clientTop||0),left:u.left+(n.pageXOffset||a.scrollLeft)-(a.clientLeft||0),width:(null==u.width?e.offsetWidth:u.width)||0,height:(null==u.height?e.offsetHeight:u.height)||0}),u):u}},function(e,t,n){var r,o,i;!function(n,a){o=[t],r=a,i="function"==typeof r?r.apply(t,o):r,!(void 0!==i&&(e.exports=i))}(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){"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(228),o=n(151),i=n(510),a=n(511),u=n(517),s=n(102);e.exports=function(e,t){var n,l,c,p,f,d,A,h=r(e),v={top:0,left:0};if(e){n=t||i(e),p=s(n),l=a(n),d=o(n,!0),p=s(n),p||(v=r(n)),h={top:h.top-v.top,left:h.left-v.left,height:h.height,width:h.width},f=h.height,c=h.top+(p?0:l),A=c+f,l=l>c?c:A>l+d?A-d:l;var m=u(function(){return a(n,l)});return function(){return u.cancel(m)}}}},function(e,t,n){"use strict";var r=n(30),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(){}};e.exports=o},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t,n){"use strict";function r(e){return a?void 0:i(!1),f.hasOwnProperty(e)||(e="*"),u.hasOwnProperty(e)||("*"===e?a.innerHTML="<link />":a.innerHTML="<"+e+"></"+e+">",u[e]=!a.firstChild),u[e]?f[e]:null}var o=n(16),i=n(2),a=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>"],f={"*":[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},d=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];d.forEach(function(e){f[e]=p,u[e]=!0}),e.exports=r},function(e,t){"use strict";var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};e.exports=function(e,t){if("string"!=typeof t)for(var o=Object.getOwnPropertyNames(t),i=0;i<o.length;++i)if(!n[o[i]]&&!r[o[i]])try{e[o[i]]=t[o[i]]}catch(a){}return e}},function(e,t,n){function r(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}var o=n(159),i=n(161);r.prototype=o(i.prototype),r.prototype.constructor=r,e.exports=r},function(e,t,n){var r=n(75),o=n(25),i=r(o,"Map");e.exports=i},function(e,t,n){function r(e){this.__data__=new o(e)}var o=n(105),i=n(602),a=n(603),u=n(604),s=n(605),l=n(606);r.prototype.clear=i,r.prototype["delete"]=a,r.prototype.get=u,r.prototype.has=s,r.prototype.set=l,e.exports=r},function(e,t,n){var r=n(25),o=r.Symbol;e.exports=o},function(e,t,n){var r=n(75),o=n(25),i=r(o,"WeakMap");e.exports=i},function(e,t){function n(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}e.exports=n},function(e,t,n){function r(e,t){return e&&o(e,t,i)}var o=n(546),i=n(166);e.exports=r},function(e,t,n){function r(e,t){t=i(t,e)?[t]:o(t);for(var n=0,r=t.length;null!=e&&r>n;)e=e[a(t[n++])];return n&&n==r?e:void 0}var o=n(249),i=n(111),a=n(83);e.exports=r},function(e,t,n){function r(e,t){return null!=e&&(a.call(e,t)||"object"==typeof e&&t in e&&null===o(e))}var o=n(257),i=Object.prototype,a=i.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?u(e)?i(e[0],e[1]):o(e):s(e)}var o=n(552),i=n(553),a=n(265),u=n(37),s=n(616);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(265),o=n(260),i=o?function(e,t){return o.set(e,t),e}:r;e.exports=i},function(e,t,n){function r(e){return o(e)?e:i(e)}var o=n(37),i=n(262);e.exports=r},function(e,t){function n(e,t,n,o){for(var i=-1,a=e.length,u=n.length,s=-1,l=t.length,c=r(a-u,0),p=Array(l+c),f=!o;++s<l;)p[s]=t[s];for(;++i<u;)(f||a>i)&&(p[n[i]]=e[i]);for(;c--;)p[s++]=e[i++];return p}var r=Math.max;e.exports=n},function(e,t){function n(e,t,n,o){for(var i=-1,a=e.length,u=-1,s=n.length,l=-1,c=t.length,p=r(a-s,0),f=Array(p+c),d=!o;++i<p;)f[i]=e[i];for(var A=i;++l<c;)f[A+l]=t[l];for(;++u<s;)(d||a>i)&&(f[A+n[u]]=e[i++]);return f}var r=Math.max;e.exports=n},function(e,t,n){function r(e,t,n,g,b,w,_,E,x,C){function S(){for(var d=arguments.length,A=Array(d),h=d;h--;)A[h]=arguments[h];if(M)var v=l(S),m=a(A,v);if(g&&(A=o(A,g,b,M)),w&&(A=i(A,w,_,M)),d-=m,M&&C>d){var y=p(A,v);return s(e,t,r,S.placeholder,n,A,y,E,x,C-d)}var R=T?n:this,N=O?R[e]:e;return d=A.length,E?A=c(A,E):I&&d>1&&A.reverse(),P&&d>x&&(A.length=x),this&&this!==f&&this instanceof S&&(N=k||u(N)),N.apply(R,A)}var P=t&m,T=t&d,O=t&A,M=t&(h|v),I=t&y,k=O?void 0:u(e);return S}var o=n(250),i=n(251),a=n(560),u=n(107),s=n(253),l=n(108),c=n(598),p=n(82),f=n(25),d=1,A=2,h=8,v=16,m=128,y=512;e.exports=r},function(e,t,n){function r(e,t,n,r,f,d,A,h,v,m){var y=t&l,g=y?A:void 0,b=y?void 0:A,w=y?d:void 0,_=y?void 0:d;t|=y?c:p,t&=~(y?p:c),t&s||(t&=~(a|u));var E=[e,t,f,w,g,_,b,h,v,m],x=n.apply(void 0,E);return o(e)&&i(x,E),x.placeholder=r,x}var o=n(582),i=n(261),a=1,u=2,s=4,l=8,c=32,p=64;e.exports=r},function(e,t,n){function r(e,t,n,r,w,_,E,x){var C=t&h;if(!C&&"function"!=typeof e)throw new TypeError(d);var S=r?r.length:0;if(S||(t&=~(y|g),r=w=void 0),E=void 0===E?E:b(f(E),0),x=void 0===x?x:f(x),S-=w?w.length:0,t&g){var P=r,T=w;r=w=void 0}var O=C?void 0:l(e),M=[e,t,n,r,w,P,T,_,E,x];if(O&&c(M,O),e=M[0],t=M[1],n=M[2],r=M[3],w=M[4],x=M[9]=null==M[9]?C?0:e.length:b(M[9]-S,0),!x&&t&(v|m)&&(t&=~(v|m)),t&&t!=A)I=t==v||t==m?a(e,t,x):t!=y&&t!=(A|y)||w.length?u.apply(void 0,M):s(e,t,n,r);else var I=i(e,t,n);var k=O?o:p;return k(I,M)}var o=n(248),i=n(563),a=n(564),u=n(252),s=n(565),l=n(256),c=n(596),p=n(261),f=n(270),d="Expected a function",A=1,h=2,v=8,m=16,y=32,g=64,b=Math.max;e.exports=r},function(e,t,n){function r(e,t,n,r,s,l){var c=s&u,p=e.length,f=t.length;if(p!=f&&!(c&&f>p))return!1;var d=l.get(e);if(d)return d==t;var A=-1,h=!0,v=s&a?new o:void 0;for(l.set(e,t);++A<p;){var m=e[A],y=t[A];if(r)var g=c?r(y,m,A,t,e,l):r(m,y,A,e,t,l);if(void 0!==g){if(g)continue;h=!1;break}if(v){if(!i(t,function(e,t){return v.has(t)||m!==e&&!n(m,e,r,s,l)?void 0:v.add(t)})){h=!1;break}}else if(m!==y&&!n(m,y,r,s,l)){h=!1;break}}return l["delete"](e),h}var o=n(542),i=n(242),a=1,u=2;e.exports=r},function(e,t,n){var r=n(260),o=n(268),i=r?function(e){return r.get(e)}:o;e.exports=i},function(e,t){function n(e){return r(Object(e))}var r=Object.getPrototypeOf;e.exports=n},function(e,t,n){function r(e){return e===e&&!o(e)}var o=n(53);e.exports=r},function(e,t){function n(e,t){return function(n){return null==n?!1:n[e]===t&&(void 0!==t||e in Object(n))}}e.exports=n},function(e,t,n){var r=n(241),o=r&&new r;e.exports=o},function(e,t,n){var r=n(248),o=n(614),i=150,a=16,u=function(){var e=0,t=0;return function(n,u){var s=o(),l=a-(s-t);if(t=s,l>0){if(++e>=i)return n}else e=0;return r(n,u)}}();e.exports=u},function(e,t,n){var r=n(613),o=n(620),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,a=/\\(\\)?/g,u=r(function(e){var t=[];return o(e).replace(i,function(e,n,r,o){t.push(r?o.replace(a,"$1"):n||e)}),t});e.exports=u},function(e,t){function n(e){if(null!=e){try{return r.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var r=Function.prototype.toString;e.exports=n},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t){function n(e){return e}e.exports=n},function(e,t,n){function r(e){return o(e)&&u.call(e,"callee")&&(!l.call(e,"callee")||s.call(e)==i)}var o=n(610),i="[object Arguments]",a=Object.prototype,u=a.hasOwnProperty,s=a.toString,l=a.propertyIsEnumerable;e.exports=r},function(e,t,n){function r(e){return"string"==typeof e||!o(e)&&i(e)&&s.call(e)==a}var o=n(37),i=n(67),a="[object String]",u=Object.prototype,s=u.toString;e.exports=r},function(e,t){function n(){}e.exports=n},function(e,t,n){function r(e,t){if("function"!=typeof e)throw new TypeError(a);return t=u(void 0===t?e.length-1:i(t),0),function(){for(var n=arguments,r=-1,i=u(n.length-t,0),a=Array(i);++r<i;)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 s=Array(t+1);for(r=-1;++r<t;)s[r]=n[r];return s[t]=a,o(e,this,s)}}var o=n(158),i=n(270),a="Expected a function",u=Math.max;e.exports=r},function(e,t,n){function r(e){var t=o(e),n=t%1;return t===t?n?t-n:t:0}var o=n(618);e.exports=r},function(e,t,n){"use strict";e.exports=n(648)},function(e,t,n){"use strict";t.__esModule=!0;var r=n(7);t["default"]=r.PropTypes.shape({subscribe:r.PropTypes.func.isRequired,dispatch:r.PropTypes.func.isRequired,getState:r.PropTypes.func.isRequired})},function(e,t){"use strict";function n(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}t.__esModule=!0,t["default"]=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 i(e,t){var n,r,o=y["default"].animate.TRANSLATION_MAP;return o&&o[e]?(n={},n[E]=o[e]+"("+t+")",n):(r={},r[e]=t,r)}function a(e){var t=c["default"].Children.map(e,function(e){return e});for(var n in t)return n}var u,s=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(7),c=r(l),p=n(152),f=r(p),d=n(151),A=r(d),h=n(153),v=r(h),m=n(633),y=r(m),g=n(46),b=r(g),w=n(54),_=r(w),E=(0,v["default"])(y["default"].animate.transform),x=0,C=1,S=2,P=3,T=(u={},u[C]="hidden",u[x]="hidden",u[S]="hidden",u);e.exports=c["default"].createClass({displayName:"Popup",propTypes:{open:c["default"].PropTypes.bool,dropUp:c["default"].PropTypes.bool,duration:c["default"].PropTypes.number,onClosing:c["default"].PropTypes.func,onOpening:c["default"].PropTypes.func,onClose:c["default"].PropTypes.func,onOpen:c["default"].PropTypes.func},getInitialState:function(){return{initialRender:!0,status:this.props.open?S:C}},getDefaultProps:function(){return{duration:200,open:!1,onClosing:function(){},onOpening:function(){},onClose:function(){},onOpen:function(){}}},componentWillReceiveProps:function(e){this.setState({contentChanged:a(e.children)!==a(this.props.children)})},componentDidMount:function(){var e=this,t=this.state.status===S;_["default"].batchedUpdates(function(){e.setState({initialRender:!1}),t&&e.open()})},componentDidUpdate:function(e){var t=e.open&&!this.props.open,n=!e.open&&this.props.open,r=this.props.open,o=this.state.status;if(!!e.dropUp!=!!this.props.dropUp)return this.cancelNextCallback(),o===S&&this.open(),void(o===x&&this.close());if(n)this.open();else if(t)this.close();else if(r){var i=this.height();i!==this.state.height&&this.setState({height:i})}},render:function(){var e=this.props,t=e.className,n=e.dropUp,r=o(e,["className","dropUp"]),i=this.state,a=i.status,u=i.height,l=T[a]||"visible",p=a===C?"none":"block";return delete r.open,c["default"].createElement("div",s({},r,{style:s({display:p,overflow:l,height:u},r.style),className:(0,b["default"])(t,"rw-popup-container",{"rw-dropup":n,"rw-popup-animating":this.isTransitioning()})}),this.renderChildren())},renderChildren:function(){if(!this.props.children)return c["default"].createElement("span",{className:"rw-popup rw-widget"});var e=this.getOffsetForStatus(this.state.status),t=c["default"].Children.only(this.props.children);return(0,l.cloneElement)(t,{style:s({},t.props.style,e,{position:this.isTransitioning()?"absolute":void 0}),className:(0,b["default"])(t.props.className,"rw-popup rw-widget")})},open:function(){var e=this;this.cancelNextCallback();var t=_["default"].findDOMNode(this).firstChild,n=this.height();this.props.onOpening(),this.safeSetState({status:S,height:n},function(){var n=e.getOffsetForStatus(P),r=e.props.duration;e.animate(t,n,r,"ease",function(){e.safeSetState({status:P},function(){e.props.onOpen()})})})},close:function(){var e=this;this.cancelNextCallback();var t=_["default"].findDOMNode(this).firstChild,n=this.height();this.props.onClosing(),this.safeSetState({status:x,height:n},function(){var n=e.getOffsetForStatus(C),r=e.props.duration;e.animate(t,n,r,"ease",function(){return e.safeSetState({status:C},function(){e.props.onClose()})})})},getOffsetForStatus:function(e){var t;if(this.state.initialRender)return{};var n=i("top",this.props.dropUp?"100%":"-100%"),r=i("top",0);return(t={},t[C]=n,t[x]=r,t[S]=n,t[P]=r,t)[e]||{}},height:function O(){var e=_["default"].findDOMNode(this),t=e.firstChild,n=parseInt((0,f["default"])(t,"margin-top"),10)+parseInt((0,f["default"])(t,"margin-bottom"),10),r=e.style.display,O=void 0;return e.style.display="block",O=((0,A["default"])(t)||0)+(isNaN(n)?0:n),e.style.display=r,O},isTransitioning:function(){return this.state.status===S||this.state.status===C},animate:function(e,t,n,r,o){this._transition=y["default"].animate(e,t,n,r,this.setNextCallback(o))},cancelNextCallback:function(){this._transition&&this._transition.cancel&&(this._transition.cancel(),this._transition=null),this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},safeSetState:function(e,t){this.setState(e,this.setNextCallback(t))},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(){return n=!1},this.nextCallback}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t=n.props.caseSensitive?t:t.toLowerCase(),function(r){var o=(0,p.dataText)(r,n.props.textField);return n.props.caseSensitive||(o=o.toLowerCase()),e(o,t)}}var i=n(7),a=r(i),u=n(175),s=r(u),l=n(43),c=r(l),p=n(42),f=function(e){return e===!0?"startsWith":e?e:"eq"};e.exports={propTypes:{data:a["default"].PropTypes.array,value:a["default"].PropTypes.any,filter:c["default"].filter,caseSensitive:a["default"].PropTypes.bool,minLength:a["default"].PropTypes.number},getDefaultProps:function(){return{caseSensitive:!1,minLength:1}},filterIndexOf:function(e,t){var n=-1,r="function"==typeof this.props.filter?this.props.filter:o(s["default"][f(this.props.filter)],t,this);return!t||!t.trim()||this.props.filter&&t.length<(this.props.minLength||1)?-1:(e.every(function(e,o){return r(e,t,o)?(n=o,!1):!0}),n)},filter:function(e,t){var n="string"==typeof this.props.filter?o(s["default"][this.props.filter],t,this):this.props.filter;return!n||!t||!t.trim()||t.length<(this.props.minLength||1)?e:e.filter(function(e,r){return n(e,t,r)})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return e?(e=e.toLowerCase(),function(t){return a["default"].startsWith((0,u.dataText)(t,n).toLowerCase(),e)}):function(){return!0}}t.__esModule=!0;var i=n(175),a=r(i),u=n(42),s=n(43),l=r(s),c=n(55),p={},f=function(e,t){return(0,c.isDisabledItem)(e,t)||(0,c.isReadOnlyItem)(e,t)};t["default"]={propTypes:{textField:l["default"].accessor,valueField:l["default"].accessor,disabled:l["default"].disabled.acceptsArray,readOnly:l["default"].readOnly.acceptsArray},first:function(){return this.next(p)},last:function(){var e=this._data(),t=e[e.length-1];return f(t,this.props)?this.prev(t):t},prev:function(e,t){var n=this._data(),r=n.indexOf(e),i=o(t,e,this.props.textField);for((0>r||null==r)&&(r=0),r--;r>-1&&(f(n[r],this.props)||!i(n[r]));)r--;return r>=0?n[r]:e},next:function(e,t){for(var n=this._data(),r=n.indexOf(e)+1,i=n.length,a=o(t,e,this.props.textField);i>r&&(f(n[r],this.props)||!a(n[r]));)r++;return i>r?n[r]:e}},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(231),i=r(o);t["default"]={_scrollTo:function(e,t,n){var r,o,a=this._scrollState||(this._scrollState={}),u=this.props.onMove,s=a.visible,l=a.focused;a.visible=!(!t.offsetWidth||!t.offsetHeight),a.focused=n,o=l!==n,r=a.visible&&!s,(r||a.visible&&o)&&(u?u(e,t,n):(a.scrollCancel&&a.scrollCancel(),a.scrollCancel=(0,i["default"])(e,t)))}},e.exports=t["default"]},function(e,t,n){"use strict";var r=n(31);e.exports={shouldComponentUpdate:function(e,t){return!r.isShallowEqual(this.props,e)||!r.isShallowEqual(this.state,t)}}},function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},o=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){o.forEach(function(t){r[n(t,e)]=r[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}},a={isUnitlessNumber:r,shorthandPropertyExpansions:i};e.exports=a},function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=n(10),i=n(56),a=n(2);o(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?a(!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}},checkpoint:function(){return this._callbacks?this._callbacks.length:0},rollback:function(e){this._callbacks&&(this._callbacks.length=e,this._contexts.length=e)},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),i.addPoolingTo(r),e.exports=r; },function(e,t){"use strict";var n={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};e.exports=n},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 i(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);m(e,i,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,i=e.keyPrefix,a=e.func,u=e.context,s=a.call(u,t,e.count++);Array.isArray(s)?l(s,o,n,v.thatReturnsArgument):null!=s&&(h.isValidElement(s)&&(s=h.cloneAndReplaceKey(s,i+(!s.key||t&&t.key===s.key?"":r(s.key)+"/")+n)),o.push(s))}function l(e,t,n,o,i){var a="";null!=n&&(a=r(n)+"/");var l=u.getPooled(t,a,o,i);m(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 f(e,t){return m(e,p,null)}function d(e){var t=[];return l(e,t,null,v.thatReturnsArgument),t}var A=n(56),h=n(32),v=n(30),m=n(194),y=A.twoArgumentPooler,g=A.fourArgumentPooler,b=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},A.addPoolingTo(o,y),u.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},A.addPoolingTo(u,g);var w={forEach:a,map:c,mapIntoWithKeyPrefixInternal:l,count:f,toArray:d};e.exports=w},function(e,t,n){"use strict";function r(e,t){var n=_.hasOwnProperty(t)?_[t]:null;x.hasOwnProperty(t)&&(n!==b.OVERRIDE_BASE?v(!1):void 0),e&&(n!==b.DEFINE_MANY&&n!==b.DEFINE_MANY_MERGED?v(!1):void 0)}function o(e,t){if(t){"function"==typeof t?v(!1):void 0,d.isValidElement(t)?v(!1):void 0;var n=e.prototype,o=n.__reactAutoBindPairs;t.hasOwnProperty(g)&&E.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==g){var a=t[i],l=n.hasOwnProperty(i);if(r(l,i),E.hasOwnProperty(i))E[i](e,a);else{var c=_.hasOwnProperty(i),p="function"==typeof a,f=p&&!c&&!l&&t.autobind!==!1;if(f)o.push(i,a),n[i]=a;else if(l){var A=_[i];!c||A!==b.DEFINE_MANY_MERGED&&A!==b.DEFINE_MANY?v(!1):void 0,A===b.DEFINE_MANY_MERGED?n[i]=u(n[i],a):A===b.DEFINE_MANY&&(n[i]=s(n[i],a))}else n[i]=a}}}}function i(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in E;o?v(!1):void 0;var i=n in e;i?v(!1):void 0,e[n]=r}}}function a(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:v(!1);for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?v(!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 a(o,n),a(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=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],o=t[n+1];e[r]=l(e,o)}}var p=n(10),f=n(284),d=n(32),A=(n(121),n(120),n(296)),h=n(103),v=n(2),m=n(104),y=n(51),g=(n(4),y({mixins:null})),b=m({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),w=[],_={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},E={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=p({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=p({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=u(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=p({},e.propTypes,t)},statics:function(e,t){i(e,t)},autobind:function(){}},x={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},C=function(){};p(C.prototype,f.prototype,x);var S={createClass:function(e){var t=function(e,t,n){this.__reactAutoBindPairs.length&&c(this),this.props=e,this.context=t,this.refs=h,this.updater=n||A,this.state=null;var r=this.getInitialState?this.getInitialState():null;"object"!=typeof r||Array.isArray(r)?v(!1):void 0,this.state=r};t.prototype=new C,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],w.forEach(o.bind(null,t)),o(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:v(!1);for(var n in _)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){w.push(e)}}};e.exports=S},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||o}var o=n(296),i=(n(26),n(185),n(103)),a=n(2);n(4);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?a(!1):void 0,this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};e.exports=r},function(e,t,n){"use strict";var r=n(177),o=n(656),i={processChildrenUpdates:o.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup,unmountIDFromEnvironment:function(e){}};e.exports=i},function(e,t){"use strict";var n={hasCachedChildNodes:1};e.exports=n},function(e,t,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=s.getValue(e);null!=t&&o(this,Boolean(e.multiple),t)}}function o(e,t,n){var r,o,i=l.getNodeFromInstance(e).options;if(t){for(r={},o=0;o<n.length;o++)r[""+n[o]]=!0;for(o=0;o<i.length;o++){var a=r.hasOwnProperty(i[o].value);i[o].selected!==a&&(i[o].selected=a)}}else{for(r=""+n,o=0;o<i.length;o++)if(i[o].value===r)return void(i[o].selected=!0);i.length&&(i[0].selected=!0)}}function i(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);return this._rootNodeID&&(this._wrapperState.pendingUpdate=!0),c.asap(r,this),n}var a=n(10),u=n(117),s=n(181),l=n(13),c=n(38),p=(n(4),!1),f={getNativeProps:function(e,t){return a({},u.getNativeProps(e,t),{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){var n=s.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:t.defaultValue,listeners:null,onChange:i.bind(e),wasMultiple:Boolean(t.multiple)},void 0===t.value||void 0===t.defaultValue||p||(p=!0)},getSelectValueContext:function(e){return e._wrapperState.initialValue},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=s.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?[]:""))}};e.exports=f},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){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;i("uniqueKey",e,t)}}function i(e,t,n){var o=r();if(!o){var i="string"==typeof n?n:n.displayName||n.name;i&&(o=" Check the top-level render call using <"+i+">.")}var a=A[e]||(A[e]={});if(a[o])return null;a[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 a(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 i=f(e);if(i&&i!==e.entries)for(var a,u=i.call(e);!(a=u.next()).done;)l.isValidElement(a.value)&&o(a.value,t)}}function u(e,t,n,o){for(var i in t)if(t.hasOwnProperty(i)){var a;try{"function"!=typeof t[i]?d(!1):void 0,a=t[i](n,i,e,o)}catch(u){a=u}if(a instanceof Error&&!(a.message in h)){h[a.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=n(32),c=n(121),p=(n(120),n(57)),f=(n(185),n(190)),d=n(2),A=(n(4),{}),h={},v={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 i=2;i<arguments.length;i++)a(arguments[i],e);return s(o),o},createFactory:function(e){var t=v.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++)a(arguments[o],r.type);return s(r),r}};e.exports=v},function(e,t){"use strict";var n,r={injectEmptyComponentFactory:function(e){n=e}},o={create:function(e){return n(e)}};o.injection=r,e.exports=o},function(e,t){"use strict";var n={logTopLevelRenders:!1};e.exports=n},function(e,t,n){"use strict";function r(e){return i(document.documentElement,e)}var o=n(660),i=n(521),a=n(233),u=n(234),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),a(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(void 0===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 i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(e,t)}};e.exports=s},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===k?e.documentElement:e.firstChild:null}function i(e){return e.getAttribute&&e.getAttribute(O)||""}function a(e,t,n,r,o){var i;if(g.logTopLevelRenders){var a=e._currentElement.props,u=a.type;i="React mount: "+("string"==typeof u?u:u.displayName||u.name),console.time(i)}var s=w.mountComponent(e,n,null,v(e,t),o);i&&console.timeEnd(i),e._renderedComponent._topLevelWrapper=e,j._mountImageIntoNode(s,t,e,r,n)}function u(e,t,n,r){var o=E.ReactReconcileTransaction.getPooled(!n&&m.useCreateElement);o.perform(a,null,e,t,o,n,r),E.ReactReconcileTransaction.release(o)}function s(e,t,n){for(w.unmountComponent(e,n),t.nodeType===k&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function l(e){var t=o(e);if(t){var n=h.getInstanceFromNode(t);return!(!n||!n._nativeParent)}}function c(e){var t=o(e),n=t&&h.getInstanceFromNode(t);return n&&!n._nativeParent?n:null}function p(e){var t=c(e);return t?t._nativeContainerInfo._topLevelWrapper:null}var f=n(77),d=n(69),A=n(119),h=(n(57),n(13)),v=n(651),m=n(655),y=n(32),g=n(290),b=(n(26),n(671)),w=n(78),_=n(298),E=n(38),x=n(103),C=n(305),S=n(2),P=n(192),T=n(193),O=(n(4),d.ID_ATTRIBUTE_NAME),M=d.ROOT_ATTRIBUTE_NAME,I=1,k=9,R=11,N={},D=1,F=function(){this.rootID=D++};F.prototype.isReactComponent={},F.prototype.render=function(){return this.props};var j={TopLevelWrapper:F,_instancesByReactRootID:N,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return j.scrollMonitor(n,function(){_.enqueueElementInternal(e,t),r&&_.enqueueCallbackInternal(e,r)}),e},_renderNewRootComponent:function(e,t,n,r){!t||t.nodeType!==I&&t.nodeType!==k&&t.nodeType!==R?S(!1):void 0,A.ensureScrollValueMonitoring();var o=C(e);E.batchedUpdates(u,o,t,n,r);var i=o._instance.rootID;return N[i]=o,o},renderSubtreeIntoContainer:function(e,t,n,r){return null==e||null==e._reactInternalInstance?S(!1):void 0,j._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){_.validateCallback(r,"ReactDOM.render"),y.isValidElement(t)?void 0:S(!1);var a=y(F,null,null,null,null,null,t),u=p(n);if(u){var s=u._currentElement,c=s.props;if(T(c,t)){var f=u._renderedComponent.getPublicInstance(),d=r&&function(){r.call(f)};return j._updateRootComponent(u,a,n,d),f}j.unmountComponentAtNode(n)}var A=o(n),h=A&&!!i(A),v=l(n),m=h&&!u&&!v,g=j._renderNewRootComponent(a,n,m,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):x)._renderedComponent.getPublicInstance();return r&&r.call(g),g},render:function(e,t,n){return j._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){!e||e.nodeType!==I&&e.nodeType!==k&&e.nodeType!==R?S(!1):void 0;var t=p(e);if(!t){l(e),1===e.nodeType&&e.hasAttribute(M);return!1}return delete N[t._instance.rootID],E.batchedUpdates(s,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,i,a){if(!t||t.nodeType!==I&&t.nodeType!==k&&t.nodeType!==R?S(!1):void 0,i){var u=o(t);if(b.canReuseMarkup(e,u))return void h.precacheNode(n,u);var s=u.getAttribute(b.CHECKSUM_ATTR_NAME);u.removeAttribute(b.CHECKSUM_ATTR_NAME);var l=u.outerHTML;u.setAttribute(b.CHECKSUM_ATTR_NAME,s);var c=e,p=r(c,l);" (client) "+c.substring(p-20,p+20)+"\n (server) "+l.substring(p-20,p+20);t.nodeType===k?S(!1):void 0}if(t.nodeType===k?S(!1):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);f.insertTreeBefore(t,e,null)}else P(t,e),h.precacheNode(n,t.firstChild)}};e.exports=j},function(e,t,n){"use strict";var r=n(104),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=o},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)}function i(e){return new f(e)}function a(e){return e instanceof f}var u=n(10),s=n(2),l=null,c=null,p={},f=null,d={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){f=e},injectComponentClasses:function(e){u(p,e)}},A={getComponentClassForElement:r,createInternalComponent:o,createInstanceForText:i,isTextComponent:a,injection:d};e.exports=A},function(e,t,n){"use strict";var r=n(32),o=n(2),i={NATIVE:0,COMPOSITE:1,EMPTY:2,getType:function(e){return null===e||e===!1?i.EMPTY:r.isValidElement(e)?"function"==typeof e.type?i.COMPOSITE:i.NATIVE:void o(!1)}};e.exports=i},function(e,t,n){"use strict";function r(e,t){}var o=(n(4),{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")}});e.exports=o},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function o(e){function t(t,n,r,o,i,a){if(o=o||E,a=a||r,null==n[r]){var u=b[i];return t?new Error("Required "+u+" `"+a+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,i,a)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function i(e){function t(t,n,r,o,i){var a=t[n],u=v(a);if(u!==e){var s=b[o],l=m(a);return new Error("Invalid "+s+" `"+i+"` of type "+("`"+l+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return o(t)}function a(){return o(w.thatReturns(null))}function u(e){function t(t,n,r,o,i){if("function"!=typeof e)return new Error("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){var u=b[o],s=v(a);return new Error("Invalid "+u+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<a.length;l++){var c=e(a,l,r,o,i+"["+l+"]");if(c instanceof Error)return c}return null}return o(t)}function s(){function e(e,t,n,r,o){if(!g.isValidElement(e[t])){var i=b[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+n+"`, expected a single ReactElement."))}return null}return o(e)}function l(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=b[o],u=e.name||E,s=y(t[n]);return new Error("Invalid "+a+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+u+"`."))}return null}return o(t)}function c(e){function t(t,n,o,i,a){for(var u=t[n],s=0;s<e.length;s++)if(r(u,e[s]))return null;var l=b[i],c=JSON.stringify(e);return new Error("Invalid "+l+" `"+a+"` of value `"+u+"` "+("supplied to `"+o+"`, expected one of "+c+"."))}return o(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function p(e){function t(t,n,r,o,i){if("function"!=typeof e)return new Error("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],u=v(a);if("object"!==u){var s=b[o];return new Error("Invalid "+s+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an object."))}for(var l in a)if(a.hasOwnProperty(l)){var c=e(a,l,r,o,i+"."+l);if(c instanceof Error)return c}return null}return o(t)}function f(e){function t(t,n,r,o,i){for(var a=0;a<e.length;a++){var u=e[a];if(null==u(t,n,r,o,i))return null}var s=b[o];return new Error("Invalid "+s+" `"+i+"` supplied to "+("`"+r+"`."))}return o(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 i=b[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return o(e)}function A(e){function t(t,n,r,o,i){var a=t[n],u=v(a);if("object"!==u){var s=b[o];return new Error("Invalid "+s+" `"+i+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `object`."))}for(var l in e){var c=e[l];if(c){var p=c(a,l,r,o,i+"."+l);if(p)return p}}return null}return o(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;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 y(e){return e.constructor&&e.constructor.name?e.constructor.name:E}var g=n(32),b=n(120),w=n(30),_=n(190),E="<<anonymous>>",x={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),any:a(),arrayOf:u,element:s(),instanceOf:l,node:d(),objectOf:p,oneOf:c,oneOfType:f,shape:A};e.exports=x},function(e,t,n){"use strict";function r(e){a.enqueueUpdate(e)}function o(e,t){var n=i.get(e);return n?n:null}var i=(n(57),n(184)),a=n(38),u=n(2),s=(n(4),{isMounted:function(e){var t=i.get(e);return t?!!t._renderedComponent:!1},enqueueCallback:function(e,t,n){s.validateCallback(t,n);var i=o(e);return i?(i._pendingCallbacks?i._pendingCallbacks.push(t):i._pendingCallbacks=[t],void r(i)):null},enqueueCallbackInternal:function(e,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)}},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?u(!1):void 0}});e.exports=s},function(e,t){"use strict";e.exports="15.1.0"},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},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=n(2);e.exports=r},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.NATIVE?e._renderedComponent:t===o.EMPTY?null:void 0}var o=n(295);e.exports=r},function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(16),i=null;e.exports=r},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,n=null===e||e===!1;if(n)t=u.create(o);else if("object"==typeof e){var i=e;!i||"function"!=typeof i.type&&"string"!=typeof i.type?l(!1):void 0,t="string"==typeof i.type?s.createInternalComponent(i):r(i.type)?new i.type(i):new c(i)}else"string"==typeof e||"number"==typeof e?t=s.createInstanceForText(e):l(!1);t._mountIndex=0,t._mountImage=null;return t}var i=n(10),a=n(647),u=n(289),s=n(294),l=(n(26),n(2)),c=(n(4),function(e){this.construct(e)});i(c.prototype,a.Mixin,{_instantiateReactComponent:o});e.exports=o},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&r[e.type]||"textarea"===t)}var r={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};e.exports=n},function(e,t,n){"use strict";var r=n(16),o=n(124),i=n(192),a=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){i(e,o(t))})),e.exports=a},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 i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(518),s=r(u),l=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,"Submit Validation Failed"));return n.errors=e,n}return a(t,e),t}(s["default"]);t["default"]=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.untouch=t.unregisterField=t.touch=t.setSubmitFailed=t.stopSubmit=t.stopAsyncValidation=t.startSubmit=t.startAsyncValidation=t.reset=t.registerField=t.initialize=t.focus=t.destroy=t.change=t.blur=t.arrayUnshift=t.arraySwap=t.arraySplice=t.arrayShift=t.arrayRemoveAll=t.arrayRemove=t.arrayPush=t.arrayPop=t.arrayMove=t.arrayInsert=void 0;var r=n(196);t.arrayInsert=function(e,t,n,o){return{type:r.ARRAY_INSERT,meta:{form:e,field:t,index:n},payload:o}},t.arrayMove=function(e,t,n,o){return{type:r.ARRAY_MOVE,meta:{form:e,field:t,from:n,to:o}}},t.arrayPop=function(e,t){return{type:r.ARRAY_POP,meta:{form:e,field:t}}},t.arrayPush=function(e,t,n){return{type:r.ARRAY_PUSH,meta:{form:e,field:t},payload:n}},t.arrayRemove=function(e,t,n){return{type:r.ARRAY_REMOVE,meta:{form:e,field:t,index:n}}},t.arrayRemoveAll=function(e,t){return{type:r.ARRAY_REMOVE_ALL,meta:{form:e,field:t}}},t.arrayShift=function(e,t){return{type:r.ARRAY_SHIFT,meta:{form:e,field:t}}},t.arraySplice=function(e,t,n,o,i){var a={type:r.ARRAY_SPLICE,meta:{form:e,field:t,index:n,removeNum:o}};return void 0!==i&&(a.payload=i),a},t.arraySwap=function(e,t,n,o){if(n===o)throw new Error("Swap indices cannot be equal");if(0>n||0>o)throw new Error("Swap indices cannot be negative");return{type:r.ARRAY_SWAP,meta:{form:e,field:t,indexA:n,indexB:o}}},t.arrayUnshift=function(e,t,n){return{type:r.ARRAY_UNSHIFT,meta:{form:e,field:t},payload:n}},t.blur=function(e,t,n,o){return{type:r.BLUR,meta:{form:e,field:t,touch:o},payload:n}},t.change=function(e,t,n,o){return{type:r.CHANGE,meta:{form:e,field:t,touch:o},payload:n}},t.destroy=function(e){return{type:r.DESTROY,meta:{form:e}}},t.focus=function(e,t){return{type:r.FOCUS,meta:{form:e,field:t}}},t.initialize=function(e,t){return{type:r.INITIALIZE,meta:{form:e},payload:t}},t.registerField=function(e,t,n){return{type:r.REGISTER_FIELD,meta:{form:e},payload:{name:t,type:n}}},t.reset=function(e){return{type:r.RESET,meta:{form:e}}},t.startAsyncValidation=function(e,t){return{type:r.START_ASYNC_VALIDATION,meta:{form:e,field:t}}},t.startSubmit=function(e){return{type:r.START_SUBMIT,meta:{form:e}}},t.stopAsyncValidation=function(e,t){var n={type:r.STOP_ASYNC_VALIDATION,meta:{form:e},payload:t};return t&&Object.keys(t).length&&(n.error=!0),n},t.stopSubmit=function(e,t){var n={type:r.STOP_SUBMIT,meta:{form:e},payload:t};return t&&Object.keys(t).length&&(n.error=!0),n},t.setSubmitFailed=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;t>o;o++)n[o-1]=arguments[o];return{type:r.SET_SUBMIT_FAILED,meta:{form:e,fields:n},error:!0}},t.touch=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;t>o;o++)n[o-1]=arguments[o];return{type:r.TOUCH,meta:{form:e,fields:n}}},t.unregisterField=function(e,t){return{type:r.UNREGISTER_FIELD,meta:{form:e},payload:{name:t}}},t.untouch=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;t>o;o++)n[o-1]=arguments[o];return{type:r.UNTOUCH,meta:{form:e,fields:n}}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=t.dataKey="value",r=function(e,t){return function(e){e.dataTransfer.setData(n,t)}};t["default"]=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(312),i=r(o),a=function(e){var t=[];if(e)for(var n=0;n<e.length;n++){var r=e[n];r.selected&&t.push(r.value)}return t},u=function(e,t){if((0,i["default"])(e)){if(!t&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(t&&void 0!==e.nativeEvent)return e.nativeEvent.text;var n=e.target,r=n.type,o=n.value,u=n.checked,s=n.files,l=e.dataTransfer;return"checkbox"===r?u:"file"===r?s||l&&l.files:"select-multiple"===r?a(e.target.options):"number"===r||"range"===r?parseFloat(o):o}return e&&void 0!==e.value?e.value:e};t["default"]=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return!!(e&&e.stopPropagation&&e.preventDefault)};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(312),i=r(o),a=function(e){var t=(0,i["default"])(e);return t&&e.preventDefault(),t};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.values=t.untouch=t.touch=t.SubmissionError=t.stopSubmit=t.stopAsyncValidation=t.startSubmit=t.startAsyncValidation=t.setSubmitFailed=t.reset=t.propTypes=t.initialize=t.reduxForm=t.reducer=t.formValueSelector=t.focus=t.FieldArray=t.Field=t.destroy=t.change=t.blur=t.arrayUnshift=t.arraySwap=t.arraySplice=t.arrayShift=t.arrayRemoveAll=t.arrayRemove=t.arrayPush=t.arrayPop=t.arrayMove=t.arrayInsert=t.actionTypes=void 0;var o=n(707),i=r(o),a=n(89),u=r(a),s=(0,i["default"])(u["default"]),l=s.actionTypes,c=s.arrayInsert,p=s.arrayMove,f=s.arrayPop,d=s.arrayPush,A=s.arrayRemove,h=s.arrayRemoveAll,v=s.arrayShift,m=s.arraySplice,y=s.arraySwap,g=s.arrayUnshift,b=s.blur,w=s.change,_=s.destroy,E=s.Field,x=s.FieldArray,C=s.focus,S=s.formValueSelector,P=s.reducer,T=s.reduxForm,O=s.initialize,M=s.propTypes,I=s.reset,k=s.setSubmitFailed,R=s.startAsyncValidation,N=s.startSubmit,D=s.stopAsyncValidation,F=s.stopSubmit,j=s.SubmissionError,L=s.touch,U=s.untouch,B=s.values;t.actionTypes=l,t.arrayInsert=c,t.arrayMove=p,t.arrayPop=f,t.arrayPush=d,t.arrayRemove=A,t.arrayRemoveAll=h,t.arrayShift=v,t.arraySplice=m,t.arraySwap=y,t.arrayUnshift=g,t.blur=b,t.change=w,t.destroy=_,t.Field=E,t.FieldArray=x,t.focus=C,t.formValueSelector=S,t.reducer=P,t.reduxForm=T,t.initialize=O,t.propTypes=M,t.reset=I,t.setSubmitFailed=k,t.startAsyncValidation=R,t.startSubmit=N,t.stopAsyncValidation=D,t.stopSubmit=F,t.SubmissionError=j,t.touch=L,t.untouch=U,t.values=B},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product;t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(116),a=r(i),u=function l(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o];if(!e)return e;var i=e[t];return r.length?l.apply(void 0,[i].concat(r)):i},s=function(e,t){return u.apply(void 0,[e].concat(o((0,a["default"])(t))))};t["default"]=s},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(0===t.length)return function(e){return e};var r=function(){var e=t[t.length-1],n=t.slice(0,-1);return{v:function(){return n.reduceRight(function(e,t){return t(e)},e.apply(void 0,arguments))}}}();return"object"==typeof r?r.v:void 0}t.__esModule=!0,t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){function r(){m===v&&(m=v.slice())}function i(){return h}function u(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return r(),m.push(e),function(){if(t){t=!1,r();var n=m.indexOf(e);m.splice(n,1)}}}function c(e){if(!(0,a["default"])(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(y)throw new Error("Reducers may not dispatch actions.");try{y=!0,h=A(h,e)}finally{y=!1}for(var t=v=m,n=0;n<t.length;n++)t[n]();return e}function p(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");A=e,c({type:l.INIT})}function f(){var e,t=u;return e={subscribe:function(e){function n(){e.next&&e.next(i())}if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");n();var r=t(n);return{unsubscribe:r}}},e[s["default"]]=function(){return this},e}var d;if("function"==typeof t&&"undefined"==typeof n&&(n=t,t=void 0),"undefined"!=typeof n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(o)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function."); var A=e,h=t,v=[],m=v,y=!1;return c({type:l.INIT}),d={dispatch:c,subscribe:u,getState:i,replaceReducer:p},d[s["default"]]=f,d}t.__esModule=!0,t.ActionTypes=void 0,t["default"]=o;var i=n(165),a=r(i),u=n(736),s=r(u),l=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t){"use strict";function n(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}t.__esModule=!0,t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),i=r(o),a=n(314),u=n(628),s=r(u),l=n(632),c=r(l),p=n(629),f=r(p);n(735);var d=[{color:"Red",value:"ff0000"},{color:"Green",value:"00ff00"},{color:"Blue",value:"0000ff"}],A=function(e){var t=e.handleSubmit,n=e.pristine,r=e.reset,o=e.submitting;return i["default"].createElement("form",{onSubmit:t},i["default"].createElement("div",null,i["default"].createElement("label",null,"Favorite Color"),i["default"].createElement(a.Field,{name:"favoriteColor",component:s["default"],data:d,valueField:"value",textField:"color"})),i["default"].createElement("div",null,i["default"].createElement("label",null,"Hobbies"),i["default"].createElement(a.Field,{name:"hobbies",component:f["default"],defaultValue:[],onBlur:function(){return e.onBlur()},data:["Guitar","Cycling","Hiking"]})),i["default"].createElement("div",null,i["default"].createElement("label",null,"Sex"),i["default"].createElement(a.Field,{name:"sex",component:c["default"],onBlur:function(){return e.onBlur()},data:["male","female"]})),i["default"].createElement("div",null,i["default"].createElement("button",{type:"submit",disabled:n||o},"Submit"),i["default"].createElement("button",{type:"button",disabled:n||o,onClick:r},"Reset Values")))};A=(0,a.reduxForm)({form:"reactWidgets"})(A),t["default"]=A},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(7),i=r(o),a=n(271),u=r(a),s=n(85),l=n(197),c=n(314),p=n(701),f=document.getElementById("content"),d=(0,l.combineReducers)({form:c.reducer}),A=(window.devToolsExtension?window.devToolsExtension()(l.createStore):l.createStore)(d),h=function(e){return new Promise(function(t){setTimeout(function(){window.alert("You submitted:\n\n"+JSON.stringify(e,null,2)),t()},500)})},v=function(){var e=n(320)["default"],t=n(537),r=n(623);u["default"].render(i["default"].createElement(s.Provider,{store:A},i["default"].createElement(p.App,{version:"6.0.0-rc.1",path:"/examples/react-widgets/",breadcrumbs:(0,p.generateExampleBreadcrumbs)("react-widgets","React Widgets Form Example","6.0.0-rc.1")},i["default"].createElement(p.Markdown,{content:t}),i["default"].createElement("h2",null,"Form"),i["default"].createElement(e,{onSubmit:h}),i["default"].createElement(p.Values,{form:"reactWidgets"}),i["default"].createElement("h2",null,"Code"),i["default"].createElement("h4",null,"ReactWidgetsForm.js"),i["default"].createElement(p.Code,{source:r}))),f)};v()},function(e,t,n){(function(e){"use strict";function t(e,t,n){e[t]||Object[r](e,t,{writable:!0,configurable:!0,value:n})}if(n(504),n(733),n(323),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;var r="defineProperty";t(String.prototype,"padLeft","".padStart),t(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(e){[][e]&&t(Array,e,Function.call.bind([][e]))})}).call(t,function(){return this}())},function(e,t,n){n(333),e.exports=n(34).RegExp.escape},function(e,t,n){var r=n(8),o=n(133),i=n(9)("species");e.exports=function(e){var t;return o(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&(t=t[i],null===t&&(t=void 0))),void 0===t?Array:t}},function(e,t,n){var r=n(324);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){"use strict";var r=n(3),o=n(36),i="number";e.exports=function(e){if("string"!==e&&e!==i&&"default"!==e)throw TypeError("Incorrect hint");return o(r(this),e!=i)}},function(e,t,n){var r=n(62),o=n(98),i=n(80);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var a,u=n(e),s=i.f,l=0;u.length>l;)s.call(e,a=u[l++])&&t.push(a);return t}},function(e,t,n){var r=n(62),o=n(22);e.exports=function(e,t){for(var n,i=o(e),a=r(i),u=a.length,s=0;u>s;)if(i[n=a[s++]]===t)return n}},function(e,t,n){"use strict";var r=n(330),o=n(94),i=n(19);e.exports=function(){for(var e=i(this),t=arguments.length,n=Array(t),a=0,u=r._,s=!1;t>a;)(n[a]=arguments[a++])===u&&(s=!0);return function(){var r,i=this,a=arguments.length,l=0,c=0;if(!s&&!a)return o(e,n,i);if(r=n.slice(),s)for(;t>l;l++)r[l]===u&&(r[l]=arguments[c++]);for(;a>c;)r.push(arguments[c++]);return o(e,r,i)}}},function(e,t,n){e.exports=n(5)},function(e,t){e.exports=function(e,t){var n=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,n)}}},function(e,t,n){var r=n(71),o=n(9)("iterator"),i=n(58);e.exports=n(34).isIterable=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||i.hasOwnProperty(r(t))}},function(e,t,n){var r=n(1),o=n(331)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(e){return o(e)}})},function(e,t,n){var r=n(1);r(r.P,"Array",{copyWithin:n(200)}),n(70)("copyWithin")},function(e,t,n){"use strict";var r=n(1),o=n(33)(4);r(r.P+r.F*!n(29)([].every,!0),"Array",{every:function(e){return o(this,e,arguments[1])}})},function(e,t,n){var r=n(1);r(r.P,"Array",{fill:n(125)}),n(70)("fill")},function(e,t,n){"use strict";var r=n(1),o=n(33)(2);r(r.P+r.F*!n(29)([].filter,!0),"Array",{filter:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),o=n(33)(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(70)(i)},function(e,t,n){"use strict";var r=n(1),o=n(33)(5),i="find",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(70)(i)},function(e,t,n){"use strict";var r=n(1),o=n(33)(0),i=n(29)([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(39),o=n(1),i=n(15),a=n(208),u=n(132),s=n(14),l=n(126),c=n(149);o(o.S+o.F*!n(96)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,o,p,f=i(e),d="function"==typeof this?this:Array,A=arguments.length,h=A>1?arguments[1]:void 0,v=void 0!==h,m=0,y=c(f);if(v&&(h=r(h,A>2?arguments[2]:void 0,2)),void 0==y||d==Array&&u(y))for(t=s(f.length),n=new d(t);t>m;m++)l(n,m,v?h(f[m],m):f[m]);else for(p=y.call(f),n=new d;!(o=p.next()).done;m++)l(n,m,v?a(p,h,[o.value,m],!0):o.value);return n.length=m,n}})},function(e,t,n){"use strict";var r=n(1),o=n(90)(!1),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(29)(i)),"Array",{indexOf:function(e){return a?i.apply(this,arguments)||0:o(this,e,arguments[1])}})},function(e,t,n){var r=n(1);r(r.S,"Array",{isArray:n(133)})},function(e,t,n){"use strict";var r=n(1),o=n(22),i=[].join;r(r.P+r.F*(n(79)!=Object||!n(29)(i)),"Array",{join:function(e){return i.call(o(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(1),o=n(22),i=n(50),a=n(14),u=[].lastIndexOf,s=!!u&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(s||!n(29)(u)),"Array",{lastIndexOf:function(e){if(s)return u.apply(this,arguments)||0;var t=o(this),n=a(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),0>r&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){"use strict";var r=n(1),o=n(33)(1);r(r.P+r.F*!n(29)([].map,!0),"Array",{map:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),o=n(126);r(r.S+r.F*n(6)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)o(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(1),o=n(202);r(r.P+r.F*!n(29)([].reduceRight,!0),"Array",{reduceRight:function(e){return o(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(1),o=n(202);r(r.P+r.F*!n(29)([].reduce,!0),"Array",{reduce:function(e){return o(this,e,arguments.length,arguments[1],!1)}})},function(e,t,n){"use strict";var r=n(1),o=n(130),i=n(27),a=n(65),u=n(14),s=[].slice;r(r.P+r.F*n(6)(function(){o&&s.call(o)}),"Array",{slice:function(e,t){var n=u(this.length),r=i(this);if(t=void 0===t?n:t,"Array"==r)return s.call(this,e,t);for(var o=a(e,n),l=a(t,n),c=u(l-o),p=Array(c),f=0;c>f;f++)p[f]="String"==r?this.charAt(o+f):this[o+f];return p}})},function(e,t,n){"use strict";var r=n(1),o=n(33)(3);r(r.P+r.F*!n(29)([].some,!0),"Array",{some:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),o=n(19),i=n(15),a=n(6),u=[].sort,s=[1,2,3];r(r.P+r.F*(a(function(){s.sort(void 0)})||!a(function(){s.sort(null)})||!n(29)(u)),"Array",{sort:function(e){return void 0===e?u.call(i(this)):u.call(i(this),o(e))}})},function(e,t,n){n(64)("Array")},function(e,t,n){var r=n(1);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(1),o=n(6),i=Date.prototype.getTime,a=function(e){return e>9?e:"0"+e};r(r.P+r.F*(o(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!o(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=0>t?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}})},function(e,t,n){"use strict";var r=n(1),o=n(15),i=n(36);r(r.P+r.F*n(6)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=o(this),n=i(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(9)("toPrimitive"),o=Date.prototype;r in o||n(18)(o,r,n(326))},function(e,t,n){var r=Date.prototype,o="Invalid Date",i="toString",a=r[i],u=r.getTime;new Date(NaN)+""!=o&&n(20)(r,i,function(){var e=u.call(this);return e===e?a.call(this):o})},function(e,t,n){var r=n(1);r(r.P,"Function",{bind:n(203)})},function(e,t,n){"use strict";var r=n(8),o=n(24),i=n(9)("hasInstance"),a=Function.prototype;i in a||n(12).f(a,i,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=o(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(12).f,o=n(49),i=n(17),a=Function.prototype,u=/^\s*function ([^ (]*)/,s="name",l=Object.isExtensible||function(){return!0};s in a||n(11)&&r(a,s,{configurable:!0,get:function(){try{var e=this,t=(""+e).match(u)[1];return i(e,s)||!l(e)||r(e,s,o(5,t)),t}catch(n){return""}}})},function(e,t,n){var r=n(1),o=n(210),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:o(e-1+i(e-1)*i(e+1))}})},function(e,t,n){function r(e){return isFinite(e=+e)&&0!=e?0>e?-r(-e):Math.log(e+Math.sqrt(e*e+1)):e}var o=n(1),i=Math.asinh;o(o.S+o.F*!(i&&1/i(0)>0),"Math",{asinh:r})},function(e,t,n){var r=n(1),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(1),o=n(138);r(r.S,"Math",{cbrt:function(e){return o(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(1),o=Math.exp;r(r.S,"Math",{cosh:function(e){return(o(e=+e)+o(-e))/2}})},function(e,t,n){var r=n(1),o=n(137);r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},function(e,t,n){var r=n(1),o=n(138),i=Math.pow,a=i(2,-52),u=i(2,-23),s=i(2,127)*(2-u),l=i(2,-126),c=function(e){return e+1/a-1/a};r(r.S,"Math",{fround:function(e){var t,n,r=Math.abs(e),i=o(e);return l>r?i*c(r/l/u)*l*u:(t=(1+u/a)*r,n=t-(t-r),n>s||n!=n?i*(1/0):i*n)}})},function(e,t,n){var r=n(1),o=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,i=0,a=0,u=arguments.length,s=0;u>a;)n=o(arguments[a++]),n>s?(r=s/n,i=i*r*r+1,s=n):n>0?(r=n/s,i+=r*r):i+=n;return s===1/0?1/0:s*Math.sqrt(i)}})},function(e,t,n){var r=n(1),o=Math.imul;r(r.S+r.F*n(6)(function(){return-5!=o(4294967295,5)||2!=o.length}),"Math",{imul:function(e,t){var n=65535,r=+e,o=+t,i=n&r,a=n&o;return 0|i*a+((n&r>>>16)*a+i*(n&o>>>16)<<16>>>0)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{log10:function(e){return Math.log(e)/Math.LN10}})},function(e,t,n){var r=n(1);r(r.S,"Math",{log1p:n(210)})},function(e,t,n){var r=n(1);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(1);r(r.S,"Math",{sign:n(138)})},function(e,t,n){var r=n(1),o=n(137),i=Math.exp;r(r.S+r.F*n(6)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(o(e)-o(-e))/2:(i(e-1)-i(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(1),o=n(137),i=Math.exp;r(r.S,"Math",{tanh:function(e){var t=o(e=+e),n=o(-e);return t==1/0?1:n==1/0?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){var r=n(1);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){"use strict";var r=n(5),o=n(17),i=n(27),a=n(131),u=n(36),s=n(6),l=n(61).f,c=n(23).f,p=n(12).f,f=n(74).trim,d="Number",A=r[d],h=A,v=A.prototype,m=i(n(60)(v))==d,y="trim"in String.prototype,g=function(e){var t=u(e,!1);if("string"==typeof t&&t.length>2){t=y?t.trim():f(t,3);var n,r,o,i=t.charCodeAt(0);if(43===i||45===i){if(n=t.charCodeAt(2),88===n||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+t}for(var a,s=t.slice(2),l=0,c=s.length;c>l;l++)if(a=s.charCodeAt(l),48>a||a>o)return NaN;return parseInt(s,r)}}return+t};if(!A(" 0o1")||!A("0b1")||A("+0x1")){A=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof A&&(m?s(function(){v.valueOf.call(n)}):i(n)!=d)?a(new h(g(t)),n,A):g(t)};for(var b,w=n(11)?l(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),_=0;w.length>_;_++)o(h,b=w[_])&&!o(A,b)&&p(A,b,c(h,b));A.prototype=v,v.constructor=A,n(20)(r,d,A)}},function(e,t,n){var r=n(1);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(1),o=n(5).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&o(e)}})},function(e,t,n){var r=n(1);r(r.S,"Number",{isInteger:n(134)})},function(e,t,n){var r=n(1);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(1),o=n(134),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return o(e)&&i(e)<=9007199254740991}})},function(e,t,n){var r=n(1);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(1);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(1),o=n(217);r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},function(e,t,n){var r=n(1),o=n(218);r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},function(e,t,n){"use strict";var r=n(1),o=(n(47),n(50)),i=n(199),a=n(144),u=1..toFixed,s=Math.floor,l=[0,0,0,0,0,0],c="Number.toFixed: incorrect invocation!",p="0",f=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*l[n],l[n]=r%1e7,r=s(r/1e7)},d=function(e){for(var t=6,n=0;--t>=0;)n+=l[t],l[t]=s(n/e),n=n%e*1e7},A=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==l[e]){var n=String(l[e]);t=""===t?n:t+a.call(p,7-n.length)+n}return t},h=function(e,t,n){return 0===t?n:t%2===1?h(e,t-1,n*e):h(e*e,t/2,n)},v=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t};r(r.P+r.F*(!!u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0))||!n(6)(function(){u.call({})})),"Number",{toFixed:function(e){var t,n,r,u,s=i(this,c),l=o(e),m="",y=p;if(0>l||l>20)throw RangeError(c);if(s!=s)return"NaN";if(-1e21>=s||s>=1e21)return String(s);if(0>s&&(m="-",s=-s),s>1e-21)if(t=v(s*h(2,69,1))-69,n=0>t?s*h(2,-t,1):s/h(2,t,1),n*=4503599627370496,t=52-t,t>0){for(f(0,n),r=l;r>=7;)f(1e7,0),r-=7;for(f(h(10,r,1),0),r=t-1;r>=23;)d(1<<23),r-=23;d(1<<r),f(1,1),d(2),y=A()}else f(0,n),f(1<<-t,0),y=A()+a.call(p,l);return l>0?(u=y.length,y=m+(l>=u?"0."+a.call(p,l-u)+y:y.slice(0,u-l)+"."+y.slice(u-l))):y=m+y,y}})},function(e,t,n){"use strict";var r=n(1),o=n(6),i=n(199),a=1..toPrecision;r(r.P+r.F*(o(function(){return"1"!==a.call(1,void 0)})||!o(function(){a.call({})})),"Number",{toPrecision:function(e){var t=i(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},function(e,t,n){var r=n(1);r(r.S+r.F,"Object",{assign:n(211)})},function(e,t,n){var r=n(1);r(r.S,"Object",{create:n(60)})},function(e,t,n){var r=n(1);r(r.S+r.F*!n(11),"Object",{defineProperties:n(212)})},function(e,t,n){var r=n(1);r(r.S+r.F*!n(11),"Object",{defineProperty:n(12).f})},function(e,t,n){var r=n(8),o=n(48).onFreeze;n(35)("freeze",function(e){return function(t){return e&&r(t)?e(o(t)):t}})},function(e,t,n){var r=n(22),o=n(23).f;n(35)("getOwnPropertyDescriptor",function(){return function(e,t){return o(r(e),t)}})},function(e,t,n){n(35)("getOwnPropertyNames",function(){return n(213).f})},function(e,t,n){var r=n(15),o=n(24);n(35)("getPrototypeOf",function(){return function(e){return o(r(e))}})},function(e,t,n){var r=n(8);n(35)("isExtensible",function(e){return function(t){return r(t)?e?e(t):!0:!1}})},function(e,t,n){var r=n(8);n(35)("isFrozen",function(e){return function(t){return r(t)?e?e(t):!1:!0}})},function(e,t,n){var r=n(8);n(35)("isSealed",function(e){return function(t){return r(t)?e?e(t):!1:!0}})},function(e,t,n){var r=n(1);r(r.S,"Object",{is:n(219)})},function(e,t,n){var r=n(15),o=n(62);n(35)("keys",function(){return function(e){return o(r(e))}})},function(e,t,n){var r=n(8),o=n(48).onFreeze;n(35)("preventExtensions",function(e){return function(t){return e&&r(t)?e(o(t)):t}})},function(e,t,n){var r=n(8),o=n(48).onFreeze;n(35)("seal",function(e){return function(t){return e&&r(t)?e(o(t)):t}})},function(e,t,n){var r=n(1);r(r.S,"Object",{setPrototypeOf:n(99).set})},function(e,t,n){"use strict";var r=n(71),o={};o[n(9)("toStringTag")]="z",o+""!="[object z]"&&n(20)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(e,t,n){var r=n(1),o=n(217);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},function(e,t,n){var r=n(1),o=n(218);r(r.G+r.F*(parseInt!=o),{parseInt:o})},function(e,t,n){"use strict";var r,o,i,a=n(59),u=n(5),s=n(39),l=n(71),c=n(1),p=n(8),f=(n(3),n(19)),d=n(47),A=n(72),h=(n(99).set,n(141)),v=n(146).set,m=n(139)(),y="Promise",g=u.TypeError,b=u.process,w=u[y],b=u.process,_="process"==l(b),E=function(){},x=!!function(){try{var e=w.resolve(1),t=(e.constructor={})[n(9)("species")]=function(e){e(E,E)};return(_||"function"==typeof PromiseRejectionEvent)&&e.then(E)instanceof t}catch(r){}}(),C=function(e,t){return e===t||e===w&&t===i},S=function(e){var t;return p(e)&&"function"==typeof(t=e.then)?t:!1},P=function(e){return C(w,e)?new T(e):new o(e)},T=o=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw g("Bad Promise constructor");t=e,n=r}),this.resolve=f(t),this.reject=f(n)},O=function(e){try{e()}catch(t){return{error:t}}},M=function(e,t){if(!e._n){e._n=!0;var n=e._c;m(function(){for(var r=e._v,o=1==e._s,i=0,a=function(t){var n,i,a=o?t.ok:t.fail,u=t.resolve,s=t.reject,l=t.domain;try{a?(o||(2==e._h&&R(e),e._h=1),a===!0?n=r:(l&&l.enter(),n=a(r),l&&l.exit()),n===t.promise?s(g("Promise-chain cycle")):(i=S(n))?i.call(n,u,s):u(n)):s(r)}catch(c){s(c)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&I(e)})}},I=function(e){v.call(u,function(){var t,n,r,o=e._v;if(k(e)&&(t=O(function(){_?b.emit("unhandledRejection",o,e):(n=u.onunhandledrejection)?n({promise:e,reason:o}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",o)}),e._h=_||k(e)?2:1),e._a=void 0,t)throw t.error})},k=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if(t=n[r++],t.fail||!k(t.promise))return!1;return!0},R=function(e){v.call(u,function(){var t;_?b.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})})},N=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),M(t,!0))},D=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw g("Promise can't be resolved itself");(t=S(e))?m(function(){var r={_w:n,_d:!1};try{t.call(e,s(D,r,1),s(N,r,1))}catch(o){N.call(r,o)}}):(n._v=e,n._s=1,M(n,!1))}catch(r){N.call({_w:n,_d:!1},r)}}};x||(w=function(e){d(this,w,y,"_h"),f(e),r.call(this);try{e(s(D,this,1),s(N,this,1))}catch(t){N.call(this,t)}},r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(63)(w.prototype,{then:function(e,t){var n=P(h(this,w));return n.ok="function"==typeof e?e:!0,n.fail="function"==typeof t&&t,n.domain=_?b.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&M(this,!1),n.promise},"catch":function(e){return this.then(void 0,e)}}),T=function(){var e=new r;this.promise=e,this.resolve=s(D,e,1),this.reject=s(N,e,1)}),c(c.G+c.W+c.F*!x,{Promise:w}),n(73)(w,y),n(64)(y),i=n(34)[y],c(c.S+c.F*!x,y,{reject:function(e){var t=P(this),n=t.reject;return n(e),t.promise}}),c(c.S+c.F*(a||!x),y,{resolve:function(e){if(e instanceof w&&C(e.constructor,this))return e;var t=P(this),n=t.resolve;return n(e),t.promise}}),c(c.S+c.F*!(x&&n(96)(function(e){w.all(e)["catch"](E)})),y,{all:function(e){var t=this,n=P(t),r=n.resolve,o=n.reject,i=O(function(){var n=[],i=0,a=1;A(e,!1,function(e){var u=i++,s=!1;n.push(void 0),a++,t.resolve(e).then(function(e){s||(s=!0,n[u]=e,--a||r(n))},o)}),--a||r(n)});return i&&o(i.error),n.promise},race:function(e){var t=this,n=P(t),r=n.reject,o=O(function(){A(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return o&&r(o.error),n.promise}})},function(e,t,n){var r=n(1),o=n(19),i=n(3),a=Function.apply;r(r.S,"Reflect",{apply:function(e,t,n){return a.call(o(e),t,i(n))}})},function(e,t,n){var r=n(1),o=n(60),i=n(19),a=n(3),u=n(8),s=n(203);r(r.S+r.F*n(6)(function(){function e(){}return!(Reflect.construct(function(){},[],e)instanceof e)}),"Reflect",{construct:function(e,t){i(e),a(t);var n=arguments.length<3?e:i(arguments[2]);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(s.apply(e,r))}var l=n.prototype,c=o(u(l)?l:Object.prototype),p=Function.apply.call(e,c,t);return u(p)?p:c}})},function(e,t,n){var r=n(12),o=n(1),i=n(3),a=n(36);o(o.S+o.F*n(6)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(e,t,n){i(e),t=a(t,!0),i(n);try{return r.f(e,t,n),!0}catch(o){return!1}}})},function(e,t,n){var r=n(1),o=n(23).f,i=n(3);r(r.S,"Reflect",{deleteProperty:function(e,t){var n=o(i(e),t);return n&&!n.configurable?!1:delete e[t]}})},function(e,t,n){"use strict";var r=n(1),o=n(3),i=function(e){this._t=o(e),this._i=0;var t,n=this._k=[];for(t in e)n.push(t)};n(135)(i,"Object",function(){var e,t=this,n=t._k;do if(t._i>=n.length)return{value:void 0,done:!0};while(!((e=n[t._i++])in t._t));return{value:e,done:!1}}),r(r.S,"Reflect",{enumerate:function(e){return new i(e)}})},function(e,t,n){var r=n(23),o=n(1),i=n(3);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(i(e),t)}})},function(e,t,n){var r=n(1),o=n(24),i=n(3);r(r.S,"Reflect",{getPrototypeOf:function(e){return o(i(e))}})},function(e,t,n){function r(e,t){var n,u,c=arguments.length<3?e:arguments[2];return l(e)===c?e[t]:(n=o.f(e,t))?a(n,"value")?n.value:void 0!==n.get?n.get.call(c):void 0:s(u=i(e))?r(u,t,c):void 0}var o=n(23),i=n(24),a=n(17),u=n(1),s=n(8),l=n(3);u(u.S,"Reflect",{get:r})},function(e,t,n){var r=n(1);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(1),o=n(3),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return o(e),i?i(e):!0}})},function(e,t,n){var r=n(1);r(r.S,"Reflect",{ownKeys:n(216)})},function(e,t,n){var r=n(1),o=n(3),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){o(e);try{return i&&i(e),!0}catch(t){return!1}}})},function(e,t,n){var r=n(1),o=n(99);o&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){o.check(e,t);try{return o.set(e,t),!0}catch(n){return!1}}})},function(e,t,n){function r(e,t,n){var s,f,d=arguments.length<4?e:arguments[3],A=i.f(c(e),t);if(!A){if(p(f=a(e)))return r(f,t,n,d);A=l(0)}return u(A,"value")?A.writable!==!1&&p(d)?(s=i.f(d,t)||l(0),s.value=n,o.f(d,t,s),!0):!1:void 0===A.set?!1:(A.set.call(d,n),!0)}var o=n(12),i=n(23),a=n(24),u=n(17),s=n(1),l=n(49),c=n(3),p=n(8);s(s.S,"Reflect",{set:r})},function(e,t,n){var r=n(5),o=n(131),i=n(12).f,a=n(61).f,u=n(95),s=n(93),l=r.RegExp,c=l,p=l.prototype,f=/a/g,d=/a/g,A=new l(f)!==f;if(n(11)&&(!A||n(6)(function(){return d[n(9)("match")]=!1,l(f)!=f||l(d)==d||"/a/i"!=l(f,"i")}))){l=function(e,t){var n=this instanceof l,r=u(e),i=void 0===t;return!n&&r&&e.constructor===l&&i?e:o(A?new c(r&&!i?e.source:e,t):c((r=e instanceof l)?e.source:e,r&&i?s.call(e):t),n?this:p,l)};for(var h=(function(e){e in l||i(l,e,{configurable:!0,get:function(){return c[e]},set:function(t){c[e]=t}})}),v=a(c),m=0;v.length>m;)h(v[m++]);p.constructor=l,l.prototype=p,n(20)(r,"RegExp",l)}n(64)("RegExp")},function(e,t,n){n(92)("match",1,function(e,t,n){return[function(n){"use strict";var r=e(this),o=void 0==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(92)("replace",2,function(e,t,n){return[function(r,o){"use strict";var i=e(this),a=void 0==r?void 0:r[t];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},n]})},function(e,t,n){n(92)("search",1,function(e,t,n){return[function(n){"use strict";var r=e(this),o=void 0==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(92)("split",2,function(e,t,r){"use strict";var o=n(95),i=r,a=[].push,u="split",s="length",l="lastIndex";if("c"=="abbc"[u](/(b)*/)[1]||4!="test"[u](/(?:)/,-1)[s]||2!="ab"[u](/(?:ab)*/)[s]||4!="."[u](/(.?)(.?)/)[s]||"."[u](/()()/)[s]>1||""[u](/.?/)[s]){var c=void 0===/()??/.exec("")[1];r=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!o(e))return i.call(n,e,t);var r,u,p,f,d,A=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),v=0,m=void 0===t?4294967295:t>>>0,y=new RegExp(e.source,h+"g");for(c||(r=new RegExp("^"+y.source+"$(?!\\s)",h));(u=y.exec(n))&&(p=u.index+u[0][s],!(p>v&&(A.push(n.slice(v,u.index)),!c&&u[s]>1&&u[0].replace(r,function(){for(d=1;d<arguments[s]-2;d++)void 0===arguments[d]&&(u[d]=void 0)}),u[s]>1&&u.index<n[s]&&a.apply(A,u.slice(1)),f=u[0][s],v=p,A[s]>=m)));)y[l]===u.index&&y[l]++;return v===n[s]?!f&&y.test("")||A.push(""):A.push(n.slice(v)),A[s]>m?A.slice(0,m):A}}else"0"[u](void 0,0)[s]&&(r=function(e,t){return void 0===e&&0===t?[]:i.call(this,e,t)});return[function(n,o){var i=e(this),a=void 0==n?void 0:n[t];return void 0!==a?a.call(n,i,o):r.call(String(i),n,o)},r]})},function(e,t,n){"use strict";n(223);var r=n(3),o=n(93),i=n(11),a="toString",u=/./[a],s=function(e){n(20)(RegExp.prototype,a,e,!0)};n(6)(function(){return"/a/b"!=u.call({source:"a",flags:"b"})})?s(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!i&&e instanceof RegExp?o.call(e):void 0)}):u.name!=a&&s(function(){return u.call(this)})},function(e,t,n){"use strict";n(21)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},function(e,t,n){"use strict";n(21)("big",function(e){return function(){return e(this,"big","","")}})},function(e,t,n){"use strict";n(21)("blink",function(e){return function(){return e(this,"blink","","")}})},function(e,t,n){"use strict";n(21)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t,n){"use strict";var r=n(1),o=n(142)(!1);r(r.P,"String",{codePointAt:function(e){return o(this,e)}})},function(e,t,n){"use strict";var r=n(1),o=n(14),i=n(143),a="endsWith",u=""[a];r(r.P+r.F*n(129)(a),"String",{endsWith:function(e){var t=i(this,e,a),n=arguments.length>1?arguments[1]:void 0,r=o(t.length),s=void 0===n?r:Math.min(o(n),r),l=String(e);return u?u.call(t,l,s):t.slice(s-l.length,s)===l}})},function(e,t,n){"use strict";n(21)("fixed",function(e){return function(){return e(this,"tt","","")}})},function(e,t,n){"use strict";n(21)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},function(e,t,n){"use strict";n(21)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},function(e,t,n){var r=n(1),o=n(65),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],o(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(65536>t?i(t):i(((t-=65536)>>10)+55296,t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var r=n(1),o=n(143),i="includes";r(r.P+r.F*n(129)(i),"String",{includes:function(e){return!!~o(this,e,i).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";n(21)("italics",function(e){return function(){return e(this,"i","","")}})},function(e,t,n){"use strict";var r=n(142)(!0);n(136)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";n(21)("link",function(e){return function(t){return e(this,"a","href",t)}})},function(e,t,n){var r=n(1),o=n(22),i=n(14);r(r.S,"String",{raw:function(e){for(var t=o(e.raw),n=i(t.length),r=arguments.length,a=[],u=0;n>u;)a.push(String(t[u++])),r>u&&a.push(String(arguments[u]));return a.join("")}})},function(e,t,n){var r=n(1);r(r.P,"String",{repeat:n(144)})},function(e,t,n){"use strict";n(21)("small",function(e){return function(){return e(this,"small","","")}})},function(e,t,n){"use strict";var r=n(1),o=n(14),i=n(143),a="startsWith",u=""[a];r(r.P+r.F*n(129)(a),"String",{startsWith:function(e){var t=i(this,e,a),n=o(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return u?u.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(21)("strike",function(e){return function(){return e(this,"strike","","")}})},function(e,t,n){"use strict";n(21)("sub",function(e){return function(){return e(this,"sub","","")}})},function(e,t,n){"use strict";n(21)("sup",function(e){return function(){return e(this,"sup","","")}})},function(e,t,n){"use strict";n(74)("trim",function(e){return function(){return e(this,3)}})},function(e,t,n){"use strict";var r=n(5),o=n(17),i=n(11),a=n(1),u=n(20),s=n(48).KEY,l=n(6),c=n(100),p=n(73),f=n(66),d=n(9),A=n(221),h=n(148),v=n(328),m=n(327),y=n(133),g=n(3),b=n(22),w=n(36),_=n(49),E=n(60),x=n(213),C=n(23),S=n(12),P=n(62),T=C.f,O=S.f,M=x.f,I=r.Symbol,k=r.JSON,R=k&&k.stringify,N="prototype",D=d("_hidden"),F=d("toPrimitive"),j={}.propertyIsEnumerable,L=c("symbol-registry"),U=c("symbols"),B=c("op-symbols"),V=Object[N],Q="function"==typeof I,z=r.QObject,W=!z||!z[N]||!z[N].findChild,K=i&&l(function(){return 7!=E(O({},"a",{get:function(){return O(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=T(V,t);r&&delete V[t],O(e,t,n),r&&e!==V&&O(V,t,r)}:O,q=function(e){var t=U[e]=E(I[N]);return t._k=e,t},G=Q&&"symbol"==typeof I.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof I},H=function(e,t,n){return e===V&&H(B,t,n),g(e),t=w(t,!0),g(n),o(U,t)?(n.enumerable?(o(e,D)&&e[D][t]&&(e[D][t]=!1), n=E(n,{enumerable:_(0,!1)})):(o(e,D)||O(e,D,_(1,{})),e[D][t]=!0),K(e,t,n)):O(e,t,n)},Y=function(e,t){g(e);for(var n,r=m(t=b(t)),o=0,i=r.length;i>o;)H(e,n=r[o++],t[n]);return e},J=function(e,t){return void 0===t?E(e):Y(E(e),t)},Z=function(e){var t=j.call(this,e=w(e,!0));return this===V&&o(U,e)&&!o(B,e)?!1:t||!o(this,e)||!o(U,e)||o(this,D)&&this[D][e]?t:!0},X=function(e,t){if(e=b(e),t=w(t,!0),e!==V||!o(U,t)||o(B,t)){var n=T(e,t);return!n||!o(U,t)||o(e,D)&&e[D][t]||(n.enumerable=!0),n}},$=function(e){for(var t,n=M(b(e)),r=[],i=0;n.length>i;)o(U,t=n[i++])||t==D||t==s||r.push(t);return r},ee=function(e){for(var t,n=e===V,r=M(n?B:b(e)),i=[],a=0;r.length>a;)o(U,t=r[a++])&&(n?o(V,t):!0)&&i.push(U[t]);return i};Q||(I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===V&&t.call(B,n),o(this,D)&&o(this[D],e)&&(this[D][e]=!1),K(this,e,_(1,n))};return i&&W&&K(V,e,{configurable:!0,set:t}),q(e)},u(I[N],"toString",function(){return this._k}),C.f=X,S.f=H,n(61).f=x.f=$,n(80).f=Z,n(98).f=ee,i&&!n(59)&&u(V,"propertyIsEnumerable",Z,!0),A.f=function(e){return q(d(e))}),a(a.G+a.W+a.F*!Q,{Symbol:I});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)d(te[ne++]);for(var te=P(d.store),ne=0;te.length>ne;)h(te[ne++]);a(a.S+a.F*!Q,"Symbol",{"for":function(e){return o(L,e+="")?L[e]:L[e]=I(e)},keyFor:function(e){if(G(e))return v(L,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!Q,"Object",{create:J,defineProperty:H,defineProperties:Y,getOwnPropertyDescriptor:X,getOwnPropertyNames:$,getOwnPropertySymbols:ee}),k&&a(a.S+a.F*(!Q||l(function(){var e=I();return"[null]"!=R([e])||"{}"!=R({a:e})||"{}"!=R(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!G(e)){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);return t=r[1],"function"==typeof t&&(n=t),!n&&y(t)||(t=function(e,t){return n&&(t=n.call(this,e,t)),G(t)?void 0:t}),r[1]=t,R.apply(k,r)}}}),I[N][F]||n(18)(I[N],F,I[N].valueOf),p(I,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(e,t,n){"use strict";var r=n(1),o=n(101),i=n(147),a=n(3),u=n(65),s=n(14),l=n(8),c=(n(9)("typed_array"),n(5).ArrayBuffer),p=n(141),f=i.ArrayBuffer,d=i.DataView,A=o.ABV&&c.isView,h=f.prototype.slice,v=o.VIEW,m="ArrayBuffer";r(r.G+r.W+r.F*(c!==f),{ArrayBuffer:f}),r(r.S+r.F*!o.CONSTR,m,{isView:function(e){return A&&A(e)||l(e)&&v in e}}),r(r.P+r.U+r.F*n(6)(function(){return!new f(2).slice(1,void 0).byteLength}),m,{slice:function(e,t){if(void 0!==h&&void 0===t)return h.call(a(this),e);for(var n=a(this).byteLength,r=u(e,n),o=u(void 0===t?n:t,n),i=new(p(this,f))(s(o-r)),l=new d(this),c=new d(i),A=0;o>r;)c.setUint8(A++,l.getUint8(r++));return i}}),n(64)(m)},function(e,t,n){var r=n(1);r(r.G+r.W+r.F*!n(101).ABV,{DataView:n(147).DataView})},function(e,t,n){n(41)("Float32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(41)("Float64",8,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(41)("Int16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(41)("Int32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(41)("Int8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(41)("Uint16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(41)("Uint32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(41)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(41)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}},!0)},function(e,t,n){"use strict";var r=n(206);n(91)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(1),o=n(90)(!0);r(r.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(70)("includes")},function(e,t,n){var r=n(1),o=n(139)(),i=n(5).process,a="process"==n(27)(i);r(r.G,{asap:function(e){var t=a&&i.domain;o(t?t.bind(e):e)}})},function(e,t,n){var r=n(1),o=n(27);r(r.S,"Error",{isError:function(e){return"Error"===o(e)}})},function(e,t,n){var r=n(1);r(r.P+r.R,"Map",{toJSON:n(205)("Map")})},function(e,t,n){var r=n(1);r(r.S,"Math",{iaddh:function(e,t,n,r){var o=e>>>0,i=t>>>0,a=n>>>0;return i+(r>>>0)+((o&a|(o|a)&~(o+a>>>0))>>>31)|0}})},function(e,t,n){var r=n(1);r(r.S,"Math",{imulh:function(e,t){var n=65535,r=+e,o=+t,i=r&n,a=o&n,u=r>>16,s=o>>16,l=(u*a>>>0)+(i*a>>>16);return u*s+(l>>16)+((i*s>>>0)+(l&n)>>16)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{isubh:function(e,t,n,r){var o=e>>>0,i=t>>>0,a=n>>>0;return i-(r>>>0)-((~o&a|~(o^a)&o-a>>>0)>>>31)|0}})},function(e,t,n){var r=n(1);r(r.S,"Math",{umulh:function(e,t){var n=65535,r=+e,o=+t,i=r&n,a=o&n,u=r>>>16,s=o>>>16,l=(u*a>>>0)+(i*a>>>16);return u*s+(l>>>16)+((i*s>>>0)+(l&n)>>>16)}})},function(e,t,n){"use strict";var r=n(1),o=n(15),i=n(19),a=n(12);n(11)&&r(r.P+n(97),"Object",{__defineGetter__:function(e,t){a.f(o(this),e,{get:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(1),o=n(15),i=n(19),a=n(12);n(11)&&r(r.P+n(97),"Object",{__defineSetter__:function(e,t){a.f(o(this),e,{set:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(1),o=n(215)(!0);r(r.S,"Object",{entries:function(e){return o(e)}})},function(e,t,n){var r=n(1),o=n(216),i=n(22),a=n(23),u=n(126);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n=i(e),r=a.f,s=o(n),l={},c=0;s.length>c;)u(l,t=s[c++],r(n,t));return l}})},function(e,t,n){"use strict";var r=n(1),o=n(15),i=n(36),a=n(24),u=n(23).f;n(11)&&r(r.P+n(97),"Object",{__lookupGetter__:function(e){var t,n=o(this),r=i(e,!0);do if(t=u(n,r))return t.get;while(n=a(n))}})},function(e,t,n){"use strict";var r=n(1),o=n(15),i=n(36),a=n(24),u=n(23).f;n(11)&&r(r.P+n(97),"Object",{__lookupSetter__:function(e){var t,n=o(this),r=i(e,!0);do if(t=u(n,r))return t.set;while(n=a(n))}})},function(e,t,n){var r=n(1),o=n(215)(!1);r(r.S,"Object",{values:function(e){return o(e)}})},function(e,t,n){"use strict";var r=n(1),o=n(5),i=n(34),a=n(139)(),u=n(9)("observable"),s=n(19),l=n(3),c=n(47),p=n(63),f=n(18),d=n(72),A=d.RETURN,h=function(e){return null==e?void 0:s(e)},v=function(e){var t=e._c;t&&(e._c=void 0,t())},m=function(e){return void 0===e._o},y=function(e){m(e)||(e._o=void 0,v(e))},g=function(e,t){l(e),this._c=void 0,this._o=e,e=new b(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:s(n),this._c=n)}catch(o){return void e.error(o)}m(this)&&v(this)};g.prototype=p({},{unsubscribe:function(){y(this)}});var b=function(e){this._s=e};b.prototype=p({},{next:function(e){var t=this._s;if(!m(t)){var n=t._o;try{var r=h(n.next);if(r)return r.call(n,e)}catch(o){try{y(t)}finally{throw o}}}},error:function(e){var t=this._s;if(m(t))throw e;var n=t._o;t._o=void 0;try{var r=h(n.error);if(!r)throw e;e=r.call(n,e)}catch(o){try{v(t)}finally{throw o}}return v(t),e},complete:function(e){var t=this._s;if(!m(t)){var n=t._o;t._o=void 0;try{var r=h(n.complete);e=r?r.call(n,e):void 0}catch(o){try{v(t)}finally{throw o}}return v(t),e}}});var w=function(e){c(this,w,"Observable","_f")._f=s(e)};p(w.prototype,{subscribe:function(e){return new g(e,this._f)},forEach:function(e){var t=this;return new(i.Promise||o.Promise)(function(n,r){s(e);var o=t.subscribe({next:function(t){try{return e(t)}catch(n){r(n),o.unsubscribe()}},error:r,complete:n})})}}),p(w,{from:function(e){var t="function"==typeof this?this:w,n=h(l(e)[u]);if(n){var r=l(n.call(e));return r.constructor===t?r:new t(function(e){return r.subscribe(e)})}return new t(function(t){var n=!1;return a(function(){if(!n){try{if(d(e,!1,function(e){return t.next(e),n?A:void 0})===A)return}catch(r){if(n)throw r;return void t.error(r)}t.complete()}}),function(){n=!0}})},of:function(){for(var e=0,t=arguments.length,n=Array(t);t>e;)n[e]=arguments[e++];return new("function"==typeof this?this:w)(function(e){var t=!1;return a(function(){if(!t){for(var r=0;r<n.length;++r)if(e.next(n[r]),t)return;e.complete()}}),function(){t=!0}})}}),f(w.prototype,u,function(){return this}),r(r.G,{Observable:w}),n(64)("Observable")},function(e,t,n){var r=n(40),o=n(3),i=r.key,a=r.set;r.exp({defineMetadata:function(e,t,n,r){a(e,t,o(n),i(r))}})},function(e,t,n){var r=n(40),o=n(3),i=r.key,a=r.map,u=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:i(arguments[2]),r=a(o(t),n,!1);if(void 0===r||!r["delete"](e))return!1;if(r.size)return!0;var s=u.get(t);return s["delete"](n),!!s.size||u["delete"](t)}})},function(e,t,n){var r=n(224),o=n(201),i=n(40),a=n(3),u=n(24),s=i.keys,l=i.key,c=function(e,t){var n=s(e,t),i=u(e);if(null===i)return n;var a=c(i,t);return a.length?n.length?o(new r(n.concat(a))):a:n};i.exp({getMetadataKeys:function(e){return c(a(e),arguments.length<2?void 0:l(arguments[1]))}})},function(e,t,n){var r=n(40),o=n(3),i=n(24),a=r.has,u=r.get,s=r.key,l=function(e,t,n){var r=a(e,t,n);if(r)return u(e,t,n);var o=i(t);return null!==o?l(e,o,n):void 0};r.exp({getMetadata:function(e,t){return l(e,o(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(40),o=n(3),i=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(e){return i(o(e),arguments.length<2?void 0:a(arguments[1]))}})},function(e,t,n){var r=n(40),o=n(3),i=r.get,a=r.key;r.exp({getOwnMetadata:function(e,t){return i(e,o(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(40),o=n(3),i=n(24),a=r.has,u=r.key,s=function(e,t,n){var r=a(e,t,n);if(r)return!0;var o=i(t);return null!==o?s(e,o,n):!1};r.exp({hasMetadata:function(e,t){return s(e,o(t),arguments.length<3?void 0:u(arguments[2]))}})},function(e,t,n){var r=n(40),o=n(3),i=r.has,a=r.key;r.exp({hasOwnMetadata:function(e,t){return i(e,o(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(40),o=n(3),i=n(19),a=r.key,u=r.set;r.exp({metadata:function(e,t){return function(n,r){u(e,t,(void 0!==r?o:i)(n),a(r))}}})},function(e,t,n){var r=n(1);r(r.P+r.R,"Set",{toJSON:n(205)("Set")})},function(e,t,n){"use strict";var r=n(1),o=n(142)(!0);r(r.P,"String",{at:function(e){return o(this,e)}})},function(e,t,n){"use strict";var r=n(1),o=n(28),i=n(14),a=n(95),u=n(93),s=RegExp.prototype,l=function(e,t){this._r=e,this._s=t};n(135)(l,"RegExp String",function(){var e=this._r.exec(this._s);return{value:e,done:null===e}}),r(r.P,"String",{matchAll:function(e){if(o(this),!a(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in s?String(e.flags):u.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=i(e.lastIndex),new l(r,t)}})},function(e,t,n){"use strict";var r=n(1),o=n(220);r(r.P,"String",{padEnd:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";var r=n(1),o=n(220);r(r.P,"String",{padStart:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){"use strict";n(74)("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},function(e,t,n){"use strict";n(74)("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},function(e,t,n){n(148)("asyncIterator")},function(e,t,n){n(148)("observable")},function(e,t,n){var r=n(1);r(r.S,"System",{global:n(5)})},function(e,t,n){for(var r=n(150),o=n(20),i=n(5),a=n(18),u=n(58),s=n(9),l=s("iterator"),c=s("toStringTag"),p=u.Array,f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],d=0;5>d;d++){var A,h=f[d],v=i[h],m=v&&v.prototype;if(m){m[l]||a(m,l,p),m[c]||a(m,c,h),u[h]=p;for(A in r)m[A]||o(m,A,r[A],!0)}}},function(e,t,n){var r=n(1),o=n(146);r(r.G+r.B,{setImmediate:o.set,clearImmediate:o.clear})},function(e,t,n){var r=n(5),o=n(1),i=n(94),a=n(329),u=r.navigator,s=!!u&&/MSIE .\./.test(u.userAgent),l=function(e){return s?function(t,n){return e(i(a,[].slice.call(arguments,2),"function"==typeof t?t:Function(t)),n)}:e};o(o.G+o.B+o.F*s,{setTimeout:l(r.setTimeout),setInterval:l(r.setInterval)})},function(e,t,n){n(453),n(392),n(394),n(393),n(396),n(398),n(403),n(397),n(395),n(405),n(404),n(400),n(401),n(399),n(391),n(402),n(406),n(407),n(359),n(361),n(360),n(409),n(408),n(379),n(389),n(390),n(380),n(381),n(382),n(383),n(384),n(385),n(386),n(387),n(388),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(374),n(375),n(376),n(377),n(378),n(440),n(445),n(452),n(443),n(435),n(436),n(441),n(446),n(448),n(431),n(432),n(433),n(434),n(437),n(438),n(439),n(442),n(444),n(447),n(449),n(450),n(451),n(354),n(356),n(355),n(358),n(357),n(343),n(341),n(347),n(344),n(350),n(352),n(340),n(346),n(337),n(351),n(335),n(349),n(348),n(342),n(345),n(334),n(336),n(339),n(338),n(353),n(150),n(425),n(430),n(223),n(426),n(427),n(428),n(429),n(410),n(222),n(224),n(225),n(465),n(454),n(455),n(460),n(463),n(464),n(458),n(461),n(459),n(462),n(456),n(457),n(411),n(412),n(413),n(414),n(415),n(418),n(416),n(417),n(419),n(420),n(421),n(422),n(424),n(423),n(466),n(492),n(495),n(494),n(496),n(497),n(493),n(498),n(499),n(477),n(480),n(476),n(474),n(475),n(478),n(479),n(469),n(491),n(500),n(468),n(470),n(472),n(471),n(473),n(482),n(483),n(485),n(484),n(487),n(486),n(488),n(489),n(490),n(467),n(481),n(503),n(502),n(501),e.exports=n(34)},function(e,t,n){t=e.exports=n(506)(),t.push([e.id,".rw-btn,.rw-input{color:inherit;font:inherit;margin:0}button.rw-input{overflow:visible}button.rw-input,select.rw-input{text-transform:none}button.rw-input,html input[type=button].rw-input,input[type=reset].rw-input,input[type=submit].rw-input{-webkit-appearance:button;cursor:pointer}button[disabled].rw-input,html input[disabled].rw-input{cursor:not-allowed}button.rw-input::-moz-focus-inner,input.rw-input::-moz-focus-inner{border:0;padding:0}@font-face{font-family:RwWidgets;src:url("+n(534)+");src:url("+n(533)+"?#iefix&v=4.1.0) format('embedded-opentype'),url("+n(740)+") format('woff'),url("+n(536)+") format('truetype'),url("+n(535)+"#fontawesomeregular) format('svg');font-weight:400;font-style:normal}.rw-i{display:inline-block;font-family:RwWidgets;font-style:normal;font-weight:400;line-height:1em;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.rw-i-caret-down:before{content:'\\E803'}.rw-i-caret-up:before{content:'\\E800'}.rw-i-caret-left:before{content:'\\E801'}.rw-i-caret-right:before{content:'\\E802'}.rw-i-clock-o:before{content:'\\E805'}.rw-i-calendar:before{content:'\\E804'}.rw-i-search:before{content:'\\E806'}.rw-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.rw-widget,.rw-widget *,.rw-widget:after,.rw-widget :after,.rw-widget:before,.rw-widget :before{box-sizing:border-box}.rw-widget{outline:0;background-clip:border-box}.rw-btn{color:#333;line-height:2.286em;display:inline-block;margin:0;text-align:center;vertical-align:middle;background:none;background-image:none;border:1px solid transparent;padding:0;white-space:nowrap}.rw-rtl{direction:rtl}.rw-input{color:#555;height:2.286em;padding:.429em .857em;background-color:#fff}.rw-input[disabled]{box-shadow:none;cursor:not-allowed;opacity:1;background-color:#eee;border-color:#ccc}.rw-input[readonly]{cursor:not-allowed}.rw-filter-input{position:relative;width:100%;padding-right:1.9em;border:1px solid #ccc;border-radius:4px;margin-bottom:2px}.rw-rtl .rw-filter-input{padding-left:1.9em;padding-right:0}.rw-filter-input>.rw-input{width:100%;border:none;outline:none}.rw-filter-input>span{margin-top:-2px}.rw-i.rw-loading{background:url("+n(742)+") no-repeat 50%;width:16px;height:100%}.rw-i.rw-loading:before{content:\"\"}.rw-loading-mask{border-radius:4px;position:relative}.rw-loading-mask:after{content:'';background:url("+n(741)+') no-repeat 50%;position:absolute;background-color:#fff;opacity:.7;top:0;left:0;height:100%;width:100%}.rw-now{font-weight:600}.rw-state-focus{background-color:#fff;border:1px solid #66afe9;color:#333}.rw-state-selected{background-color:#adadad;border:1px solid #adadad;color:#333}.rw-state-disabled{box-shadow:none;cursor:not-allowed;opacity:1}.rw-btn,.rw-dropdownlist{cursor:pointer}.rw-btn[disabled],.rw-state-disabled .rw-btn,.rw-state-readonly .rw-btn{box-shadow:none;pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);opacity:.65}.rw-selectlist,ul.rw-list{margin:0;padding-left:0;list-style:none;padding:5px 0;overflow:auto;outline:0;height:100%}.rw-selectlist>li,ul.rw-list>li{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.rw-selectlist>li.rw-list-optgroup,ul.rw-list>li.rw-list-optgroup{font-weight:700}.rw-selectlist>li.rw-list-empty,.rw-selectlist>li.rw-list-option,ul.rw-list>li.rw-list-empty,ul.rw-list>li.rw-list-option{padding-left:10px;padding-right:10px}.rw-selectlist>li.rw-list-option,ul.rw-list>li.rw-list-option{cursor:pointer;border:1px solid transparent;border-radius:3px}.rw-selectlist>li.rw-list-option:hover,ul.rw-list>li.rw-list-option:hover{background-color:#e6e6e6;border-color:#adadad}.rw-selectlist>li.rw-list-option.rw-state-focus,ul.rw-list>li.rw-list-option.rw-state-focus{background-color:#fff;border:1px solid #66afe9;color:#333}.rw-selectlist>li.rw-list-option.rw-state-selected,ul.rw-list>li.rw-list-option.rw-state-selected{background-color:#adadad;border:1px solid #adadad;color:#333}.rw-selectlist>li.rw-list-option.rw-state-disabled,.rw-selectlist>li.rw-list-option.rw-state-readonly,ul.rw-list>li.rw-list-option.rw-state-disabled,ul.rw-list>li.rw-list-option.rw-state-readonly{color:#777;cursor:not-allowed}.rw-selectlist>li.rw-list-option.rw-state-disabled:hover,.rw-selectlist>li.rw-list-option.rw-state-readonly:hover,ul.rw-list>li.rw-list-option.rw-state-disabled:hover,ul.rw-list>li.rw-list-option.rw-state-readonly:hover{background:none;border-color:transparent}.rw-selectlist.rw-list-grouped>li.rw-list-optgroup,ul.rw-list.rw-list-grouped>li.rw-list-optgroup{padding-left:10px}.rw-selectlist.rw-list-grouped>li.rw-list-option,ul.rw-list.rw-list-grouped>li.rw-list-option{padding-left:20px}.rw-widget{position:relative}.rw-open.rw-widget,.rw-open>.rw-multiselect-wrapper{border-bottom-right-radius:0;border-bottom-left-radius:0}.rw-open-up.rw-widget,.rw-open-up>.rw-multiselect-wrapper{border-top-right-radius:0;border-top-left-radius:0}.rw-combobox .rw-list,.rw-datetimepicker .rw-list,.rw-dropdownlist .rw-list,.rw-multiselect .rw-list,.rw-numberpicker .rw-list{max-height:200px;height:auto}.rw-widget{background-color:#fff;border:1px solid #ccc;border-radius:4px}.rw-widget .rw-input{border-bottom-left-radius:4px;border-top-left-radius:4px}.rw-rtl.rw-widget .rw-input{border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-right-radius:4px;border-top-right-radius:4px}.rw-widget>.rw-select{border-left:1px solid #ccc}.rw-rtl.rw-widget>.rw-select{border-right:1px solid #ccc;border-left:none}.rw-widget.rw-state-focus,.rw-widget.rw-state-focus:hover{box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);border-color:#66afe9;outline:0}.rw-widget.rw-state-readonly,.rw-widget.rw-state-readonly>.rw-multiselect-wrapper{cursor:not-allowed}.rw-widget.rw-state-disabled,.rw-widget.rw-state-disabled:active,.rw-widget.rw-state-disabled:hover{box-shadow:none;background-color:#eee;border-color:#ccc}.rw-combobox,.rw-datetimepicker,.rw-dropdownlist,.rw-numberpicker{padding-right:1.9em}.rw-combobox.rw-rtl,.rw-datetimepicker.rw-rtl,.rw-dropdownlist.rw-rtl,.rw-numberpicker.rw-rtl{padding-right:0;padding-left:1.9em}.rw-combobox>.rw-input,.rw-datetimepicker>.rw-input,.rw-dropdownlist>.rw-input,.rw-numberpicker>.rw-input{width:100%;border:none;outline:0}.rw-combobox>.rw-input::-moz-placeholder,.rw-datetimepicker>.rw-input::-moz-placeholder,.rw-dropdownlist>.rw-input::-moz-placeholder,.rw-numberpicker>.rw-input::-moz-placeholder{color:#999;opacity:1}.rw-combobox>.rw-input:-ms-input-placeholder,.rw-datetimepicker>.rw-input:-ms-input-placeholder,.rw-dropdownlist>.rw-input:-ms-input-placeholder,.rw-numberpicker>.rw-input:-ms-input-placeholder{color:#999}.rw-combobox>.rw-input::-webkit-input-placeholder,.rw-datetimepicker>.rw-input::-webkit-input-placeholder,.rw-dropdownlist>.rw-input::-webkit-input-placeholder,.rw-numberpicker>.rw-input::-webkit-input-placeholder{color:#999}.rw-placeholder{color:#999}.rw-select{position:absolute;width:1.9em;height:100%;right:0;top:0}.rw-select.rw-btn,.rw-select>.rw-btn{height:100%;vertical-align:middle;outline:0}.rw-rtl .rw-select{left:0;right:auto}.rw-combobox input.rw-input,.rw-datetimepicker input.rw-input,.rw-multiselect,.rw-numberpicker input.rw-input{box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.rw-combobox:active,.rw-combobox:active.rw-state-focus,.rw-datetimepicker:active,.rw-datetimepicker:active.rw-state-focus,.rw-dropdownlist:active,.rw-dropdownlist:active.rw-state-focus,.rw-header>.rw-btn:active,.rw-header>.rw-btn:active.rw-state-focus,.rw-numberpicker .rw-btn.rw-state-active,.rw-numberpicker .rw-btn.rw-state-active.rw-state-focus{background-image:none;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.rw-combobox:hover,.rw-datetimepicker:hover,.rw-dropdownlist:hover,.rw-numberpicker:hover{background-color:#e6e6e6;border-color:#adadad}.rw-dropdownlist.rw-state-disabled,.rw-dropdownlist.rw-state-readonly{cursor:not-allowed}.rw-dropdownlist>.rw-input{line-height:2.286em;background-color:transparent;padding-top:0;padding-bottom:0;padding-right:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rw-dropdownlist.rw-rtl>.rw-input{padding:.429em .857em;padding-top:0;padding-bottom:0;padding-left:0}.rw-dropdownlist.rw-rtl>.rw-select,.rw-dropdownlist>.rw-select{border-width:0}.rw-numberpicker .rw-btn{display:block;height:1.143em;line-height:1.143em;width:100%;border-width:0}.rw-popup{position:absolute;box-shadow:0 5px 6px rgba(0,0,0,.2);border-top-right-radius:0;border-top-left-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid #ccc;background:#fff;padding:2px;overflow:auto;margin-bottom:10px;left:10px;right:10px}.rw-dropup>.rw-popup{margin-bottom:0;margin-top:10px;border-top-right-radius:3px;border-top-left-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;box-shadow:0 0 6px rgba(0,0,0,.2)}.rw-popup-container{position:absolute;top:100%;margin-top:1px;z-index:1005;left:-11px;right:-11px}.rw-widget.rw-state-focus .rw-popup-container{z-index:1015}.rw-popup-container.rw-dropup{top:auto;bottom:100%}.rw-popup-container.rw-calendar-popup{right:auto;width:18em}.rw-datetimepicker .rw-btn{width:1.8em}.rw-datetimepicker.rw-has-neither{padding-left:0;padding-right:0}.rw-datetimepicker.rw-has-neither .rw-input{border-radius:4px}.rw-datetimepicker.rw-has-both{padding-right:3.8em}.rw-datetimepicker.rw-has-both.rw-rtl{padding-right:0;padding-left:3.8em}.rw-datetimepicker.rw-has-both>.rw-select{width:3.8em;height:100%}.rw-calendar{background-color:#fff}.rw-calendar thead>tr{border-bottom:2px solid #ccc}.rw-calendar .rw-header{padding-bottom:5px}.rw-calendar .rw-header .rw-btn-left,.rw-calendar .rw-header .rw-btn-right{width:12.5%}.rw-calendar .rw-header .rw-btn-view{width:75%;background-color:#eee;border-radius:4px}.rw-calendar .rw-header .rw-btn-view[disabled]{box-shadow:none;cursor:not-allowed}.rw-calendar .rw-footer{border-top:1px solid #ccc}.rw-calendar .rw-footer .rw-btn{width:100%;white-space:normal}.rw-calendar .rw-footer .rw-btn:hover{background-color:#e6e6e6}.rw-calendar .rw-footer .rw-btn[disabled]{box-shadow:none;cursor:not-allowed}.rw-calendar-grid{outline:none;height:14.28571429em;table-layout:fixed;width:100%}.rw-calendar-grid th{text-align:right;padding:0 .4em 0 .1em}.rw-calendar-grid .rw-btn{width:100%;text-align:right}.rw-calendar-grid td .rw-btn{border-radius:4px;padding:0 .4em 0 .1em;outline:0}.rw-calendar-grid td .rw-btn:hover{background-color:#e6e6e6}.rw-calendar-grid td .rw-btn.rw-off-range{color:#b3b3b3}.rw-calendar-grid.rw-nav-view .rw-btn{padding:.25em 0 .3em;display:block;overflow:hidden;text-align:center;white-space:normal}.rw-selectlist{padding:2px}.rw-selectlist>ul{height:100%;overflow:auto}.rw-selectlist>ul>li.rw-list-option{position:relative;min-height:27px;cursor:auto;outline:none;padding-left:5px}.rw-selectlist>ul>li.rw-list-option>label>input{position:absolute;margin:4px 0 0 -20px}.rw-selectlist>ul>li.rw-list-option>label{padding-left:20px;line-height:1.423em;display:inline-block}.rw-selectlist.rw-rtl>ul>li.rw-list-option{padding-left:0;padding-right:5px}.rw-selectlist.rw-rtl>ul>li.rw-list-option>label>input{margin:4px -20px 0 0}.rw-selectlist.rw-rtl>ul>li.rw-list-option>label{padding-left:0;padding-right:20px}.rw-selectlist.rw-state-disabled>ul>li:hover,.rw-selectlist.rw-state-readonly>ul>li:hover{background:none;border-color:transparent}.rw-multiselect{background-color:#fff}.rw-multiselect:hover{border-color:#adadad}.rw-multiselect-wrapper{border-radius:4px;position:relative;cursor:text}.rw-multiselect-wrapper:after,.rw-multiselect-wrapper:before{content:" ";display:table}.rw-multiselect-wrapper:after{clear:both}.rw-multiselect-wrapper i.rw-loading{position:absolute;right:3px}.rw-multiselect-wrapper>.rw-input{outline:0;border-width:0;line-height:normal;width:auto;max-width:100%}.rw-multiselect-wrapper>.rw-input::-moz-placeholder{color:#999;opacity:1}.rw-multiselect-wrapper>.rw-input:-ms-input-placeholder{color:#999}.rw-multiselect-wrapper>.rw-input::-webkit-input-placeholder{color:#999}.rw-state-disabled>.rw-multiselect-wrapper,.rw-state-readonly>.rw-multiselect-wrapper{cursor:not-allowed}.rw-rtl .rw-multiselect-wrapper>.rw-input{float:right}.rw-multiselect-create-tag{border-top:1px solid #ccc;padding-top:5px;margin-top:5px}.rw-multiselect-taglist{margin:0;padding-left:0;list-style:none;display:inline;padding-right:0}.rw-multiselect-taglist>li{display:inline-block;padding-left:5px;padding-right:5px;margin:1px;padding:.214em .15em .214em .4em;line-height:1.4em;text-align:center;white-space:nowrap;border-radius:3px;border:1px solid #ccc;background-color:#ccc;cursor:pointer}.rw-multiselect-taglist>li.rw-state-focus{background-color:#fff;border:1px solid #66afe9;color:#333}.rw-multiselect-taglist>li.rw-state-disabled,.rw-multiselect-taglist>li.rw-state-readonly,.rw-multiselect.rw-state-disabled .rw-multiselect-taglist>li,.rw-multiselect.rw-state-readonly .rw-multiselect-taglist>li{cursor:not-allowed;filter:alpha(opacity=65);opacity:.65}.rw-multiselect-taglist>li .rw-btn{outline:0;font-size:115%;line-height:normal}.rw-rtl .rw-multiselect-taglist>li{float:right}',""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},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(229);t.__esModule=!0,t["default"]=r;var i=n(226);o.interopRequireDefault(i);e.exports=t["default"]},function(e,t,n){"use strict";var r=n(81),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";var r=n(81),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(152),o=n(151);e.exports=function(e){var t=r(e,"position"),n="absolute"===t,i=e.ownerDocument;if("fixed"===t)return i||document;for(;(e=e.parentNode)&&9!==e.nodeType;){var a=n&&"static"===r(e,"position"),u=r(e,"overflow")+r(e,"overflow-y")+r(e,"overflow-x");if(!a&&/(auto|scroll)/.test(u)&&o(e)<e.scrollHeight)return e}return document}},function(e,t,n){"use strict";var r=n(102);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(229),o=n(153),i=r.interopRequireDefault(o),a=/^(top|right|bottom|left)$/,u=/^([+-]?(?:\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=(0,i["default"])(t),"float"==t&&(t="styleFloat");var r=e.currentStyle[t]||null;if(null==r&&n&&n[t]&&(r=n[t]),u.test(r)&&!a.test(t)){var o=n.left,s=e.runtimeStyle,l=s&&s.left;l&&(s.left=e.currentStyle.left),n.left="fontSize"===t?"1em":r,r=n.pixelLeft+"px",n.left=o,l&&(s.left=l)}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(l.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,i,a,u,s=n(81),l=Object.prototype.hasOwnProperty,c="transform",p={};s&&(p=r(),c=p.prefix+c,a=p.prefix+"transition-property",i=p.prefix+"transition-duration",u=p.prefix+"transition-delay",o=p.prefix+"transition-timing-function"),e.exports={transform:c,end:p.end,property:a,timing:o,delay:u,duration:i}},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,n){"use strict";var r=n(230),o=/^ms-/;e.exports=function(e){return r(e).replace(o,"-ms-")}},function(e,t,n){"use strict";function r(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-c)),r=setTimeout(e,n);return c=t,r}var o,i=n(81),a=["","webkit","moz","o","ms"],u="clearTimeout",s=r,l=function(e,t){return e+(e?t[0].toUpperCase()+t.substr(1):t)+"AnimationFrame"};i&&a.some(function(e){var t=l(e,"request");return t in window?(u=l(e,"cancel"),s=function(e){return window[t](e)}):void 0});var c=(new Date).getTime();o=function(e){return s(e)},o.cancel=function(e){return window[u](e)},e.exports=o},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;r=!1,null===o&&(o=Function.prototype);var u=Object.getOwnPropertyDescriptor(o,i);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var l=Object.getPrototypeOf(o);if(null===l)return;e=l,t=i,n=a,r=!0,u=l=void 0}},i=function(e){function t(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0];return n(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),Object.defineProperty(this,"message",{enumerable:!1,value:e,writable:!0}),Object.defineProperty(this,"name",{enumerable:!1,value:this.constructor.name, writable:!0}),Error.hasOwnProperty("captureStackTrace")?void Error.captureStackTrace(this,this.constructor):void Object.defineProperty(this,"stack",{enumerable:!1,value:new Error(e).stack,writable:!0})}return r(t,e),t}(Error);t["default"]=i,e.exports=t["default"]},function(e,t){"use strict";function n(e){return e.replace(r,function(e,t){return t.toUpperCase()})}var r=/-(.)/g;e.exports=n},function(e,t,n){"use strict";function r(e){return o(e.replace(i,"ms-"))}var o=n(519),i=/^-ms-/;e.exports=r},function(e,t,n){"use strict";function r(e,t){return e&&t?e===t?!0:o(e)?!1:o(t)?r(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(16&e.compareDocumentPosition(t)):!1:!1}var o=n(528);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?a(!1):void 0,"number"!=typeof t?a(!1):void 0,0===t||t-1 in e?void 0:a(!1),"function"==typeof e.callee?a(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),o=0;t>o;o++)r[o]=e[o];return r}function o(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 i(e){return o(e)?Array.isArray(e)?e.slice():r(e):[e]}var a=n(2);e.exports=i},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),i=o&&u(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&&(t?void 0:s(!1),a(p).forEach(t));for(var f=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return f}var i=n(16),a=n(522),u=n(235),s=n(2),l=i.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;e.exports=o},function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=n},function(e,t){"use strict";function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;e.exports=n},function(e,t,n){"use strict";function r(e){return o(e).replace(i,"-ms-")}var o=n(525),i=/^ms-/;e.exports=r},function(e,t){"use strict";function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=n(527);e.exports=r},function(e,t){"use strict";function n(e,t,n){if(!e)return null;var o={};for(var i in e)r.call(e,i)&&(o[i]=t.call(n,e[i],i,e));return o}var r=Object.prototype.hasOwnProperty;e.exports=n},function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=n},function(e,t,n){"use strict";var r,o=n(16);o.canUseDOM&&(r=window.performance||window.msPerformance||window.webkitPerformance),e.exports=r||{}},function(e,t,n){"use strict";var r,o=n(531);r=o.now?function(){return o.now()}:function(){return Date.now()},e.exports=r},function(e,t,n){e.exports=n.p+"rw-widgets.eot"},function(e,t,n){e.exports=n.p+"rw-widgets.eot"},function(e,t,n){e.exports=n.p+"rw-widgets.svg"},function(e,t,n){e.exports=n.p+"rw-widgets.ttf"},function(e,t){e.exports="<h1 id=react-widgets-example>React Widgets Example</h1> <p>This is a demonstration of how to connect <a href=https://github.com/jquense/react-widgets>react-widgets</a> form elements to <code>redux-form</code>.</p> <p>Very few modifications are needed. All of these can be done as props to the <code>Field</code> component.</p> <ul> <li><code>Multiselect</code><ul> <li>Needs <code>onBlur</code> to be rewritten ignoring the parameter</li> <li>Needs <code>defaultValue</code> of <code>[]</code> to be provided</li> </ul> </li> <li><code>SelectList</code><ul> <li>Needs <code>onBlur</code> to be rewritten ignoring the parameter</li> </ul> </li> </ul> <p>For more information, see the <code>react-widgets</code> docs.</p> <p>The delay between when you click &quot;Submit&quot; and when the alert dialog pops up is intentional, to simulate server latency.</p>"},function(e,t,n){var r=n(75),o=n(25),i=r(o,"DataView");e.exports=i},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(574),i=n(575),a=n(576),u=n(577),s=n(578);r.prototype.clear=o,r.prototype["delete"]=i,r.prototype.get=a,r.prototype.has=u,r.prototype.set=s,e.exports=r},function(e,t,n){var r=n(75),o=n(25),i=r(o,"Promise");e.exports=i},function(e,t,n){var r=n(75),o=n(25),i=r(o,"Set");e.exports=i},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.__data__=new o;++t<n;)this.add(e[t])}var o=n(157),i=n(599),a=n(600);r.prototype.add=r.prototype.push=i,r.prototype.has=a,e.exports=r},function(e,t,n){var r=n(25),o=r.Uint8Array;e.exports=o},function(e,t){function n(e,t){for(var n=-1,r=e?e.length:0,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}e.exports=n},function(e,t,n){var r=n(243),o=n(561),i=o(r);e.exports=i},function(e,t,n){var r=n(562),o=r();e.exports=o},function(e,t){function n(e,t){return null!=e&&t in Object(e)}e.exports=n},function(e,t,n){function r(e,t,n,r,v,y){var g=l(e),b=l(t),w=A,_=A;g||(w=s(e),w=w==d?h:w),b||(_=s(t),_=_==d?h:_);var E=w==h&&!c(e),x=_==h&&!c(t),C=w==_;if(C&&!E)return y||(y=new o),g||p(e)?i(e,t,n,r,v,y):a(e,t,w,n,r,v,y);if(!(v&f)){var S=E&&m.call(e,"__wrapped__"),P=x&&m.call(t,"__wrapped__");if(S||P){var T=S?e.value():e,O=P?t.value():t;return y||(y=new o),n(T,O,r,v,y)}}return C?(y||(y=new o),u(e,t,n,r,v,y)):!1}var o=n(239),i=n(255),a=n(566),u=n(567),s=n(571),l=n(37),c=n(163),p=n(612),f=2,d="[object Arguments]",A="[object Array]",h="[object Object]",v=Object.prototype,m=v.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t,n,r){var s=n.length,l=s,c=!r;if(null==e)return!l;for(e=Object(e);s--;){var p=n[s];if(c&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++s<l;){p=n[s];var f=p[0],d=e[f],A=p[1];if(c&&p[2]){if(void 0===d&&!(f in e))return!1}else{var h=new o;if(r)var v=r(d,A,f,e,t,h);if(!(void 0===v?i(A,d,r,a|u,h):v))return!1}}return!0}var o=n(239),i=n(160),a=1,u=2;e.exports=r},function(e,t,n){function r(e){if(!u(e)||a(e))return!1;var t=o(e)||i(e)?A:c;return t.test(s(e))}var o=n(164),i=n(163),a=n(583),u=n(53),s=n(263),l=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,p=Object.prototype,f=Function.prototype.toString,d=p.hasOwnProperty,A=RegExp("^"+f.call(d).replace(l,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=r},function(e,t){function n(e){return r(Object(e))}var r=Object.keys;e.exports=n},function(e,t,n){function r(e){var t=i(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||o(n,e,t)}}var o=n(549),i=n(570),a=n(259);e.exports=r},function(e,t,n){function r(e,t){return u(e)&&s(t)?l(c(e),t):function(n){var r=i(n,e);return void 0===r&&r===t?a(n,e):o(t,r,void 0,p|f)}}var o=n(160),i=n(608),a=n(609),u=n(111),s=n(258),l=n(259),c=n(83),p=1,f=2;e.exports=r},function(e,t,n){function r(e){return function(t){return o(t,e)}}var o=n(244);e.exports=r},function(e,t,n){function r(e,t){var n;return o(e,function(e,r,o){return n=t(e,r,o),!n}),!!n}var o=n(545);e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}e.exports=n},function(e,t,n){function r(e){if("string"==typeof e)return e;if(i(e))return s?s.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}var o=n(240),i=n(84),a=1/0,u=o?o.prototype:void 0,s=u?u.toString:void 0;e.exports=r},function(e,t){function n(e){return e&&e.Object===Object?e:null}e.exports=n},function(e,t,n){var r=n(25),o=r["__core-js_shared__"];e.exports=o},function(e,t){function n(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&r++;return r}e.exports=n},function(e,t,n){function r(e,t){return function(n,r){if(null==n)return n;if(!o(n))return e(n,r);for(var i=n.length,a=t?i:-1,u=Object(n);(t?a--:++a<i)&&r(u[a],a,u)!==!1;);return n}}var o=n(113);e.exports=r},function(e,t){function n(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),u=a.length;u--;){var s=a[e?u:++o];if(n(i[s],s,i)===!1)break}return t}}e.exports=n},function(e,t,n){function r(e,t,n){function r(){var t=this&&this!==i&&this instanceof r?s:e;return t.apply(u?n:this,arguments)}var u=t&a,s=o(e);return r}var o=n(107),i=n(25),a=1;e.exports=r},function(e,t,n){function r(e,t,n){function r(){for(var i=arguments.length,f=Array(i),d=i,A=s(r);d--;)f[d]=arguments[d];var h=3>i&&f[0]!==A&&f[i-1]!==A?[]:l(f,A);if(i-=h.length,n>i)return u(e,t,a,r.placeholder,void 0,f,h,void 0,void 0,n-i);var v=this&&this!==c&&this instanceof r?p:e;return o(v,this,f)}var p=i(e);return r}var o=n(158),i=n(107),a=n(252),u=n(253),s=n(108),l=n(82),c=n(25);e.exports=r},function(e,t,n){function r(e,t,n,r){function s(){for(var t=-1,i=arguments.length,u=-1,p=r.length,f=Array(p+i),d=this&&this!==a&&this instanceof s?c:e;++u<p;)f[u]=r[u];for(;i--;)f[u++]=arguments[++t];return o(d,l?n:this,f)}var l=t&u,c=i(e);return s}var o=n(158),i=n(107),a=n(25),u=1;e.exports=r},function(e,t,n){function r(e,t,n,r,o,_,x){switch(n){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!r(new i(e),new i(t)));case p:case f:return+e==+t;case d:return e.name==t.name&&e.message==t.message;case h:return e!=+e?t!=+t:e==+t;case v:case y:return e==t+"";case A:var C=u;case m:var S=_&c;if(C||(C=s),e.size!=t.size&&!S)return!1;var P=x.get(e);return P?P==t:(_|=l,x.set(e,t),a(C(e),C(t),r,o,_,x));case g:if(E)return E.call(e)==E.call(t)}return!1}var o=n(240),i=n(543),a=n(255),u=n(595),s=n(601),l=1,c=2,p="[object Boolean]",f="[object Date]",d="[object Error]",A="[object Map]",h="[object Number]",v="[object RegExp]",m="[object Set]",y="[object String]",g="[object Symbol]",b="[object ArrayBuffer]",w="[object DataView]",_=o?o.prototype:void 0,E=_?_.valueOf:void 0;e.exports=r},function(e,t,n){function r(e,t,n,r,u,s){var l=u&a,c=i(e),p=c.length,f=i(t),d=f.length;if(p!=d&&!l)return!1;for(var A=p;A--;){var h=c[A];if(!(l?h in t:o(t,h)))return!1}var v=s.get(e);if(v)return v==t;var m=!0;s.set(e,t);for(var y=l;++A<p;){h=c[A];var g=e[h],b=t[h];if(r)var w=l?r(b,g,h,t,e,s):r(g,b,h,e,t,s);if(!(void 0===w?g===b||n(g,b,r,u,s):w)){m=!1;break}y||(y="constructor"==h)}if(m&&!y){var _=e.constructor,E=t.constructor;_!=E&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof E&&E instanceof E)&&(m=!1)}return s["delete"](e),m}var o=n(245),i=n(166),a=2;e.exports=r},function(e,t,n){function r(e){for(var t=e.name+"",n=o[t],r=a.call(o,t)?n.length:0;r--;){var i=n[r],u=i.func;if(null==u||u==e)return i.name}return t}var o=n(597),i=Object.prototype,a=i.hasOwnProperty;e.exports=r},function(e,t,n){var r=n(247),o=r("length");e.exports=o},function(e,t,n){function r(e){for(var t=i(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,o(a)]}return t}var o=n(258),i=n(166);e.exports=r},function(e,t,n){function r(e){return m.call(e)}var o=n(538),i=n(238),a=n(540),u=n(541),s=n(241),l=n(263),c="[object Map]",p="[object Object]",f="[object Promise]",d="[object Set]",A="[object WeakMap]",h="[object DataView]",v=Object.prototype,m=v.toString,y=l(o),g=l(i),b=l(a),w=l(u),_=l(s);(o&&r(new o(new ArrayBuffer(1)))!=h||i&&r(new i)!=c||a&&r(a.resolve())!=f||u&&r(new u)!=d||s&&r(new s)!=A)&&(r=function(e){var t=m.call(e),n=t==p?e.constructor:void 0,r=n?l(n):void 0;if(r)switch(r){case y:return h;case g:return c;case b:return f;case w:return d;case _:return A}return t}),e.exports=r},function(e,t){function n(e,t){return null==e?void 0:e[t]}e.exports=n},function(e,t,n){function r(e,t,n){t=s(t,e)?[t]:o(t);for(var r,f=-1,d=t.length;++f<d;){var A=p(t[f]);if(!(r=null!=e&&n(e,A)))break;e=e[A]}if(r)return r;var d=e?e.length:0;return!!d&&l(d)&&u(A,d)&&(a(e)||c(e)||i(e))}var o=n(249),i=n(266),a=n(37),u=n(110),s=n(111),l=n(114),c=n(267),p=n(83);e.exports=r},function(e,t,n){function r(){this.__data__=o?o(null):{}}var o=n(112);e.exports=r},function(e,t){function n(e){return this.has(e)&&delete this.__data__[e]}e.exports=n},function(e,t,n){function r(e){var t=this.__data__;if(o){var n=t[e];return n===i?void 0:n}return u.call(t,e)?t[e]:void 0}var o=n(112),i="__lodash_hash_undefined__",a=Object.prototype,u=a.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){var t=this.__data__;return o?void 0!==t[e]:a.call(t,e)}var o=n(112),i=Object.prototype,a=i.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__;return n[e]=o&&void 0===t?i:t,this}var o=n(112),i="__lodash_hash_undefined__";e.exports=r},function(e,t,n){function r(e){var t=e?e.length:void 0;return u(t)&&(a(e)||s(e)||i(e))?o(t,String):null}var o=n(556),i=n(266),a=n(37),u=n(114),s=n(267);e.exports=r},function(e,t,n){function r(e,t,n){if(!u(n))return!1;var r=typeof t;return("number"==r?i(n)&&a(t,n.length):"string"==r&&t in n)?o(n[t],e):!1}var o=n(264),i=n(113),a=n(110),u=n(53);e.exports=r},function(e,t){function n(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=n},function(e,t,n){function r(e){var t=a(e),n=u[t];if("function"!=typeof n||!(t in o.prototype))return!1;if(e===n)return!0;var r=i(n);return!!r&&e===r[0]}var o=n(156),i=n(256),a=n(568),u=n(621);e.exports=r},function(e,t,n){function r(e){return!!i&&i in e}var o=n(559),i=function(){var e=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=r},function(e,t){function n(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||r;return e===n}var r=Object.prototype;e.exports=n},function(e,t){function n(){this.__data__=[]}e.exports=n},function(e,t,n){function r(e){var t=this.__data__,n=o(t,e);if(0>n)return!1;var r=t.length-1;return n==r?t.pop():a.call(t,n,1),!0}var o=n(106),i=Array.prototype,a=i.splice;e.exports=r},function(e,t,n){function r(e){var t=this.__data__,n=o(t,e);return 0>n?void 0:t[n][1]}var o=n(106);e.exports=r},function(e,t,n){function r(e){return o(this.__data__,e)>-1}var o=n(106);e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__,r=o(n,e);return 0>r?n.push([e,t]):n[r][1]=t,this}var o=n(106);e.exports=r},function(e,t,n){function r(){this.__data__={hash:new o,map:new(a||i),string:new o}}var o=n(539),i=n(105),a=n(238);e.exports=r},function(e,t,n){function r(e){return o(this,e)["delete"](e)}var o=n(109);e.exports=r},function(e,t,n){function r(e){return o(this,e).get(e)}var o=n(109);e.exports=r},function(e,t,n){function r(e){return o(this,e).has(e)}var o=n(109);e.exports=r},function(e,t,n){function r(e,t){return o(this,e).set(e,t),this}var o=n(109);e.exports=r},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}e.exports=n},function(e,t,n){function r(e,t){var n=e[1],r=t[1],h=n|r,v=(s|l|f)>h,m=r==f&&n==p||r==f&&n==d&&e[7].length<=t[8]||r==(f|d)&&t[7].length<=t[8]&&n==p;if(!v&&!m)return e;r&s&&(e[2]=t[2],h|=n&s?0:c);var y=t[3];if(y){var g=e[3];e[3]=g?o(g,y,t[4]):y,e[4]=g?a(e[3],u):t[4]}return y=t[5],y&&(g=e[5],e[5]=g?i(g,y,t[6]):y,e[6]=g?a(e[5],u):t[6]),y=t[7],y&&(e[7]=y),r&f&&(e[8]=null==e[8]?t[8]:A(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=h,e}var o=n(250),i=n(251),a=n(82),u="__lodash_placeholder__",s=1,l=2,c=4,p=8,f=128,d=256,A=Math.min;e.exports=r},function(e,t){var n={};e.exports=n},function(e,t,n){function r(e,t){for(var n=e.length,r=a(t.length,n),u=o(e);r--;){var s=t[r];e[r]=i(s,n)?u[s]:void 0}return e}var o=n(162),i=n(110),a=Math.min;e.exports=r},function(e,t){function n(e){return this.__data__.set(e,r),this}var r="__lodash_hash_undefined__";e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}e.exports=n},function(e,t,n){function r(){this.__data__=new o}var o=n(105);e.exports=r},function(e,t){function n(e){return this.__data__["delete"](e)}e.exports=n},function(e,t){function n(e){return this.__data__.get(e)}e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t,n){function r(e,t){var n=this.__data__;return n instanceof o&&n.__data__.length==a&&(n=this.__data__=new i(n.__data__)),n.set(e,t),this}var o=n(105),i=n(157),a=200;e.exports=r},function(e,t,n){function r(e){if(e instanceof o)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=a(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var o=n(156),i=n(237),a=n(162);e.exports=r},function(e,t,n){function r(e,t,n){var r=null==e?void 0:o(e,t);return void 0===r?n:r}var o=n(244);e.exports=r},function(e,t,n){function r(e,t){return null!=e&&i(e,t,o)}var o=n(547),i=n(573);e.exports=r},function(e,t,n){function r(e){return i(e)&&o(e)}var o=n(113),i=n(67);e.exports=r},function(e,t,n){function r(e,t,n){n="function"==typeof n?n:void 0;var r=n?n(e,t):void 0;return void 0===r?o(e,t,n):!!r}var o=n(160);e.exports=r},function(e,t,n){function r(e){return i(e)&&o(e.length)&&!!M[k.call(e)]}var o=n(114),i=n(67),a="[object Arguments]",u="[object Array]",s="[object Boolean]",l="[object Date]",c="[object Error]",p="[object Function]",f="[object Map]",d="[object Number]",A="[object Object]",h="[object RegExp]",v="[object Set]",m="[object String]",y="[object WeakMap]",g="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",_="[object Float64Array]",E="[object Int8Array]",x="[object Int16Array]",C="[object Int32Array]",S="[object Uint8Array]",P="[object Uint8ClampedArray]",T="[object Uint16Array]",O="[object Uint32Array]",M={};M[w]=M[_]=M[E]=M[x]=M[C]=M[S]=M[P]=M[T]=M[O]=!0,M[a]=M[u]=M[g]=M[s]=M[b]=M[l]=M[c]=M[p]=M[f]=M[d]=M[A]=M[h]=M[v]=M[m]=M[y]=!1;var I=Object.prototype,k=I.toString;e.exports=r},function(e,t,n){function r(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a),a};return n.cache=new(r.Cache||o),n}var o=n(157),i="Expected a function";r.Cache=o,e.exports=r},function(e,t){function n(){return Date.now()}e.exports=n},function(e,t,n){var r=n(254),o=n(108),i=n(82),a=n(269),u=64,s=a(function(e,t){var n=i(t,o(s));return r(e,u,void 0,t,n)});s.placeholder={},e.exports=s},function(e,t,n){function r(e){return a(e)?o(u(e)):i(e)}var o=n(247),i=n(554),a=n(111),u=n(83);e.exports=r},function(e,t,n){function r(e,t,n){var r=u(e)?o:a;return n&&s(e,t,n)&&(t=void 0),r(e,i(t,3))}var o=n(242),i=n(246),a=n(555),u=n(37),s=n(580);e.exports=r},function(e,t,n){function r(e){if(!e)return 0===e?e:0;if(e=o(e),e===i||e===-i){var t=0>e?-1:1;return t*a}return e===e?e:0}var o=n(619),i=1/0,a=1.7976931348623157e308;e.exports=r},function(e,t,n){function r(e){if("number"==typeof e)return e;if(a(e))return u;if(i(e)){var t=o(e.valueOf)?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var n=c.test(e);return n||p.test(e)?f(e.slice(2),n?2:8):l.test(e)?u:+e}var o=n(164),i=n(53),a=n(84),u=NaN,s=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,p=/^0o[0-7]+$/i,f=parseInt;e.exports=r},function(e,t,n){function r(e){return null==e?"":o(e)}var o=n(557);e.exports=r},function(e,t,n){function r(e){if(s(e)&&!u(e)&&!(e instanceof o)){if(e instanceof i)return e;if(p.call(e,"__wrapped__"))return l(e)}return new i(e)}var o=n(156),i=n(237),a=n(161),u=n(37),s=n(67),l=n(607),c=Object.prototype,p=c.hasOwnProperty;r.prototype=a.prototype,r.prototype.constructor=r,e.exports=r},function(e,t){function n(){l&&a&&(l=!1,a.length?s=a.concat(s):c=-1,s.length&&r())}function r(){if(!l){var e=setTimeout(n);l=!0;for(var t=s.length;t;){for(a=s,s=[];++c<t;)a&&a[c].run();c=-1,t=s.length}a=null,l=!1,clearTimeout(e)}}function o(e,t){this.fun=e,this.array=t}function i(){}var a,u=e.exports={},s=[],l=!1,c=-1;u.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new o(e,t)),1!==s.length||l||setTimeout(r,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=i,u.addListener=i,u.once=i,u.off=i,u.removeListener=i,u.removeAllListeners=i,u.emit=i,u.binding=function(e){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(e){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},function(e,t){e.exports="import React from 'react'\nimport { Field, reduxForm } from 'redux-form'\nimport DropdownList from 'react-widgets/lib/DropdownList'\nimport SelectList from 'react-widgets/lib/SelectList'\nimport Multiselect from 'react-widgets/lib/Multiselect'\nimport 'react-widgets/dist/css/react-widgets.css'\n\nconst colors = [ { color: 'Red', value: 'ff0000' },\n { color: 'Green', value: '00ff00' },\n { color: 'Blue', value: '0000ff' } ]\n\nlet ReactWidgetsForm = props => {\n const { handleSubmit, pristine, reset, submitting } = props\n return (\n <form onSubmit={handleSubmit}>\n <div>\n <label>Favorite Color</label>\n <Field\n name=\"favoriteColor\"\n component={DropdownList}\n data={colors}\n valueField=\"value\"\n textField=\"color\"/>\n </div>\n <div>\n <label>Hobbies</label>\n <Field\n name=\"hobbies\"\n component={Multiselect}\n defaultValue={[]}\n onBlur={() => props.onBlur()}\n data={[ 'Guitar', 'Cycling', 'Hiking' ]}/>\n </div>\n <div>\n <label>Sex</label>\n <Field\n name=\"sex\"\n component={SelectList}\n onBlur={() => props.onBlur()}\n data={[ 'male', 'female' ]}/>\n </div>\n <div>\n <button type=\"submit\" disabled={pristine || submitting}>Submit</button>\n <button type=\"button\" disabled={pristine || submitting} onClick={reset}>Reset Values\n </button>\n </div>\n </form>\n )\n}\n\nReactWidgetsForm = reduxForm({\n form: 'reactWidgets' // a unique identifier for this form\n})(ReactWidgetsForm)\n\nexport default ReactWidgetsForm\n"},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 i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t["default"]=void 0;var u=n(7),s=n(272),l=r(s),c=n(273),p=(r(c),function(e){function t(n,r){o(this,t);var a=i(this,e.call(this,n,r));return a.store=n.store,a}return a(t,e),t.prototype.getChildContext=function(){return{store:this.store}},t.prototype.render=function(){var e=this.props.children;return u.Children.only(e)},t}(u.Component));t["default"]=p,p.propTypes={store:l["default"].isRequired,children:u.PropTypes.element.isRequired},p.childContextTypes={store:l["default"].isRequired}},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 i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return e.displayName||e.name||"Component"}function s(e,t){try{return e.apply(t)}catch(n){return P.value=n,P}}function l(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],l=Boolean(e),f=e||x,A=void 0;A="function"==typeof t?t:t?(0,m["default"])(t):C;var v=n||S,y=r.pure,g=void 0===y?!0:y,b=r.withRef,_=void 0===b?!1:b,O=g&&v!==S,M=T++;return function(e){function t(e,t,n){var r=v(e,t,n);return r}var n="Connect("+u(e)+")",r=function(r){function u(e,t){o(this,u);var a=i(this,r.call(this,e,t));a.version=M,a.store=e.store||t.store,(0,E["default"])(a.store,'Could not find "store" in either the context or '+('props of "'+n+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+n+'".'));var s=a.store.getState();return a.state={storeState:s},a.clearCache(),a}return a(u,r),u.prototype.shouldComponentUpdate=function(){return!g||this.haveOwnPropsChanged||this.hasStoreStateChanged},u.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState(),r=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n);return r},u.prototype.configureFinalMapState=function(e,t){var n=f(e.getState(),t),r="function"==typeof n;return this.finalMapStateToProps=r?n:f,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,r?this.computeStateProps(e,t):n},u.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch,r=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n);return r},u.prototype.configureFinalMapDispatch=function(e,t){var n=A(e.dispatch,t),r="function"==typeof n;return this.finalMapDispatchToProps=r?n:A,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,r?this.computeDispatchProps(e,t):n},u.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return this.stateProps&&(0,h["default"])(e,this.stateProps)?!1:(this.stateProps=e,!0)},u.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return this.dispatchProps&&(0,h["default"])(e,this.dispatchProps)?!1:(this.dispatchProps=e,!0)},u.prototype.updateMergedPropsIfNeeded=function(){var e=t(this.stateProps,this.dispatchProps,this.props);return this.mergedProps&&O&&(0,h["default"])(e,this.mergedProps)?!1:(this.mergedProps=e,!0)},u.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},u.prototype.trySubscribe=function(){l&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},u.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},u.prototype.componentDidMount=function(){this.trySubscribe()},u.prototype.componentWillReceiveProps=function(e){g&&(0,h["default"])(e,this.props)||(this.haveOwnPropsChanged=!0)},u.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},u.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},u.prototype.handleChange=function(){if(this.unsubscribe){var e=this.store.getState(),t=this.state.storeState;if(!g||t!==e){if(g&&!this.doStatePropsDependOnOwnProps){var n=s(this.updateStatePropsIfNeeded,this);if(!n)return;n===P&&(this.statePropsPrecalculationError=P.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:e})}}},u.prototype.getWrappedInstance=function(){return(0,E["default"])(_,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},u.prototype.render=function(){var t=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,r=this.haveStatePropsBeenPrecalculated,o=this.statePropsPrecalculationError,i=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,o)throw o;var a=!0,u=!0;g&&i&&(a=n||t&&this.doStatePropsDependOnOwnProps,u=t&&this.doDispatchPropsDependOnOwnProps);var s=!1,l=!1;r?s=!0:a&&(s=this.updateStatePropsIfNeeded()),u&&(l=this.updateDispatchPropsIfNeeded());var f=!0;return f=s||l||t?this.updateMergedPropsIfNeeded():!1,!f&&i?i:(_?this.renderedElement=(0,p.createElement)(e,c({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,p.createElement)(e,this.mergedProps),this.renderedElement)},u}(p.Component);return r.displayName=n,r.WrappedComponent=e,r.contextTypes={store:d["default"]},r.propTypes={store:d["default"]},(0,w["default"])(r,e)}}var c=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.__esModule=!0,t["default"]=l;var p=n(7),f=n(272),d=r(f),A=n(626),h=r(A),v=n(627),m=r(v),y=n(273),g=(r(y),n(165)),b=(r(g),n(236)),w=r(b),_=n(52),E=r(_),x=function(e){return{}},C=function(e){return{dispatch:e}},S=function(e,t,n){return c({},n,e,t)},P={value:null},T=0},function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,i=0;i<n.length;i++)if(!o.call(t,n[i])||e[n[i]]!==t[n[i]])return!1;return!0}t.__esModule=!0,t["default"]=n},function(e,t,n){"use strict";function r(e){return function(t){return(0,o.bindActionCreators)(e,t)}}t.__esModule=!0,t["default"]=r;var o=n(197)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n,r,o){var i={};return Object.keys(r).forEach(function(e){i[e]=r[e]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,t,i),i=null),i}function i(e){return u({open:"open dropdown",filterPlaceholder:"",emptyList:"There are no items in this list",emptyFilter:"The filter returned no results"},e)}t.__esModule=!0;var a,u=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},s=n(7),l=r(s),c=n(507),p=r(c),f=n(227),d=r(f),A=n(46),h=r(A),v=n(31),m=r(v),y=n(274),g=r(y),b=n(54),w=r(b),_=n(43),E=r(_),x=n(169),C=r(x),S=n(170),P=r(S),T=n(176),O=r(T),M=n(198),I=r(M),k=n(42),R=n(55),N=n(68),D=m["default"].omit,F=m["default"].pick,j=m["default"].result,L={value:l["default"].PropTypes.any,onChange:l["default"].PropTypes.func,open:l["default"].PropTypes.bool,onToggle:l["default"].PropTypes.func,data:l["default"].PropTypes.array,valueField:l["default"].PropTypes.string,textField:E["default"].accessor,valueComponent:E["default"].elementType,itemComponent:E["default"].elementType,listComponent:E["default"].elementType,groupComponent:E["default"].elementType,groupBy:E["default"].accessor,onSelect:l["default"].PropTypes.func,searchTerm:l["default"].PropTypes.string,onSearch:l["default"].PropTypes.func,busy:l["default"].PropTypes.bool,delay:l["default"].PropTypes.number,dropUp:l["default"].PropTypes.bool,duration:l["default"].PropTypes.number,disabled:E["default"].disabled.acceptsArray,readOnly:E["default"].readOnly.acceptsArray,messages:l["default"].PropTypes.shape({open:E["default"].message,emptyList:E["default"].message,emptyFilter:E["default"].message,filterPlaceholder:E["default"].message})},U=l["default"].createClass((a={ displayName:"DropdownList",mixins:[n(174),n(278),n(275),n(277),n(173),n(76)(),n(172)({didHandle:function(e){e||this.close()}})],propTypes:L,getDefaultProps:function(){return{delay:500,value:"",open:!1,data:[],searchTerm:"",messages:i(),ariaActiveDescendantKey:"dropdownlist"}},getInitialState:function(){var e=this.props,t=e.open,n=e.filter,r=e.value,o=e.data,i=e.searchTerm,a=e.valueField,u=n?this.filter(o,i):o,s=(0,k.dataIndexOf)(o,r,a);return{filteredData:t&&n?u:null,selectedItem:u[s],focusedItem:u[s]||o[0]}},componentDidUpdate:function(){this.refs.list&&(0,O["default"])(this.refs.list)},componentWillReceiveProps:function(e){var t=e.open,n=e.filter,r=e.value,o=e.data,i=e.searchTerm,a=e.valueField,u=n?this.filter(o,i):o,s=(0,k.dataIndexOf)(o,r,a);this.setState({filteredData:t&&n?u:null,selectedItem:u[s],focusedItem:u[~s?s:0]})},render:function(){var e,t=this,n=this.props,r=n.className,o=n.tabIndex,a=n.filter,s=n.valueField,c=n.textField,p=n.groupBy,f=n.messages,d=n.data,A=n.busy,v=n.dropUp,m=n.placeholder,y=n.value,b=n.open,w=n.valueComponent,_=n.listComponent;_=_||p&&P["default"]||C["default"];var E=D(this.props,Object.keys(L)),x=F(this.props,Object.keys(_.propTypes)),S=F(this.props,Object.keys(g["default"].propTypes)),T=this.state,O=T.focusedItem,M=T.selectedItem,I=T.focused,U=this._data(),B=(0,R.isDisabled)(this.props),V=(0,R.isReadOnly)(this.props),Q=(0,k.dataItem)(d,y,s),z=(0,N.instanceId)(this,"__listbox"),W=(0,N.isFirstFocusedRender)(this)||b;return f=i(f),l["default"].createElement("div",u({},E,{ref:"input",role:"combobox",tabIndex:o||"0","aria-expanded":b,"aria-haspopup":!0,"aria-owns":z,"aria-busy":!!A,"aria-live":!b&&"polite","aria-autocomplete":"list","aria-disabled":B,"aria-readonly":V,onKeyDown:this._keyDown,onKeyPress:this._keyPress,onClick:this._click,onBlur:this.handleBlur,onFocus:this.handleFocus,className:(0,h["default"])(r,"rw-dropdownlist","rw-widget",(e={"rw-state-disabled":B,"rw-state-readonly":V,"rw-state-focus":I,"rw-rtl":this.isRtl()},e["rw-open"+(v?"-up":"")]=b,e))}),l["default"].createElement("span",{className:"rw-dropdownlist-picker rw-select rw-btn"},l["default"].createElement("i",{className:"rw-i rw-i-caret-down"+(A?" rw-loading":"")},l["default"].createElement("span",{className:"rw-sr"},j(f.open,this.props)))),l["default"].createElement("div",{className:"rw-input"},!Q&&m?l["default"].createElement("span",{className:"rw-placeholder"},m):this.props.valueComponent?l["default"].createElement(w,{item:Q}):(0,k.dataText)(Q,c)),l["default"].createElement(g["default"],u({},S,{onOpen:function(){return t.focus()},onOpening:function(){return t.refs.list.forceUpdate()}}),l["default"].createElement("div",null,a&&this._renderFilter(f),W&&l["default"].createElement(_,u({ref:"list"},x,{data:U,id:z,"aria-live":b&&"polite","aria-labelledby":(0,N.instanceId)(this),"aria-hidden":!this.props.open,selected:M,focused:b?O:null,onSelect:this._onSelect,onMove:this._scrollTo,messages:{emptyList:d.length?f.emptyFilter:f.emptyList}})))))},_renderFilter:function(e){var t=this;return l["default"].createElement("div",{ref:"filterWrapper",className:"rw-filter-input"},l["default"].createElement("span",{className:"rw-select rw-btn"},l["default"].createElement("i",{className:"rw-i rw-i-search"})),l["default"].createElement("input",{ref:"filter",className:"rw-input",autoComplete:"off",placeholder:m["default"].result(e.filterPlaceholder,this.props),value:this.props.searchTerm,onChange:function(e){return(0,N.notify)(t.props.onSearch,e.target.value)}}))},_onSelect:function(e){this.close(),(0,N.notify)(this.props.onSelect,e),this.change(e),this.focus(this)},_click:function(e){var t=this.refs.filterWrapper;this.props.filter&&this.props.open?(0,d["default"])(w["default"].findDOMNode(t),e.target)||this.close():this.toggle(),(0,N.notify)(this.props.onClick,e)},_keyDown:function(e){function t(e,t){e&&(t?r._onSelect(e):r.change(e))}var n=this,r=this,o=e.key,i=e.altKey,a=this.refs.list,u=this.props.filter,s=this.state.focusedItem,l=this.state.selectedItem,c=this.props.open,p=function(){n.close(),w["default"].findDOMNode(n).focus()};(0,N.notify)(this.props.onKeyDown,[e]),e.defaultPrevented||("End"===o?(c?this.setState({focusedItem:a.last()}):t(a.last()),e.preventDefault()):"Home"===o?(c?this.setState({focusedItem:a.first()}):t(a.first()),e.preventDefault()):"Escape"===o&&c?(e.preventDefault(),p()):("Enter"===o||" "===o&&!u)&&c?(e.preventDefault(),t(this.state.focusedItem,!0)):" "!==o||u||c?"ArrowDown"===o?(i?this.open():c?this.setState({focusedItem:a.next(s)}):t(a.next(l)),e.preventDefault()):"ArrowUp"===o&&(i?p():c?this.setState({focusedItem:a.prev(s)}):t(a.prev(l)),e.preventDefault()):(e.preventDefault(),this.open()))},_keyPress:function(e){var t=this;(0,N.notify)(this.props.onKeyPress,[e]),e.defaultPrevented||this.props.filter&&this.props.open||this.search(String.fromCharCode(e.which),function(e){t.isMounted()&&t.props.open?t.setState({focusedItem:e}):e&&t.change(e)})},change:function(e){(0,k.valueMatcher)(e,this.props.value,this.props.valueField)||((0,N.notify)(this.props.onChange,e),(0,N.notify)(this.props.onSearch,""),this.close())},focus:function(e){var t=e||(this.props.filter&&this.props.open?this.refs.filter:this.refs.input);(0,p["default"])()!==w["default"].findDOMNode(t)&&w["default"].findDOMNode(t).focus()},_data:function(){return this.state.filteredData||this.props.data.concat()},search:function(e,t){var n=this,r=((this._searchTerm||"")+e).toLowerCase();e&&(this._searchTerm=r,this.setTimeout("search",function(){var e=n.refs.list,o=n.props.open?"focusedItem":"selectedItem",i=e.next(n.state[o],r);n._searchTerm="",i&&t(i)},this.props.delay))},open:function(){(0,N.notify)(this.props.onToggle,!0)},close:function(){(0,N.notify)(this.props.onToggle,!1)},toggle:function(){this.props.open?this.close():this.open()}},o(a,"_onSelect",[R.widgetEditable],Object.getOwnPropertyDescriptor(a,"_onSelect"),a),o(a,"_click",[R.widgetEditable],Object.getOwnPropertyDescriptor(a,"_click"),a),o(a,"_keyDown",[R.widgetEditable],Object.getOwnPropertyDescriptor(a,"_keyDown"),a),o(a,"_keyPress",[R.widgetEditable],Object.getOwnPropertyDescriptor(a,"_keyPress"),a),a));t["default"]=(0,I["default"])(U,{open:"onToggle",value:"onChange",searchTerm:"onSearch"},["focus"]),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){var i={};return Object.keys(r).forEach(function(e){i[e]=r[e]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,t,i),i=null),i}function i(e){return u({createNew:"(create new tag)",emptyList:"There are no items in this list",emptyFilter:"The filter returned no results",tagsLabel:"selected items",selectedItems:"selected items",removeLabel:"remove selected item"},e)}t.__esModule=!0;var a,u=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},s=n(7),l=r(s),c=n(46),p=r(c),f=n(31),d=r(f),A=n(274),h=r(A),v=n(630),m=r(v),y=n(631),g=r(y),b=n(43),w=r(b),_=n(169),E=r(_),x=n(170),C=r(x),S=n(176),P=r(S),T=n(198),O=r(T),M=n(42),I=n(55),k=n(68),R=function(e,t){return"function"==typeof t.createNew?t.createNew(e):[l["default"].createElement("strong",{key:"dumb"},'"'+e.searchTerm+'"')," "+t.createNew]},N=d["default"].omit,D=d["default"].pick,F=d["default"].splat,j={data:l["default"].PropTypes.array,value:l["default"].PropTypes.array,onChange:l["default"].PropTypes.func,searchTerm:l["default"].PropTypes.string,onSearch:l["default"].PropTypes.func,open:l["default"].PropTypes.bool,onToggle:l["default"].PropTypes.func,valueField:l["default"].PropTypes.string,textField:w["default"].accessor,tagComponent:w["default"].elementType,itemComponent:w["default"].elementType,listComponent:w["default"].elementType,groupComponent:w["default"].elementType,groupBy:w["default"].accessor,createComponent:w["default"].elementType,onSelect:l["default"].PropTypes.func,onCreate:l["default"].PropTypes.oneOfType([l["default"].PropTypes.oneOf([!1]),l["default"].PropTypes.func]),dropUp:l["default"].PropTypes.bool,duration:l["default"].PropTypes.number,placeholder:l["default"].PropTypes.string,autoFocus:l["default"].PropTypes.bool,disabled:w["default"].disabled.acceptsArray,readOnly:w["default"].readOnly.acceptsArray,messages:l["default"].PropTypes.shape({open:w["default"].message,emptyList:w["default"].message,emptyFilter:w["default"].message,createNew:w["default"].message})},L=l["default"].createClass((a={displayName:"Multiselect",mixins:[n(174),n(275),n(277),n(173),n(172)({willHandle:function(e){e&&this.focus()},didHandle:function(e){e||this.close(),!e&&this.refs.tagList&&this.setState({focusedTag:null}),e&&!this.props.open&&this.open()}}),n(76)("input",function(e,t){var n=this.props.ariaActiveDescendantKey,r=(!this._data().length||null===this.state.focusedItem)&&e===n,o=null!=this.state.focusedTag&&"taglist"===e,i=null==this.state.focusedTag&&"list"===e;return r||o||i?t:void 0})],propTypes:j,getDefaultProps:function(){return{data:[],filter:"startsWith",value:[],open:!1,searchTerm:"",ariaActiveDescendantKey:"multiselect",messages:{createNew:"(create new tag)",emptyList:"There are no items in this list",emptyFilter:"The filter returned no results",tagsLabel:"selected items",selectedItems:"selected items",noneSelected:"no selected items",removeLabel:"remove selected item"}}},getInitialState:function(){var e=this.props,t=e.data,n=e.value,r=e.valueField,o=e.searchTerm,i=F(n).map(function(e){return(0,M.dataItem)(t,e,r)}),a=this.process(t,i,o);return{focusedTag:null,focusedItem:a[0],processedData:a,dataItems:i}},componentDidUpdate:function(){this.ariaActiveDescendant((0,k.instanceId)(this,"__createlist_option")),this.refs.list&&(0,P["default"])(this.refs.list)},componentWillReceiveProps:function(e){var t=e.data,n=e.value,r=e.valueField,o=e.searchTerm,i=d["default"].splat(n),a=this.state.focusedItem,u=this.process(t,i,o);this.setState({processedData:u,focusedItem:-1===u.indexOf(a)?u[0]:a,dataItems:i.map(function(e){return(0,M.dataItem)(t,e,r)})})},render:function(){var e,t=this,n=this.props,r=n.searchTerm,o=n.maxLength,a=n.className,s=n.tabIndex,c=n.textField,f=n.groupBy,d=n.messages,A=n.busy,v=n.dropUp,y=n.open,b=n.disabled,w=n.readOnly,_=n.tagComponent,x=n.listComponent;x=x||f&&C["default"]||E["default"],d=i(d);var S=N(this.props,Object.keys(j)),P=D(this.props,["valueField","textField"]),T=D(this.props,["maxLength","searchTerm","autoFocus"]),O=D(this.props,Object.keys(x.propTypes)),I=D(this.props,Object.keys(h["default"].propTypes)),F=this.state,L=F.focusedTag,U=F.focusedItem,B=F.focused,V=F.dataItems,Q=this._data(),z=(0,k.instanceId)(this,"_taglist"),W=(0,k.instanceId)(this,"__listbox"),K=(0,k.instanceId)(this,"__createlist"),q=(0,k.instanceId)(this,"__createlist_option"),G=!!V.length,H=(0,k.isFirstFocusedRender)(this)||y,Y=this._shouldShowCreate(),J=!Q.length||null===U;if(B)var Z=V.length?d.selectedItems+": "+V.map(function(e){return(0,M.dataText)(e,c)}).join(", "):d.noneSelected;return l["default"].createElement("div",u({},S,{ref:"element",id:(0,k.instanceId)(this),onKeyDown:this._keyDown,onBlur:this.handleBlur,onFocus:this.handleFocus,onTouchEnd:this.handleFocus,tabIndex:"-1",className:(0,p["default"])(a,"rw-widget","rw-multiselect",(e={"rw-state-focus":B,"rw-state-disabled":b===!0,"rw-state-readonly":w===!0,"rw-rtl":this.isRtl()},e["rw-open"+(v?"-up":"")]=y,e))}),l["default"].createElement("span",{ref:"status",id:(0,k.instanceId)(this,"__notify"),role:"status",className:"rw-sr","aria-live":"assertive","aria-atomic":"true","aria-relevant":"additions removals text"},Z),l["default"].createElement("div",{className:"rw-multiselect-wrapper",ref:"wrapper"},A&&l["default"].createElement("i",{className:"rw-i rw-loading"}),G&&l["default"].createElement(g["default"],u({},P,{ref:"tagList",id:z,"aria-label":d.tagsLabel,value:V,focused:L,disabled:b,readOnly:w,onDelete:this._delete,valueComponent:_,ariaActiveDescendantKey:"taglist"})),l["default"].createElement(m["default"],u({},T,{ref:"input",tabIndex:s||0,role:"listbox","aria-expanded":y,"aria-busy":!!A,autoFocus:this.props.autoFocus,"aria-owns":W+" "+(0,k.instanceId)(this,"__notify")+(G?" "+z:"")+(Y?" "+K:""),"aria-haspopup":!0,value:r,maxLength:o,disabled:b===!0,readOnly:w===!0,placeholder:this._placeholder(),onKeyDown:this._searchKeyDown,onKeyUp:this._searchgKeyUp,onChange:this._typing,onClick:this.handleInputInteraction,onTouchEnd:this.handleInputInteraction}))),l["default"].createElement(h["default"],u({},I,{onOpening:function(){return t.refs.list.forceUpdate()}}),l["default"].createElement("div",null,H&&[l["default"].createElement(x,u({ref:"list",key:0},O,{readOnly:w,disabled:b,id:W,"aria-live":"polite","aria-labelledby":(0,k.instanceId)(this),"aria-hidden":!y,ariaActiveDescendantKey:"list",data:Q,focused:U,onSelect:this._onSelect,onMove:this._scrollTo,messages:{emptyList:this._lengthWithoutValues?d.emptyFilter:d.emptyList}})),Y&&l["default"].createElement("ul",{key:1,role:"listbox",id:K,className:"rw-list rw-multiselect-create-tag"},l["default"].createElement("li",{onClick:this._onCreate.bind(null,r),role:"option",id:q,className:(0,p["default"])({"rw-list-option":!0,"rw-state-focus":J})},R(this.props,d)))])))},_data:function(){return this.state.processedData},_delete:function(e){this.focus(),this.change(this.state.dataItems.filter(function(t){return t!==e}))},_searchKeyDown:function(e){"Backspace"===e.key&&e.target.value&&!this._deletingText&&(this._deletingText=!0)},_searchgKeyUp:function(e){"Backspace"===e.key&&this._deletingText&&(this._deletingText=!1)},_typing:function(e){(0,k.notify)(this.props.onSearch,[e.target.value]),this.open()},handleInputInteraction:function(){this.open()},_onSelect:function(e){return void 0===e?void(this.props.onCreate&&this._onCreate(this.props.searchTerm)):((0,k.notify)(this.props.onSelect,e),this.change(this.state.dataItems.concat(e)),this.close(),void this.focus())},_onCreate:function(e){""!==e.trim()&&((0,k.notify)(this.props.onCreate,e),this.props.searchTerm&&(0,k.notify)(this.props.onSearch,[""]),this.close(),this.focus())},_keyDown:function(e){var t=e.key,n=e.altKey,r=e.ctrlKey,o=!this.props.searchTerm&&!this._deletingText,i=this.props.open,a=this.state,s=a.focusedTag,l=a.focusedItem,c=this.refs,p=c.list,f=c.tagList,d={focusedTag:null};if((0,k.notify)(this.props.onKeyDown,[e]),!e.defaultPrevented)if("ArrowDown"===t){var A=p.next(l),h=this._shouldShowCreate()&&l===A||null===l;A=h?null:A,e.preventDefault(),i?this.setState(u({focusedItem:A},d)):this.open()}else if("ArrowUp"===t){var v=null===l?p.last():p.prev(l);e.preventDefault(),n?this.close():i&&this.setState(u({focusedItem:v},d))}else"End"===t?(e.preventDefault(),i?this.setState(u({focusedItem:p.last()},d)):f&&this.setState({focusedTag:f.last()})):"Home"===t?(e.preventDefault(),i?this.setState(u({focusedItem:p.first()},d)):f&&this.setState({focusedTag:f.first()})):i&&"Enter"===t?(e.preventDefault(),r&&this.props.onCreate||null===l?this._onCreate(this.props.searchTerm):this._onSelect(this.state.focusedItem)):"Escape"===t?i?this.close():f&&this.setState(d):o&&"ArrowLeft"===t?f&&this.setState({focusedTag:f.prev(s)}):o&&"ArrowRight"===t?f&&this.setState({focusedTag:f.next(s)}):o&&"Delete"===t?f&&f.remove(s):o&&"Backspace"===t&&f&&f.removeNext()},change:function(e){(0,k.notify)(this.props.onChange,[e]),(0,k.notify)(this.props.onSearch,[""])},focus:function(){this.refs.input.focus()},open:function(){this.props.open||(0,k.notify)(this.props.onToggle,!0)},close:function(){(0,k.notify)(this.props.onToggle,!1)},toggle:function(){this.props.open?this.close():this.open()},process:function(e,t,n){var r=this.props.valueField,o=e.filter(function(e){return!t.some(function(t){return(0,M.valueMatcher)(e,t,r)})});return this._lengthWithoutValues=o.length,n&&(o=this.filter(o,n)),o},_shouldShowCreate:function(){var e=this.props,t=e.textField,n=e.searchTerm,r=e.onCreate;return r&&n?!this._data().some(function(e){return(0,M.dataText)(e,t)===n})&&!this.state.dataItems.some(function(e){return(0,M.dataText)(e,t)===n}):!1},_placeholder:function(){return(this.props.value||[]).length?"":this.props.placeholder||""}},o(a,"handleInputInteraction",[I.widgetEditable],Object.getOwnPropertyDescriptor(a,"handleInputInteraction"),a),o(a,"_onSelect",[I.widgetEditable],Object.getOwnPropertyDescriptor(a,"_onSelect"),a),o(a,"_onCreate",[I.widgetEditable],Object.getOwnPropertyDescriptor(a,"_onCreate"),a),o(a,"_keyDown",[I.widgetEditable],Object.getOwnPropertyDescriptor(a,"_keyDown"),a),o(a,"change",[I.widgetEditable],Object.getOwnPropertyDescriptor(a,"change"),a),a));t["default"]=(0,O["default"])(L,{open:"onToggle",value:"onChange",searchTerm:"onSearch"},["focus"]),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=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(7),a=r(i),u=n(54),s=r(u),l=n(43),c=r(l);t["default"]=a["default"].createClass({displayName:"MultiselectInput",propTypes:{value:a["default"].PropTypes.string,maxLength:a["default"].PropTypes.number,onChange:a["default"].PropTypes.func.isRequired,onFocus:a["default"].PropTypes.func,disabled:c["default"].disabled,readOnly:c["default"].readOnly},render:function(){var e=this.props.value,t=this.props.placeholder,n=Math.max((e||t).length,1)+1;return a["default"].createElement("input",o({},this.props,{className:"rw-input",autoComplete:"off","aria-disabled":this.props.disabled,"aria-readonly":this.props.readOnly,disabled:this.props.disabled,readOnly:this.props.readOnly,size:n}))},focus:function(){s["default"].findDOMNode(this).focus()}}),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=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(7),a=r(i),u=n(31),s=r(u),l=n(46),c=r(l),p=n(43),f=r(p),d=n(68),A=n(42),h=n(55),v=function(e,t){return e+"__option__"+t};t["default"]=a["default"].createClass({displayName:"MultiselectTagList",mixins:[n(278),n(76)()],propTypes:{value:a["default"].PropTypes.array,focused:a["default"].PropTypes.number,valueField:a["default"].PropTypes.string,textField:f["default"].accessor,valueComponent:a["default"].PropTypes.func,disabled:f["default"].disabled.acceptsArray,readOnly:f["default"].readOnly.acceptsArray},getDefaultProps:function(){return{ariaActiveDescendantKey:"taglist"}},componentDidUpdate:function(){var e=this.props.focused,t=v((0,d.instanceId)(this),e);this.ariaActiveDescendant(null==e||(0,h.isDisabledItem)(e,this.props)?null:t)},render:function(){var e=this,t=s["default"].omit(this.props,["value","disabled","readOnly"]),n=this.props,r=n.focused,i=n.value,u=n.textField,l=n.valueComponent,p=(0,d.instanceId)(this);return a["default"].createElement("ul",o({},t,{role:"listbox",tabIndex:"-1",className:"rw-multiselect-taglist"}),i.map(function(t,n){var o=(0,h.isDisabledItem)(t,e.props),i=(0,h.isReadOnlyItem)(t,e.props),s=!o&&r===n,f=v(p,n);return a["default"].createElement("li",{key:n,id:f,tabIndex:"-1",role:"option",className:(0,c["default"])({"rw-state-focus":s,"rw-state-disabled":o,"rw-state-readonly":i})},l?a["default"].createElement(l,{item:t}):(0,A.dataText)(t,u),a["default"].createElement("span",{tabIndex:"-1",onClick:o||i?void 0:e._delete.bind(null,t),"aria-disabled":o,"aria-label":"Unselect",disabled:o},a["default"].createElement("span",{className:"rw-tag-btn","aria-hidden":"true"},"×")))}))},_delete:function(e){this.props.onDelete(e)},remove:function(e){var t=this.props.value[e];!t||(0,h.isDisabledItem)(t,this.props)||(0,h.isReadOnlyItem)(t,this.props)||this.props.onDelete(t)},removeNext:function(){var e=this.props.value[this.props.value.length-1];!e||(0,h.isDisabledItem)(e,this.props)||(0,h.isReadOnlyItem)(e,this.props)||this.props.onDelete(e)},clear:function(){this.setState({focused:null})},first:function(){for(var e=0,t=this.props.value,n=t.length;n>e&&(0,h.isDisabledItem)(t[e],this.props);)e++;return e!==n?e:null},last:function(){for(var e=this.props.value,t=e.length-1;t>-1&&(0,h.isDisabledItem)(e[t],this.props);)t--;return t>=0?t:null},next:function(e){for(var t=e+1,n=this.props.value,r=n.length;r>t&&(0,h.isDisabledItem)(t,this.props);)t++;return null===e||t>=r?null:t},prev:function(e){var t=e,n=this.props.value;for(null!==t&&0!==t||(t=n.length),t--;t>-1&&(0,h.isDisabledItem)(n[t],this.props);)t--;return t>=0?t:null}}),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){var i={};return Object.keys(r).forEach(function(e){i[e]=r[e]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,t,i),i=null),i}function i(e){var t=e.data,n=e.value,r=e.valueField;return n=f["default"].splat(n),n.length?F(t,function(e){return-1!==(0,I.dataIndexOf)(n,e,r)})||null:null}function a(e){return c["default"].createClass({displayName:"SelectItem",render:function(){function t(){e._clicking=!0}function n(e){i||a||h(e.target.checked)}var r=this.props,o=r.children,i=r.disabled,a=r.readonly,u=r.dataItem,l=e.props,p=l.multiple,f=l.name,d=void 0===f?(0,R.instanceId)(e,"_name"):f,A=(0,k.contains)(u,e._values(),e.props.valueField),h=e._change.bind(null,u),v=p?"checkbox":"radio";return c["default"].createElement(S["default"],s({},this.props,{role:v,"aria-checked":!!A}),c["default"].createElement("label",{onMouseDown:t},c["default"].createElement("input",{name:d,tabIndex:"-1",role:"presentation",type:v,onChange:n,checked:A,disabled:i||a}),o))}})}t.__esModule=!0;var u,s=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(7),c=r(l),p=n(31),f=r(p),d=n(46),A=r(d),h=n(198),v=r(h),m=n(54),y=r(m),g=n(43),b=r(g),w=n(169),_=r(w),E=n(170),x=r(E),C=n(171),S=r(C),P=n(176),T=r(P),O=n(231),M=r(O),I=n(42),k=n(55),R=n(68),N=f["default"].omit,D=f["default"].pick,F=f["default"].find,j={data:c["default"].PropTypes.array,value:c["default"].PropTypes.oneOfType([c["default"].PropTypes.any,c["default"].PropTypes.array]),onChange:c["default"].PropTypes.func,onMove:c["default"].PropTypes.func,multiple:c["default"].PropTypes.bool,itemComponent:b["default"].elementType,listComponent:b["default"].elementType,valueField:c["default"].PropTypes.string,textField:b["default"].accessor,busy:c["default"].PropTypes.bool,filter:c["default"].PropTypes.string,delay:c["default"].PropTypes.number,disabled:b["default"].disabled.acceptsArray,readOnly:b["default"].readOnly.acceptsArray,messages:c["default"].PropTypes.shape({emptyList:c["default"].PropTypes.string})},L=c["default"].createClass((u={displayName:"SelectList",propTypes:j,mixins:[n(174),n(173),n(76)(),n(172)({didHandle:function(e){e!==this.state.focused&&(e?e&&!this._clicking&&this.setState({focusedItem:i(this.props)}):this.setState({focusedItem:null}),this._clicking=!1)}})],getDefaultProps:function(){return{delay:250,value:[],data:[],ariaActiveDescendantKey:"selectlist",messages:{emptyList:"There are no items in this list"}}},getDefaultState:function(e){var t=e.data,n=e.value,r=e.valueField,o=e.multiple;return{dataItems:o&&f["default"].splat(n).map(function(e){return(0,I.dataItem)(t,e,r)})}},getInitialState:function(){var e=this.getDefaultState(this.props);return e.ListItem=a(this),e},componentWillReceiveProps:function(e){return this.setState(this.getDefaultState(e))},componentDidMount:function(){(0,T["default"])(this.refs.list)},render:function(){var e=this.props,t=e.className,n=e.tabIndex,r=e.busy,o=e.groupBy,i=e.listComponent;i=i||o&&x["default"]||_["default"];var a=N(this.props,Object.keys(j)),u=D(this.props,Object.keys(i.propTypes)),l=this.state,p=l.ListItem,f=l.focusedItem,d=l.focused,h=this._data(),v=(0,R.instanceId)(this,"_listbox");return f=d&&!(0,k.isDisabled)(this.props)&&!(0,k.isReadOnly)(this.props)&&f,c["default"].createElement("div",s({},a,{onKeyDown:this._keyDown,onKeyPress:this._keyPress,onBlur:this.handleBlur,onFocus:this.handleFocus,role:"radiogroup","aria-busy":!!r,"aria-disabled":(0,k.isDisabled)(this.props),"aria-readonly":(0,k.isReadOnly)(this.props),tabIndex:"-1",className:(0,A["default"])(t,"rw-widget","rw-selectlist",{"rw-state-focus":d,"rw-state-disabled":(0,k.isDisabled)(this.props),"rw-state-readonly":(0,k.isReadOnly)(this.props),"rw-rtl":this.isRtl(),"rw-loading-mask":r})}),c["default"].createElement(i,s({},u,{ref:"list",id:v,role:"radiogroup",tabIndex:n||"0",data:h,focused:f,optionComponent:p,itemComponent:this.props.itemComponent,onMove:this._scrollTo})))},_scrollTo:function(e,t){var n=this.props.onMove;n?n(e,t):(this._scrollCancel&&this._scrollCancel(),this._scrollCancel=(0,M["default"])(e))},_keyDown:function(e){var t=this,n=e.key,r=this.props,o=r.valueField,i=r.multiple,a=this.refs.list,u=this.state.focusedItem,s=function(e){e&&t._change(e,i?!(0,k.contains)(e,t._values(),o):!0)};(0,R.notify)(this.props.onKeyDown,[e]),e.defaultPrevented||("End"===n?(e.preventDefault(),u=a.last(),this.setState({focusedItem:u}),i||s(u)):"Home"===n?(e.preventDefault(),u=a.first(),this.setState({focusedItem:u}),i||s(u)):"Enter"===n||" "===n?(e.preventDefault(),s(u)):"ArrowDown"===n||"ArrowRight"===n?(e.preventDefault(),u=a.next(u),this.setState({focusedItem:u}),i||s(u)):"ArrowUp"===n||"ArrowLeft"===n?(e.preventDefault(),u=a.prev(u),this.setState({focusedItem:u}),i||s(u)):i&&65===e.keyCode&&e.ctrlKey&&(e.preventDefault(),this.selectAll()))},_keyPress:function(e){(0,R.notify)(this.props.onKeyPress,[e]),e.defaultPrevented||this.search(String.fromCharCode(e.which))},focus:function(){y["default"].findDOMNode(this.refs.list).focus()},selectAll:function(){var e,t=this,n=this.props,r=n.disabled,o=n.readOnly,i=n.valueField,a=this.state.dataItems,u=this._data();r=r||o,r=Array.isArray(r)?r:[],e=r.filter(function(e){return!(0,k.contains)(e,a,i)}),u=u.filter(function(t){return!(0,k.contains)(t,e,i)}),u.length===a.length&&(u=r.filter(function(e){return(0,k.contains)(e,a,i)}),u=u.map(function(e){return(0,I.dataItem)(t._data(),e,i)})),(0,R.notify)(this.props.onChange,[u])},_change:function(e,t){var n=this.props.multiple,r=this.state.dataItems;return n=!!n,this.clearTimeout("focusedItem"),this.setState({focusedItem:e}),n?(r=t?r.concat(e):r.filter(function(t){return t!==e}),void(0,R.notify)(this.props.onChange,[r||[]])):(0,R.notify)(this.props.onChange,t?e:null)},search:function(e){var t=this,n=((this._searchTerm||"")+e).toLowerCase(),r=this.refs.list,o=this.props.multiple;e&&(this._searchTerm=n,this.setTimeout("search",function(){var e=r.next(t.state.focusedItem,n);t._searchTerm="",e&&(o?t.setState({focusedItem:e}):t._change(e,!0))},this.props.delay))},_data:function(){return this.props.data},_values:function(){return this.props.multiple?this.state.dataItems:this.props.value}},o(u,"_keyDown",[k.widgetEditable],Object.getOwnPropertyDescriptor(u,"_keyDown"),u),o(u,"_keyPress",[k.widgetEditable],Object.getOwnPropertyDescriptor(u,"_keyPress"),u),u));t["default"]=(0,v["default"])(L,{value:"onChange"},["selectAll","focus"]),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(634),i=r(o);t["default"]={animate:i["default"]},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){function i(t){t.target===t.currentTarget&&(u=!0,(0,f["default"])(t.target,A["default"].end,i),(0,s["default"])(e,v),o&&o.call(this))}var u,l=[],p={target:e,currentTarget:e},d={},y="";"function"==typeof r&&(o=r,r=null),A["default"].end||(n=0),void 0===n&&(n=200);for(var g in t)h.call(t,g)&&(/(top|bottom)/.test(g)?y+=m[g]+"("+t[g]+") ":(d[g]=t[g],l.push((0,a["default"])(g))));return y&&(d[A["default"].transform]=y,l.push(A["default"].transform)),n>0&&(d[A["default"].property]=l.join(", "),d[A["default"].duration]=n/1e3+"s",d[A["default"].delay]="0s",d[A["default"].timing]=r||"linear",(0,c["default"])(e,A["default"].end,i),setTimeout(function(){u||i(p)},n+500)),e.clientLeft,(0,s["default"])(e,d),0>=n&&setTimeout(i.bind(null,p),0),{cancel:function(){u||(u=!0,(0,f["default"])(e,A["default"].end,i),(0,s["default"])(e,v))}}}t.__esModule=!0,t["default"]=o;var i=n(230),a=r(i),u=n(152),s=r(u),l=n(509),c=r(l),p=n(508),f=r(p),d=n(514),A=r(d),h=Object.prototype.hasOwnProperty,v={},m={left:"translateX",right:"translateX",top:"translateY",bottom:"translateY"};v[A["default"].property]=v[A["default"].duration]=v[A["default"].delay]=v[A["default"].timing]="",o.endEvent=A["default"].end,o.transform=A["default"].transform,o.TRANSLATION_MAP=m,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){var i="function"==typeof r?r(n,o,e):t.call(e,n,r,o);return(0,c["default"])(null==i||"string"==typeof i,"`localizer format(..)` must return a string, null, or undefined"),i}function i(e,t){}function a(e){var t=e.format,n=e.parse,r=e.decimalChar,a=void 0===r?function(){return"."}:r,u=e.precision,s=void 0===u?function(){return null}:u,l=e.formats,p=e.propType;(0,c["default"])("function"==typeof t,"number localizer `format(..)` must be a function"),(0,c["default"])("function"==typeof n,"number localizer `parse(..)` must be a function"),i(A,l),l.editFormat=l.editFormat||function(e){return parseFloat(e)},v={formats:l,precision:s,decimalChar:a,propType:p||d,format:function(e,n,r){return o(this,t,e,n,r)},parse:function(e,t,r){var o=n.call(this,e,t,r);return(0,c["default"])(null==o||"number"==typeof o,"number localizer `parse(..)` must return a number, null, or undefined"),o}}}function u(e){(0,c["default"])("function"==typeof e.format,"date localizer `format(..)` must be a function"),(0,c["default"])("function"==typeof e.parse,"date localizer `parse(..)` must be a function"),(0,c["default"])("function"==typeof e.firstOfWeek,"date localizer `firstOfWeek(..)` must be a function"),i(h,e.formats),m={formats:e.formats,propType:e.propType||d,startOfWeek:e.firstOfWeek,format:function(t,n,r){return o(this,e.format,t,n,r)},parse:function(t,n){var r=e.parse.call(this,t,n);return(0,c["default"])(null==r||r instanceof Date&&!isNaN(r.getTime()),"date localizer `parse(..)` must return a valid Date, null, or undefined"),r}}}function s(){var e={};return e}t.__esModule=!0,t.date=t.number=t.setNumber=void 0,t.setDate=u;var l=n(52),c=r(l),p=(n(31),n(7)),f=r(p),d=f["default"].PropTypes.oneOfType([f["default"].PropTypes.string,f["default"].PropTypes.func]),A=["default"],h=["default","date","time","header","footer","dayOfMonth","month","year","decade","century"],v=s("NumberPicker");t.setNumber=a;var m=s("DateTimePicker"),y=t.number={propType:function(){var e;return(e=v).propType.apply(e,arguments)},getFormat:function(e,t){return t||v.formats[e]},parse:function(){var e;return(e=v).parse.apply(e,arguments)},format:function(){var e;return(e=v).format.apply(e,arguments)},decimalChar:function(){var e;return(e=v).decimalChar.apply(e,arguments)},precision:function(){var e;return(e=v).precision.apply(e,arguments)}},g=t.date={propType:function(){var e;return(e=m).propType.apply(e,arguments)},getFormat:function(e,t){return t||m.formats[e]},parse:function(){var e;return(e=m).parse.apply(e,arguments)},format:function(){var e;return(e=m).format.apply(e,arguments)},startOfWeek:function(){var e;return(e=m).startOfWeek.apply(e,arguments); }};t["default"]={number:y,date:g}},function(e,t,n){"use strict";var r=n(13),o=n(233),i={focusDOMComponent:function(){o(r.getNodeFromInstance(this))}};e.exports=i},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 T.topCompositionStart:return O.compositionStart;case T.topCompositionEnd:return O.compositionEnd;case T.topCompositionUpdate:return O.compositionUpdate}}function a(e,t){return e===T.topKeyDown&&t.keyCode===w}function u(e,t){switch(e){case T.topKeyUp:return-1!==b.indexOf(t.keyCode);case T.topKeyDown:return t.keyCode!==w;case T.topKeyPress:case T.topMouseDown:case T.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){var o,l;if(_?o=i(e):I?u(e,n)&&(o=O.compositionEnd):a(e,n)&&(o=O.compositionStart),!o)return null;C&&(I||o!==O.compositionStart?o===O.compositionEnd&&I&&(l=I.getData()):I=v.getPooled(r));var c=m.getPooled(o,t,n,r);if(l)c.data=l;else{var p=s(n);null!==p&&(c.data=p)}return A.accumulateTwoPhaseDispatches(c),c}function c(e,t){switch(e){case T.topCompositionEnd:return s(t);case T.topKeyPress:var n=t.which;return n!==S?null:(M=!0,P);case T.topTextInput:var r=t.data;return r===P&&M?null:r;default:return null}}function p(e,t){if(I){if(e===T.topCompositionEnd||u(e,t)){var n=I.getData();return v.release(I),I=null,n}return null}switch(e){case T.topPaste:return null;case T.topKeyPress:return t.which&&!o(t)?String.fromCharCode(t.which):null;case T.topCompositionEnd:return C?null:t.data;default:return null}}function f(e,t,n,r){var o;if(o=x?c(e,n):p(e,n),!o)return null;var i=y.getPooled(O.beforeInput,t,n,r);return i.data=o,A.accumulateTwoPhaseDispatches(i),i}var d=n(44),A=n(87),h=n(16),v=n(643),m=n(682),y=n(685),g=n(51),b=[9,13,27,32],w=229,_=h.canUseDOM&&"CompositionEvent"in window,E=null;h.canUseDOM&&"documentMode"in document&&(E=document.documentMode);var x=h.canUseDOM&&"TextEvent"in window&&!E&&!r(),C=h.canUseDOM&&(!_||E&&E>8&&11>=E),S=32,P=String.fromCharCode(S),T=d.topLevelTypes,O={beforeInput:{phasedRegistrationNames:{bubbled:g({onBeforeInput:null}),captured:g({onBeforeInputCapture:null})},dependencies:[T.topCompositionEnd,T.topKeyPress,T.topTextInput,T.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:g({onCompositionEnd:null}),captured:g({onCompositionEndCapture:null})},dependencies:[T.topBlur,T.topCompositionEnd,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:g({onCompositionStart:null}),captured:g({onCompositionStartCapture:null})},dependencies:[T.topBlur,T.topCompositionStart,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:g({onCompositionUpdate:null}),captured:g({onCompositionUpdateCapture:null})},dependencies:[T.topBlur,T.topCompositionUpdate,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]}},M=!1,I=null,k={eventTypes:O,extractEvents:function(e,t,n,r){return[l(e,t,n,r),f(e,t,n,r)]}};e.exports=k},function(e,t,n){"use strict";var r=n(279),o=n(16),i=(n(26),n(520),n(691)),a=n(526),u=n(530),s=(n(4),u(function(e){return a(e)})),l=!1,c="cssFloat";if(o.canUseDOM){var p=document.createElement("div").style;try{p.font=""}catch(f){l=!0}void 0===document.documentElement.style.cssFloat&&(c="styleFloat")}var d={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];null!=o&&(n+=s(r)+":",n+=i(r,o,t)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var a in t)if(t.hasOwnProperty(a)){var u=i(a,t[a],n);if("float"!==a&&"cssFloat"!==a||(a=c),u)o[a]=u;else{var s=l&&r.shorthandPropertyExpansions[a];if(s)for(var p in s)o[p]="";else o[a]=""}}}};e.exports=d},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(M.change,k,e,C(e));b.accumulateTwoPhaseDispatches(t),E.batchedUpdates(i,t)}function i(e){g.enqueueEvents(e),g.processEventQueue(!1)}function a(e,t){I=e,k=t,I.attachEvent("onchange",o)}function u(){I&&(I.detachEvent("onchange",o),I=null,k=null)}function s(e,t){return e===O.topChange?t:void 0}function l(e,t,n){e===O.topFocus?(u(),a(t,n)):e===O.topBlur&&u()}function c(e,t){I=e,k=t,R=e.value,N=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(I,"value",j),I.attachEvent?I.attachEvent("onpropertychange",f):I.addEventListener("propertychange",f,!1)}function p(){I&&(delete I.value,I.detachEvent?I.detachEvent("onpropertychange",f):I.removeEventListener("propertychange",f,!1),I=null,k=null,R=null,N=null)}function f(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==R&&(R=t,o(e))}}function d(e,t){return e===O.topInput?t:void 0}function A(e,t,n){e===O.topFocus?(p(),c(t,n)):e===O.topBlur&&p()}function h(e,t){return e!==O.topSelectionChange&&e!==O.topKeyUp&&e!==O.topKeyDown||!I||I.value===R?void 0:(R=I.value,k)}function v(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function m(e,t){return e===O.topClick?t:void 0}var y=n(44),g=n(86),b=n(87),w=n(16),_=n(13),E=n(38),x=n(45),C=n(189),S=n(191),P=n(306),T=n(51),O=y.topLevelTypes,M={change:{phasedRegistrationNames:{bubbled:T({onChange:null}),captured:T({onChangeCapture:null})},dependencies:[O.topBlur,O.topChange,O.topClick,O.topFocus,O.topInput,O.topKeyDown,O.topKeyUp,O.topSelectionChange]}},I=null,k=null,R=null,N=null,D=!1;w.canUseDOM&&(D=S("change")&&(!("documentMode"in document)||document.documentMode>8));var F=!1;w.canUseDOM&&(F=S("input")&&(!("documentMode"in document)||document.documentMode>11));var j={get:function(){return N.get.call(this)},set:function(e){R=""+e,N.set.call(this,e)}},L={eventTypes:M,extractEvents:function(e,t,n,o){var i,a,u=t?_.getNodeFromInstance(t):window;if(r(u)?D?i=s:a=l:P(u)?F?i=d:(i=h,a=A):v(u)&&(i=m),i){var c=i(e,t);if(c){var p=x.getPooled(M.change,c,n,o);return p.type="change",b.accumulateTwoPhaseDispatches(p),p}}a&&a(e,u,t)}};e.exports=L},function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var o=n(77),i=n(16),a=n(523),u=n(30),s=n(235),l=n(2),c=/^(<[^ \/>]+)/,p="data-danger-index",f={dangerouslyRenderMarkup:function(e){i.canUseDOM?void 0:l(!1);for(var t,n={},o=0;o<e.length;o++)e[o]?void 0:l(!1),t=r(e[o]),t=s(t)?t:"*",n[t]=n[t]||[],n[t][o]=e[o];var f=[],d=0;for(t in n)if(n.hasOwnProperty(t)){var A,h=n[t];for(A in h)if(h.hasOwnProperty(A)){var v=h[A];h[A]=v.replace(c,"$1 "+p+'="'+A+'" ')}for(var m=a(h.join(""),u),y=0;y<m.length;++y){var g=m[y];g.hasAttribute&&g.hasAttribute(p)&&(A=+g.getAttribute(p),g.removeAttribute(p),f.hasOwnProperty(A)?l(!1):void 0,f[A]=g,d+=1)}}return d!==f.length?l(!1):void 0,f.length!==e.length?l(!1):void 0,f},dangerouslyReplaceNodeWithMarkup:function(e,t){if(i.canUseDOM?void 0:l(!1),t?void 0:l(!1),"HTML"===e.nodeName?l(!1):void 0,"string"==typeof t){var n=a(t,u)[0];e.parentNode.replaceChild(n,e)}else o.replaceChildWithTree(e,t)}};e.exports=f},function(e,t,n){"use strict";var r=n(51),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null})];e.exports=o},function(e,t,n){"use strict";var r=n(44),o=n(87),i=n(13),a=n(122),u=n(51),s=r.topLevelTypes,l={mouseEnter:{registrationName:u({onMouseEnter:null}),dependencies:[s.topMouseOut,s.topMouseOver]},mouseLeave:{registrationName:u({onMouseLeave:null}),dependencies:[s.topMouseOut,s.topMouseOver]}},c={eventTypes:l,extractEvents:function(e,t,n,r){if(e===s.topMouseOver&&(n.relatedTarget||n.fromElement))return null;if(e!==s.topMouseOut&&e!==s.topMouseOver)return null;var u;if(r.window===r)u=r;else{var c=r.ownerDocument;u=c?c.defaultView||c.parentWindow:window}var p,f;if(e===s.topMouseOut){p=t;var d=n.relatedTarget||n.toElement;f=d?i.getClosestInstanceFromNode(d):null}else p=null,f=t;if(p===f)return null;var A=null==p?u:i.getNodeFromInstance(p),h=null==f?u:i.getNodeFromInstance(f),v=a.getPooled(l.mouseLeave,p,n,r);v.type="mouseleave",v.target=A,v.relatedTarget=h;var m=a.getPooled(l.mouseEnter,f,n,r);return m.type="mouseenter",m.target=h,m.relatedTarget=A,o.accumulateEnterLeaveDispatches(v,m,p,f),[v,m]}};e.exports=c},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=n(10),i=n(56),a=n(304);o(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[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 u=t>1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r=n(69),o=r.injection.MUST_USE_PROPERTY,i=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_SIDE_EFFECTS,u=r.injection.HAS_NUMERIC_VALUE,s=r.injection.HAS_POSITIVE_NUMERIC_VALUE,l=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,c={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|i,cite:0,classID:0,className:0,cols:s,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,coords:0,crossOrigin:0,data:0,dateTime:0,"default":i,defer:i,dir:0,disabled:i,download:l,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|i,muted:o|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,poster:0,preload:0,profile:0,radioGroup:0,readOnly:i,rel:0,required:i,reversed:i,role:0,rows:s,rowSpan:u,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:o|i,shape:0,size:s,sizes:0,span:s,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:u,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:o|a,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,"typeof":0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:i,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};e.exports=c},function(e,t,n){"use strict";var r=n(10),o=n(282),i=n(284),a=n(283),u=n(654),s=n(32),l=(n(288),n(297)),c=n(299),p=n(697),f=(n(4),s.createElement),d=s.createFactory,A=s.cloneElement,h=r,v={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:p},Component:i,createElement:f,cloneElement:A,isValidElement:s.isValidElement,PropTypes:l,createClass:a.createClass,createFactory:d,createMixin:function(e){return e},DOM:u,version:c,__spread:h};e.exports=v},function(e,t,n){"use strict";function r(e,t,n){var r=void 0===e[n];null!=t&&r&&(e[n]=i(t))}var o=n(78),i=n(305),a=(n(180),n(193)),u=n(194),s=(n(4),{instantiateChildren:function(e,t,n){if(null==e)return null;var o={};return u(e,r,o),o},updateChildren:function(e,t,n,r,u){if(t||e){var s,l;for(s in t)if(t.hasOwnProperty(s)){l=e&&e[s];var c=l&&l._currentElement,p=t[s];if(null!=l&&a(c,p))o.receiveComponent(l,p,r,u),t[s]=l;else{l&&(n[s]=o.getNativeNode(l),o.unmountComponent(l,!1));var f=i(p);t[s]=f}}for(s in e)!e.hasOwnProperty(s)||t&&t.hasOwnProperty(s)||(l=e[s],n[s]=o.getNativeNode(l),o.unmountComponent(l,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];o.unmountComponent(r,t)}}});e.exports=s},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){}function i(e,t){}function a(e){return e.prototype&&e.prototype.isReactComponent}var u=n(10),s=n(182),l=n(57),c=n(32),p=n(183),f=n(184),d=(n(26),n(295)),A=n(121),h=(n(120),n(78)),v=n(298),m=n(103),y=n(2),g=n(193);n(4);o.prototype.render=function(){var e=f.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);return i(e,t),t};var b=1,w={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._nativeParent=null,this._nativeContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(e,t,n,r){this._context=r,this._mountOrder=b++,this._nativeParent=t,this._nativeContainerInfo=n;var u,s=this._processProps(this._currentElement.props),l=this._processContext(r),p=this._currentElement.type,d=this._constructComponent(s,l);a(p)||null!=d&&null!=d.render||(u=d,i(p,u),null===d||d===!1||c.isValidElement(d)?void 0:y(!1),d=new o(p));d.props=s,d.context=l,d.refs=m,d.updater=v,this._instance=d,f.set(d,this);var A=d.state;void 0===A&&(d.state=A=null),"object"!=typeof A||Array.isArray(A)?y(!1):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var h;return h=d.unstable_handleError?this.performInitialMountWithErrorHandling(u,t,n,e,r):this.performInitialMount(u,t,n,e,r),d.componentDidMount&&e.getReactMountReady().enqueue(d.componentDidMount,d),h},_constructComponent:function(e,t){return this._constructComponentWithoutOwner(e,t)},_constructComponentWithoutOwner:function(e,t){var n,r=this._currentElement.type;return n=a(r)?new r(e,t,v):r(e,t,v)},performInitialMountWithErrorHandling:function(e,t,n,r,o){var i,a=r.checkpoint();try{i=this.performInitialMount(e,t,n,r,o)}catch(u){r.rollback(a),this._instance.unstable_handleError(u),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),a=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(a),i=this.performInitialMount(e,t,n,r,o)}return i},performInitialMount:function(e,t,n,r,o){var i=this._instance;i.componentWillMount&&(i.componentWillMount(),this._pendingStateQueue&&(i.state=this._processPendingState(i.props,i.context))),void 0===e&&(e=this._renderValidatedComponent()),this._renderedNodeType=d.getType(e),this._renderedComponent=this._instantiateReactComponent(e);var a=h.mountComponent(this._renderedComponent,r,t,n,this._processChildContext(o));return a},getNativeNode:function(){return h.getNativeNode(this._renderedComponent)},unmountComponent:function(e){if(this._renderedComponent){var t=this._instance;if(t.componentWillUnmount&&!t._calledComponentWillUnmount)if(t._calledComponentWillUnmount=!0,e){var n=this.getName()+".componentWillUnmount()";p.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(h.unmountComponent(this._renderedComponent,e),this._renderedNodeType=null,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,f.remove(t)}},_maskContext:function(e){var t=this._currentElement.type,n=t.contextTypes;if(!n)return m;var r={};for(var o in n)r[o]=e[o];return r},_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?y(!1):void 0;for(var o in r)o in t.childContextTypes?void 0:y(!1);return u({},e,r)}return 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{"function"!=typeof e[i]?y(!1):void 0,a=e[i](t,i,o,n)}catch(u){a=u}if(a instanceof Error){r(this);n===A.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?h.receiveComponent(this,this._pendingElement,e,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(e,t,n,r,o){var i,a,u=this._instance,s=!1;this._context===o?i=u.context:(i=this._processContext(o),s=!0),t===n?a=n.props:(a=this._processProps(n.props),s=!0),s&&u.componentWillReceiveProps&&u.componentWillReceiveProps(a,i);var l=this._processPendingState(a,i),c=!0;!this._pendingForceUpdate&&u.shouldComponentUpdate&&(c=u.shouldComponentUpdate(a,l,i)),this._updateBatchNumber=null,c?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,a,l,i,e,o)):(this._currentElement=n,this._context=o,u.props=a,u.state=l,u.context=i)},_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=u({},o?r[0]:n.state),a=o?1:0;a<r.length;a++){var s=r[a];u(i,"function"==typeof s?s.call(n,i,e,t):s)}return i},_performComponentUpdate:function(e,t,n,r,o,i){var a,u,s,l=this._instance,c=Boolean(l.componentDidUpdate);c&&(a=l.props,u=l.state,s=l.context),l.componentWillUpdate&&l.componentWillUpdate(t,n,r),this._currentElement=e,this._context=i,l.props=t,l.state=n,l.context=r,this._updateRenderedComponent(o,i),c&&o.getReactMountReady().enqueue(l.componentDidUpdate.bind(l,a,u,s),l)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent();if(g(r,o))h.receiveComponent(n,o,e,this._processChildContext(t));else{var i=h.getNativeNode(n);h.unmountComponent(n,!1),this._renderedNodeType=d.getType(o),this._renderedComponent=this._instantiateReactComponent(o);var a=h.mountComponent(this._renderedComponent,e,this._nativeParent,this._nativeContainerInfo,this._processChildContext(t));this._replaceNodeWithMarkup(i,a,n)}},_replaceNodeWithMarkup:function(e,t,n){s.replaceNodeWithMarkup(e,t,n)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return t},_renderValidatedComponent:function(){var e;l.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{l.current=null}return null===e||e===!1||c.isValidElement(e)?void 0:y(!1),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n?y(!1):void 0;var r=t.getPublicInstance(),o=n.refs===m?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},_={Mixin:w};e.exports=_},function(e,t,n){"use strict";var r=n(13),o=n(667),i=n(292),a=n(78),u=n(38),s=n(299),l=n(692),c=n(303),p=n(699);n(4);o.inject();var f={findDOMNode:l,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:s,unstable_batchedUpdates:u.batchedUpdates,unstable_renderSubtreeIntoContainer:p};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=c(e)),e?r.getNodeFromInstance(e):null}},Mount:i,Reconciler:a});e.exports=f},function(e,t,n){"use strict";var r=n(117),o={getNativeProps:r.getNativeProps};e.exports=o},function(e,t,n){"use strict";function r(e,t){t&&(Y[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?N(!1):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?N(!1):void 0,"object"==typeof t.dangerouslySetInnerHTML&&z in t.dangerouslySetInnerHTML?void 0:N(!1)),null!=t.style&&"object"!=typeof t.style?N(!1):void 0)}function o(e,t,n,r){if(!(r instanceof k)){var o=e._nativeContainerInfo,a=o._node&&o._node.nodeType===K,u=a?o._node:o._ownerDocument;U(t,u),r.getReactMountReady().enqueue(i,{inst:e,registrationName:t,listener:n})}}function i(){var e=this;b.putListener(e.inst,e.registrationName,e.listener)}function a(){var e=this;T.postMountWrapper(e)}function u(){var e=this;e._rootNodeID?void 0:N(!1);var t=L(e);switch(t?void 0:N(!1),e._tag){case"iframe":case"object":e._wrapperState.listeners=[_.trapBubbledEvent(g.topLevelTypes.topLoad,"load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in q)q.hasOwnProperty(n)&&e._wrapperState.listeners.push(_.trapBubbledEvent(g.topLevelTypes[n],q[n],t));break;case"img":e._wrapperState.listeners=[_.trapBubbledEvent(g.topLevelTypes.topError,"error",t),_.trapBubbledEvent(g.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[_.trapBubbledEvent(g.topLevelTypes.topReset,"reset",t),_.trapBubbledEvent(g.topLevelTypes.topSubmit,"submit",t)];break;case"input":case"select":case"textarea":e._wrapperState.listeners=[_.trapBubbledEvent(g.topLevelTypes.topInvalid,"invalid",t)]}}function s(){O.postUpdateWrapper(this)}function l(e){X.call(Z,e)||(J.test(e)?void 0:N(!1),Z[e]=!0)}function c(e,t){return e.indexOf("-")>=0||null!=t.is}function p(e){var t=e.type;l(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._nativeNode=null,this._nativeParent=null,this._rootNodeID=null,this._domID=null,this._nativeContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var f=n(10),d=n(636),A=n(638),h=n(77),v=n(281),m=n(69),y=n(178),g=n(44),b=n(86),w=n(118),_=n(119),E=n(285),x=n(649),C=n(286),S=n(13),P=n(657),T=n(659),O=n(287),M=n(662),I=(n(26),n(672)),k=n(676),R=(n(30),n(124)),N=n(2),D=(n(191),n(51)),F=(n(154),n(195),n(4),C),j=b.deleteListener,L=S.getNodeFromInstance,U=_.listenTo,B=w.registrationNameModules,V={string:!0,number:!0},Q=D({style:null}),z=D({__html:null}),W={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},K=11,q={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},H={listing:!0,pre:!0,textarea:!0},Y=f({menuitem:!0},G),J=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Z={},X={}.hasOwnProperty,$=1;p.displayName="ReactDOMComponent",p.Mixin={mountComponent:function(e,t,n,o){this._rootNodeID=$++,this._domID=n._idCounter++,this._nativeParent=t,this._nativeContainerInfo=n;var i=this._currentElement.props;switch(this._tag){case"iframe":case"object":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(u,this);break;case"button":i=x.getNativeProps(this,i,t);break;case"input":P.mountWrapper(this,i,t),i=P.getNativeProps(this,i),e.getReactMountReady().enqueue(u,this);break;case"option":T.mountWrapper(this,i,t),i=T.getNativeProps(this,i);break;case"select":O.mountWrapper(this,i,t),i=O.getNativeProps(this,i),e.getReactMountReady().enqueue(u,this);break;case"textarea":M.mountWrapper(this,i,t),i=M.getNativeProps(this,i),e.getReactMountReady().enqueue(u,this)}r(this,i);var s,l;null!=t?(s=t._namespaceURI,l=t._tag):n._tag&&(s=n._namespaceURI,l=n._tag),(null==s||s===v.svg&&"foreignobject"===l)&&(s=v.html),s===v.html&&("svg"===this._tag?s=v.svg:"math"===this._tag&&(s=v.mathml)),this._namespaceURI=s;var c;if(e.useCreateElement){var p,f=n._ownerDocument;if(s===v.html)if("script"===this._tag){var A=f.createElement("div"),m=this._currentElement.type;A.innerHTML="<"+m+"></"+m+">",p=A.removeChild(A.firstChild)}else p=f.createElement(this._currentElement.type,i.is||null);else p=f.createElementNS(s,this._currentElement.type);S.precacheNode(this,p),this._flags|=F.hasCachedChildNodes,this._nativeParent||y.setAttributeForRoot(p),this._updateDOMProperties(null,i,e);var g=h(p);this._createInitialChildren(e,i,o,g),c=g}else{var b=this._createOpenTagMarkupAndPutListeners(e,i),w=this._createContentMarkup(e,i,o);c=!w&&G[this._tag]?b+"/>":b+">"+w+"</"+this._currentElement.type+">"}switch(this._tag){case"button":case"input":case"select":case"textarea":i.autoFocus&&e.getReactMountReady().enqueue(d.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(a,this)}return c},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(B.hasOwnProperty(r))i&&o(this,r,i,e);else{r===Q&&(i&&(i=this._previousStyleCopy=f({},t.style)),i=A.createMarkupForStyles(i,this));var a=null;null!=this._tag&&c(this._tag,t)?W.hasOwnProperty(r)||(a=y.createMarkupForCustomAttribute(r,i)):a=y.createMarkupForProperty(r,i),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._nativeParent||(n+=" "+y.createMarkupForRoot()),n+=" "+y.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=V[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)r=R(i);else if(null!=a){var u=this.mountChildren(a,e,n);r=u.join("")}}return H[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&&h.queueHTML(r,o.__html);else{var i=V[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)h.queueText(r,i);else if(null!=a)for(var u=this.mountChildren(a,e,n),s=0;s<u.length;s++)h.queueChild(r,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,o){var i=t.props,a=this._currentElement.props;switch(this._tag){case"button":i=x.getNativeProps(this,i),a=x.getNativeProps(this,a);break;case"input":P.updateWrapper(this),i=P.getNativeProps(this,i),a=P.getNativeProps(this,a);break;case"option":i=T.getNativeProps(this,i),a=T.getNativeProps(this,a);break;case"select":i=O.getNativeProps(this,i),a=O.getNativeProps(this,a);break;case"textarea":M.updateWrapper(this),i=M.getNativeProps(this,i),a=M.getNativeProps(this,a)}r(this,a),this._updateDOMProperties(i,a,e),this._updateDOMChildren(i,a,e,o),"select"===this._tag&&e.getReactMountReady().enqueue(s,this)},_updateDOMProperties:function(e,t,n){var r,i,a;for(r in e)if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&null!=e[r])if(r===Q){var u=this._previousStyleCopy;for(i in u)u.hasOwnProperty(i)&&(a=a||{},a[i]="");this._previousStyleCopy=null}else B.hasOwnProperty(r)?e[r]&&j(this,r):(m.properties[r]||m.isCustomAttribute(r))&&y.deleteValueForProperty(L(this),r);for(r in t){var s=t[r],l=r===Q?this._previousStyleCopy:null!=e?e[r]:void 0;if(t.hasOwnProperty(r)&&s!==l&&(null!=s||null!=l))if(r===Q)if(s?s=this._previousStyleCopy=f({},s):this._previousStyleCopy=null,l){for(i in l)!l.hasOwnProperty(i)||s&&s.hasOwnProperty(i)||(a=a||{},a[i]="");for(i in s)s.hasOwnProperty(i)&&l[i]!==s[i]&&(a=a||{},a[i]=s[i])}else a=s;else if(B.hasOwnProperty(r))s?o(this,r,s,n):l&&j(this,r);else if(c(this._tag,t))W.hasOwnProperty(r)||y.setValueForAttribute(L(this),r,s);else if(m.properties[r]||m.isCustomAttribute(r)){var p=L(this);null!=s?y.setValueForProperty(p,r,s):y.deleteValueForProperty(p,r)}}a&&A.setValueForStyles(L(this),a,this)},_updateDOMChildren:function(e,t,n,r){var o=V[typeof e.children]?e.children:null,i=V[typeof t.children]?t.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,u=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,s=null!=o?null:e.children,l=null!=i?null:t.children,c=null!=o||null!=a,p=null!=i||null!=u;null!=s&&null==l?this.updateChildren(null,n,r):c&&!p&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=u?a!==u&&this.updateMarkup(""+u):null!=l&&this.updateChildren(l,n,r)},getNativeNode:function(){return L(this)},unmountComponent:function(e){switch(this._tag){case"iframe":case"object":case"img":case"form":case"video":case"audio":var t=this._wrapperState.listeners;if(t)for(var n=0;n<t.length;n++)t[n].remove();break;case"html":case"head":case"body":N(!1)}this.unmountChildren(e),S.uncacheNode(this),b.deleteAllListeners(this),E.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null,this._domID=null,this._wrapperState=null},getPublicInstance:function(){return L(this)}},f(p.prototype,p.Mixin,I.Mixin),e.exports=p},function(e,t,n){"use strict";function r(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===o?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var o=(n(195),9);e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,o,i){}var o=n(664),i=(n(4),[]),a={addDevtool:function(e){i.push(e)},removeDevtool:function(e){for(var t=0;t<i.length;t++)i[t]===e&&(i.splice(t,1),t--)},onCreateMarkupForProperty:function(e,t){r("onCreateMarkupForProperty",e,t)},onSetValueForProperty:function(e,t,n){r("onSetValueForProperty",e,t,n)},onDeleteValueForProperty:function(e,t){r("onDeleteValueForProperty",e,t)}};a.addDevtool(o),e.exports=a},function(e,t,n){"use strict";var r=n(10),o=n(77),i=n(13),a=function(e){this._currentElement=null,this._nativeNode=null,this._nativeParent=null,this._nativeContainerInfo=null,this._domID=null};r(a.prototype,{mountComponent:function(e,t,n,r){var a=n._idCounter++;this._domID=a,this._nativeParent=t,this._nativeContainerInfo=n;var u=" react-empty: "+this._domID+" ";if(e.useCreateElement){var s=n._ownerDocument,l=s.createComment(u);return i.precacheNode(this,l),o(l)}return e.renderToStaticMarkup?"":"<!--"+u+"-->"},receiveComponent:function(){},getNativeNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),e.exports=a},function(e,t,n){"use strict";function r(e){return o.createFactory(e)}var o=n(32),i=(n(288),n(529)),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",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);e.exports=a},function(e,t){"use strict";var n={useCreateElement:!0};e.exports=n},function(e,t,n){"use strict";var r=n(177),o=n(13),i={dangerouslyProcessChildrenUpdates:function(e,t){var n=o.getNodeFromInstance(e);r.processUpdates(n,t)}};e.exports=i},function(e,t,n){"use strict";function r(){this._rootNodeID&&f.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);c.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var i=l.getNodeFromInstance(this),a=i;a.parentNode;)a=a.parentNode;for(var u=a.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),f=0;f<u.length;f++){var d=u[f];if(d!==i&&d.form===i.form){var A=l.getInstanceFromNode(d);A?void 0:p(!1),c.asap(r,A)}}}return n}var i=n(10),a=n(117),u=n(178),s=n(181),l=n(13),c=n(38),p=n(2),f=(n(4),{getNativeProps:function(e,t){var n=s.getValue(t),r=s.getChecked(t),o=i({type:void 0},a.getNativeProps(e,t),{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange});return o},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:t.defaultChecked||!1,initialValue:null!=n?n:null,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&u.setValueForProperty(l.getNodeFromInstance(e),"checked",n||!1);var r=s.getValue(t);null!=r&&u.setValueForProperty(l.getNodeFromInstance(e),"value",""+r)}});e.exports=f},function(e,t,n){"use strict";var r=n(652);e.exports={debugTool:r}},function(e,t,n){"use strict";var r=n(10),o=n(282),i=n(13),a=n(287),u=(n(4),{mountWrapper:function(e,t,n){var r=null;if(null!=n){var o=n;"optgroup"===o._tag&&(o=o._nativeParent),null!=o&&"select"===o._tag&&(r=a.getSelectValueContext(o))}var i=null;if(null!=r)if(i=!1,Array.isArray(r)){for(var u=0;u<r.length;u++)if(""+r[u]==""+t.value){i=!0;break}}else i=""+r==""+t.value;e._wrapperState={selected:i}},postMountWrapper:function(e){var t=e._currentElement.props;if(null!=t.value){var n=i.getNodeFromInstance(e);n.setAttribute("value",t.value)}},getNativeProps:function(e,t){var n=r({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(n.selected=e._wrapperState.selected);var i="";return o.forEach(t.children,function(e){null!=e&&("string"!=typeof e&&"number"!=typeof e||(i+=e))}),i&&(n.children=i),n}});e.exports=u},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,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 f=r(p.startContainer,p.startOffset,p.endContainer,p.endOffset),d=f?0:p.toString().length,A=d+c,h=document.createRange();h.setStart(n,o),h.setEnd(i,a);var v=h.collapsed;return{start:v?A:d,end:v?d:A}}function a(e,t){var n,r,o=document.selection.createRange().duplicate();void 0===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),i=void 0===t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var u=l(e,o),s=l(e,i);if(u&&s){var p=document.createRange();p.setStart(u.node,u.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(s.node,s.offset)):(p.setEnd(s.node,s.offset),n.addRange(p))}}}var s=n(16),l=n(695),c=n(304),p=s.canUseDOM&&"selection"in document&&!("getSelection"in window),f={getOffsets:p?o:i,setOffsets:p?a:u};e.exports=f},function(e,t,n){"use strict";var r=n(10),o=n(177),i=n(77),a=n(13),u=(n(26),n(124)),s=n(2),l=(n(195),function(e){this._currentElement=e,this._stringText=""+e,this._nativeNode=null,this._nativeParent=null,this._domID=null,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});r(l.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,s=" react-text: "+o+" ",l=" /react-text ";if(this._domID=o,this._nativeParent=t,e.useCreateElement){var c=n._ownerDocument,p=c.createComment(s),f=c.createComment(l),d=i(c.createDocumentFragment());return i.queueChild(d,i(p)),this._stringText&&i.queueChild(d,i(c.createTextNode(this._stringText))),i.queueChild(d,i(f)),a.precacheNode(this,p),this._closingComment=f,d}var A=u(this._stringText);return e.renderToStaticMarkup?A:"<!--"+s+"-->"+A+"<!--"+l+"-->"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getNativeNode();o.replaceDelimitedText(r[0],r[1],n)}}},getNativeNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=a.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?s(!1):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._nativeNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),e.exports=l},function(e,t,n){"use strict";function r(){this._rootNodeID&&f.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);return c.asap(r,this),n}var i=n(10),a=n(117),u=n(178),s=n(181),l=n(13),c=n(38),p=n(2),f=(n(4),{getNativeProps:function(e,t){null!=t.dangerouslySetInnerHTML?p(!1):void 0;var n=i({},a.getNativeProps(e,t),{defaultValue:void 0,value:void 0,children:e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=t.defaultValue,r=t.children;null!=r&&(null!=n?p(!1):void 0,Array.isArray(r)&&(r.length<=1?void 0:p(!1),r=r[0]),n=""+r),null==n&&(n="");var i=s.getValue(t);e._wrapperState={initialValue:""+(null!=i?i:n),listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=s.getValue(t);null!=n&&u.setValueForProperty(l.getNodeFromInstance(e),"value",""+n)}});e.exports=f},function(e,t,n){"use strict";function r(e,t){"_nativeNode"in e?void 0:s(!1),"_nativeNode"in t?void 0:s(!1);for(var n=0,r=e;r;r=r._nativeParent)n++;for(var o=0,i=t;i;i=i._nativeParent)o++;for(;n-o>0;)e=e._nativeParent,n--;for(;o-n>0;)t=t._nativeParent,o--;for(var a=n;a--;){if(e===t)return e;e=e._nativeParent,t=t._nativeParent}return null}function o(e,t){"_nativeNode"in e?void 0:s(!1),"_nativeNode"in t?void 0:s(!1);for(;t;){if(t===e)return!0;t=t._nativeParent}return!1}function i(e){return"_nativeNode"in e?void 0:s(!1),e._nativeParent}function a(e,t,n){for(var r=[];e;)r.push(e),e=e._nativeParent;var o;for(o=r.length;o-- >0;)t(r[o],!1,n);for(o=0;o<r.length;o++)t(r[o],!0,n)}function u(e,t,n,o,i){for(var a=e&&t?r(e,t):null,u=[];e&&e!==a;)u.push(e),e=e._nativeParent;for(var s=[];t&&t!==a;)s.push(t),t=t._nativeParent;var l;for(l=0;l<u.length;l++)n(u[l],!0,o);for(l=s.length;l-- >0;)n(s[l],!1,i)}var s=n(2);e.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:i,traverseTwoPhase:a,traverseEnterLeave:u}},function(e,t,n){"use strict";var r,o=(n(69),n(118),n(4),{onCreateMarkupForProperty:function(e,t){r(e)},onSetValueForProperty:function(e,t,n){r(t)},onDeleteValueForProperty:function(e,t){r(t)}});e.exports=o},function(e,t,n){"use strict";function r(e,t,n,r,o,i){}function o(e){}var i=(n(16),n(532),n(4),[]),a={addDevtool:function(e){i.push(e)},removeDevtool:function(e){for(var t=0;t<i.length;t++)i[t]===e&&(i.splice(t,1),t--)},beginProfiling:function(){},endProfiling:function(){},getFlushHistory:function(){},onBeginFlush:function(){r("onBeginFlush")},onEndFlush:function(){r("onEndFlush")},onBeginLifeCycleTimer:function(e,t){o(e),r("onBeginLifeCycleTimer",e,t)},onEndLifeCycleTimer:function(e,t){o(e),r("onEndLifeCycleTimer",e,t)},onBeginReconcilerTimer:function(e,t){o(e),r("onBeginReconcilerTimer",e,t)},onEndReconcilerTimer:function(e,t){o(e),r("onEndReconcilerTimer",e,t)},onBeginProcessingChildContext:function(){r("onBeginProcessingChildContext")},onEndProcessingChildContext:function(){r("onEndProcessingChildContext")},onNativeOperation:function(e,t,n){o(e),r("onNativeOperation",e,t,n)},onSetState:function(){r("onSetState")},onSetDisplayName:function(e,t){o(e),r("onSetDisplayName",e,t)},onSetChildren:function(e,t){o(e),r("onSetChildren",e,t)},onSetOwner:function(e,t){o(e),r("onSetOwner",e,t)},onSetText:function(e,t){o(e),r("onSetText",e,t)},onMountRootComponent:function(e){o(e),r("onMountRootComponent",e)},onMountComponent:function(e){o(e),r("onMountComponent",e)},onUpdateComponent:function(e){o(e),r("onUpdateComponent",e)},onUnmountComponent:function(e){o(e),r("onUnmountComponent",e)}};e.exports=a},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(10),i=n(38),a=n(123),u=n(30),s={initialize:u,close:function(){f.isBatchingUpdates=!1}},l={initialize:u,close:i.flushBatchedUpdates.bind(i)},c=[l,s];o(r.prototype,a.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,i){var a=f.isBatchingUpdates;f.isBatchingUpdates=!0,a?e(t,n,r,o,i):p.perform(e,null,t,n,r,o,i)}};e.exports=f},function(e,t,n){"use strict";function r(){_||(_=!0,m.EventEmitter.injectReactEventListener(v),m.EventPluginHub.injectEventPluginOrder(a),m.EventPluginUtils.injectComponentTree(p),m.EventPluginUtils.injectTreeTraversal(d),m.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:w,EnterLeaveEventPlugin:u,ChangeEventPlugin:i,SelectEventPlugin:b,BeforeInputEventPlugin:o}),m.NativeComponent.injectGenericComponentClass(c),m.NativeComponent.injectTextComponentClass(A),m.DOMProperty.injectDOMPropertyConfig(s),m.DOMProperty.injectDOMPropertyConfig(g),m.EmptyComponent.injectEmptyComponentFactory(function(e){return new f(e)}),m.Updates.injectReconcileTransaction(y),m.Updates.injectBatchingStrategy(h),m.Component.injectEnvironment(l))}var o=n(637),i=n(639),a=n(641),u=n(642),s=n(644),l=n(285),c=n(650),p=n(13),f=n(653),d=n(663),A=n(661),h=n(666),v=n(669),m=n(670),y=n(674),g=n(677),b=n(678),w=n(679),_=!1;e.exports={inject:r}},function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}var o=n(86),i={handleTopLevel:function(e,t,n,i){var a=o.extractEvents(e,t,n,i);r(a)}};e.exports=i},function(e,t,n){"use strict";function r(e){for(;e._nativeParent;)e=e._nativeParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){var t=d(e.nativeEvent),n=p.getClosestInstanceFromNode(t),o=n;do e.ancestors.push(o),o=o&&r(o);while(o);for(var i=0;i<e.ancestors.length;i++)n=e.ancestors[i],h._handleTopLevel(e.topLevelType,n,e.nativeEvent,d(e.nativeEvent))}function a(e){var t=A(window);e(t)}var u=n(10),s=n(232),l=n(16),c=n(56),p=n(13),f=n(38),d=n(189),A=n(524);u(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),c.addPoolingTo(o,c.twoArgumentPooler);var h={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:l.canUseDOM?window:null,setHandleTopLevel:function(e){h._handleTopLevel=e},setEnabled:function(e){h._enabled=!!e},isEnabled:function(){return h._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?s.listen(r,t,h.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?s.capture(r,t,h.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=a.bind(null,e);s.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(h._enabled){var n=o.getPooled(e,t);try{f.batchedUpdates(i,n)}finally{o.release(n)}}}};e.exports=h},function(e,t,n){"use strict";var r=n(69),o=n(86),i=n(179),a=n(182),u=n(283),s=n(289),l=n(119),c=n(294),p=n(38),f={Component:a.injection,Class:u.injection,DOMProperty:r.injection,EmptyComponent:s.injection,EventPluginHub:o.injection,EventPluginUtils:i.injection,EventEmitter:l.injection,NativeComponent:c.injection,Updates:p.injection};e.exports=f},function(e,t,n){"use strict";var r=n(690),o=/\/?>/,i=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return i.test(e)?e: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}};e.exports=a},function(e,t,n){"use strict";function r(e,t,n){return{type:p.INSERT_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function o(e,t,n){return{type:p.MOVE_EXISTING,content:null,fromIndex:e._mountIndex,fromNode:f.getNativeNode(e),toIndex:n,afterNode:t}}function i(e,t){return{type:p.REMOVE_NODE,content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function a(e){return{type:p.SET_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(e){return{type:p.TEXT_CONTENT,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(e,t){return t&&(e=e||[],e.push(t)),e}function l(e,t){c.processChildrenUpdates(e,t)}var c=n(182),p=(n(26),n(293)),f=(n(57),n(78)),d=n(646),A=(n(30),n(693)),h=n(2),v={Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return d.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,o){var i;return i=A(t),d.updateChildren(e,i,n,r,o),i},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var u=r[a],s=f.mountComponent(u,t,this,this._nativeContainerInfo,n);u._mountIndex=i++,o.push(s)}return o},updateTextContent:function(e){var t=this._renderedChildren;d.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&h(!1);var r=[u(e)];l(this,r)},updateMarkup:function(e){var t=this._renderedChildren;d.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&h(!1);var r=[a(e)];l(this,r)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,o={},i=this._reconcilerUpdateChildren(r,e,o,t,n);if(i||r){var a,u=null,c=0,p=0,d=null;for(a in i)if(i.hasOwnProperty(a)){var A=r&&r[a],h=i[a];A===h?(u=s(u,this.moveChild(A,d,p,c)),c=Math.max(A._mountIndex,c),A._mountIndex=p):(A&&(c=Math.max(A._mountIndex,c)),u=s(u,this._mountChildAtIndex(h,d,p,t,n))),p++,d=f.getNativeNode(h)}for(a in o)o.hasOwnProperty(a)&&(u=s(u,this._unmountChild(r[a],o[a])));u&&l(this,u),this._renderedChildren=i}},unmountChildren:function(e){var t=this._renderedChildren;d.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){return e._mountIndex<r?o(e,t,n):void 0},createChild:function(e,t,n){return r(n,t,e._mountIndex)},removeChild:function(e,t){return i(e,t)},_mountChildAtIndex:function(e,t,n,r,o){var i=f.mountComponent(e,r,this,this._nativeContainerInfo,o);return e._mountIndex=n,this.createChild(e,t,i)},_unmountChild:function(e,t){var n=this.removeChild(e,t);return e._mountIndex=null,n}}};e.exports=v},function(e,t,n){"use strict";var r=n(2),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);var i=n.getPublicInstance();i&&i.refs[t]===e.getPublicInstance()&&n.detachRef(t)}};e.exports=o},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=i.getPooled(null),this.useCreateElement=e}var o=n(10),i=n(280),a=n(56),u=n(119),s=n(291),l=n(123),c={initialize:s.getSelectionInformation,close:s.restoreSelection},p={initialize:function(){var e=u.isEnabled();return u.setEnabled(!1),e},close:function(e){u.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},d=[c,p,f],A={getTransactionWrappers:function(){return d},getReactMountReady:function(){return this.reactMountReady},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null}};o(r.prototype,l.Mixin,A),a.addPoolingTo(r),e.exports=r},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=n(673),a={};a.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},a.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},a.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&o(n,e,t._owner)}},e.exports=a},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.useCreateElement=!1}var o=n(10),i=n(56),a=n(123),u=[],s={enqueue:function(){}},l={getTransactionWrappers:function(){return u},getReactMountReady:function(){return s},destructor:function(){},checkpoint:function(){},rollback:function(){}};o(r.prototype,a.Mixin,l),i.addPoolingTo(r),e.exports=r},function(e,t){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},r={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering","in":0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",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",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},o={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(r).forEach(function(e){o.Properties[e]=0,r[e]&&(o.DOMAttributeNames[e]=r[e])}),e.exports=o},function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&l.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(w||null==y||y!==p())return null;var n=r(y);if(!b||!A(b,n)){b=n;var o=c.getPooled(m.select,g,e,t);return o.type="select",o.target=y,a.accumulateTwoPhaseDispatches(o),o}return null}var i=n(44),a=n(87),u=n(16),s=n(13),l=n(291),c=n(45),p=n(234),f=n(306),d=n(51),A=n(154),h=i.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]}},y=null,g=null,b=null,w=!1,_=!1,E=d({onSelect:null}),x={eventTypes:m,extractEvents:function(e,t,n,r){if(!_)return null;var i=t?s.getNodeFromInstance(t):window;switch(e){case h.topFocus:(f(i)||"true"===i.contentEditable)&&(y=i,g=t,b=null);break;case h.topBlur:y=null,g=null,b=null;break;case h.topMouseDown:w=!0;break;case h.topContextMenu:case h.topMouseUp:return w=!1,o(n,r);case h.topSelectionChange:if(v)break;case h.topKeyDown:case h.topKeyUp:return o(n,r)}return null},didPutListener:function(e,t,n){t===E&&(_=!0)}};e.exports=x},function(e,t,n){"use strict";var r=n(44),o=n(232),i=n(87),a=n(13),u=n(680),s=n(681),l=n(45),c=n(684),p=n(686),f=n(122),d=n(683),A=n(687),h=n(688),v=n(88),m=n(689),y=n(30),g=n(187),b=n(2),w=n(51),_=r.topLevelTypes,E={abort:{phasedRegistrationNames:{bubbled:w({onAbort:!0}),captured:w({onAbortCapture:!0})}},animationEnd:{phasedRegistrationNames:{bubbled:w({onAnimationEnd:!0}),captured:w({onAnimationEndCapture:!0})}},animationIteration:{phasedRegistrationNames:{bubbled:w({onAnimationIteration:!0}),captured:w({onAnimationIterationCapture:!0})}},animationStart:{phasedRegistrationNames:{bubbled:w({onAnimationStart:!0}),captured:w({onAnimationStartCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:w({onBlur:!0}),captured:w({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:w({onCanPlay:!0}),captured:w({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:w({onCanPlayThrough:!0}),captured:w({onCanPlayThroughCapture:!0})}},click:{phasedRegistrationNames:{bubbled:w({onClick:!0}),captured:w({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:w({onContextMenu:!0}),captured:w({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:w({onCopy:!0}),captured:w({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:w({onCut:!0}),captured:w({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:w({onDoubleClick:!0}),captured:w({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:w({onDrag:!0}),captured:w({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:w({onDragEnd:!0}),captured:w({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:w({onDragEnter:!0}),captured:w({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:w({onDragExit:!0}),captured:w({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:w({onDragLeave:!0}),captured:w({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:w({onDragOver:!0}),captured:w({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:w({onDragStart:!0}),captured:w({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:w({onDrop:!0}),captured:w({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:w({onDurationChange:!0}),captured:w({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:w({onEmptied:!0}),captured:w({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:w({onEncrypted:!0}),captured:w({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:w({onEnded:!0}),captured:w({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:w({onError:!0}),captured:w({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:w({onFocus:!0}),captured:w({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:w({onInput:!0}),captured:w({onInputCapture:!0})}},invalid:{phasedRegistrationNames:{bubbled:w({onInvalid:!0}),captured:w({onInvalidCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:w({onKeyDown:!0}),captured:w({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:w({onKeyPress:!0}),captured:w({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:w({onKeyUp:!0}),captured:w({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:w({onLoad:!0}),captured:w({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:w({onLoadedData:!0}),captured:w({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:w({onLoadedMetadata:!0}),captured:w({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:w({onLoadStart:!0}),captured:w({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:w({onMouseDown:!0}),captured:w({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:w({onMouseMove:!0}),captured:w({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:w({onMouseOut:!0}),captured:w({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:w({onMouseOver:!0}),captured:w({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:w({onMouseUp:!0}),captured:w({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:w({onPaste:!0}),captured:w({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:w({onPause:!0}),captured:w({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:w({onPlay:!0}),captured:w({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:w({onPlaying:!0}),captured:w({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:w({onProgress:!0}),captured:w({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:w({onRateChange:!0}),captured:w({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:w({onReset:!0}),captured:w({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:w({onScroll:!0}),captured:w({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:w({onSeeked:!0}),captured:w({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:w({onSeeking:!0}),captured:w({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:w({onStalled:!0}),captured:w({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:w({onSubmit:!0}),captured:w({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:w({onSuspend:!0}),captured:w({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:w({onTimeUpdate:!0}),captured:w({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:w({onTouchCancel:!0}),captured:w({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:w({onTouchEnd:!0}),captured:w({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:w({onTouchMove:!0}),captured:w({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:w({onTouchStart:!0}),captured:w({onTouchStartCapture:!0})}},transitionEnd:{phasedRegistrationNames:{bubbled:w({onTransitionEnd:!0}),captured:w({onTransitionEndCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:w({onVolumeChange:!0}),captured:w({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:w({onWaiting:!0}),captured:w({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:w({onWheel:!0}),captured:w({onWheelCapture:!0})}}},x={topAbort:E.abort,topAnimationEnd:E.animationEnd,topAnimationIteration:E.animationIteration,topAnimationStart:E.animationStart, topBlur:E.blur,topCanPlay:E.canPlay,topCanPlayThrough:E.canPlayThrough,topClick:E.click,topContextMenu:E.contextMenu,topCopy:E.copy,topCut:E.cut,topDoubleClick:E.doubleClick,topDrag:E.drag,topDragEnd:E.dragEnd,topDragEnter:E.dragEnter,topDragExit:E.dragExit,topDragLeave:E.dragLeave,topDragOver:E.dragOver,topDragStart:E.dragStart,topDrop:E.drop,topDurationChange:E.durationChange,topEmptied:E.emptied,topEncrypted:E.encrypted,topEnded:E.ended,topError:E.error,topFocus:E.focus,topInput:E.input,topInvalid:E.invalid,topKeyDown:E.keyDown,topKeyPress:E.keyPress,topKeyUp:E.keyUp,topLoad:E.load,topLoadedData:E.loadedData,topLoadedMetadata:E.loadedMetadata,topLoadStart:E.loadStart,topMouseDown:E.mouseDown,topMouseMove:E.mouseMove,topMouseOut:E.mouseOut,topMouseOver:E.mouseOver,topMouseUp:E.mouseUp,topPaste:E.paste,topPause:E.pause,topPlay:E.play,topPlaying:E.playing,topProgress:E.progress,topRateChange:E.rateChange,topReset:E.reset,topScroll:E.scroll,topSeeked:E.seeked,topSeeking:E.seeking,topStalled:E.stalled,topSubmit:E.submit,topSuspend:E.suspend,topTimeUpdate:E.timeUpdate,topTouchCancel:E.touchCancel,topTouchEnd:E.touchEnd,topTouchMove:E.touchMove,topTouchStart:E.touchStart,topTransitionEnd:E.transitionEnd,topVolumeChange:E.volumeChange,topWaiting:E.waiting,topWheel:E.wheel};for(var C in x)x[C].dependencies=[C];var S=w({onClick:null}),P={},T={eventTypes:E,extractEvents:function(e,t,n,r){var o=x[e];if(!o)return null;var a;switch(e){case _.topAbort:case _.topCanPlay:case _.topCanPlayThrough:case _.topDurationChange:case _.topEmptied:case _.topEncrypted:case _.topEnded:case _.topError:case _.topInput:case _.topInvalid:case _.topLoad:case _.topLoadedData:case _.topLoadedMetadata:case _.topLoadStart:case _.topPause:case _.topPlay:case _.topPlaying:case _.topProgress:case _.topRateChange:case _.topReset:case _.topSeeked:case _.topSeeking:case _.topStalled:case _.topSubmit:case _.topSuspend:case _.topTimeUpdate:case _.topVolumeChange:case _.topWaiting:a=l;break;case _.topKeyPress:if(0===g(n))return null;case _.topKeyDown:case _.topKeyUp:a=p;break;case _.topBlur:case _.topFocus:a=c;break;case _.topClick:if(2===n.button)return null;case _.topContextMenu:case _.topDoubleClick:case _.topMouseDown:case _.topMouseMove:case _.topMouseOut:case _.topMouseOver:case _.topMouseUp:a=f;break;case _.topDrag:case _.topDragEnd:case _.topDragEnter:case _.topDragExit:case _.topDragLeave:case _.topDragOver:case _.topDragStart:case _.topDrop:a=d;break;case _.topTouchCancel:case _.topTouchEnd:case _.topTouchMove:case _.topTouchStart:a=A;break;case _.topAnimationEnd:case _.topAnimationIteration:case _.topAnimationStart:a=u;break;case _.topTransitionEnd:a=h;break;case _.topScroll:a=v;break;case _.topWheel:a=m;break;case _.topCopy:case _.topCut:case _.topPaste:a=s}a?void 0:b(!1);var y=a.getPooled(o,t,n,r);return i.accumulateTwoPhaseDispatches(y),y},didPutListener:function(e,t,n){if(t===S){var r=e._rootNodeID,i=a.getNodeFromInstance(e);P[r]||(P[r]=o.listen(i,"click",y))}},willDeleteListener:function(e,t){if(t===S){var n=e._rootNodeID;P[n].remove(),delete P[n]}}};e.exports=T},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(45),i={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(45),i={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(45),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(122),i={dataTransfer:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(88),i={relatedTarget:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(45),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(88),i=n(187),a=n(694),u=n(188),s={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:u,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,s),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(88),i=n(188),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(45),i={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(122),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),e.exports=r},function(e,t){"use strict";function n(e){for(var t=1,n=0,o=0,i=e.length,a=-4&i;a>o;){for(var u=Math.min(o+4096,a);u>o;o+=4)n+=(t+=e.charCodeAt(o))+(t+=e.charCodeAt(o+1))+(t+=e.charCodeAt(o+2))+(t+=e.charCodeAt(o+3));t%=r,n%=r}for(;i>o;o++)n+=t+=e.charCodeAt(o);return t%=r,n%=r,t|n<<16}var r=65521;e.exports=n},function(e,t,n){"use strict";function r(e,t,n){var r=null==t||"boolean"==typeof t||""===t;if(r)return"";var o=isNaN(t);if(o||0===t||i.hasOwnProperty(e)&&i[e])return""+t;if("string"==typeof t){t=t.trim()}return t+"px"}var o=n(279),i=(n(4),o.isUnitlessNumber);e.exports=r},function(e,t,n){"use strict";function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=i.get(e);return t?(t=a(t),t?o.getNodeFromInstance(t):null):void u(("function"==typeof e.render,!1))}var o=(n(57),n(13)),i=n(184),a=n(303),u=n(2);n(4);e.exports=r},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 i(e,r,t),t}var i=(n(180),n(194));n(4);e.exports=o},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=n(187),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"};e.exports=r},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function o(e,t){for(var o=n(e),i=0,a=0;o;){if(3===o.nodeType){if(a=i+o.textContent.length,t>=i&&a>=t)return{node:o,offset:t-i};i=a}o=n(r(o))}}e.exports=o},function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(u[e])return u[e];if(!a[e])return e;var t=a[e];for(var n in t)if(t.hasOwnProperty(n)&&n in s)return u[e]=t[n];return""}var i=n(16),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},u={},s={};i.canUseDOM&&(s=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),e.exports=o},function(e,t,n){"use strict";function r(e){return o.isValidElement(e)?void 0:i(!1),e}var o=n(32),i=n(2);e.exports=r},function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=n(124);e.exports=r},function(e,t,n){"use strict";var r=n(292);e.exports=r.renderSubtreeIntoContainer},function(e,t,n){"use strict";function r(e,t,n){return!o(e.props,t)||!o(e.state,n)}var o=n(154);e.exports=r},function(e,t,n){!function(t,r){e.exports=r(n(7))}(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){n(180),e.exports=n(188)},function(e,t,n){"use strict";function r(e,t,n,r,o,i,a,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,i,a,u],c=0;s=new Error(t.replace(/%s/g,function(){return l[c++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}e.exports=r},function(e,t,n){"use strict";var r=n(11),o=r;e.exports=o},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;10>n;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}}var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,a,u=n(e),s=1;s<arguments.length;s++){r=Object(arguments[s]);for(var l in r)o.call(r,l)&&(u[l]=r[l]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var c=0;c<a.length;c++)i.call(r,a[c])&&(u[a[c]]=r[a[c]])}}return u}},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){for(var t;t=e._renderedComponent;)e=t;return e}function o(e,t){var n=r(e);n._nativeNode=t,t[h]=n}function i(e){var t=e._nativeNode;t&&(delete t[h],e._nativeNode=null)}function a(e,t){if(!(e._flags&A.hasCachedChildNodes)){var n=e._renderedChildren,i=t.firstChild;e:for(var a in n)if(n.hasOwnProperty(a)){var u=n[a],s=r(u)._domID;if(null!=s){for(;null!==i;i=i.nextSibling)if(1===i.nodeType&&i.getAttribute(d)===String(s)||8===i.nodeType&&i.nodeValue===" react-text: "+s+" "||8===i.nodeType&&i.nodeValue===" react-empty: "+s+" "){o(u,i);continue e}f(!1)}}e._flags|=A.hasCachedChildNodes}}function u(e){if(e[h])return e[h];for(var t=[];!e[h];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,r;e&&(r=e[h]);e=t.pop())n=r,t.length&&a(r,e);return n}function s(e){var t=u(e);return null!=t&&t._nativeNode===e?t:null}function l(e){if(void 0===e._nativeNode?f(!1):void 0,e._nativeNode)return e._nativeNode;for(var t=[];!e._nativeNode;)t.push(e),e._nativeParent?void 0:f(!1),e=e._nativeParent;for(;t.length;e=t.pop())a(e,e._nativeNode);return e._nativeNode}var c=n(19),p=n(144),f=n(1),d=c.ID_ATTRIBUTE_NAME,A=p,h="__reactInternalInstance$"+Math.random().toString(36).slice(2),v={getClosestInstanceFromNode:u,getInstanceFromNode:s,getNodeFromInstance:l,precacheChildNodes:a,precacheNode:o,uncacheNode:i};e.exports=v},function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};e.exports=r},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}}};e.exports=o},function(e,t,n){(function(e,r){var o=n(227),i={"function":!0,object:!0},a=i[typeof t]&&t&&!t.nodeType?t:void 0,u=i[typeof e]&&e&&!e.nodeType?e:void 0,s=o(a&&u&&"object"==typeof r&&r),l=o(i[typeof self]&&self),c=o(i[typeof window]&&window),p=o(i[typeof this]&&this),f=s||c!==(p&&p.window)&&c||l||p||Function("return this")();e.exports=f}).call(t,n(397)(e),function(){return this}())},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";function r(){P.ReactReconcileTransaction&&w?void 0:m(!1)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=p.getPooled(),this.reconcileTransaction=P.ReactReconcileTransaction.getPooled(!0)}function i(e,t,n,o,i,a){r(),w.batchedUpdates(e,t,n,o,i,a)}function a(e,t){return e._mountOrder-t._mountOrder}function u(e){var t=e.dirtyComponentsLength;t!==y.length?m(!1):void 0,y.sort(a);for(var n=0;t>n;n++){var r=y[n],o=r._pendingCallbacks;r._pendingCallbacks=null;var i;if(d.logTopLevelRenders){var u=r;r._currentElement.props===r._renderedComponent._currentElement&&(u=r._renderedComponent),i="React update: "+u.getName(),console.time(i)}if(h.performUpdateIfNecessary(r,e.reconcileTransaction),i&&console.timeEnd(i),o)for(var s=0;s<o.length;s++)e.callbackQueue.enqueue(o[s],r.getPublicInstance())}}function s(e){return r(),w.isBatchingUpdates?void y.push(e):void w.batchedUpdates(s,e)}function l(e,t){w.isBatchingUpdates?void 0:m(!1),g.enqueue(e,t),b=!0}var c=n(3),p=n(142),f=n(16),d=n(150),A=n(7),h=n(23),v=n(52),m=n(1),y=[],g=p.getPooled(),b=!1,w=null,_={initialize:function(){this.dirtyComponentsLength=y.length},close:function(){this.dirtyComponentsLength!==y.length?(y.splice(0,this.dirtyComponentsLength),C()):y.length=0}},E={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},x=[_,E];c(o.prototype,v.Mixin,{getTransactionWrappers:function(){return x},destructor:function(){this.dirtyComponentsLength=null,p.release(this.callbackQueue),this.callbackQueue=null,P.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return v.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),f.addPoolingTo(o);var C=function(){for(;y.length||b;){if(y.length){var e=o.getPooled();e.perform(u,null,e),o.release(e)}if(b){b=!1;var t=g;g=p.getPooled(),t.notifyAll(),p.release(t)}}};C=A.measure("ReactUpdates","flushBatchedUpdates",C);var S={injectReconcileTransaction:function(e){e?void 0:m(!1),P.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,w=e}},P={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:s,flushBatchedUpdates:C,injection:S,asap:l};e.exports=P},function(e,t){"use strict";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";var r=n(32),o=r({bubbled:null,captured:null}),i=r({topAbort:null,topAnimationEnd:null,topAnimationIteration:null,topAnimationStart: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,topInvalid: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,topTransitionEnd:null,topVolumeChange:null,topWaiting:null,topWheel:null}),a={topLevelTypes:i,PropagationPhases:o};e.exports=a},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var o=this.constructor.Interface;for(var i in o)if(o.hasOwnProperty(i)){var u=o[i];u?this[i]=u(n):"target"===i?this.target=r:this[i]=n[i]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return s?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var o=n(3),i=n(16),a=n(11),u=(n(2),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),s={type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};o(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(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;for(var n=0;n<u.length;n++)this[u[n]]=null}}),r.Interface=s,r.augmentClass=function(e,t){var n=this,r=function(){};r.prototype=n.prototype;var a=new r;o(a,e.prototype),e.prototype=a,e.prototype.constructor=e,e.Interface=o({},n.Interface,t),e.augmentClass=n.augmentClass,i.addPoolingTo(e,i.fourArgumentPooler)},i.addPoolingTo(r,i.fourArgumentPooler),e.exports=r},function(e,t){"use strict";var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=n},function(e,t){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){"use strict";var r=n(1),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)},u=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},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)},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,f=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||p,n.poolSize||(n.poolSize=c),n.release=l,n},d={addPoolingTo:f,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:u,fiveArgumentPooler:s};e.exports=d},function(e,t,n){"use strict";var r=n(3),o=n(20),i=(n(2),n(162),"function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103),a={key:!0,ref:!0,__self:!0,__source:!0},u=function(e,t,n,r,o,a,u){var s={$$typeof:i,type:e,key:t,ref:n,props:u,_owner:a};return s};u.createElement=function(e,t,n){var r,i={},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(r in t)t.hasOwnProperty(r)&&!a.hasOwnProperty(r)&&(i[r]=t[r])}var f=arguments.length-2;if(1===f)i.children=n;else if(f>1){for(var d=Array(f),A=0;f>A;A++)d[A]=arguments[A+2];i.children=d}if(e&&e.defaultProps){var h=e.defaultProps;for(r in h)void 0===i[r]&&(i[r]=h[r])}return u(e,s,l,c,p,o.current,i)},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.cloneElement=function(e,t,n){var i,s=r({},e.props),l=e.key,c=e.ref,p=e._self,f=e._source,d=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,d=o.current),void 0!==t.key&&(l=""+t.key);var A;e.type&&e.type.defaultProps&&(A=e.type.defaultProps);for(i in t)t.hasOwnProperty(i)&&!a.hasOwnProperty(i)&&(void 0===t[i]&&void 0!==A?s[i]=A[i]:s[i]=t[i])}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,f,d,s)},u.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},e.exports=u},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=n(1),i={MUST_USE_PROPERTY:1,HAS_SIDE_EFFECTS:2,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(e){var t=i,n=e.Properties||{},a=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 f=p.toLowerCase(),d=n[p],A={attributeName:f,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseProperty:r(d,t.MUST_USE_PROPERTY),hasSideEffects:r(d,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(d,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(d,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(d,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(d,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(!A.mustUseProperty&&A.hasSideEffects?o(!1):void 0,A.hasBooleanValue+A.hasNumericValue+A.hasOverloadedBooleanValue<=1?void 0:o(!1),s.hasOwnProperty(p)){var h=s[p];A.attributeName=h}a.hasOwnProperty(p)&&(A.attributeNamespace=a[p]),l.hasOwnProperty(p)&&(A.propertyName=l[p]),c.hasOwnProperty(p)&&(A.mutationMethod=c[p]),u.properties[p]=A}}},a=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",u={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:a,ATTRIBUTE_NAME_CHAR:a+"\\-.0-9\\uB7\\u0300-\\u036F\\u203F-\\u2040",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},injection:i};e.exports=u},function(e,t){"use strict";var n={current:null};e.exports=n},function(e,t,n){function r(e,t){var n=e[t];return o(n)?n:void 0}var o=n(278);e.exports=r},function(e,t,n){"use strict";function r(e){if(p){var t=e.node,n=e.children;if(n.length)for(var r=0;r<n.length;r++)f(t,n[r],null);else null!=e.html?t.innerHTML=e.html:null!=e.text&&c(t,e.text)}}function o(e,t){e.parentNode.replaceChild(t.node,e),r(t)}function i(e,t){p?e.children.push(t):e.node.appendChild(t.node)}function a(e,t){p?e.html=t:e.node.innerHTML=t}function u(e,t){p?e.text=t:c(e.node,t)}function s(e){return{node:e,children:[],html:null,text:null}}var l=n(82),c=n(168),p="undefined"!=typeof document&&"number"==typeof document.documentMode||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent),f=l(function(e,t,n){11===t.node.nodeType?(r(t),e.insertBefore(t.node,n)):(e.insertBefore(t.node,n),r(t))});s.insertTreeBefore=f,s.replaceChildWithTree=o,s.queueChild=i,s.queueHTML=a,s.queueText=u,e.exports=s},function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=n(336),i=(n(50),{mountComponent:function(e,t,n,o,i){var a=e.mountComponent(t,n,o,i);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(r,e),a},getNativeNode:function(e){return e.getNativeNode()},unmountComponent:function(e,t){o.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,i){var a=e._currentElement;if(t!==a||i!==e._context){var u=o.shouldUpdateRefs(a,t);u&&o.detachRefs(e,a),e.receiveComponent(t,n,i),u&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}});e.exports=i},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t){function n(e,t){for(var n=-1,o=e.length,i=0,a=[];++n<o;){var u=e[n];u!==t&&u!==r||(e[n]=r,a[i++]=n)}return a}var r="__lodash_placeholder__";e.exports=n},function(e,t,n){function r(e){if("string"==typeof e||o(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}var o=n(27),i=1/0;e.exports=r},function(e,t,n){function r(e){return"symbol"==typeof e||o(e)&&u.call(e)==i}var o=n(18),i="[object Symbol]",a=Object.prototype,u=a.toString;e.exports=r},function(e,t,n){"use strict";var r=n(48),o=n(74),i=n(78),a=n(161),u=n(163),s=n(1),l={},c=null,p=function(e,t){e&&(o.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},f=function(e){return p(e,!0)},d=function(e){return p(e,!1)},A={injection:{injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?s(!1):void 0;var o=l[t]||(l[t]={});o[e._rootNodeID]=n;var i=r.registrationNameModules[t];i&&i.didPutListener&&i.didPutListener(e,t,n)},getListener:function(e,t){var n=l[t];return n&&n[e._rootNodeID]},deleteListener:function(e,t){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var o=l[t];o&&delete o[e._rootNodeID]},deleteAllListeners:function(e){for(var t in l)if(l[t][e._rootNodeID]){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete l[t][e._rootNodeID]}},extractEvents:function(e,t,n,o){for(var i,u=r.plugins,s=0;s<u.length;s++){var l=u[s];if(l){var c=l.extractEvents(e,t,n,o);c&&(i=a(i,c))}}return i},enqueueEvents:function(e){e&&(c=a(c,e))},processEventQueue:function(e){var t=c;c=null,e?u(t,f):u(t,d),c?s(!1):void 0,i.rethrowCaughtError()},__purge:function(){l={}},__getListenerBank:function(){return l}};e.exports=A},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return g(e,r)}function o(e,t,n){var o=t?y.bubbled:y.captured,i=r(e,n,o);i&&(n._dispatchListeners=v(n._dispatchListeners,i),n._dispatchInstances=v(n._dispatchInstances,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.traverseTwoPhase(e._targetInst,o,e)}function a(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?h.getParentInstance(t):null;h.traverseTwoPhase(n,o,e)}}function u(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=g(e,r);o&&(n._dispatchListeners=v(n._dispatchListeners,o),n._dispatchInstances=v(n._dispatchInstances,e))}}function s(e){e&&e.dispatchConfig.registrationName&&u(e._targetInst,null,e)}function l(e){m(e,i)}function c(e){m(e,a)}function p(e,t,n,r){h.traverseEnterLeave(n,r,u,e,t)}function f(e){m(e,s)}var d=n(12),A=n(28),h=n(74),v=n(161),m=n(163),y=(n(2),d.PropagationPhases),g=A.getListener,b={accumulateTwoPhaseDispatches:l,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:f,accumulateEnterLeaveDispatches:p};e.exports=b},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(13),i=n(85),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),e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(284),i=r(o),a=n(389),u=r(a),s=n(387),l=r(s),c=n(388),p=r(c),f=n(385),d=r(f),A=n(386),h=r(A),v={empty:{},getIn:l["default"],setIn:p["default"],deepEqual:d["default"],deleteIn:h["default"],fromJS:function(e){return e},size:function(e){return e?e.length:0},some:i["default"],splice:u["default"]};t["default"]=v},function(e,t,n){"use strict";var r=n(1),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};e.exports=o},function(e,t,n){"use strict";var r=function(e,t,n,r,o,i,a,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,i,a,u],c=0;s=new Error(t.replace(/%s/g,function(){return l[c++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}};e.exports=r},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(250),i=n(251),a=n(252),u=n(253),s=n(254);r.prototype.clear=o,r.prototype["delete"]=i,r.prototype.get=a,r.prototype.has=u,r.prototype.set=s,e.exports=r},function(e,t,n){function r(e,t){for(var n=e.length;n--;)if(o(e[n][0],t))return n;return-1}var o=n(132);e.exports=r},function(e,t,n){function r(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=o(e.prototype),r=e.apply(n,t);return i(r)?r:n}}var o=n(60),i=n(15);e.exports=r},function(e,t){function n(e){var t=e;return t.placeholder}e.exports=n},function(e,t,n){function r(e,t){var n=e.__data__;return o(t)?n["string"==typeof t?"string":"hash"]:n.map}var o=n(247);e.exports=r},function(e,t){function n(e,t){return t=null==t?r:t,!!t&&("number"==typeof e||o.test(e))&&e>-1&&e%1==0&&t>e}var r=9007199254740991,o=/^(?:0|[1-9]\d*)$/;e.exports=n},function(e,t,n){function r(e,t){if(o(e))return!1;var n=typeof e;return"number"==n||"symbol"==n||"boolean"==n||null==e||i(e)?!0:u.test(e)||!a.test(e)||null!=t&&e in Object(t)}var o=n(9),i=n(27),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;e.exports=r},function(e,t,n){var r=n(21),o=r(Object,"create");e.exports=o},function(e,t,n){function r(e){return null!=e&&a(o(e))&&!i(e)}var o=n(238),i=n(66),a=n(43);e.exports=r},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=n(119),o=n(37),i=n(25),a=n(137),u=32,s=a(function(e,t){var n=i(t,o(s));return r(e,u,void 0,t,n)});s.placeholder={},e.exports=s},function(e,t,n){function r(e){return a(e)?o(e,l):u(e)?[e]:i(s(e))}var o=n(106),i=n(64),a=n(9),u=n(27),s=n(130),l=n(26);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.connect=t.Provider=void 0;var o=n(292),i=r(o),a=n(293),u=r(a);t.Provider=i["default"],t.connect=u["default"]},function(e,t){"use strict";var n={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0},r={getNativeProps:function(e,t){if(!t.disabled)return t;var r={};for(var o in t)!n[o]&&t.hasOwnProperty(o)&&(r[o]=t[o]); return r}};e.exports=r},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:a(!1),!l.plugins[n]){t.extractEvents?void 0:a(!1),l.plugins[n]=t;var r=t.eventTypes;for(var i in r)o(r[i],t,i)?void 0:a(!1)}}}function o(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?a(!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];i(u,t,n)}return!0}return e.registrationName?(i(e.registrationName,t,n),!0):!1}function i(e,t,n){l.registrationNameModules[e]?a(!1):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(1),u=null,s={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){u?a(!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]?a(!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]}};e.exports=l},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,v)||(e[v]=A++,f[e[v]]={}),f[e[v]]}var o,i=n(3),a=n(12),u=n(48),s=n(328),l=n(160),c=n(359),p=n(87),f={},d=!1,A=0,h={topAbort:"abort",topAnimationEnd:c("animationend")||"animationend",topAnimationIteration:c("animationiteration")||"animationiteration",topAnimationStart:c("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:c("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},v="_reactListenersID"+String(Math.random()).slice(2),m=i({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(m.handleTopLevel),m.ReactEventListener=e}},setEnabled:function(e){m.ReactEventListener&&m.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!m.ReactEventListener||!m.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,o=r(n),i=u.registrationNameDependencies[e],s=a.topLevelTypes,l=0;l<i.length;l++){var c=i[l];o.hasOwnProperty(c)&&o[c]||(c===s.topWheel?p("wheel")?m.ReactEventListener.trapBubbledEvent(s.topWheel,"wheel",n):p("mousewheel")?m.ReactEventListener.trapBubbledEvent(s.topWheel,"mousewheel",n):m.ReactEventListener.trapBubbledEvent(s.topWheel,"DOMMouseScroll",n):c===s.topScroll?p("scroll",!0)?m.ReactEventListener.trapCapturedEvent(s.topScroll,"scroll",n):m.ReactEventListener.trapBubbledEvent(s.topScroll,"scroll",m.ReactEventListener.WINDOW_HANDLE):c===s.topFocus||c===s.topBlur?(p("focus",!0)?(m.ReactEventListener.trapCapturedEvent(s.topFocus,"focus",n),m.ReactEventListener.trapCapturedEvent(s.topBlur,"blur",n)):p("focusin")&&(m.ReactEventListener.trapBubbledEvent(s.topFocus,"focusin",n),m.ReactEventListener.trapBubbledEvent(s.topBlur,"focusout",n)),o[s.topBlur]=!0,o[s.topFocus]=!0):h.hasOwnProperty(c)&&m.ReactEventListener.trapBubbledEvent(c,h[c],n),o[c]=!0)}},trapBubbledEvent:function(e,t,n){return m.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return m.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(void 0===o&&(o=document.createEvent&&"pageX"in document.createEvent("MouseEvent")),!o&&!d){var e=l.refreshScrollValues;m.ReactEventListener.monitorScrollValue(e),d=!0}}});e.exports=m},function(e,t,n){"use strict";var r=n(327);e.exports={debugTool:r}},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(30),i=n(160),a=n(84),u={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,u),e.exports=r},function(e,t,n){"use strict";var r=n(1),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,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,i,a,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]=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){this.isInTransaction()?void 0:r(!1);for(var t=this.transactionWrappers,n=e;n<t.length;n++){var o,a=t[n],u=this.wrapperInitData[n];try{o=!0,u!==i.OBSERVED_ERROR&&a.close&&a.close.call(this,u),o=!1}finally{if(o)try{this.closeAll(n+1)}catch(s){}}}this.wrapperInitData.length=0}},i={Mixin:o,OBSERVED_ERROR:{}};e.exports=i},function(e,t){"use strict";function n(e){return o[e]}function r(e){return(""+e).replace(i,n)}var o={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},i=/[&><"']/g;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 t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),a=r(i),u=n(192),s=r(u),l=n(183),c=r(l),p=n(184),f=r(p),d=n(181),A=r(d),h=n(185),v=r(h),m=n(95),y=r(m),g=function(e){var t=e.children,n=e.path,r=e.version,i=e.breadcrumbs,u="/"===n,l="http://redux-form.com/"+r;return a["default"].createElement("div",{className:(0,y["default"])(s["default"].app,o({},s["default"].hasNav,!u))},!u&&a["default"].createElement(f["default"],{path:n,url:l}),a["default"].createElement("div",{className:s["default"].contentAndFooter},a["default"].createElement("div",{className:s["default"].topNav},a["default"].createElement("a",{href:"http://redux-form.com",className:s["default"].brand}),a["default"].createElement("a",{className:s["default"].github,href:"https://github.com/erikras/redux-form",title:"Github",target:"_blank"},a["default"].createElement("i",{className:"fa fa-fw fa-github"}))),a["default"].createElement("div",{className:(0,y["default"])(s["default"].content,o({},s["default"].home,u))},u?a["default"].createElement(c["default"],{version:r}):a["default"].createElement("div",null,a["default"].createElement(A["default"],{items:i}),t)),a["default"].createElement("div",{className:s["default"].footer},a["default"].createElement("div",null,"Created by Erik Rasmussen"),a["default"].createElement("div",null,"Got questions? Ask for help:",a["default"].createElement("a",{className:s["default"].help,href:"https://stackoverflow.com/questions/ask?tags=redux-form",title:"Stack Overflow",target:"_blank"},a["default"].createElement("i",{className:"fa fa-fw fa-stack-overflow"})),a["default"].createElement("a",{className:s["default"].help,href:"https://github.com/erikras/redux-form/issues/new",title:"Github",target:"_blank"},a["default"].createElement("i",{className:"fa fa-fw fa-github"}))),a["default"].createElement("div",null,a["default"].createElement(v["default"],{username:"erikras",showUsername:!0,large:!0}),a["default"].createElement(v["default"],{username:"ReduxForm",showUsername:!0,large:!0})))))};t["default"]=g},function(e,t){"use strict";function n(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function r(e,t){if(n(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var a=0;a<r.length;a++)if(!o.call(t,r[a])||!n(e[r[a]],t[r[a]]))return!1;return!0}var o=Object.prototype.hasOwnProperty;e.exports=r},function(e,t){function n(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}e.exports=n},function(e,t,n){function r(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=a,this.__views__=[]}var o=n(60),i=n(63),a=4294967295;r.prototype=o(i.prototype),r.prototype.constructor=r,e.exports=r},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(255),i=n(256),a=n(257),u=n(258),s=n(259);r.prototype.clear=o,r.prototype["delete"]=i,r.prototype.get=a,r.prototype.has=u,r.prototype.set=s,e.exports=r},function(e,t){function n(e,t,n){var r=n.length;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}e.exports=n},function(e,t,n){function r(e){return o(e)?i(e):{}}var o=n(15),i=Object.create;e.exports=r},function(e,t,n){function r(e,t,n,u,s){return e===t?!0:null==e||null==t||!i(e)&&!a(t)?e!==e&&t!==t:o(e,t,r,n,u,s)}var o=n(217),i=n(15),a=n(18);e.exports=r},function(e,t,n){function r(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?u(e)?i(e[0],e[1]):o(e):s(e)}var o=n(220),i=n(221),a=n(133),u=n(9),s=n(283);e.exports=r},function(e,t){function n(){}e.exports=n},function(e,t){function n(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}e.exports=n},function(e,t){function n(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}e.exports=n},function(e,t,n){function r(e){var t=o(e)?s.call(e):"";return t==i||t==a}var o=n(15),i="[object Function]",a="[object GeneratorFunction]",u=Object.prototype,s=u.toString;e.exports=r},function(e,t,n){function r(e){if(!a(e)||f.call(e)!=u||i(e))return!1;var t=o(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==p}var o=n(122),i=n(65),a=n(18),u="[object Object]",s=Object.prototype,l=Function.prototype.toString,c=s.hasOwnProperty,p=l.call(Object),f=s.toString;e.exports=r},function(e,t,n){function r(e){var t=l(e);if(!t&&!u(e))return i(e);var n=a(e),r=!!n,c=n||[],p=c.length;for(var f in e)!o(e,f)||r&&("length"==f||s(f,p))||t&&"constructor"==f||c.push(f);return c}var o=n(111),i=n(219),a=n(246),u=n(42),s=n(39),l=n(249);e.exports=r},function(e,t,n){function r(e,t){var n={};return t=i(t,3),o(e,function(e,r,o){n[r]=t(e,r,o)}),n}var o=n(109),i=n(62);e.exports=r},function(e,t,n){(function(t){(function(){function t(e){this.tokens=[],this.tokens.links={},this.options=e||c.defaults,this.rules=p.normal,this.options.gfm&&(this.options.tables?this.rules=p.tables:this.rules=p.gfm)}function n(e,t){if(this.options=t||c.defaults,this.links=e,this.rules=f.normal,this.renderer=this.options.renderer||new r,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=f.breaks:this.rules=f.gfm:this.options.pedantic&&(this.rules=f.pedantic)}function r(e){this.options=e||{}}function o(e){this.tokens=[],this.token=null,this.options=e||c.defaults,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options}function i(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function a(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function u(e,t){return e=e.source,t=t||"",function n(r,o){return r?(o=o.source||o,o=o.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,o),n):new RegExp(e,t)}}function s(){}function l(e){for(var t,n,r=1;r<arguments.length;r++){t=arguments[r];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}function c(e,n,r){if(r||"function"==typeof n){r||(r=n,n=null),n=l({},c.defaults,n||{});var a,u,s=n.highlight,p=0;try{a=t.lex(e,n)}catch(f){return r(f)}u=a.length;var d=function(e){if(e)return n.highlight=s,r(e);var t;try{t=o.parse(a,n)}catch(i){e=i}return n.highlight=s,e?r(e):r(null,t)};if(!s||s.length<3)return d();if(delete n.highlight,!u)return d();for(;p<a.length;p++)!function(e){return"code"!==e.type?--u||d():s(e.text,e.lang,function(t,n){return t?d(t):null==n||n===e.text?--u||d():(e.text=n,e.escaped=!0,void(--u||d()))})}(a[p])}else try{return n&&(n=l({},c.defaults,n)),o.parse(t.lex(e,n),n)}catch(f){if(f.message+="\nPlease report this to https://github.com/chjj/marked.",(n||c.defaults).silent)return"<p>An error occured:</p><pre>"+i(f.message+"",!0)+"</pre>";throw f}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:s,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:s,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:s,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=u(p.item,"gm")(/bull/g,p.bullet)(),p.list=u(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=u(p.blockquote)("def",p.def)(),p._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",p.html=u(p.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,p._tag)(),p.paragraph=u(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=l({},p),p.gfm=l({},p.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),p.gfm.paragraph=u(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=l({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=p,t.lex=function(e,n){var r=new t(n);return r.lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t,n){for(var r,o,i,a,u,s,l,c,f,e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:i.replace(/\n+$/,"")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2],text:i[3]||""});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(t&&(i=this.rules.nptable.exec(e))){for(e=e.substring(i[0].length),s={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/\n$/,"").split("\n")},c=0;c<s.align.length;c++)/^ *-+: *$/.test(s.align[c])?s.align[c]="right":/^ *:-+: *$/.test(s.align[c])?s.align[c]="center":/^ *:-+ *$/.test(s.align[c])?s.align[c]="left":s.align[c]=null;for(c=0;c<s.cells.length;c++)s.cells[c]=s.cells[c].split(/ *\| */);this.tokens.push(s)}else if(i=this.rules.lheading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:"="===i[2]?1:2,text:i[1]});else if(i=this.rules.hr.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"hr"});else if(i=this.rules.blockquote.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"blockquote_start"}),i=i[0].replace(/^ *> ?/gm,""),this.token(i,t,!0),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),a=i[2],this.tokens.push({type:"list_start",ordered:a.length>1}),i=i[0].match(this.rules.item),r=!1,f=i.length,c=0;f>c;c++)s=i[c],l=s.length,s=s.replace(/^ *([*+-]|\d+\.) +/,""),~s.indexOf("\n ")&&(l-=s.length,s=this.options.pedantic?s.replace(/^ {1,4}/gm,""):s.replace(new RegExp("^ {1,"+l+"}","gm"),"")),this.options.smartLists&&c!==f-1&&(u=p.bullet.exec(i[c+1])[0],a===u||a.length>1&&u.length>1||(e=i.slice(c+1).join("\n")+e,c=f-1)),o=r||/\n\n(?!\s*$)/.test(s),c!==f-1&&(r="\n"===s.charAt(s.length-1),o||(o=r)),this.tokens.push({type:o?"loose_item_start":"list_item_start"}),this.token(s,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(e))e=e.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===i[1]||"script"===i[1]||"style"===i[1]),text:i[0]});else if(!n&&t&&(i=this.rules.def.exec(e)))e=e.substring(i[0].length),this.tokens.links[i[1].toLowerCase()]={href:i[2],title:i[3]};else if(t&&(i=this.rules.table.exec(e))){for(e=e.substring(i[0].length),s={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c<s.align.length;c++)/^ *-+: *$/.test(s.align[c])?s.align[c]="right":/^ *:-+: *$/.test(s.align[c])?s.align[c]="center":/^ *:-+ *$/.test(s.align[c])?s.align[c]="left":s.align[c]=null;for(c=0;c<s.cells.length;c++)s.cells[c]=s.cells[c].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(s)}else if(t&&(i=this.rules.paragraph.exec(e)))e=e.substring(i[0].length),this.tokens.push({type:"paragraph",text:"\n"===i[1].charAt(i[1].length-1)?i[1].slice(0,-1):i[1]});else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"text",text:i[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var f={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:s,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:s,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};f._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,f._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,f.link=u(f.link)("inside",f._inside)("href",f._href)(),f.reflink=u(f.reflink)("inside",f._inside)(),f.normal=l({},f),f.pedantic=l({},f.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),f.gfm=l({},f.normal,{escape:u(f.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:u(f.text)("]|","~]|")("|","|https?://|")()}),f.breaks=l({},f.gfm,{br:u(f.br)("{2,}","*")(),text:u(f.gfm.text)("{2,}","*")()}),n.rules=f,n.output=function(e,t,r){var o=new n(t,r);return o.output(e)},n.prototype.output=function(e){for(var t,n,r,o,a="";e;)if(o=this.rules.escape.exec(e))e=e.substring(o[0].length),a+=o[1];else if(o=this.rules.autolink.exec(e))e=e.substring(o[0].length),"@"===o[2]?(n=":"===o[1].charAt(6)?this.mangle(o[1].substring(7)):this.mangle(o[1]),r=this.mangle("mailto:")+n):(n=i(o[1]),r=n),a+=this.renderer.link(r,null,n);else if(this.inLink||!(o=this.rules.url.exec(e))){if(o=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(o[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(o[0])&&(this.inLink=!1),e=e.substring(o[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):i(o[0]):o[0];else if(o=this.rules.link.exec(e))e=e.substring(o[0].length),this.inLink=!0,a+=this.outputLink(o,{href:o[2],title:o[3]}),this.inLink=!1;else if((o=this.rules.reflink.exec(e))||(o=this.rules.nolink.exec(e))){if(e=e.substring(o[0].length),t=(o[2]||o[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){a+=o[0].charAt(0),e=o[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(o,t),this.inLink=!1}else if(o=this.rules.strong.exec(e))e=e.substring(o[0].length),a+=this.renderer.strong(this.output(o[2]||o[1]));else if(o=this.rules.em.exec(e))e=e.substring(o[0].length),a+=this.renderer.em(this.output(o[2]||o[1]));else if(o=this.rules.code.exec(e))e=e.substring(o[0].length),a+=this.renderer.codespan(i(o[2],!0));else if(o=this.rules.br.exec(e))e=e.substring(o[0].length),a+=this.renderer.br();else if(o=this.rules.del.exec(e))e=e.substring(o[0].length),a+=this.renderer.del(this.output(o[1]));else if(o=this.rules.text.exec(e))e=e.substring(o[0].length),a+=this.renderer.text(i(this.smartypants(o[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(o[0].length),n=i(o[1]),r=n,a+=this.renderer.link(r,null,n);return a},n.prototype.outputLink=function(e,t){var n=i(t.href),r=t.title?i(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,i(e[1]))},n.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},n.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,o=0;r>o;o++)t=e.charCodeAt(o),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},r.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'<pre><code class="'+this.options.langPrefix+i(t,!0)+'">'+(n?e:i(e,!0))+"\n</code></pre>\n":"<pre><code>"+(n?e:i(e,!0))+"\n</code></pre>"},r.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n"},r.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},r.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"</"+n+">\n"},r.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},r.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},r.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n<tbody>\n"+t+"</tbody>\n</table>\n"},r.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"</"+n+">\n"},r.prototype.strong=function(e){return"<strong>"+e+"</strong>"},r.prototype.em=function(e){return"<em>"+e+"</em>"},r.prototype.codespan=function(e){return"<code>"+e+"</code>"},r.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},r.prototype.del=function(e){return"<del>"+e+"</del>"},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(a(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(o){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var i='<a href="'+e+'"';return t&&(i+=' title="'+t+'"'),i+=">"+n+"</a>"},r.prototype.image=function(e,t,n){var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},r.prototype.text=function(e){return e},o.parse=function(e,t,n){var r=new o(t,n);return r.parse(e)},o.prototype.parse=function(e){this.inline=new n(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},o.prototype.next=function(){return this.token=this.tokens.pop()},o.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},o.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},o.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,o,i="",a="";for(n="",e=0;e<this.token.header.length;e++)r={header:!0,align:this.token.align[e]},n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(i+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",o=0;o<t.length;o++)n+=this.renderer.tablecell(this.inline.output(t[o]),{header:!1,align:this.token.align[o]});a+=this.renderer.tablerow(n)}return this.renderer.table(i,a);case"blockquote_start":for(var a="";"blockquote_end"!==this.next().type;)a+=this.tok();return this.renderer.blockquote(a);case"list_start":for(var a="",u=this.token.ordered;"list_end"!==this.next().type;)a+=this.tok();return this.renderer.list(a,u);case"list_item_start":for(var a="";"list_item_end"!==this.next().type;)a+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(a);case"loose_item_start":for(var a="";"list_item_end"!==this.next().type;)a+=this.tok();return this.renderer.listitem(a);case"html":var s=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(s);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},s.exec=s,c.options=c.setOptions=function(e){return l(c.defaults,e),c},c.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new r,xhtml:!1},c.Parser=o,c.parser=o.parse,c.Renderer=r,c.Lexer=t,c.lexer=t.lex,c.InlineLexer=n,c.inlineLexer=n.output,c.parse=c,e.exports=c}).call(function(){return this||("undefined"!=typeof window?window:t)}())}).call(t,function(){return this}())},function(e,t,n){e.exports=n(362)},function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function o(e,t,n){c.insertTreeBefore(e,t,n)}function i(e,t,n){Array.isArray(t)?u(e,t[0],t[1],n):m(e,t,n)}function a(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],s(e,t,n),e.removeChild(n)}e.removeChild(t)}function u(e,t,n,r){for(var o=t;;){var i=o.nextSibling;if(m(e,o,r),o===n)break;o=i}}function s(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}function l(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&m(r,document.createTextNode(n),o):n?(v(o,n),s(r,o,t)):s(r,e,t)}var c=n(22),p=n(301),f=n(154),d=n(7),A=n(82),h=n(88),v=n(168),m=A(function(e,t,n){e.insertBefore(t,n)}),y={dangerouslyReplaceNodeWithMarkup:p.dangerouslyReplaceNodeWithMarkup,replaceDelimitedText:l,processUpdates:function(e,t){for(var n=0;n<t.length;n++){var u=t[n];switch(u.type){case f.INSERT_MARKUP:o(e,u.content,r(e,u.afterNode));break;case f.MOVE_EXISTING:i(e,u.fromNode,r(e,u.afterNode));break;case f.SET_MARKUP:h(e,u.content);break;case f.TEXT_CONTENT:v(e,u.content);break;case f.REMOVE_NODE:a(e,u.fromNode)}}}};d.measureMethods(y,"DOMChildrenOperations",{replaceDelimitedText:"replaceDelimitedText"}),e.exports=y},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 i=n(19),a=(n(319),n(7)),u=n(360),s=(n(2),new RegExp("^["+i.ATTRIBUTE_NAME_START_CHAR+"]["+i.ATTRIBUTE_NAME_CHAR+"]*$")),l={},c={},p={createMarkupForID:function(e){return i.ID_ATTRIBUTE_NAME+"="+u(e)},setAttributeForID:function(e,t){e.setAttribute(i.ID_ATTRIBUTE_NAME,t)},createMarkupForRoot:function(){return i.ROOT_ATTRIBUTE_NAME+'=""'},setAttributeForRoot:function(e){e.setAttribute(i.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(e,t){var n=i.properties.hasOwnProperty(e)?i.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 i.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=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(r){var a=r.mutationMethod;if(a)a(e,n);else if(o(r,n))this.deleteValueForProperty(e,t);else if(r.mustUseProperty){var u=r.propertyName;r.hasSideEffects&&""+e[u]==""+n||(e[u]=n)}else{var s=r.attributeName,l=r.attributeNamespace;l?e.setAttributeNS(l,s,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(s,""):e.setAttribute(s,""+n)}}else i.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=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseProperty){var o=n.propertyName;n.hasBooleanValue?e[o]=!1:n.hasSideEffects&&""+e[o]==""||(e[o]="")}else e.removeAttribute(n.attributeName)}else i.isCustomAttribute(t)&&e.removeAttribute(t)}};a.measureMethods(p,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),e.exports=p},function(e,t,n){"use strict";function r(e){return e===y.topMouseUp||e===y.topTouchEnd||e===y.topTouchCancel; }function o(e){return e===y.topMouseMove||e===y.topTouchMove}function i(e){return e===y.topMouseDown||e===y.topTouchStart}function a(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=g.getNodeFromInstance(r),t?h.invokeGuardedCallbackWithCatch(o,n,e):h.invokeGuardedCallback(o,n,e),e.currentTarget=null}function u(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)a(e,t,n[o],r[o]);else n&&a(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null}function s(e){var t=e._dispatchListeners,n=e._dispatchInstances;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._dispatchInstances=null,e._dispatchListeners=null,t}function c(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.isArray(t)?v(!1):void 0,e.currentTarget=t?g.getNodeFromInstance(n):null;var r=t?t(e):null;return e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,r}function p(e){return!!e._dispatchListeners}var f,d,A=n(12),h=n(78),v=n(1),m=(n(2),{injectComponentTree:function(e){f=e},injectTreeTraversal:function(e){d=e}}),y=A.topLevelTypes,g={isEndish:r,isMoveish:o,isStartish:i,executeDirectDispatch:c,executeDispatchesInOrder:u,executeDispatchesInOrderStopAtTrue:l,hasDispatches:p,getInstanceFromNode:function(e){return f.getInstanceFromNode(e)},getNodeFromInstance:function(e){return f.getNodeFromInstance(e)},isAncestor:function(e,t){return d.isAncestor(e,t)},getLowestCommonAncestor:function(e,t){return d.getLowestCommonAncestor(e,t)},getParentInstance:function(e){return d.getParentInstance(e)},traverseTwoPhase:function(e,t,n){return d.traverseTwoPhase(e,t,n)},traverseEnterLeave:function(e,t,n,r,o){return d.traverseEnterLeave(e,t,n,r,o)},injection:m};e.exports=g},function(e,t){"use strict";function n(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function r(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var o={escape:n,unescape:r};e.exports=o},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 i(e){r(e),null!=e.checked||null!=e.onChange?l(!1):void 0}function a(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var u=n(334),s=n(81),l=n(1),c=(n(2),{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},f={},d={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 f)&&(f[o.message]=!0,a(n))}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(i(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(i(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=d},function(e,t,n){"use strict";var r=n(1),o=!1,i={unmountIDFromEnvironment:null,replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o?r(!1):void 0,i.unmountIDFromEnvironment=e.unmountIDFromEnvironment,i.replaceNodeWithMarkup=e.replaceNodeWithMarkup,i.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};e.exports=i},function(e,t,n){"use strict";function r(e,t,n,r){try{return t(n,r)}catch(i){return void(null===o&&(o=i))}}var o=null,i={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(o){var e=o;throw o=null,e}}};e.exports=i},function(e,t){"use strict";var n={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}};e.exports=n},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=n(32),o=r({prop:null,context:null,childContext:null});e.exports=o},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e};e.exports=n},function(e,t){"use strict";function n(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}e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return r?!!n[r]:!1}function r(e){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}e.exports=n},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=u.create(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?s.createInternalComponent(n):r(n.type)?new n.type(n):new c(n)}else"string"==typeof e||"number"==typeof e?t=s.createInstanceForText(e):l(!1);return t._mountIndex=0,t._mountImage=null,t}var i=n(3),a=n(310),u=n(149),s=n(155),l=n(1),c=(n(2),function(e){this.construct(e)});i(c.prototype,a.Mixin,{_instantiateReactComponent:o}),e.exports=o},function(e,t,n){"use strict";/** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */ function r(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=n(6);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t,n){"use strict";var r=n(6),o=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=n(82),u=a(function(e,t){e.innerHTML=t});if(r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(u=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&i.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}),s=null}e.exports=u},function(e,t){"use strict";function n(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}e.exports=n},function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?l.escape(e.key):t.toString(36)}function o(e,t,n,i){var f=typeof e;if("undefined"!==f&&"boolean"!==f||(e=null),null===e||"string"===f||"number"===f||a.isValidElement(e))return n(i,e,""===t?c+r(e,0):t),1;var d,A,h=0,v=""===t?c:t+p;if(Array.isArray(e))for(var m=0;m<e.length;m++)d=e[m],A=v+r(d,m),h+=o(d,A,n,i);else{var y=u(e);if(y){var g,b=y.call(e);if(y!==e.entries)for(var w=0;!(g=b.next()).done;)d=g.value,A=v+r(d,w++),h+=o(d,A,n,i);else for(;!(g=b.next()).done;){var _=g.value;_&&(d=_[1],A=v+l.escape(_[0])+p+r(d,0),h+=o(d,A,n,i))}}else"object"===f&&(String(e),s(!1))}return h}function i(e,t,n){return null==e?0:o(e,"",t,n)}var a=(n(20),n(17)),u=n(164),s=n(1),l=n(75),c=(n(2),"."),p=":";e.exports=i},function(e,t,n){"use strict";var r=(n(3),n(11)),o=(n(2),r);e.exports=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ARRAY_INSERT="redux-form/ARRAY_INSERT",t.ARRAY_POP="redux-form/ARRAY_POP",t.ARRAY_PUSH="redux-form/ARRAY_PUSH",t.ARRAY_REMOVE="redux-form/ARRAY_REMOVE",t.ARRAY_SHIFT="redux-form/ARRAY_SHIFT",t.ARRAY_SPLICE="redux-form/ARRAY_SPLICE",t.ARRAY_UNSHIFT="redux-form/ARRAY_UNSHIFT",t.ARRAY_SWAP="redux-form/ARRAY_SWAP",t.BLUR="redux-form/BLUR",t.CHANGE="redux-form/CHANGE",t.DESTROY="redux-form/DESTROY",t.FOCUS="redux-form/FOCUS",t.INITIALIZE="redux-form/INITIALIZE",t.RESET="redux-form/RESET",t.SET_SUBMIT_FAILED="redux-form/SET_SUBMIT_FAILED",t.START_ASYNC_VALIDATION="redux-form/START_ASYNC_VALIDATION",t.START_SUBMIT="redux-form/START_SUBMIT",t.STOP_ASYNC_VALIDATION="redux-form/STOP_ASYNC_VALIDATION",t.STOP_SUBMIT="redux-form/STOP_SUBMIT",t.TOUCH="redux-form/TOUCH",t.UNTOUCH="redux-form/UNTOUCH"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=r(o),a=n(94),u=r(a),s=function(e){var t=e.source,n=e.language;return i["default"].createElement(u["default"],{content:"```"+n+t+"```"})};s.defaultProps={language:"js"},t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=r(o),a=n(70),u=r(a),s=n(190),l=r(s),c=function(e){return e.replace(/```(?:javascript|js)([\s\S]+?)```/g,function(e,t){return'<pre class="language-jsx"><code class="language-jsx">'+l["default"].highlight(t,l["default"].languages.jsx)+"</code></pre>"})},p=function(e){var t=e.content;return i["default"].createElement("div",{dangerouslySetInnerHTML:{__html:(0,u["default"])(c(t))}})};t["default"]=p},function(e,t,n){var r,o;/*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===o)for(var a in r)i.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=n:(r=[],o=function(){return n}.apply(t,r),!(void 0!==o&&(e.exports=o)))}()},function(e,t,n){"use strict";var r=n(11),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(){}};e.exports=o},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t,n){"use strict";function r(e){return a?void 0:i(!1),f.hasOwnProperty(e)||(e="*"),u.hasOwnProperty(e)||("*"===e?a.innerHTML="<link />":a.innerHTML="<"+e+"></"+e+">",u[e]=!a.firstChild),u[e]?f[e]:null}var o=n(6),i=n(1),a=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>"],f={"*":[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},d=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];d.forEach(function(e){f[e]=p,u[e]=!0}),e.exports=r},function(e,t){"use strict";var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};e.exports=function(e,t){if("string"!=typeof t)for(var o=Object.getOwnPropertyNames(t),i=0;i<o.length;++i)if(!n[o[i]]&&!r[o[i]])try{e[o[i]]=t[o[i]]}catch(a){}return e}},function(e,t,n){function r(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}var o=n(60),i=n(63);r.prototype=o(i.prototype),r.prototype.constructor=r,e.exports=r},function(e,t,n){var r=n(21),o=n(8),i=r(o,"Map");e.exports=i},function(e,t,n){function r(e){this.__data__=new o(e)}var o=n(34),i=n(267),a=n(268),u=n(269),s=n(270),l=n(271);r.prototype.clear=i,r.prototype["delete"]=a,r.prototype.get=u,r.prototype.has=s,r.prototype.set=l,e.exports=r},function(e,t,n){var r=n(8),o=r.Symbol;e.exports=o},function(e,t,n){var r=n(21),o=n(8),i=r(o,"WeakMap");e.exports=i},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=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}e.exports=n},function(e,t,n){var r=n(109),o=n(229),i=o(r);e.exports=i},function(e,t,n){function r(e,t){return e&&o(e,t,i)}var o=n(215),i=n(68);e.exports=r},function(e,t,n){function r(e,t){t=i(t,e)?[t]:o(t);for(var n=0,r=t.length;null!=e&&r>n;)e=e[a(t[n++])];return n&&n==r?e:void 0}var o=n(114),i=n(40),a=n(26);e.exports=r},function(e,t,n){function r(e,t){return a.call(e,t)||"object"==typeof e&&t in e&&null===o(e)}var o=n(122),i=Object.prototype,a=i.hasOwnProperty;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(133),o=n(128),i=o?function(e,t){return o.set(e,t),e}:r;e.exports=i},function(e,t,n){function r(e){return o(e)?e:i(e)}var o=n(9),i=n(130);e.exports=r},function(e,t){function n(e,t,n,o){for(var i=-1,a=e.length,u=n.length,s=-1,l=t.length,c=r(a-u,0),p=Array(l+c),f=!o;++s<l;)p[s]=t[s];for(;++i<u;)(f||a>i)&&(p[n[i]]=e[i]);for(;c--;)p[s++]=e[i++];return p}var r=Math.max;e.exports=n},function(e,t){function n(e,t,n,o){for(var i=-1,a=e.length,u=-1,s=n.length,l=-1,c=t.length,p=r(a-s,0),f=Array(p+c),d=!o;++i<p;)f[i]=e[i];for(var A=i;++l<c;)f[A+l]=t[l];for(;++u<s;)(d||a>i)&&(f[A+n[u]]=e[i++]);return f}var r=Math.max;e.exports=n},function(e,t,n){function r(e,t,n,g,b,w,_,E,x,C){function S(){for(var d=arguments.length,A=Array(d),h=d;h--;)A[h]=arguments[h];if(M)var v=l(S),m=a(A,v);if(g&&(A=o(A,g,b,M)),w&&(A=i(A,w,_,M)),d-=m,M&&C>d){var y=p(A,v);return s(e,t,r,S.placeholder,n,A,y,E,x,C-d)}var R=T?n:this,N=O?R[e]:e;return d=A.length,E?A=c(A,E):I&&d>1&&A.reverse(),P&&d>x&&(A.length=x),this&&this!==f&&this instanceof S&&(N=k||u(N)),N.apply(R,A)}var P=t&m,T=t&d,O=t&A,M=t&(h|v),I=t&y,k=O?void 0:u(e);return S}var o=n(115),i=n(116),a=n(228),u=n(36),s=n(118),l=n(37),c=n(262),p=n(25),f=n(8),d=1,A=2,h=8,v=16,m=128,y=512;e.exports=r},function(e,t,n){function r(e,t,n,r,f,d,A,h,v,m){var y=t&l,g=y?A:void 0,b=y?void 0:A,w=y?d:void 0,_=y?void 0:d;t|=y?c:p,t&=~(y?p:c),t&s||(t&=~(a|u));var E=[e,t,f,w,g,_,b,h,v,m],x=n.apply(void 0,E);return o(e)&&i(x,E),x.placeholder=r,x}var o=n(248),i=n(129),a=1,u=2,s=4,l=8,c=32,p=64;e.exports=r},function(e,t,n){function r(e,t,n,r,w,_,E,x){var C=t&h;if(!C&&"function"!=typeof e)throw new TypeError(d);var S=r?r.length:0;if(S||(t&=~(y|g),r=w=void 0),E=void 0===E?E:b(f(E),0),x=void 0===x?x:f(x),S-=w?w.length:0,t&g){var P=r,T=w;r=w=void 0}var O=C?void 0:l(e),M=[e,t,n,r,w,P,T,_,E,x];if(O&&c(M,O),e=M[0],t=M[1],n=M[2],r=M[3],w=M[4],x=M[9]=null==M[9]?C?0:e.length:b(M[9]-S,0),!x&&t&(v|m)&&(t&=~(v|m)),t&&t!=A)I=t==v||t==m?a(e,t,x):t!=y&&t!=(A|y)||w.length?u.apply(void 0,M):s(e,t,n,r);else var I=i(e,t,n);var k=O?o:p;return k(I,M)}var o=n(113),i=n(231),a=n(232),u=n(117),s=n(233),l=n(121),c=n(260),p=n(129),f=n(138),d="Expected a function",A=1,h=2,v=8,m=16,y=32,g=64,b=Math.max;e.exports=r},function(e,t,n){function r(e,t,n,r,s,l){var c=s&u,p=e.length,f=t.length;if(p!=f&&!(c&&f>p))return!1;var d=l.get(e);if(d)return d==t;var A=-1,h=!0,v=s&a?new o:void 0;for(l.set(e,t);++A<p;){var m=e[A],y=t[A];if(r)var g=c?r(y,m,A,t,e,l):r(m,y,A,e,t,l);if(void 0!==g){if(g)continue;h=!1;break}if(v){if(!i(t,function(e,t){return v.has(t)||m!==e&&!n(m,e,r,s,l)?void 0:v.add(t)})){h=!1;break}}else if(m!==y&&!n(m,y,r,s,l)){h=!1;break}}return l["delete"](e),h}var o=n(211),i=n(107),a=1,u=2;e.exports=r},function(e,t,n){var r=n(128),o=n(136),i=r?function(e){return r.get(e)}:o;e.exports=i},function(e,t){function n(e){return r(Object(e))}var r=Object.getPrototypeOf;e.exports=n},function(e,t,n){function r(e){return m.call(e)}var o=n(207),i=n(102),a=n(209),u=n(210),s=n(105),l=n(131),c="[object Map]",p="[object Object]",f="[object Promise]",d="[object Set]",A="[object WeakMap]",h="[object DataView]",v=Object.prototype,m=v.toString,y=l(o),g=l(i),b=l(a),w=l(u),_=l(s);(o&&r(new o(new ArrayBuffer(1)))!=h||i&&r(new i)!=c||a&&r(a.resolve())!=f||u&&r(new u)!=d||s&&r(new s)!=A)&&(r=function(e){var t=m.call(e),n=t==p?e.constructor:void 0,r=n?l(n):void 0;if(r)switch(r){case y:return h;case g:return c;case b:return f;case w:return d;case _:return A}return t}),e.exports=r},function(e,t,n){function r(e,t,n){if(!u(n))return!1;var r=typeof t;return("number"==r?i(n)&&a(t,n.length):"string"==r&&t in n)?o(n[t],e):!1}var o=n(132),i=n(42),a=n(39),u=n(15);e.exports=r},function(e,t,n){function r(e){return e===e&&!o(e)}var o=n(15);e.exports=r},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}e.exports=n},function(e,t){function n(e,t){return function(n){return null==n?!1:n[e]===t&&(void 0!==t||e in Object(n))}}e.exports=n},function(e,t,n){var r=n(105),o=r&&new r;e.exports=o},function(e,t,n){var r=n(113),o=n(281),i=150,a=16,u=function(){var e=0,t=0;return function(n,u){var s=o(),l=a-(s-t);if(t=s,l>0){if(++e>=i)return n}else e=0;return r(n,u)}}();e.exports=u},function(e,t,n){var r=n(280),o=n(288),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,a=/\\(\\)?/g,u=r(function(e){var t=[];return o(e).replace(i,function(e,n,r,o){t.push(r?o.replace(a,"$1"):n||e)}),t});e.exports=u},function(e,t){function n(e){if(null!=e){try{return r.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var r=Function.prototype.toString;e.exports=n},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t){function n(e){return e}e.exports=n},function(e,t,n){function r(e){return o(e)&&u.call(e,"callee")&&(!l.call(e,"callee")||s.call(e)==i)}var o=n(276),i="[object Arguments]",a=Object.prototype,u=a.hasOwnProperty,s=a.toString,l=a.propertyIsEnumerable;e.exports=r},function(e,t,n){function r(e){return"string"==typeof e||!o(e)&&i(e)&&s.call(e)==a}var o=n(9),i=n(18),a="[object String]",u=Object.prototype,s=u.toString;e.exports=r},function(e,t){function n(){}e.exports=n},function(e,t,n){function r(e,t){if("function"!=typeof e)throw new TypeError(a);return t=u(void 0===t?e.length-1:i(t),0),function(){for(var n=arguments,r=-1,i=u(n.length-t,0),a=Array(i);++r<i;)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 s=Array(t+1);for(r=-1;++r<t;)s[r]=n[r];return s[t]=a,o(e,this,s)}}var o=n(59),i=n(138),a="Expected a function",u=Math.max;e.exports=r},function(e,t,n){function r(e){var t=o(e),n=t%1;return t===t?n?t-n:t:0}var o=n(285);e.exports=r},function(e,t,n){"use strict";t.__esModule=!0;var r=n(4);t["default"]=r.PropTypes.shape({subscribe:r.PropTypes.func.isRequired,dispatch:r.PropTypes.func.isRequired,getState:r.PropTypes.func.isRequired})},function(e,t){"use strict";function n(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}t.__esModule=!0,t["default"]=n},function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},o=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){o.forEach(function(t){r[n(t,e)]=r[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}},a={isUnitlessNumber:r,shorthandPropertyExpansions:i};e.exports=a},function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=n(3),i=n(16),a=n(1);o(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?a(!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}},checkpoint:function(){return this._callbacks?this._callbacks.length:0},rollback:function(e){this._callbacks&&(this._callbacks.length=e,this._contexts.length=e)},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r=n(72),o=n(317),i=n(7),a={processChildrenUpdates:o.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup,unmountIDFromEnvironment:function(e){}};i.measureMethods(a,"ReactComponentBrowserEnvironment",{replaceNodeWithMarkup:"replaceNodeWithMarkup"}),e.exports=a},function(e,t){"use strict";var n={hasCachedChildNodes:1};e.exports=n},function(e,t,n){"use strict";function r(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===o?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var o=(n(91),9);e.exports=r},function(e,t,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=s.getValue(e);null!=t&&o(this,Boolean(e.multiple),t)}}function o(e,t,n){var r,o,i=l.getNodeFromInstance(e).options;if(t){for(r={},o=0;o<n.length;o++)r[""+n[o]]=!0;for(o=0;o<i.length;o++){var a=r.hasOwnProperty(i[o].value);i[o].selected!==a&&(i[o].selected=a)}}else{for(r=""+n,o=0;o<i.length;o++)if(i[o].value===r)return void(i[o].selected=!0);i.length&&(i[0].selected=!0)}}function i(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);return this._rootNodeID&&(this._wrapperState.pendingUpdate=!0),c.asap(r,this),n}var a=n(3),u=n(47),s=n(76),l=n(5),c=n(10),p=(n(2),!1),f={getNativeProps:function(e,t){return a({},u.getNativeProps(e,t),{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){var n=s.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:t.defaultValue,listeners:null,onChange:i.bind(e),wasMultiple:Boolean(t.multiple)},void 0===t.value||void 0===t.defaultValue||p||(p=!0)},getSelectValueContext:function(e){return e._wrapperState.initialValue},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=s.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?[]:""))}};e.exports=f},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(3),i=n(10),a=n(52),u=n(11),s={initialize:u,close:function(){f.isBatchingUpdates=!1}},l={initialize:u,close:i.flushBatchedUpdates.bind(i)},c=[l,s];o(r.prototype,a.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,i){var a=f.isBatchingUpdates;f.isBatchingUpdates=!0,a?e(t,n,r,o,i):p.perform(e,null,t,n,r,o,i)}};e.exports=f},function(e,t,n){"use strict";function r(){_||(_=!0,m.EventEmitter.injectReactEventListener(v),m.EventPluginHub.injectEventPluginOrder(a),m.EventPluginUtils.injectComponentTree(p),m.EventPluginUtils.injectTreeTraversal(d),m.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:w,EnterLeaveEventPlugin:u,ChangeEventPlugin:i,SelectEventPlugin:b,BeforeInputEventPlugin:o}),m.NativeComponent.injectGenericComponentClass(c),m.NativeComponent.injectTextComponentClass(A),m.DOMProperty.injectDOMPropertyConfig(s),m.DOMProperty.injectDOMPropertyConfig(g),m.EmptyComponent.injectEmptyComponentFactory(function(e){return new f(e)}),m.Updates.injectReconcileTransaction(y),m.Updates.injectBatchingStrategy(h),m.Component.injectEnvironment(l))}var o=n(297),i=n(299),a=n(302),u=n(303),s=(n(6),n(305)),l=n(143),c=n(313),p=n(5),f=n(315),d=n(325),A=n(323),h=n(147),v=n(329),m=n(330),y=n(335),g=n(340),b=n(341),w=n(342),_=!1;e.exports={inject:r}},function(e,t){"use strict";var n,r={injectEmptyComponentFactory:function(e){n=e}},o={create:function(e){return n(e)}};o.injection=r,e.exports=o},function(e,t){"use strict";var n={logTopLevelRenders:!1};e.exports=n},function(e,t,n){"use strict";function r(e){return i(document.documentElement,e)}var o=n(321),i=n(198),a=n(97),u=n(98),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),a(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(void 0===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 i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(e,t)}};e.exports=s},function(e,t,n){"use strict";var r=n(353),o=/\/?>/,i=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return i.test(e)?e: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}};e.exports=a},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===R?e.documentElement:e.firstChild:null}function i(e){return e.getAttribute&&e.getAttribute(M)||""}function a(e,t,n,r,o){var i;if(g.logTopLevelRenders){var a=e._currentElement.props,u=a.type;i="React mount: "+("string"==typeof u?u:u.displayName||u.name),console.time(i)}var s=_.mountComponent(e,n,null,v(e,t),o);i&&console.timeEnd(i),e._renderedComponent._topLevelWrapper=e,L._mountImageIntoNode(s,t,e,r,n)}function u(e,t,n,r){var o=x.ReactReconcileTransaction.getPooled(!n&&m.useCreateElement);o.perform(a,null,e,t,o,n,r),x.ReactReconcileTransaction.release(o)}function s(e,t,n){for(_.unmountComponent(e,n),t.nodeType===R&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function l(e){var t=o(e);if(t){var n=h.getInstanceFromNode(t);return!(!n||!n._nativeParent)}}function c(e){var t=o(e),n=t&&h.getInstanceFromNode(t);return n&&!n._nativeParent?n:null}function p(e){var t=c(e);return t?t._nativeContainerInfo._topLevelWrapper:null}var f=n(22),d=n(19),A=n(49),h=(n(20),n(5)),v=n(145),m=n(316),y=n(17),g=n(150),b=(n(50),n(152)),w=n(7),_=n(23),E=n(158),x=n(10),C=n(24),S=n(86),P=n(1),T=n(88),O=n(89),M=(n(2),d.ID_ATTRIBUTE_NAME),I=d.ROOT_ATTRIBUTE_NAME,k=1,R=9,N=11,D={},F=1,j=function(){this.rootID=F++};j.prototype.isReactComponent={},j.prototype.render=function(){return this.props};var L={TopLevelWrapper:j,_instancesByReactRootID:D,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return L.scrollMonitor(n,function(){E.enqueueElementInternal(e,t),r&&E.enqueueCallbackInternal(e,r)}),e},_renderNewRootComponent:function(e,t,n,r){!t||t.nodeType!==k&&t.nodeType!==R&&t.nodeType!==N?P(!1):void 0,A.ensureScrollValueMonitoring();var o=S(e);x.batchedUpdates(u,o,t,n,r);var i=o._instance.rootID;return D[i]=o,o},renderSubtreeIntoContainer:function(e,t,n,r){return null==e||null==e._reactInternalInstance?P(!1):void 0,L._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){E.validateCallback(r,"ReactDOM.render"),y.isValidElement(t)?void 0:P(!1);var a=y(j,null,null,null,null,null,t),u=p(n);if(u){var s=u._currentElement,c=s.props;if(O(c,t)){var f=u._renderedComponent.getPublicInstance(),d=r&&function(){r.call(f)};return L._updateRootComponent(u,a,n,d),f}L.unmountComponentAtNode(n)}var A=o(n),h=A&&!!i(A),v=l(n),m=h&&!u&&!v,g=L._renderNewRootComponent(a,n,m,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):C)._renderedComponent.getPublicInstance();return r&&r.call(g),g},render:function(e,t,n){return L._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){!e||e.nodeType!==k&&e.nodeType!==R&&e.nodeType!==N?P(!1):void 0;var t=p(e);return t?(delete D[t._instance.rootID],x.batchedUpdates(s,t,e,!1),!0):(l(e),1===e.nodeType&&e.hasAttribute(I),!1)},_mountImageIntoNode:function(e,t,n,i,a){if(!t||t.nodeType!==k&&t.nodeType!==R&&t.nodeType!==N?P(!1):void 0,i){var u=o(t);if(b.canReuseMarkup(e,u))return void h.precacheNode(n,u);var s=u.getAttribute(b.CHECKSUM_ATTR_NAME);u.removeAttribute(b.CHECKSUM_ATTR_NAME);var l=u.outerHTML;u.setAttribute(b.CHECKSUM_ATTR_NAME,s);var c=e,p=r(c,l);" (client) "+c.substring(p-20,p+20)+"\n (server) "+l.substring(p-20,p+20),t.nodeType===R?P(!1):void 0}if(t.nodeType===R?P(!1):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);f.insertTreeBefore(t,e,null)}else T(t,e),h.precacheNode(n,t.firstChild)}};w.measureMethods(L,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),e.exports=L},function(e,t,n){"use strict";var r=n(32),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=o},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)}function i(e){return new f(e)}function a(e){return e instanceof f}var u=n(3),s=n(1),l=null,c=null,p={},f=null,d={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){f=e},injectComponentClasses:function(e){u(p,e)}},A={getComponentClassForElement:r,createInternalComponent:o,createInstanceForText:i,isTextComponent:a,injection:d};e.exports=A},function(e,t,n){"use strict";var r=n(17),o=n(1),i={NATIVE:0,COMPOSITE:1,EMPTY:2,getType:function(e){return null===e||e===!1?i.EMPTY:r.isValidElement(e)?"function"==typeof e.type?i.COMPOSITE:i.NATIVE:void o(!1)}};e.exports=i},function(e,t,n){"use strict";function r(e,t){}var o=(n(2),{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")}});e.exports=o},function(e,t,n){"use strict";function r(e){a.enqueueUpdate(e)}function o(e,t){var n=i.get(e);return n?n:null}var i=(n(20),n(79)),a=n(10),u=n(1),s=(n(2),{isMounted:function(e){var t=i.get(e);return t?!!t._renderedComponent:!1},enqueueCallback:function(e,t,n){s.validateCallback(t,n);var i=o(e);return i?(i._pendingCallbacks?i._pendingCallbacks.push(t):i._pendingCallbacks=[t],void r(i)):null},enqueueCallbackInternal:function(e,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)}},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?u(!1):void 0}});e.exports=s},function(e,t){"use strict";e.exports="15.0.2"},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},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=n(1);e.exports=r},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[o]);return"function"==typeof t?t:void 0}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=n},function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.NATIVE?e._renderedComponent:t===o.EMPTY?null:void 0}var o=n(156);e.exports=r},function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(6),i=null;e.exports=r},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&r[e.type]||"textarea"===t)}var r={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};e.exports=n},function(e,t,n){"use strict";var r=n(6),o=n(53),i=n(88),a=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){i(e,o(t))})),e.exports=a},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 i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(191),s=r(u),l=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,"Submit Validation Failed"));return n.errors=e,n}return a(t,e),t}(s["default"]);t["default"]=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.untouch=t.touch=t.setSubmitFailed=t.stopSubmit=t.stopAsyncValidation=t.startSubmit=t.startAsyncValidation=t.reset=t.initialize=t.focus=t.destroy=t.change=t.blur=t.arrayUnshift=t.arraySwap=t.arraySplice=t.arrayShift=t.arrayRemove=t.arrayPush=t.arrayPop=t.arrayInsert=void 0;var r=n(92);t.arrayInsert=function(e,t,n,o){return{type:r.ARRAY_INSERT,meta:{form:e,field:t,index:n},payload:o}},t.arrayPop=function(e,t){return{type:r.ARRAY_POP,meta:{form:e,field:t}}},t.arrayPush=function(e,t,n){return{type:r.ARRAY_PUSH,meta:{form:e,field:t},payload:n}},t.arrayRemove=function(e,t,n){return{type:r.ARRAY_REMOVE,meta:{form:e,field:t,index:n}}},t.arrayShift=function(e,t){return{type:r.ARRAY_SHIFT,meta:{form:e,field:t}}},t.arraySplice=function(e,t,n,o,i){var a={type:r.ARRAY_SPLICE,meta:{form:e,field:t,index:n,removeNum:o}};return void 0!==i&&(a.payload=i),a},t.arraySwap=function(e,t,n,o){if(n===o)throw new Error("Swap indices cannot be equal");if(0>n||0>o)throw new Error("Swap indices cannot be negative");return{type:r.ARRAY_SWAP,meta:{form:e,field:t,indexA:n,indexB:o}}},t.arrayUnshift=function(e,t,n){return{type:r.ARRAY_UNSHIFT,meta:{form:e,field:t},payload:n}},t.blur=function(e,t,n,o){return{type:r.BLUR,meta:{form:e,field:t,touch:o},payload:n}},t.change=function(e,t,n,o){return{type:r.CHANGE,meta:{form:e,field:t,touch:o},payload:n}},t.destroy=function(e){return{type:r.DESTROY,meta:{form:e}}},t.focus=function(e,t){return{type:r.FOCUS,meta:{form:e,field:t}}},t.initialize=function(e,t){return{type:r.INITIALIZE,meta:{form:e},payload:t}},t.reset=function(e){return{type:r.RESET,meta:{form:e}}},t.startAsyncValidation=function(e,t){return{type:r.START_ASYNC_VALIDATION,meta:{form:e,field:t}}},t.startSubmit=function(e){return{type:r.START_SUBMIT,meta:{form:e}}},t.stopAsyncValidation=function(e,t){var n={type:r.STOP_ASYNC_VALIDATION,meta:{form:e},payload:t};return t&&Object.keys(t).length&&(n.error=!0),n},t.stopSubmit=function(e,t){var n={type:r.STOP_SUBMIT,meta:{form:e},payload:t};return t&&Object.keys(t).length&&(n.error=!0),n},t.setSubmitFailed=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;t>o;o++)n[o-1]=arguments[o];return{type:r.SET_SUBMIT_FAILED,meta:{form:e,fields:n},error:!0}},t.touch=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;t>o;o++)n[o-1]=arguments[o];return{type:r.TOUCH,meta:{form:e,fields:n}}},t.untouch=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;t>o;o++)n[o-1]=arguments[o];return{type:r.UNTOUCH,meta:{form:e,fields:n}}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=t.dataKey="value",r=function(e,t){return function(e){e.dataTransfer.setData(n,t)}};t["default"]=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(173),i=r(o),a=function(e){var t=[];if(e)for(var n=0;n<e.length;n++){var r=e[n];r.selected&&t.push(r.value)}return t},u=function(e,t){if((0,i["default"])(e)){if(!t&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(t&&void 0!==e.nativeEvent)return e.nativeEvent.text;var n=e.target,r=n.type,o=n.value,u=n.checked,s=n.files,l=e.dataTransfer;return"checkbox"===r?u:"file"===r?s||l&&l.files:"select-multiple"===r?a(e.target.options):o}return e&&void 0!==e.value?e.value:e};t["default"]=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return!!(e&&e.stopPropagation&&e.preventDefault)};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(173),i=r(o),a=function(e){var t=(0,i["default"])(e);return t&&e.preventDefault(),t};t["default"]=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product;t["default"]=n},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(0===t.length)return function(e){return e};var r=function(){var e=t[t.length-1],n=t.slice(0,-1);return{v:function(){return n.reduceRight(function(e,t){return t(e)},e.apply(void 0,arguments))}}}();return"object"==typeof r?r.v:void 0}t.__esModule=!0,t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){function r(){m===v&&(m=v.slice())}function i(){return h}function u(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return r(),m.push(e),function(){if(t){t=!1,r();var n=m.indexOf(e);m.splice(n,1)}}}function c(e){if(!(0,a["default"])(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(y)throw new Error("Reducers may not dispatch actions.");try{y=!0,h=A(h,e)}finally{y=!1}for(var t=v=m,n=0;n<t.length;n++)t[n]();return e}function p(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");A=e,c({type:l.INIT})}function f(){var e,t=u;return e={subscribe:function(e){function n(){e.next&&e.next(i())}if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");n();var r=t(n);return{unsubscribe:r}}},e[s["default"]]=function(){return this},e}var d;if("function"==typeof t&&"undefined"==typeof n&&(n=t,t=void 0),"undefined"!=typeof n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function."); return n(o)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var A=e,h=t,v=[],m=v,y=!1;return c({type:l.INIT}),d={dispatch:c,subscribe:u,getState:i,replaceReducer:p},d[s["default"]]=f,d}t.__esModule=!0,t.ActionTypes=void 0,t["default"]=o;var i=n(67),a=r(i),u=n(395),s=r(u),l=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var o=n(177),i=r(o),a=n(394),u=r(a),s=n(393),l=r(s),c=n(392),p=r(c),f=n(176),d=r(f),A=n(179);r(A),t.createStore=i["default"],t.combineReducers=u["default"],t.bindActionCreators=l["default"],t.applyMiddleware=p["default"],t.compose=d["default"]},function(e,t){"use strict";function n(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}t.__esModule=!0,t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(4),i=r(o),a=n(290),u=r(a),s=n(54),l=r(s);"undefined"!=typeof window&&(window.initReact=function(e){return u["default"].render(i["default"].createElement(l["default"],e),document.getElementById("content"))})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=r(o),a=n(70),u=r(a),s=n(193),l=r(s),c=function(e){return/<p>(.+)<\/p>/.exec((0,u["default"])(e))[1]},p=function(e){var t=e.items;return t&&t.length?i["default"].createElement("ol",{className:l["default"].breadcrumbs},t.map(function(e,n){var r=e.path,o=e.title;return n===t.length-1?i["default"].createElement("li",{key:n,dangerouslySetInnerHTML:{__html:c(o)}}):i["default"].createElement("li",{key:n},i["default"].createElement("a",{href:r,dangerouslySetInnerHTML:{__html:c(o)}}))})):!1};t["default"]=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=r(o),a=function(e){var t=e.user,n=e.repo,r=e.type,o=e.width,a=e.height,u=e.count,s=e.large,l="https://ghbtns.com/github-btn.html?user="+t+"&repo="+n+"&type="+r;return u&&(l+="&count=true"),s&&(l+="&size=large"),i["default"].createElement("iframe",{src:l,frameBorder:"0",allowTransparency:"true",scrolling:"0",width:o,height:a,style:{border:"none",width:o,height:a}})};a.propTypes={user:o.PropTypes.string.isRequired,repo:o.PropTypes.string.isRequired,type:o.PropTypes.oneOf(["star","watch","fork","follow"]).isRequired,width:o.PropTypes.number.isRequired,height:o.PropTypes.number.isRequired,count:o.PropTypes.bool,large:o.PropTypes.bool},t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=r(o),a=n(182),u=r(a),s=function(e){var t=e.version,r=n(194);return i["default"].createElement("div",{className:r.home},i["default"].createElement("div",{className:r.masthead},i["default"].createElement("div",{className:r.logo}),i["default"].createElement("h1",null,"Redux Form"),i["default"].createElement("div",{className:r.version},"v",t),i["default"].createElement("h2",null,"The best way to manage your form state in Redux."),i["default"].createElement(u["default"],{user:"erikras",repo:"redux-form",type:"star",width:160,height:30,count:!0,large:!0}),i["default"].createElement(u["default"],{user:"erikras",repo:"redux-form",type:"fork",width:160,height:30,count:!0,large:!0})),i["default"].createElement("div",{className:r.options},i["default"].createElement("a",{href:"docs/GettingStarted.md"},i["default"].createElement("i",{className:r.start}),"Start Here"),i["default"].createElement("a",{href:"docs/api"},i["default"].createElement("i",{className:r.api}),"API"),i["default"].createElement("a",{href:"examples"},i["default"].createElement("i",{className:r.examples}),"Examples"),i["default"].createElement("a",{href:"docs/faq"},i["default"].createElement("i",{className:r.faq}),"FAQ")))};t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(4),c=r(l),p=n(95),f=r(p),d=n(70),A=r(d),h=n(195),v=r(h),m=function(e){return/<p>(.+)<\/p>/.exec((0,A["default"])(e))[1]},y=function(e){function t(e){i(this,t);var n=a(this,Object.getPrototypeOf(t).call(this,e));return n.open=n.open.bind(n),n.close=n.close.bind(n),n.state={open:!1},n}return u(t,e),s(t,[{key:"renderItem",value:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],r=this.props,i=r.path,a=r.url;return c["default"].createElement("a",{href:""+(a||"")+e,className:(0,f["default"])(v["default"]["indent"+n],o({},v["default"].active,e===i)),dangerouslySetInnerHTML:{__html:m(t)}})}},{key:"open",value:function(){this.setState({open:!0})}},{key:"close",value:function(){this.setState({open:!1})}},{key:"render",value:function(){var e=this.state.open,t=this.props.url;return c["default"].createElement("div",{className:(0,f["default"])(v["default"].nav,o({},v["default"].open,e))},c["default"].createElement("button",{type:"button",onClick:this.open}),c["default"].createElement("div",{className:v["default"].overlay,onClick:this.close},c["default"].createElement("i",{className:"fa fa-times"})," Close"),c["default"].createElement("div",{className:v["default"].placeholder}),c["default"].createElement("nav",{className:v["default"].menu},c["default"].createElement("a",{href:t,className:v["default"].brand},"Redux Form"),this.renderItem("/docs/GettingStarted.md","Getting Started"),this.renderItem("/docs/MigrationGuide.md","`v6` Migration Guide"),this.renderItem("/docs/api","API"),this.renderItem("/docs/api/ReduxForm.md","`reduxForm()`",1),this.renderItem("/docs/api/Props.md","`props`",1),this.renderItem("/docs/api/Field.md","`Field`",1),this.renderItem("/docs/api/FieldArray.md","`FieldArray`",1),this.renderItem("/docs/api/FormValueSelector.md","`formValueSelector()`",1),this.renderItem("/docs/api/Reducer.md","`reducer`",1),this.renderItem("/docs/api/ReducerPlugin.md","`reducer.plugin()`",2),this.renderItem("/docs/api/SubmissionError.md","`SubmissionError`",1),this.renderItem("/docs/api/ActionCreators.md","Action Creators",1),this.renderItem("/docs/faq","FAQ"),this.renderItem("/examples","Examples"),this.renderItem("/examples/simple","Simple Form",1),this.renderItem("/examples/syncValidation","Sync Validation",1),this.renderItem("/examples/submitValidation","Submit Validation",1),this.renderItem("/examples/asyncValidation","Async Validation",1),this.renderItem("/examples/initializeFromState","Initializing from State",1),this.renderItem("/examples/selectingFormValues","Selecting Form Values",1),this.renderItem("/examples/fieldArrays","Field Arrays",1),this.renderItem("/examples/immutable","Immutable JS",1),this.renderItem("/examples/wizard","Wizard Form",1),this.renderItem("/examples/material-ui","Material UI",1),this.renderItem("/examples/react-widgets","React Widgets",1),this.renderItem("/docs/DocumentationVersions.md","Older Versions")))}}]),t}(l.Component);y.propTypes={path:l.PropTypes.string.isRequired,url:l.PropTypes.string.isRequired},t["default"]=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(4),a=r(i),u=function(e){var t=e.username,n=e.showUsername,r=e.showCount,i=e.large,u={};return n||(u["data-show-screen-name"]="false"),r||(u["data-show-count"]="false"),i&&(u["data-size"]="large"),a["default"].createElement("a",o({href:"https://twitter.com/"+t,className:"twitter-follow-button"},u),"Follow @",t)};u.propTypes={username:i.PropTypes.string.isRequired,showUserName:i.PropTypes.bool,showCount:i.PropTypes.bool,large:i.PropTypes.bool},t["default"]=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=r(o),a=n(381),u=n(93),s=r(u),l=function(e){var t=e.form,n=e.format,r=void 0===n?function(e){return JSON.stringify(e,null,2)}:n,o=(0,a.values)({form:t}),u=function(e){var t=e.values;return i["default"].createElement("div",null,i["default"].createElement("h2",null,"Values"),i["default"].createElement(s["default"],{source:r(t)}))},l=o(u);return i["default"].createElement(l,null)};t["default"]=l},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,n){return[{path:"http://redux-form.com/"+n+"/",title:"Redux Form"},{path:"http://redux-form.com/"+n+"/examples",title:"Examples"},{path:"http://redux-form.com/"+n+"/examples/"+e,title:t}]};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Values=t.Markdown=t.Code=t.App=t.generateExampleBreadcrumbs=t.render=void 0;var o=n(189),i=r(o),a=n(187),u=r(a),s=n(54),l=r(s),c=n(93),p=r(c),f=n(94),d=r(f),A=n(186),h=r(A);t.render=i["default"],t.generateExampleBreadcrumbs=u["default"],t.App=l["default"],t.Code=p["default"],t.Markdown=d["default"],t.Values=h["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=r(o),a=n(291),u=n(54),s=r(u),l=function(e){var t=e.component,n=e.title,r=e.path,o=e.version,u=e.breadcrumbs;return'<!DOCTYPE html>\n <html lang="en">\n <head>\n <meta charSet="utf-8"/>\n <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>\n <title>Redux Form'+(n&&" - "+n)+'</title>\n <link href="http://redux-form.com/'+o+'/bundle.css"\n media="screen, projection" rel="stylesheet" type="text/css"/>\n <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css"\n media="screen, projection" rel="stylesheet" type="text/css"/>\n <meta itemprop="name" content="Redux Form"/>\n <meta property="og:type" content="website"/>\n <meta property="og:title" content="Redux Form"/>\n <meta property="og:site_name" content="Redux Form"/>\n <meta property="og:description" content="The best way to manage your form state in Redux."/>\n <meta property="og:image" content="logo.png"/>\n <meta property="twitter:site" content="@erikras"/>\n <meta property="twitter:creator" content="@erikras"/>\n <style type="text/css">\n body {\n margin: 0;\n }\n </style>\n </head>\n <body>\n <div id="content">\n '+(0,a.renderToString)(i["default"].createElement(s["default"],{version:o,path:r,breadcrumbs:u},t))+'\n </div>\n <script src="http://redux-form.com/'+o+'/bundle.js"></script>\n <script>initReact('+JSON.stringify({version:o,path:r,breadcrumbs:u})+")</script>\n <script>\n (function(i,s,o,g,r,a,m){i[ 'GoogleAnalyticsObject' ] = r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n ga('create', 'UA-69298417-1', 'auto');\n ga('send', 'pageview');\n </script>\n <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>\n </body>\n </html>"};t["default"]=l},function(e,t){(function(t){"use strict";var n="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},r=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,r=n.Prism={util:{encode:function(e){return e instanceof o?new o(e.type,r.util.encode(e.content),e.alias):"Array"===r.util.type(e)?e.map(r.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e){var t=r.util.type(e);switch(t){case"Object":var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=r.util.clone(e[o]));return n;case"Array":return e.map&&e.map(function(e){return r.util.clone(e)})}return e}},languages:{extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var o in t)n[o]=t[o];return n},insertBefore:function(e,t,n,o){o=o||r.languages;var i=o[e];if(2==arguments.length){n=arguments[1];for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a]);return i}var u={};for(var s in i)if(i.hasOwnProperty(s)){if(s==t)for(var a in n)n.hasOwnProperty(a)&&(u[a]=n[a]);u[s]=i[s]}return r.languages.DFS(r.languages,function(t,n){n===o[e]&&t!=e&&(this[t]=u)}),o[e]=u},DFS:function(e,t,n,o){o=o||{};for(var i in e)e.hasOwnProperty(i)&&(t.call(e,i,e[i],n||i),"Object"!==r.util.type(e[i])||o[r.util.objId(e[i])]?"Array"!==r.util.type(e[i])||o[r.util.objId(e[i])]||(o[r.util.objId(e[i])]=!0,r.languages.DFS(e[i],t,i,o)):(o[r.util.objId(e[i])]=!0,r.languages.DFS(e[i],t,null,o)))}},plugins:{},highlightAll:function(e,t){var n={callback:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",n);for(var o,i=n.elements||document.querySelectorAll(n.selector),a=0;o=i[a++];)r.highlightElement(o,e===!0,n.callback)},highlightElement:function(t,o,i){for(var a,u,s=t;s&&!e.test(s.className);)s=s.parentNode;s&&(a=(s.className.match(e)||[,""])[1],u=r.languages[a]),t.className=t.className.replace(e,"").replace(/\s+/g," ")+" language-"+a,s=t.parentNode,/pre/i.test(s.nodeName)&&(s.className=s.className.replace(e,"").replace(/\s+/g," ")+" language-"+a);var l=t.textContent,c={element:t,language:a,grammar:u,code:l};if(!l||!u)return void r.hooks.run("complete",c);if(r.hooks.run("before-highlight",c),o&&n.Worker){var p=new Worker(r.filename);p.onmessage=function(e){c.highlightedCode=e.data,r.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,i&&i.call(c.element),r.hooks.run("after-highlight",c),r.hooks.run("complete",c)},p.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else c.highlightedCode=r.highlight(c.code,c.grammar,c.language),r.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,i&&i.call(t),r.hooks.run("after-highlight",c),r.hooks.run("complete",c)},highlight:function(e,t,n){var i=r.tokenize(e,t);return o.stringify(r.util.encode(i),n)},tokenize:function(e,t){var n=r.Token,o=[e],i=t.rest;if(i){for(var a in i)t[a]=i[a];delete t.rest}e:for(var a in t)if(t.hasOwnProperty(a)&&t[a]){var u=t[a];u="Array"===r.util.type(u)?u:[u];for(var s=0;s<u.length;++s){var l=u[s],c=l.inside,p=!!l.lookbehind,f=!!l.greedy,d=0,A=l.alias;l=l.pattern||l;for(var h=0;h<o.length;h++){var v=o[h];if(o.length>e.length)break e;if(!(v instanceof n)){l.lastIndex=0;var m=l.exec(v),y=1;if(!m&&f&&h!=o.length-1){var g=o[h+1].matchedStr||o[h+1],b=v+g;if(h<o.length-2&&(b+=o[h+2].matchedStr||o[h+2]),l.lastIndex=0,m=l.exec(b),!m)continue;var w=m.index+(p?m[1].length:0);if(w>=v.length)continue;var _=m.index+m[0].length,E=v.length+g.length;y=3,E>=_&&(y=2,b=b.slice(0,E)),v=b}if(m){p&&(d=m[1].length);var w=m.index+d,m=m[0].slice(d),_=w+m.length,x=v.slice(0,w),C=v.slice(_),S=[h,y];x&&S.push(x);var P=new n(a,c?r.tokenize(m,c):m,A,m);S.push(P),C&&S.push(C),Array.prototype.splice.apply(o,S)}}}}}return o},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var o,i=0;o=n[i++];)o(t)}}},o=r.Token=function(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.matchedStr=r||null};if(o.stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===r.util.type(e))return e.map(function(n){return o.stringify(n,t,e)}).join("");var i={type:e.type,content:o.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if("comment"==i.type&&(i.attributes.spellcheck="true"),e.alias){var a="Array"===r.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,a)}r.hooks.run("wrap",i);var u="";for(var s in i.attributes)u+=(u?" ":"")+s+'="'+(i.attributes[s]||"")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'" '+u+">"+i.content+"</"+i.tag+">"},!n.document)return n.addEventListener?(n.addEventListener("message",function(e){var t=JSON.parse(e.data),o=t.language,i=t.code,a=t.immediateClose;n.postMessage(r.highlight(i,r.languages[o],o)),a&&n.close()},!1),n.Prism):n.Prism;var i=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return i&&(r.filename=i.src,document.addEventListener&&!i.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",r.highlightAll)),n.Prism}();"undefined"!=typeof e&&e.exports&&(e.exports=r),"undefined"!=typeof t&&(t.Prism=r),r.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=.$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},r.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),r.languages.xml=r.languages.markup,r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},r.languages.css.atrule.inside.rest=r.util.clone(r.languages.css),r.languages.markup&&(r.languages.insertBefore("markup","tag",{style:{pattern:/(<style[\w\W]*?>)[\w\W]*?(?=<\/style>)/i,lookbehind:!0,inside:r.languages.css,alias:"language-css"}}),r.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:r.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:r.languages.css}},alias:"language-css"}},r.languages.markup.tag)),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),r.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}}),r.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\\\|\\?[^\\])*?`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}}}),r.languages.markup&&r.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:r.languages.javascript,alias:"language-javascript"}}),r.languages.js=r.languages.javascript,r.languages.json={property:/".*?"(?=\s*:)/gi,string:/"(?!:)(\\?[^"])*?"(?!:)/g,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,punctuation:/[{}[\]);,]/g,operator:/:/g,"boolean":/\b(true|false)\b/gi,"null":/\bnull\b/gi},r.languages.jsonp=r.languages.json,!function(e){var t=e.util.clone(e.languages.javascript);e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=/<\/?[\w\.:-]+\s*(?:\s+[\w\.:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+|(\{[\w\W]*?\})))?\s*)*\/?>/i,e.languages.jsx.tag.inside["attr-value"].pattern=/=[^\{](?:('|")[\w\W]*?(\1)|[^\s>]+)/i;var n=e.util.clone(e.languages.jsx);delete n.punctuation,n=e.languages.insertBefore("jsx","operator",{punctuation:/=(?={)|[{}[\];(),.:]/},{jsx:n}),e.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{[^}]*\}|[^}])+\})/i,inside:n,alias:"language-javascript"}},e.languages.jsx.tag)}(r)}).call(t,function(){return this}())},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;r=!1,null===o&&(o=Function.prototype);var u=Object.getOwnPropertyDescriptor(o,i);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var l=Object.getPrototypeOf(o);if(null===l)return;e=l,t=i,n=a,r=!0,u=l=void 0}},i=function(e){function t(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0];return n(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),Object.defineProperty(this,"message",{enumerable:!1,value:e,writable:!0}),Object.defineProperty(this,"name",{enumerable:!1,value:this.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?void Error.captureStackTrace(this,this.constructor):void Object.defineProperty(this,"stack",{enumerable:!1,value:new Error(e).stack,writable:!0})}return r(t,e),t}(Error);t["default"]=i,e.exports=t["default"]},function(e,t){e.exports={app:"app___3P8ep",topNav:"topNav___sBW8S",brand:"brand___YAZl-",github:"github___3-vRv",contentAndFooter:"contentAndFooter___kE2nt",content:"content___3TVHp",home:"home___2XyPG",hasNav:"hasNav___1KF_W",footer:"footer___1oh0h",help:"help___3OayI"}},function(e,t){e.exports={breadcrumbs:"breadcrumbs___1BHo6"}},function(e,t){e.exports={home:"home___381a9",masthead:"masthead___MGNF0",logo:"logo___hP7wi",content:"content___2vYdp",version:"version___2mbZo",github:"github___mrRv3",options:"options___2Tyc4",start:"start___1WlUb",api:"api___1hCrr",examples:"examples___2H_mp",faq:"faq___2mIT0"}},function(e,t){e.exports={nav:"nav___11xa5",placeholder:"placeholder___TzF1K",overlay:"overlay___1GMox",menu:"menu___12xDU",active:"active___2eU59",brand:"brand___1qRUu",indent1:"indent1___4iVnL",indent2:"indent2___2PiOO",open:"open___3Bk_k"}},function(e,t){"use strict";function n(e){return e.replace(r,function(e,t){return t.toUpperCase()})}var r=/-(.)/g;e.exports=n},function(e,t,n){"use strict";function r(e){return o(e.replace(i,"ms-"))}var o=n(196),i=/^-ms-/;e.exports=r},function(e,t,n){"use strict";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=n(205);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?a(!1):void 0,"number"!=typeof t?a(!1):void 0,0===t||t-1 in e?void 0:a(!1),"function"==typeof e.callee?a(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),o=0;t>o;o++)r[o]=e[o];return r}function o(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 i(e){return o(e)?Array.isArray(e)?e.slice():r(e):[e]}var a=n(1);e.exports=i},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),i=o&&u(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&&(t?void 0:s(!1),a(p).forEach(t));for(var f=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return f}var i=n(6),a=n(199),u=n(99),s=n(1),l=i.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;e.exports=o},function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=n},function(e,t){"use strict";function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;e.exports=n},function(e,t,n){"use strict";function r(e){return o(e).replace(i,"-ms-")}var o=n(202),i=/^ms-/;e.exports=r},function(e,t){"use strict";function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=n(204);e.exports=r},function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=n},function(e,t,n){var r=n(21),o=n(8),i=r(o,"DataView");e.exports=i},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(241),i=n(242),a=n(243),u=n(244),s=n(245);r.prototype.clear=o,r.prototype["delete"]=i,r.prototype.get=a,r.prototype.has=u,r.prototype.set=s,e.exports=r},function(e,t,n){var r=n(21),o=n(8),i=r(o,"Promise");e.exports=i},function(e,t,n){var r=n(21),o=n(8),i=r(o,"Set");e.exports=i},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.__data__=new o;++t<n;)this.add(e[t])}var o=n(58),i=n(263),a=n(264);r.prototype.add=r.prototype.push=i,r.prototype.has=a,e.exports=r},function(e,t,n){var r=n(8),o=r.Uint8Array;e.exports=o},function(e,t){function n(e,t){for(var n=-1,r=e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}e.exports=n},function(e,t,n){function r(e,t){var n=!0;return o(e,function(e,r,o){return n=!!t(e,r,o)}),n}var o=n(108);e.exports=r},function(e,t,n){var r=n(230),o=r();e.exports=o},function(e,t){function n(e,t){return t in Object(e)}e.exports=n},function(e,t,n){function r(e,t,n,r,v,y){var g=l(e),b=l(t),w=A,_=A;g||(w=s(e),w=w==d?h:w),b||(_=s(t),_=_==d?h:_);var E=w==h&&!c(e),x=_==h&&!c(t),C=w==_;if(C&&!E)return y||(y=new o),g||p(e)?i(e,t,n,r,v,y):a(e,t,w,n,r,v,y);if(!(v&f)){var S=E&&m.call(e,"__wrapped__"),P=x&&m.call(t,"__wrapped__");if(S||P){var T=S?e.value():e,O=P?t.value():t;return y||(y=new o),n(T,O,r,v,y)}}return C?(y||(y=new o),u(e,t,n,r,v,y)):!1}var o=n(103),i=n(120),a=n(235),u=n(236),s=n(123),l=n(9),c=n(65),p=n(279),f=2,d="[object Arguments]",A="[object Array]",h="[object Object]",v=Object.prototype,m=v.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t,n,r){var s=n.length,l=s,c=!r;if(null==e)return!l;for(e=Object(e);s--;){var p=n[s];if(c&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++s<l;){p=n[s];var f=p[0],d=e[f],A=p[1];if(c&&p[2]){if(void 0===d&&!(f in e))return!1}else{var h=new o;if(r)var v=r(d,A,f,e,t,h);if(!(void 0===v?i(A,d,r,a|u,h):v))return!1}}return!0}var o=n(103),i=n(61),a=1,u=2;e.exports=r},function(e,t){function n(e){return r(Object(e))}var r=Object.keys;e.exports=n},function(e,t,n){function r(e){var t=i(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||o(n,e,t)}}var o=n(218),i=n(239),a=n(127);e.exports=r},function(e,t,n){function r(e,t){return u(e)&&s(t)?l(c(e),t):function(n){var r=i(n,e);return void 0===r&&r===t?a(n,e):o(t,r,void 0,p|f)}}var o=n(61),i=n(274),a=n(275),u=n(40),s=n(125),l=n(127),c=n(26),p=1,f=2;e.exports=r},function(e,t,n){function r(e){return function(t){return o(t,e)}}var o=n(110);e.exports=r},function(e,t,n){function r(e,t){var n;return o(e,function(e,r,o){return n=t(e,r,o),!n}),!!n}var o=n(108);e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}e.exports=n},function(e,t,n){function r(e,t){return o(t,function(t){return[t,e[t]]})}var o=n(106);e.exports=r},function(e,t,n){function r(e){if("string"==typeof e)return e;if(i(e))return s?s.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}var o=n(104),i=n(27),a=1/0,u=o?o.prototype:void 0,s=u?u.toString:void 0;e.exports=r},function(e,t){function n(e){return e&&e.Object===Object?e:null}e.exports=n},function(e,t){function n(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&r++;return r}e.exports=n},function(e,t,n){function r(e,t){return function(n,r){if(null==n)return n;if(!o(n))return e(n,r);for(var i=n.length,a=t?i:-1,u=Object(n);(t?a--:++a<i)&&r(u[a],a,u)!==!1;);return n}}var o=n(42);e.exports=r},function(e,t){function n(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),u=a.length;u--;){var s=a[e?u:++o];if(n(i[s],s,i)===!1)break}return t}}e.exports=n},function(e,t,n){function r(e,t,n){function r(){var t=this&&this!==i&&this instanceof r?s:e;return t.apply(u?n:this,arguments)}var u=t&a,s=o(e);return r}var o=n(36),i=n(8),a=1;e.exports=r},function(e,t,n){function r(e,t,n){function r(){for(var i=arguments.length,f=Array(i),d=i,A=s(r);d--;)f[d]=arguments[d];var h=3>i&&f[0]!==A&&f[i-1]!==A?[]:l(f,A);if(i-=h.length,n>i)return u(e,t,a,r.placeholder,void 0,f,h,void 0,void 0,n-i);var v=this&&this!==c&&this instanceof r?p:e;return o(v,this,f)}var p=i(e);return r}var o=n(59),i=n(36),a=n(117),u=n(118),s=n(37),l=n(25),c=n(8);e.exports=r},function(e,t,n){function r(e,t,n,r){function s(){for(var t=-1,i=arguments.length,u=-1,p=r.length,f=Array(p+i),d=this&&this!==a&&this instanceof s?c:e;++u<p;)f[u]=r[u];for(;i--;)f[u++]=arguments[++t];return o(d,l?n:this,f)}var l=t&u,c=i(e);return s}var o=n(59),i=n(36),a=n(8),u=1;e.exports=r},function(e,t,n){function r(e){return function(t){var n=i(t);return n==s?a(t):n==l?u(t):o(t,e(t))}}var o=n(225),i=n(123),a=n(126),u=n(266),s="[object Map]",l="[object Set]"; e.exports=r},function(e,t,n){function r(e,t,n,r,o,_,x){switch(n){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!r(new i(e),new i(t)));case p:case f:return+e==+t;case d:return e.name==t.name&&e.message==t.message;case h:return e!=+e?t!=+t:e==+t;case v:case y:return e==t+"";case A:var C=u;case m:var S=_&c;if(C||(C=s),e.size!=t.size&&!S)return!1;var P=x.get(e);return P?P==t:(_|=l,x.set(e,t),a(C(e),C(t),r,o,_,x));case g:if(E)return E.call(e)==E.call(t)}return!1}var o=n(104),i=n(212),a=n(120),u=n(126),s=n(265),l=1,c=2,p="[object Boolean]",f="[object Date]",d="[object Error]",A="[object Map]",h="[object Number]",v="[object RegExp]",m="[object Set]",y="[object String]",g="[object Symbol]",b="[object ArrayBuffer]",w="[object DataView]",_=o?o.prototype:void 0,E=_?_.valueOf:void 0;e.exports=r},function(e,t,n){function r(e,t,n,r,u,s){var l=u&a,c=i(e),p=c.length,f=i(t),d=f.length;if(p!=d&&!l)return!1;for(var A=p;A--;){var h=c[A];if(!(l?h in t:o(t,h)))return!1}var v=s.get(e);if(v)return v==t;var m=!0;s.set(e,t);for(var y=l;++A<p;){h=c[A];var g=e[h],b=t[h];if(r)var w=l?r(b,g,h,t,e,s):r(g,b,h,e,t,s);if(!(void 0===w?g===b||n(g,b,r,u,s):w)){m=!1;break}y||(y="constructor"==h)}if(m&&!y){var _=e.constructor,E=t.constructor;_!=E&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof E&&E instanceof E)&&(m=!1)}return s["delete"](e),m}var o=n(111),i=n(68),a=2;e.exports=r},function(e,t,n){function r(e){for(var t=e.name+"",n=o[t],r=a.call(o,t)?n.length:0;r--;){var i=n[r],u=i.func;if(null==u||u==e)return i.name}return t}var o=n(261),i=Object.prototype,a=i.hasOwnProperty;e.exports=r},function(e,t,n){var r=n(112),o=r("length");e.exports=o},function(e,t,n){function r(e){for(var t=i(e),n=t.length;n--;)t[n][2]=o(t[n][1]);return t}var o=n(125),i=n(287);e.exports=r},function(e,t,n){function r(e,t,n){t=s(t,e)?[t]:o(t);for(var r,f=-1,d=t.length;++f<d;){var A=p(t[f]);if(!(r=null!=e&&n(e,A)))break;e=e[A]}if(r)return r;var d=e?e.length:0;return!!d&&l(d)&&u(A,d)&&(a(e)||c(e)||i(e))}var o=n(114),i=n(134),a=n(9),u=n(39),s=n(40),l=n(43),c=n(135),p=n(26);e.exports=r},function(e,t,n){function r(){this.__data__=o?o(null):{}}var o=n(41);e.exports=r},function(e,t){function n(e){return this.has(e)&&delete this.__data__[e]}e.exports=n},function(e,t,n){function r(e){var t=this.__data__;if(o){var n=t[e];return n===i?void 0:n}return u.call(t,e)?t[e]:void 0}var o=n(41),i="__lodash_hash_undefined__",a=Object.prototype,u=a.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){var t=this.__data__;return o?void 0!==t[e]:a.call(t,e)}var o=n(41),i=Object.prototype,a=i.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__;return n[e]=o&&void 0===t?i:t,this}var o=n(41),i="__lodash_hash_undefined__";e.exports=r},function(e,t,n){function r(e){var t=e?e.length:void 0;return u(t)&&(a(e)||s(e)||i(e))?o(t,String):null}var o=n(224),i=n(134),a=n(9),u=n(43),s=n(135);e.exports=r},function(e,t){function n(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=n},function(e,t,n){function r(e){var t=a(e),n=u[t];if("function"!=typeof n||!(t in o.prototype))return!1;if(e===n)return!0;var r=i(n);return!!r&&e===r[0]}var o=n(57),i=n(121),a=n(237),u=n(289);e.exports=r},function(e,t){function n(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||r;return e===n}var r=Object.prototype;e.exports=n},function(e,t){function n(){this.__data__=[]}e.exports=n},function(e,t,n){function r(e){var t=this.__data__,n=o(t,e);if(0>n)return!1;var r=t.length-1;return n==r?t.pop():a.call(t,n,1),!0}var o=n(35),i=Array.prototype,a=i.splice;e.exports=r},function(e,t,n){function r(e){var t=this.__data__,n=o(t,e);return 0>n?void 0:t[n][1]}var o=n(35);e.exports=r},function(e,t,n){function r(e){return o(this.__data__,e)>-1}var o=n(35);e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__,r=o(n,e);return 0>r?n.push([e,t]):n[r][1]=t,this}var o=n(35);e.exports=r},function(e,t,n){function r(){this.__data__={hash:new o,map:new(a||i),string:new o}}var o=n(208),i=n(34),a=n(102);e.exports=r},function(e,t,n){function r(e){return o(this,e)["delete"](e)}var o=n(38);e.exports=r},function(e,t,n){function r(e){return o(this,e).get(e)}var o=n(38);e.exports=r},function(e,t,n){function r(e){return o(this,e).has(e)}var o=n(38);e.exports=r},function(e,t,n){function r(e,t){return o(this,e).set(e,t),this}var o=n(38);e.exports=r},function(e,t,n){function r(e,t){var n=e[1],r=t[1],h=n|r,v=(s|l|f)>h,m=r==f&&n==p||r==f&&n==d&&e[7].length<=t[8]||r==(f|d)&&t[7].length<=t[8]&&n==p;if(!v&&!m)return e;r&s&&(e[2]=t[2],h|=n&s?0:c);var y=t[3];if(y){var g=e[3];e[3]=g?o(g,y,t[4]):y,e[4]=g?a(e[3],u):t[4]}return y=t[5],y&&(g=e[5],e[5]=g?i(g,y,t[6]):y,e[6]=g?a(e[5],u):t[6]),y=t[7],y&&(e[7]=y),r&f&&(e[8]=null==e[8]?t[8]:A(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=h,e}var o=n(115),i=n(116),a=n(25),u="__lodash_placeholder__",s=1,l=2,c=4,p=8,f=128,d=256,A=Math.min;e.exports=r},function(e,t){var n={};e.exports=n},function(e,t,n){function r(e,t){for(var n=e.length,r=a(t.length,n),u=o(e);r--;){var s=t[r];e[r]=i(s,n)?u[s]:void 0}return e}var o=n(64),i=n(39),a=Math.min;e.exports=r},function(e,t){function n(e){return this.__data__.set(e,r),this}var r="__lodash_hash_undefined__";e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}e.exports=n},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}e.exports=n},function(e,t,n){function r(){this.__data__=new o}var o=n(34);e.exports=r},function(e,t){function n(e){return this.__data__["delete"](e)}e.exports=n},function(e,t){function n(e){return this.__data__.get(e)}e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t,n){function r(e,t){var n=this.__data__;return n instanceof o&&n.__data__.length==a&&(n=this.__data__=new i(n.__data__)),n.set(e,t),this}var o=n(34),i=n(58),a=200;e.exports=r},function(e,t,n){function r(e){if(e instanceof o)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=a(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var o=n(57),i=n(101),a=n(64);e.exports=r},function(e,t,n){function r(e,t,n){var r=u(e)?o:i;return n&&s(e,t,n)&&(t=void 0),r(e,a(t,3))}var o=n(213),i=n(214),a=n(62),u=n(9),s=n(124);e.exports=r},function(e,t,n){function r(e,t,n){var r=null==e?void 0:o(e,t);return void 0===r?n:r}var o=n(110);e.exports=r},function(e,t,n){function r(e,t){return null!=e&&i(e,t,o)}var o=n(216),i=n(240);e.exports=r},function(e,t,n){function r(e){return i(e)&&o(e)}var o=n(42),i=n(18);e.exports=r},function(e,t,n){function r(e,t,n){n="function"==typeof n?n:void 0;var r=n?n(e,t):void 0;return void 0===r?o(e,t,n):!!r}var o=n(61);e.exports=r},function(e,t,n){function r(e){if(!a(e))return!1;var t=o(e)||i(e)?d:l;return t.test(u(e))}var o=n(66),i=n(65),a=n(15),u=n(131),s=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,c=Object.prototype,p=Function.prototype.toString,f=c.hasOwnProperty,d=RegExp("^"+p.call(f).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=r},function(e,t,n){function r(e){return i(e)&&o(e.length)&&!!M[k.call(e)]}var o=n(43),i=n(18),a="[object Arguments]",u="[object Array]",s="[object Boolean]",l="[object Date]",c="[object Error]",p="[object Function]",f="[object Map]",d="[object Number]",A="[object Object]",h="[object RegExp]",v="[object Set]",m="[object String]",y="[object WeakMap]",g="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",_="[object Float64Array]",E="[object Int8Array]",x="[object Int16Array]",C="[object Int32Array]",S="[object Uint8Array]",P="[object Uint8ClampedArray]",T="[object Uint16Array]",O="[object Uint32Array]",M={};M[w]=M[_]=M[E]=M[x]=M[C]=M[S]=M[P]=M[T]=M[O]=!0,M[a]=M[u]=M[g]=M[s]=M[b]=M[l]=M[c]=M[p]=M[f]=M[d]=M[A]=M[h]=M[v]=M[m]=M[y]=!1;var I=Object.prototype,k=I.toString;e.exports=r},function(e,t,n){function r(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a),a};return n.cache=new(r.Cache||o),n}var o=n(58),i="Expected a function";r.Cache=o,e.exports=r},function(e,t){var n=Date.now;e.exports=n},function(e,t,n){var r=n(119),o=n(37),i=n(25),a=n(137),u=64,s=a(function(e,t){var n=i(t,o(s));return r(e,u,void 0,t,n)});s.placeholder={},e.exports=s},function(e,t,n){function r(e){return a(e)?o(u(e)):i(e)}var o=n(112),i=n(222),a=n(40),u=n(26);e.exports=r},function(e,t,n){function r(e,t,n){var r=u(e)?o:a;return n&&s(e,t,n)&&(t=void 0),r(e,i(t,3))}var o=n(107),i=n(62),a=n(223),u=n(9),s=n(124);e.exports=r},function(e,t,n){function r(e){if(!e)return 0===e?e:0;if(e=o(e),e===i||e===-i){var t=0>e?-1:1;return t*a}return e===e?e:0}var o=n(286),i=1/0,a=1.7976931348623157e308;e.exports=r},function(e,t,n){function r(e){if("number"==typeof e)return e;if(a(e))return u;if(i(e)){var t=o(e.valueOf)?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var n=c.test(e);return n||p.test(e)?f(e.slice(2),n?2:8):l.test(e)?u:+e}var o=n(66),i=n(15),a=n(27),u=NaN,s=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,p=/^0o[0-7]+$/i,f=parseInt;e.exports=r},function(e,t,n){var r=n(234),o=n(68),i=r(o);e.exports=i},function(e,t,n){function r(e){return null==e?"":o(e)}var o=n(226);e.exports=r},function(e,t,n){function r(e){if(s(e)&&!u(e)&&!(e instanceof o)){if(e instanceof i)return e;if(p.call(e,"__wrapped__"))return l(e)}return new i(e)}var o=n(57),i=n(101),a=n(63),u=n(9),s=n(18),l=n(272),c=Object.prototype,p=c.hasOwnProperty;r.prototype=a.prototype,r.prototype.constructor=r,e.exports=r},function(e,t,n){"use strict";e.exports=n(311)},function(e,t,n){"use strict";e.exports=n(322)},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 i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t["default"]=void 0;var u=n(4),s=n(139),l=r(s),c=n(140),p=(r(c),function(e){function t(n,r){o(this,t);var a=i(this,e.call(this,n,r));return a.store=n.store,a}return a(t,e),t.prototype.getChildContext=function(){return{store:this.store}},t.prototype.render=function(){var e=this.props.children;return u.Children.only(e)},t}(u.Component));t["default"]=p,p.propTypes={store:l["default"].isRequired,children:u.PropTypes.element.isRequired},p.childContextTypes={store:l["default"].isRequired}},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 i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return e.displayName||e.name||"Component"}function s(e,t){try{return e.apply(t)}catch(n){return P.value=n,P}}function l(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],l=Boolean(e),f=e||x,A=void 0;A="function"==typeof t?t:t?(0,m["default"])(t):C;var v=n||S,y=r.pure,g=void 0===y?!0:y,b=r.withRef,_=void 0===b?!1:b,O=g&&v!==S,M=T++;return function(e){function t(e,t,n){var r=v(e,t,n);return r}var n="Connect("+u(e)+")",r=function(r){function u(e,t){o(this,u);var a=i(this,r.call(this,e,t));a.version=M,a.store=e.store||t.store,(0,E["default"])(a.store,'Could not find "store" in either the context or '+('props of "'+n+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+n+'".'));var s=a.store.getState();return a.state={storeState:s},a.clearCache(),a}return a(u,r),u.prototype.shouldComponentUpdate=function(){return!g||this.haveOwnPropsChanged||this.hasStoreStateChanged},u.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState(),r=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n);return r},u.prototype.configureFinalMapState=function(e,t){var n=f(e.getState(),t),r="function"==typeof n;return this.finalMapStateToProps=r?n:f,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,r?this.computeStateProps(e,t):n},u.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch,r=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n);return r},u.prototype.configureFinalMapDispatch=function(e,t){var n=A(e.dispatch,t),r="function"==typeof n;return this.finalMapDispatchToProps=r?n:A,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,r?this.computeDispatchProps(e,t):n},u.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return this.stateProps&&(0,h["default"])(e,this.stateProps)?!1:(this.stateProps=e,!0)},u.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return this.dispatchProps&&(0,h["default"])(e,this.dispatchProps)?!1:(this.dispatchProps=e,!0)},u.prototype.updateMergedPropsIfNeeded=function(){var e=t(this.stateProps,this.dispatchProps,this.props);return this.mergedProps&&O&&(0,h["default"])(e,this.mergedProps)?!1:(this.mergedProps=e,!0)},u.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},u.prototype.trySubscribe=function(){l&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},u.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},u.prototype.componentDidMount=function(){this.trySubscribe()},u.prototype.componentWillReceiveProps=function(e){g&&(0,h["default"])(e,this.props)||(this.haveOwnPropsChanged=!0)},u.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},u.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},u.prototype.handleChange=function(){if(this.unsubscribe){var e=this.store.getState(),t=this.state.storeState;if(!g||t!==e){if(g&&!this.doStatePropsDependOnOwnProps){var n=s(this.updateStatePropsIfNeeded,this);if(!n)return;n===P&&(this.statePropsPrecalculationError=P.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:e})}}},u.prototype.getWrappedInstance=function(){return(0,E["default"])(_,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},u.prototype.render=function(){var t=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,r=this.haveStatePropsBeenPrecalculated,o=this.statePropsPrecalculationError,i=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,o)throw o;var a=!0,u=!0;g&&i&&(a=n||t&&this.doStatePropsDependOnOwnProps,u=t&&this.doDispatchPropsDependOnOwnProps);var s=!1,l=!1;r?s=!0:a&&(s=this.updateStatePropsIfNeeded()),u&&(l=this.updateDispatchPropsIfNeeded());var f=!0;return f=s||l||t?this.updateMergedPropsIfNeeded():!1,!f&&i?i:(_?this.renderedElement=(0,p.createElement)(e,c({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,p.createElement)(e,this.mergedProps),this.renderedElement)},u}(p.Component);return r.displayName=n,r.WrappedComponent=e,r.contextTypes={store:d["default"]},r.propTypes={store:d["default"]},(0,w["default"])(r,e)}}var c=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.__esModule=!0,t["default"]=l;var p=n(4),f=n(139),d=r(f),A=n(294),h=r(A),v=n(295),m=r(v),y=n(140),g=(r(y),n(67)),b=(r(g),n(100)),w=r(b),_=n(33),E=r(_),x=function(e){return{}},C=function(e){return{dispatch:e}},S=function(e,t,n){return c({},n,e,t)},P={value:null},T=0},function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,i=0;i<n.length;i++)if(!o.call(t,n[i])||e[n[i]]!==t[n[i]])return!1;return!0}t.__esModule=!0,t["default"]=n},function(e,t,n){"use strict";function r(e){return function(t){return(0,o.bindActionCreators)(e,t)}}t.__esModule=!0,t["default"]=r;var o=n(178)},function(e,t,n){"use strict";var r=n(5),o=n(97),i={focusDOMComponent:function(){o(r.getNodeFromInstance(this))}};e.exports=i},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 T.topCompositionStart:return O.compositionStart;case T.topCompositionEnd:return O.compositionEnd;case T.topCompositionUpdate:return O.compositionUpdate}}function a(e,t){return e===T.topKeyDown&&t.keyCode===w}function u(e,t){switch(e){case T.topKeyUp:return-1!==b.indexOf(t.keyCode);case T.topKeyDown:return t.keyCode!==w;case T.topKeyPress:case T.topMouseDown:case T.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){var o,l;if(_?o=i(e):I?u(e,n)&&(o=O.compositionEnd):a(e,n)&&(o=O.compositionStart),!o)return null;C&&(I||o!==O.compositionStart?o===O.compositionEnd&&I&&(l=I.getData()):I=v.getPooled(r));var c=m.getPooled(o,t,n,r);if(l)c.data=l;else{var p=s(n);null!==p&&(c.data=p)}return A.accumulateTwoPhaseDispatches(c),c}function c(e,t){switch(e){case T.topCompositionEnd:return s(t);case T.topKeyPress:var n=t.which;return n!==S?null:(M=!0,P);case T.topTextInput:var r=t.data;return r===P&&M?null:r;default:return null}}function p(e,t){if(I){if(e===T.topCompositionEnd||u(e,t)){var n=I.getData();return v.release(I),I=null,n}return null}switch(e){case T.topPaste:return null;case T.topKeyPress:return t.which&&!o(t)?String.fromCharCode(t.which):null;case T.topCompositionEnd:return C?null:t.data;default:return null}}function f(e,t,n,r){var o;if(o=x?c(e,n):p(e,n),!o)return null;var i=y.getPooled(O.beforeInput,t,n,r);return i.data=o,A.accumulateTwoPhaseDispatches(i),i}var d=n(12),A=n(29),h=n(6),v=n(304),m=n(345),y=n(348),g=n(14),b=[9,13,27,32],w=229,_=h.canUseDOM&&"CompositionEvent"in window,E=null;h.canUseDOM&&"documentMode"in document&&(E=document.documentMode);var x=h.canUseDOM&&"TextEvent"in window&&!E&&!r(),C=h.canUseDOM&&(!_||E&&E>8&&11>=E),S=32,P=String.fromCharCode(S),T=d.topLevelTypes,O={beforeInput:{phasedRegistrationNames:{bubbled:g({onBeforeInput:null}),captured:g({onBeforeInputCapture:null})},dependencies:[T.topCompositionEnd,T.topKeyPress,T.topTextInput,T.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:g({onCompositionEnd:null}),captured:g({onCompositionEndCapture:null})},dependencies:[T.topBlur,T.topCompositionEnd,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:g({onCompositionStart:null}),captured:g({onCompositionStartCapture:null})},dependencies:[T.topBlur,T.topCompositionStart,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:g({onCompositionUpdate:null}),captured:g({onCompositionUpdateCapture:null})},dependencies:[T.topBlur,T.topCompositionUpdate,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]}},M=!1,I=null,k={eventTypes:O,extractEvents:function(e,t,n,r){return[l(e,t,n,r),f(e,t,n,r)]}};e.exports=k},function(e,t,n){"use strict";var r=n(141),o=n(6),i=n(7),a=(n(197),n(354)),u=n(203),s=n(206),l=(n(2),s(function(e){return u(e)})),c=!1,p="cssFloat";if(o.canUseDOM){var f=document.createElement("div").style;try{f.font=""}catch(d){c=!0}void 0===document.documentElement.style.cssFloat&&(p="styleFloat")}var A={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];null!=o&&(n+=l(r)+":",n+=a(r,o,t)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var i in t)if(t.hasOwnProperty(i)){var u=a(i,t[i],n);if("float"!==i&&"cssFloat"!==i||(i=p),u)o[i]=u;else{var s=c&&r.shorthandPropertyExpansions[i];if(s)for(var l in s)o[l]="";else o[i]=""}}}};i.measureMethods(A,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"}),e.exports=A},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(M.change,k,e,C(e));b.accumulateTwoPhaseDispatches(t),E.batchedUpdates(i,t)}function i(e){g.enqueueEvents(e),g.processEventQueue(!1)}function a(e,t){I=e,k=t,I.attachEvent("onchange",o)}function u(){I&&(I.detachEvent("onchange",o),I=null,k=null)}function s(e,t){return e===O.topChange?t:void 0}function l(e,t,n){e===O.topFocus?(u(),a(t,n)):e===O.topBlur&&u()}function c(e,t){I=e,k=t,R=e.value,N=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(I,"value",j),I.attachEvent?I.attachEvent("onpropertychange",f):I.addEventListener("propertychange",f,!1)}function p(){I&&(delete I.value,I.detachEvent?I.detachEvent("onpropertychange",f):I.removeEventListener("propertychange",f,!1),I=null,k=null,R=null,N=null)}function f(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==R&&(R=t,o(e))}}function d(e,t){return e===O.topInput?t:void 0}function A(e,t,n){e===O.topFocus?(p(),c(t,n)):e===O.topBlur&&p()}function h(e,t){return e!==O.topSelectionChange&&e!==O.topKeyUp&&e!==O.topKeyDown||!I||I.value===R?void 0:(R=I.value,k)}function v(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function m(e,t){return e===O.topClick?t:void 0}var y=n(12),g=n(28),b=n(29),w=n(6),_=n(5),E=n(10),x=n(13),C=n(85),S=n(87),P=n(167),T=n(14),O=y.topLevelTypes,M={change:{phasedRegistrationNames:{bubbled:T({onChange:null}),captured:T({onChangeCapture:null})},dependencies:[O.topBlur,O.topChange,O.topClick,O.topFocus,O.topInput,O.topKeyDown,O.topKeyUp,O.topSelectionChange]}},I=null,k=null,R=null,N=null,D=!1;w.canUseDOM&&(D=S("change")&&(!("documentMode"in document)||document.documentMode>8));var F=!1;w.canUseDOM&&(F=S("input")&&(!("documentMode"in document)||document.documentMode>11));var j={get:function(){return N.get.call(this)},set:function(e){R=""+e,N.set.call(this,e)}},L={eventTypes:M,extractEvents:function(e,t,n,o){var i,a,u=t?_.getNodeFromInstance(t):window;if(r(u)?D?i=s:a=l:P(u)?F?i=d:(i=h,a=A):v(u)&&(i=m),i){var c=i(e,t);if(c){var p=x.getPooled(M.change,c,n,o);return p.type="change",b.accumulateTwoPhaseDispatches(p),p}}a&&a(e,u,t)}};e.exports=L},function(e,t){"use strict";var n={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};e.exports=n},function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var o=n(22),i=n(6),a=n(200),u=n(11),s=n(99),l=n(1),c=/^(<[^ \/>]+)/,p="data-danger-index",f={dangerouslyRenderMarkup:function(e){i.canUseDOM?void 0:l(!1);for(var t,n={},o=0;o<e.length;o++)e[o]?void 0:l(!1),t=r(e[o]),t=s(t)?t:"*",n[t]=n[t]||[],n[t][o]=e[o];var f=[],d=0;for(t in n)if(n.hasOwnProperty(t)){var A,h=n[t];for(A in h)if(h.hasOwnProperty(A)){var v=h[A];h[A]=v.replace(c,"$1 "+p+'="'+A+'" ')}for(var m=a(h.join(""),u),y=0;y<m.length;++y){var g=m[y];g.hasAttribute&&g.hasAttribute(p)&&(A=+g.getAttribute(p),g.removeAttribute(p),f.hasOwnProperty(A)?l(!1):void 0,f[A]=g,d+=1)}}return d!==f.length?l(!1):void 0,f.length!==e.length?l(!1):void 0,f},dangerouslyReplaceNodeWithMarkup:function(e,t){if(i.canUseDOM?void 0:l(!1),t?void 0:l(!1),"HTML"===e.nodeName?l(!1):void 0,"string"==typeof t){var n=a(t,u)[0];e.parentNode.replaceChild(n,e)}else o.replaceChildWithTree(e,t)}};e.exports=f},function(e,t,n){"use strict";var r=n(14),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null})];e.exports=o},function(e,t,n){"use strict";var r=n(12),o=n(29),i=n(5),a=n(51),u=n(14),s=r.topLevelTypes,l={mouseEnter:{registrationName:u({onMouseEnter:null}),dependencies:[s.topMouseOut,s.topMouseOver]},mouseLeave:{registrationName:u({onMouseLeave:null}),dependencies:[s.topMouseOut,s.topMouseOver]}},c={eventTypes:l,extractEvents:function(e,t,n,r){if(e===s.topMouseOver&&(n.relatedTarget||n.fromElement))return null;if(e!==s.topMouseOut&&e!==s.topMouseOver)return null;var u;if(r.window===r)u=r;else{var c=r.ownerDocument;u=c?c.defaultView||c.parentWindow:window}var p,f;if(e===s.topMouseOut){p=t;var d=n.relatedTarget||n.toElement;f=d?i.getClosestInstanceFromNode(d):null}else p=null,f=t;if(p===f)return null;var A=null==p?u:i.getNodeFromInstance(p),h=null==f?u:i.getNodeFromInstance(f),v=a.getPooled(l.mouseLeave,p,n,r);v.type="mouseleave",v.target=A,v.relatedTarget=h;var m=a.getPooled(l.mouseEnter,f,n,r);return m.type="mouseenter",m.target=h,m.relatedTarget=A,o.accumulateEnterLeaveDispatches(v,m,p,f),[v,m]}};e.exports=c},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=n(3),i=n(16),a=n(166);o(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[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 u=t>1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r=n(19),o=r.injection.MUST_USE_PROPERTY,i=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_SIDE_EFFECTS,u=r.injection.HAS_NUMERIC_VALUE,s=r.injection.HAS_POSITIVE_NUMERIC_VALUE,l=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,c={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|i,cite:0,classID:0,className:0,cols:s,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,coords:0,crossOrigin:0,data:0,dateTime:0,"default":i,defer:i,dir:0,disabled:i,download:l,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|i,muted:o|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,poster:0,preload:0,profile:0,radioGroup:0,readOnly:i,rel:0,required:i,reversed:i,role:0,rows:s,rowSpan:u,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:o|i,shape:0,size:s,sizes:0,span:s,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:u,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:o|a,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,"typeof":0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:i,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};e.exports=c},function(e,t,n){"use strict";function r(e,t,n){var r=void 0===e[n];null!=t&&r&&(e[n]=i(t))}var o=n(23),i=n(86),a=(n(75),n(89)),u=n(90),s=(n(2),{instantiateChildren:function(e,t,n){if(null==e)return null;var o={};return u(e,r,o),o},updateChildren:function(e,t,n,r,u){if(t||e){var s,l;for(s in t)if(t.hasOwnProperty(s)){l=e&&e[s];var c=l&&l._currentElement,p=t[s];if(null!=l&&a(c,p))o.receiveComponent(l,p,r,u),t[s]=l;else{l&&(n[s]=o.getNativeNode(l),o.unmountComponent(l,!1));var f=i(p);t[s]=f}}for(s in e)!e.hasOwnProperty(s)||t&&t.hasOwnProperty(s)||(l=e[s],n[s]=o.getNativeNode(l),o.unmountComponent(l,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];o.unmountComponent(r,t)}}});e.exports=s},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 i(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);m(e,i,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,i=e.keyPrefix,a=e.func,u=e.context,s=a.call(u,t,e.count++);Array.isArray(s)?l(s,o,n,v.thatReturnsArgument):null!=s&&(h.isValidElement(s)&&(s=h.cloneAndReplaceKey(s,i+(!s.key||t&&t.key===s.key?"":r(s.key)+"/")+n)),o.push(s))}function l(e,t,n,o,i){var a="";null!=n&&(a=r(n)+"/");var l=u.getPooled(t,a,o,i);m(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 f(e,t){return m(e,p,null)}function d(e){var t=[];return l(e,t,null,v.thatReturnsArgument),t}var A=n(16),h=n(17),v=n(11),m=n(90),y=A.twoArgumentPooler,g=A.fourArgumentPooler,b=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},A.addPoolingTo(o,y),u.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},A.addPoolingTo(u,g);var w={forEach:a,map:c,mapIntoWithKeyPrefixInternal:l,count:f,toArray:d};e.exports=w},function(e,t,n){"use strict";function r(e,t){var n=_.hasOwnProperty(t)?_[t]:null;x.hasOwnProperty(t)&&(n!==b.OVERRIDE_BASE?v(!1):void 0),e&&(n!==b.DEFINE_MANY&&n!==b.DEFINE_MANY_MERGED?v(!1):void 0)}function o(e,t){if(t){"function"==typeof t?v(!1):void 0,d.isValidElement(t)?v(!1):void 0;var n=e.prototype,o=n.__reactAutoBindPairs;t.hasOwnProperty(g)&&E.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==g){var a=t[i],l=n.hasOwnProperty(i);if(r(l,i),E.hasOwnProperty(i))E[i](e,a);else{var c=_.hasOwnProperty(i),p="function"==typeof a,f=p&&!c&&!l&&t.autobind!==!1;if(f)o.push(i,a),n[i]=a;else if(l){var A=_[i];!c||A!==b.DEFINE_MANY_MERGED&&A!==b.DEFINE_MANY?v(!1):void 0,A===b.DEFINE_MANY_MERGED?n[i]=u(n[i],a):A===b.DEFINE_MANY&&(n[i]=s(n[i],a))}else n[i]=a}}}}function i(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in E;o?v(!1):void 0;var i=n in e;i?v(!1):void 0,e[n]=r}}}function a(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:v(!1); for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?v(!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 a(o,n),a(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=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],o=t[n+1];e[r]=l(e,o)}}var p=n(3),f=n(309),d=n(17),A=(n(81),n(80),n(157)),h=n(24),v=n(1),m=n(32),y=n(14),g=(n(2),y({mixins:null})),b=m({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),w=[],_={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},E={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=p({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=p({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=u(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=p({},e.propTypes,t)},statics:function(e,t){i(e,t)},autobind:function(){}},x={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},C=function(){};p(C.prototype,f.prototype,x);var S={createClass:function(e){var t=function(e,t,n){this.__reactAutoBindPairs.length&&c(this),this.props=e,this.context=t,this.refs=h,this.updater=n||A,this.state=null;var r=this.getInitialState?this.getInitialState():null;"object"!=typeof r||Array.isArray(r)?v(!1):void 0,this.state=r};t.prototype=new C,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],w.forEach(o.bind(null,t)),o(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:v(!1);for(var n in _)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){w.push(e)}}};e.exports=S},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||o}var o=n(157),i=(n(50),n(162),n(24)),a=n(1);n(2),r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?a(!1):void 0,this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")},e.exports=r},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){}function i(e,t){}function a(e){return e.prototype&&e.prototype.isReactComponent}var u=n(3),s=n(77),l=n(20),c=n(17),p=n(78),f=n(79),d=(n(50),n(156)),A=n(7),h=n(81),v=(n(80),n(23)),m=n(158),y=n(24),g=n(1),b=n(89);n(2),o.prototype.render=function(){var e=f.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);return i(e,t),t};var w=1,_={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._nativeParent=null,this._nativeContainerInfo=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(e,t,n,r){this._context=r,this._mountOrder=w++,this._nativeParent=t,this._nativeContainerInfo=n;var u,s=this._processProps(this._currentElement.props),l=this._processContext(r),p=this._currentElement.type,d=this._constructComponent(s,l);a(p)||null!=d&&null!=d.render||(u=d,i(p,u),null===d||d===!1||c.isValidElement(d)?void 0:g(!1),d=new o(p)),d.props=s,d.context=l,d.refs=y,d.updater=m,this._instance=d,f.set(d,this);var A=d.state;void 0===A&&(d.state=A=null),"object"!=typeof A||Array.isArray(A)?g(!1):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var h;return h=d.unstable_handleError?this.performInitialMountWithErrorHandling(u,t,n,e,r):this.performInitialMount(u,t,n,e,r),d.componentDidMount&&e.getReactMountReady().enqueue(d.componentDidMount,d),h},_constructComponent:function(e,t){return this._constructComponentWithoutOwner(e,t)},_constructComponentWithoutOwner:function(e,t){var n=this._currentElement.type;return a(n)?new n(e,t,m):n(e,t,m)},performInitialMountWithErrorHandling:function(e,t,n,r,o){var i,a=r.checkpoint();try{i=this.performInitialMount(e,t,n,r,o)}catch(u){r.rollback(a),this._instance.unstable_handleError(u),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),a=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(a),i=this.performInitialMount(e,t,n,r,o)}return i},performInitialMount:function(e,t,n,r,o){var i=this._instance;i.componentWillMount&&(i.componentWillMount(),this._pendingStateQueue&&(i.state=this._processPendingState(i.props,i.context))),void 0===e&&(e=this._renderValidatedComponent()),this._renderedNodeType=d.getType(e),this._renderedComponent=this._instantiateReactComponent(e);var a=v.mountComponent(this._renderedComponent,r,t,n,this._processChildContext(o));return a},getNativeNode:function(){return v.getNativeNode(this._renderedComponent)},unmountComponent:function(e){if(this._renderedComponent){var t=this._instance;if(t.componentWillUnmount&&!t._calledComponentWillUnmount)if(t._calledComponentWillUnmount=!0,e){var n=this.getName()+".componentWillUnmount()";p.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(v.unmountComponent(this._renderedComponent,e),this._renderedNodeType=null,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,f.remove(t)}},_maskContext:function(e){var t=this._currentElement.type,n=t.contextTypes;if(!n)return y;var r={};for(var o in n)r[o]=e[o];return r},_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?g(!1):void 0;for(var o in r)o in t.childContextTypes?void 0:g(!1);return u({},e,r)}return 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{"function"!=typeof e[i]?g(!1):void 0,a=e[i](t,i,o,n)}catch(u){a=u}a instanceof Error&&(r(this),n===h.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&&v.receiveComponent(this,this._pendingElement,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 i,a,u=this._instance,s=!1;this._context===o?i=u.context:(i=this._processContext(o),s=!0),t===n?a=n.props:(a=this._processProps(n.props),s=!0),s&&u.componentWillReceiveProps&&u.componentWillReceiveProps(a,i);var l=this._processPendingState(a,i),c=this._pendingForceUpdate||!u.shouldComponentUpdate||u.shouldComponentUpdate(a,l,i);c?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,a,l,i,e,o)):(this._currentElement=n,this._context=o,u.props=a,u.state=l,u.context=i)},_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=u({},o?r[0]:n.state),a=o?1:0;a<r.length;a++){var s=r[a];u(i,"function"==typeof s?s.call(n,i,e,t):s)}return i},_performComponentUpdate:function(e,t,n,r,o,i){var a,u,s,l=this._instance,c=Boolean(l.componentDidUpdate);c&&(a=l.props,u=l.state,s=l.context),l.componentWillUpdate&&l.componentWillUpdate(t,n,r),this._currentElement=e,this._context=i,l.props=t,l.state=n,l.context=r,this._updateRenderedComponent(o,i),c&&o.getReactMountReady().enqueue(l.componentDidUpdate.bind(l,a,u,s),l)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent();if(b(r,o))v.receiveComponent(n,o,e,this._processChildContext(t));else{var i=v.getNativeNode(n);v.unmountComponent(n,!1),this._renderedNodeType=d.getType(o),this._renderedComponent=this._instantiateReactComponent(o);var a=v.mountComponent(this._renderedComponent,e,this._nativeParent,this._nativeContainerInfo,this._processChildContext(t));this._replaceNodeWithMarkup(i,a)}},_replaceNodeWithMarkup:function(e,t){s.replaceNodeWithMarkup(e,t)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return t},_renderValidatedComponent:function(){var e;l.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{l.current=null}return null===e||e===!1||c.isValidElement(e)?void 0:g(!1),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n?g(!1):void 0;var r=t.getPublicInstance(),o=n.refs===y?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};A.measureMethods(_,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var E={Mixin:_};e.exports=E},function(e,t,n){"use strict";var r=n(5),o=n(148),i=n(153),a=n(7),u=n(23),s=n(10),l=n(159),c=n(355),p=n(165),f=n(361);n(2),o.inject();var d=a.measure("React","render",i.render),A={findDOMNode:c,render:d,unmountComponentAtNode:i.unmountComponentAtNode,version:l,unstable_batchedUpdates:s.batchedUpdates,unstable_renderSubtreeIntoContainer:f};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=p(e)),e?r.getNodeFromInstance(e):null}},Mount:i,Reconciler:u}),e.exports=A},function(e,t,n){"use strict";var r=n(47),o={getNativeProps:r.getNativeProps};e.exports=o},function(e,t,n){"use strict";function r(e,t){t&&(Y[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?N(!1):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?N(!1):void 0,"object"==typeof t.dangerouslySetInnerHTML&&z in t.dangerouslySetInnerHTML?void 0:N(!1)),null!=t.style&&"object"!=typeof t.style?N(!1):void 0)}function o(e,t,n,r){var o=e._nativeContainerInfo,a=o._node&&o._node.nodeType===K,u=a?o._node:o._ownerDocument;u&&(U(t,u),r.getReactMountReady().enqueue(i,{inst:e,registrationName:t,listener:n}))}function i(){var e=this;b.putListener(e.inst,e.registrationName,e.listener)}function a(){var e=this;T.postMountWrapper(e)}function u(){var e=this;e._rootNodeID?void 0:N(!1);var t=L(e);switch(t?void 0:N(!1),e._tag){case"iframe":case"object":e._wrapperState.listeners=[_.trapBubbledEvent(g.topLevelTypes.topLoad,"load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in q)q.hasOwnProperty(n)&&e._wrapperState.listeners.push(_.trapBubbledEvent(g.topLevelTypes[n],q[n],t));break;case"img":e._wrapperState.listeners=[_.trapBubbledEvent(g.topLevelTypes.topError,"error",t),_.trapBubbledEvent(g.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[_.trapBubbledEvent(g.topLevelTypes.topReset,"reset",t),_.trapBubbledEvent(g.topLevelTypes.topSubmit,"submit",t)];break;case"input":case"select":case"textarea":e._wrapperState.listeners=[_.trapBubbledEvent(g.topLevelTypes.topInvalid,"invalid",t)]}}function s(){O.postUpdateWrapper(this)}function l(e){X.call(Z,e)||(J.test(e)?void 0:N(!1),Z[e]=!0)}function c(e,t){return e.indexOf("-")>=0||null!=t.is}function p(e){var t=e.type;l(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._nativeNode=null,this._nativeParent=null,this._rootNodeID=null,this._domID=null,this._nativeContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var f=n(3),d=n(296),A=n(298),h=n(22),v=n(300),m=n(19),y=n(73),g=n(12),b=n(28),w=n(48),_=n(49),E=n(143),x=n(312),C=n(144),S=n(5),P=n(318),T=n(320),O=n(146),M=n(324),I=n(332),k=n(7),R=n(53),N=n(1),D=(n(87),n(14)),F=(n(55),n(91),n(2),C),j=b.deleteListener,L=S.getNodeFromInstance,U=_.listenTo,B=w.registrationNameModules,V={string:!0,number:!0},Q=D({style:null}),z=D({__html:null}),W={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},K=11,q={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},H={listing:!0,pre:!0,textarea:!0},Y=f({menuitem:!0},G),J=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Z={},X={}.hasOwnProperty,$=1;p.displayName="ReactDOMComponent",p.Mixin={mountComponent:function(e,t,n,o){this._rootNodeID=$++,this._domID=n._idCounter++,this._nativeParent=t,this._nativeContainerInfo=n;var i=this._currentElement.props;switch(this._tag){case"iframe":case"object":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(u,this);break;case"button":i=x.getNativeProps(this,i,t);break;case"input":P.mountWrapper(this,i,t),i=P.getNativeProps(this,i),e.getReactMountReady().enqueue(u,this);break;case"option":T.mountWrapper(this,i,t),i=T.getNativeProps(this,i);break;case"select":O.mountWrapper(this,i,t),i=O.getNativeProps(this,i),e.getReactMountReady().enqueue(u,this);break;case"textarea":M.mountWrapper(this,i,t),i=M.getNativeProps(this,i),e.getReactMountReady().enqueue(u,this)}r(this,i);var s,l;null!=t?(s=t._namespaceURI,l=t._tag):n._tag&&(s=n._namespaceURI,l=n._tag),(null==s||s===v.svg&&"foreignobject"===l)&&(s=v.html),s===v.html&&("svg"===this._tag?s=v.svg:"math"===this._tag&&(s=v.mathml)),this._namespaceURI=s;var c;if(e.useCreateElement){var p,f=n._ownerDocument;if(s===v.html)if("script"===this._tag){var A=f.createElement("div"),m=this._currentElement.type;A.innerHTML="<"+m+"></"+m+">",p=A.removeChild(A.firstChild)}else p=f.createElement(this._currentElement.type);else p=f.createElementNS(s,this._currentElement.type);S.precacheNode(this,p),this._flags|=F.hasCachedChildNodes,this._nativeParent||y.setAttributeForRoot(p),this._updateDOMProperties(null,i,e);var g=h(p);this._createInitialChildren(e,i,o,g),c=g}else{var b=this._createOpenTagMarkupAndPutListeners(e,i),w=this._createContentMarkup(e,i,o);c=!w&&G[this._tag]?b+"/>":b+">"+w+"</"+this._currentElement.type+">"}switch(this._tag){case"button":case"input":case"select":case"textarea":i.autoFocus&&e.getReactMountReady().enqueue(d.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(a,this)}return c},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(B.hasOwnProperty(r))i&&o(this,r,i,e);else{r===Q&&(i&&(i=this._previousStyleCopy=f({},t.style)),i=A.createMarkupForStyles(i,this));var a=null;null!=this._tag&&c(this._tag,t)?W.hasOwnProperty(r)||(a=y.createMarkupForCustomAttribute(r,i)):a=y.createMarkupForProperty(r,i),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._nativeParent||(n+=" "+y.createMarkupForRoot()),n+=" "+y.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=V[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)r=R(i);else if(null!=a){var u=this.mountChildren(a,e,n);r=u.join("")}}return H[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&&h.queueHTML(r,o.__html);else{var i=V[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)h.queueText(r,i);else if(null!=a)for(var u=this.mountChildren(a,e,n),s=0;s<u.length;s++)h.queueChild(r,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,o){var i=t.props,a=this._currentElement.props;switch(this._tag){case"button":i=x.getNativeProps(this,i),a=x.getNativeProps(this,a);break;case"input":P.updateWrapper(this),i=P.getNativeProps(this,i),a=P.getNativeProps(this,a);break;case"option":i=T.getNativeProps(this,i),a=T.getNativeProps(this,a);break;case"select":i=O.getNativeProps(this,i),a=O.getNativeProps(this,a);break;case"textarea":M.updateWrapper(this),i=M.getNativeProps(this,i),a=M.getNativeProps(this,a)}r(this,a),this._updateDOMProperties(i,a,e),this._updateDOMChildren(i,a,e,o),"select"===this._tag&&e.getReactMountReady().enqueue(s,this)},_updateDOMProperties:function(e,t,n){var r,i,a;for(r in e)if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&null!=e[r])if(r===Q){var u=this._previousStyleCopy;for(i in u)u.hasOwnProperty(i)&&(a=a||{},a[i]="");this._previousStyleCopy=null}else B.hasOwnProperty(r)?e[r]&&j(this,r):(m.properties[r]||m.isCustomAttribute(r))&&y.deleteValueForProperty(L(this),r);for(r in t){var s=t[r],l=r===Q?this._previousStyleCopy:null!=e?e[r]:void 0;if(t.hasOwnProperty(r)&&s!==l&&(null!=s||null!=l))if(r===Q)if(s?s=this._previousStyleCopy=f({},s):this._previousStyleCopy=null,l){for(i in l)!l.hasOwnProperty(i)||s&&s.hasOwnProperty(i)||(a=a||{},a[i]="");for(i in s)s.hasOwnProperty(i)&&l[i]!==s[i]&&(a=a||{},a[i]=s[i])}else a=s;else if(B.hasOwnProperty(r))s?o(this,r,s,n):l&&j(this,r);else if(c(this._tag,t))W.hasOwnProperty(r)||y.setValueForAttribute(L(this),r,s);else if(m.properties[r]||m.isCustomAttribute(r)){var p=L(this);null!=s?y.setValueForProperty(p,r,s):y.deleteValueForProperty(p,r)}}a&&A.setValueForStyles(L(this),a,this)},_updateDOMChildren:function(e,t,n,r){var o=V[typeof e.children]?e.children:null,i=V[typeof t.children]?t.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,u=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,s=null!=o?null:e.children,l=null!=i?null:t.children,c=null!=o||null!=a,p=null!=i||null!=u;null!=s&&null==l?this.updateChildren(null,n,r):c&&!p&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=u?a!==u&&this.updateMarkup(""+u):null!=l&&this.updateChildren(l,n,r)},getNativeNode:function(){return L(this)},unmountComponent:function(e){switch(this._tag){case"iframe":case"object":case"img":case"form":case"video":case"audio":var t=this._wrapperState.listeners;if(t)for(var n=0;n<t.length;n++)t[n].remove();break;case"html":case"head":case"body":N(!1)}this.unmountChildren(e),S.uncacheNode(this),b.deleteAllListeners(this),E.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null,this._domID=null,this._wrapperState=null},getPublicInstance:function(){return L(this)}},k.measureMethods(p.Mixin,"ReactDOMComponent",{mountComponent:"mountComponent",receiveComponent:"receiveComponent"}),f(p.prototype,p.Mixin,I.Mixin),e.exports=p},function(e,t,n){"use strict";function r(e,t,n,r,o,i){}var o=n(326),i=(n(2),[]),a={addDevtool:function(e){i.push(e)},removeDevtool:function(e){for(var t=0;t<i.length;t++)i[t]===e&&(i.splice(t,1),t--)},onCreateMarkupForProperty:function(e,t){r("onCreateMarkupForProperty",e,t)},onSetValueForProperty:function(e,t,n){r("onSetValueForProperty",e,t,n)},onDeleteValueForProperty:function(e,t){r("onDeleteValueForProperty",e,t)}};a.addDevtool(o),e.exports=a},function(e,t,n){"use strict";var r=n(3),o=n(22),i=n(5),a=function(e){this._currentElement=null,this._nativeNode=null,this._nativeParent=null,this._nativeContainerInfo=null,this._domID=null};r(a.prototype,{mountComponent:function(e,t,n,r){var a=n._idCounter++;this._domID=a,this._nativeParent=t,this._nativeContainerInfo=n;var u=" react-empty: "+this._domID+" ";if(e.useCreateElement){var s=n._ownerDocument,l=s.createComment(u);return i.precacheNode(this,l),o(l)}return e.renderToStaticMarkup?"":"<!--"+u+"-->"},receiveComponent:function(){},getNativeNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),e.exports=a},function(e,t){"use strict";var n={useCreateElement:!0};e.exports=n},function(e,t,n){"use strict";var r=n(72),o=n(5),i=n(7),a={dangerouslyProcessChildrenUpdates:function(e,t){var n=o.getNodeFromInstance(e);r.processUpdates(n,t)}};i.measureMethods(a,"ReactDOMIDOperations",{dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),e.exports=a},function(e,t,n){"use strict";function r(){this._rootNodeID&&f.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);c.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var i=l.getNodeFromInstance(this),a=i;a.parentNode;)a=a.parentNode;for(var u=a.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),f=0;f<u.length;f++){var d=u[f];if(d!==i&&d.form===i.form){var A=l.getInstanceFromNode(d);A?void 0:p(!1),c.asap(r,A)}}}return n}var i=n(3),a=n(47),u=n(73),s=n(76),l=n(5),c=n(10),p=n(1),f=(n(2),{getNativeProps:function(e,t){var n=s.getValue(t),r=s.getChecked(t),o=i({type:void 0},a.getNativeProps(e,t),{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange});return o},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:t.defaultChecked||!1,initialValue:null!=n?n:null,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&u.setValueForProperty(l.getNodeFromInstance(e),"checked",n||!1);var r=s.getValue(t);null!=r&&u.setValueForProperty(l.getNodeFromInstance(e),"value",""+r)}});e.exports=f},function(e,t,n){"use strict";var r=n(314);e.exports={debugTool:r}},function(e,t,n){"use strict";var r=n(3),o=n(307),i=n(5),a=n(146),u=(n(2),{mountWrapper:function(e,t,n){var r=null;if(null!=n){var o=n;"optgroup"===o._tag&&(o=o._nativeParent),null!=o&&"select"===o._tag&&(r=a.getSelectValueContext(o))}var i=null;if(null!=r)if(i=!1,Array.isArray(r)){for(var u=0;u<r.length;u++)if(""+r[u]==""+t.value){i=!0;break}}else i=""+r==""+t.value;e._wrapperState={selected:i}},postMountWrapper:function(e){var t=e._currentElement.props;if(null!=t.value){var n=i.getNodeFromInstance(e);n.setAttribute("value",t.value)}},getNativeProps:function(e,t){var n=r({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(n.selected=e._wrapperState.selected);var i="";return o.forEach(t.children,function(e){null!=e&&("string"!=typeof e&&"number"!=typeof e||(i+=e))}),i&&(n.children=i),n}});e.exports=u},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,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 f=r(p.startContainer,p.startOffset,p.endContainer,p.endOffset),d=f?0:p.toString().length,A=d+c,h=document.createRange();h.setStart(n,o),h.setEnd(i,a);var v=h.collapsed;return{start:v?A:d,end:v?d:A}}function a(e,t){var n,r,o=document.selection.createRange().duplicate();void 0===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),i=void 0===t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var u=l(e,o),s=l(e,i);if(u&&s){var p=document.createRange();p.setStart(u.node,u.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(s.node,s.offset)):(p.setEnd(s.node,s.offset),n.addRange(p))}}}var s=n(6),l=n(358),c=n(166),p=s.canUseDOM&&"selection"in document&&!("getSelection"in window),f={getOffsets:p?o:i,setOffsets:p?a:u};e.exports=f},function(e,t,n){"use strict";var r=n(148),o=n(338),i=n(159);r.inject();var a={renderToString:o.renderToString,renderToStaticMarkup:o.renderToStaticMarkup,version:i};e.exports=a},function(e,t,n){"use strict";var r=n(3),o=n(72),i=n(22),a=n(5),u=n(7),s=n(53),l=n(1),c=(n(91),function(e){this._currentElement=e,this._stringText=""+e,this._nativeNode=null,this._nativeParent=null,this._domID=null,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});r(c.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,u=" react-text: "+o+" ",l=" /react-text ";if(this._domID=o,this._nativeParent=t,e.useCreateElement){var c=n._ownerDocument,p=c.createComment(u),f=c.createComment(l),d=i(c.createDocumentFragment());return i.queueChild(d,i(p)),this._stringText&&i.queueChild(d,i(c.createTextNode(this._stringText))),i.queueChild(d,i(f)),a.precacheNode(this,p),this._closingComment=f,d}var A=s(this._stringText);return e.renderToStaticMarkup?A:"<!--"+u+"-->"+A+"<!--"+l+"-->"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getNativeNode();o.replaceDelimitedText(r[0],r[1],n)}}},getNativeNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=a.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?l(!1):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._nativeNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),u.measureMethods(c.prototype,"ReactDOMTextComponent",{mountComponent:"mountComponent",receiveComponent:"receiveComponent"}),e.exports=c},function(e,t,n){"use strict";function r(){this._rootNodeID&&f.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);return c.asap(r,this),n}var i=n(3),a=n(47),u=n(73),s=n(76),l=n(5),c=n(10),p=n(1),f=(n(2),{getNativeProps:function(e,t){null!=t.dangerouslySetInnerHTML?p(!1):void 0;var n=i({},a.getNativeProps(e,t),{defaultValue:void 0,value:void 0,children:e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=t.defaultValue,r=t.children;null!=r&&(null!=n?p(!1):void 0,Array.isArray(r)&&(r.length<=1?void 0:p(!1),r=r[0]),n=""+r),null==n&&(n="");var i=s.getValue(t);e._wrapperState={initialValue:""+(null!=i?i:n),listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=s.getValue(t);null!=n&&u.setValueForProperty(l.getNodeFromInstance(e),"value",""+n)}});e.exports=f},function(e,t,n){"use strict";function r(e,t){"_nativeNode"in e?void 0:s(!1),"_nativeNode"in t?void 0:s(!1);for(var n=0,r=e;r;r=r._nativeParent)n++;for(var o=0,i=t;i;i=i._nativeParent)o++;for(;n-o>0;)e=e._nativeParent,n--;for(;o-n>0;)t=t._nativeParent,o--;for(var a=n;a--;){if(e===t)return e;e=e._nativeParent,t=t._nativeParent}return null}function o(e,t){"_nativeNode"in e?void 0:s(!1),"_nativeNode"in t?void 0:s(!1);for(;t;){if(t===e)return!0;t=t._nativeParent}return!1}function i(e){return"_nativeNode"in e?void 0:s(!1),e._nativeParent}function a(e,t,n){for(var r=[];e;)r.push(e),e=e._nativeParent;var o;for(o=r.length;o-- >0;)t(r[o],!1,n);for(o=0;o<r.length;o++)t(r[o],!0,n)}function u(e,t,n,o,i){for(var a=e&&t?r(e,t):null,u=[];e&&e!==a;)u.push(e),e=e._nativeParent;for(var s=[];t&&t!==a;)s.push(t),t=t._nativeParent;var l;for(l=0;l<u.length;l++)n(u[l],!0,o);for(l=s.length;l-- >0;)n(s[l],!1,i)}var s=n(1);e.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:i,traverseTwoPhase:a,traverseEnterLeave:u}},function(e,t,n){"use strict";var r,o=(n(19),n(48),n(2),{onCreateMarkupForProperty:function(e,t){r(e)},onSetValueForProperty:function(e,t,n){r(t)},onDeleteValueForProperty:function(e,t){r(t)}});e.exports=o},function(e,t,n){"use strict";function r(e,t,n,r,o,i){}var o=n(331),i=(n(2),[]),a={addDevtool:function(e){i.push(e)},removeDevtool:function(e){for(var t=0;t<i.length;t++)i[t]===e&&(i.splice(t,1),t--)},onBeginProcessingChildContext:function(){r("onBeginProcessingChildContext")},onEndProcessingChildContext:function(){r("onEndProcessingChildContext")},onSetState:function(){r("onSetState")},onMountRootComponent:function(e){r("onMountRootComponent",e)},onMountComponent:function(e){r("onMountComponent",e)},onUpdateComponent:function(e){r("onUpdateComponent",e)},onUnmountComponent:function(e){r("onUnmountComponent",e)}};a.addDevtool(o),e.exports=a},function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}var o=n(28),i={handleTopLevel:function(e,t,n,i){var a=o.extractEvents(e,t,n,i);r(a)}};e.exports=i},function(e,t,n){"use strict";function r(e){for(;e._nativeParent;)e=e._nativeParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){var t=d(e.nativeEvent),n=p.getClosestInstanceFromNode(t),o=n;do e.ancestors.push(o),o=o&&r(o);while(o);for(var i=0;i<e.ancestors.length;i++)n=e.ancestors[i],h._handleTopLevel(e.topLevelType,n,e.nativeEvent,d(e.nativeEvent))}function a(e){var t=A(window);e(t)}var u=n(3),s=n(96),l=n(6),c=n(16),p=n(5),f=n(10),d=n(85),A=n(201);u(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),c.addPoolingTo(o,c.twoArgumentPooler);var h={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:l.canUseDOM?window:null,setHandleTopLevel:function(e){h._handleTopLevel=e},setEnabled:function(e){h._enabled=!!e},isEnabled:function(){return h._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?s.listen(r,t,h.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?s.capture(r,t,h.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=a.bind(null,e);s.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(h._enabled){var n=o.getPooled(e,t); try{f.batchedUpdates(i,n)}finally{o.release(n)}}}};e.exports=h},function(e,t,n){"use strict";var r=n(19),o=n(28),i=n(74),a=n(77),u=n(308),s=n(149),l=n(49),c=n(155),p=n(7),f=n(10),d={Component:a.injection,Class:u.injection,DOMProperty:r.injection,EmptyComponent:s.injection,EventPluginHub:o.injection,EventPluginUtils:i.injection,EventEmitter:l.injection,NativeComponent:c.injection,Perf:p.injection,Updates:f.injection};e.exports=d},function(e,t,n){"use strict";var r,o,i=(n(2),{onBeginProcessingChildContext:function(){r=!0},onEndProcessingChildContext:function(){r=!1},onSetState:function(){o()}});e.exports=i},function(e,t,n){"use strict";function r(e,t,n){return{type:p.INSERT_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function o(e,t,n){return{type:p.MOVE_EXISTING,content:null,fromIndex:e._mountIndex,fromNode:f.getNativeNode(e),toIndex:n,afterNode:t}}function i(e,t){return{type:p.REMOVE_NODE,content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function a(e){return{type:p.SET_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(e){return{type:p.TEXT_CONTENT,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(e,t){return t&&(e=e||[],e.push(t)),e}function l(e,t){c.processChildrenUpdates(e,t)}var c=n(77),p=n(154),f=(n(20),n(23)),d=n(306),A=n(356),h=n(1),v={Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return d.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,o){var i;return i=A(t),d.updateChildren(e,i,n,r,o),i},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var u=r[a],s=f.mountComponent(u,t,this,this._nativeContainerInfo,n);u._mountIndex=i++,o.push(s)}return o},updateTextContent:function(e){var t=this._renderedChildren;d.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&h(!1);var r=[u(e)];l(this,r)},updateMarkup:function(e){var t=this._renderedChildren;d.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&h(!1);var r=[a(e)];l(this,r)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,o={},i=this._reconcilerUpdateChildren(r,e,o,t,n);if(i||r){var a,u=null,c=0,p=0,d=null;for(a in i)if(i.hasOwnProperty(a)){var A=r&&r[a],h=i[a];A===h?(u=s(u,this.moveChild(A,d,p,c)),c=Math.max(A._mountIndex,c),A._mountIndex=p):(A&&(c=Math.max(A._mountIndex,c)),u=s(u,this._mountChildAtIndex(h,d,p,t,n))),p++,d=f.getNativeNode(h)}for(a in o)o.hasOwnProperty(a)&&(u=s(u,this._unmountChild(r[a],o[a])));u&&l(this,u),this._renderedChildren=i}},unmountChildren:function(e){var t=this._renderedChildren;d.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){return e._mountIndex<r?o(e,t,n):void 0},createChild:function(e,t,n){return r(n,t,e._mountIndex)},removeChild:function(e,t){return i(e,t)},_mountChildAtIndex:function(e,t,n,r,o){var i=f.mountComponent(e,r,this,this._nativeContainerInfo,o);return e._mountIndex=n,this.createChild(e,t,i)},_unmountChild:function(e,t){var n=this.removeChild(e,t);return e._mountIndex=null,n}}};e.exports=v},function(e,t,n){"use strict";var r=n(1),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);var i=n.getPublicInstance();i&&i.refs[t]===e.getPublicInstance()&&n.detachRef(t)}};e.exports=o},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function o(e){function t(t,n,r,o,i,a){if(o=o||E,a=a||r,null==n[r]){var u=b[i];return t?new Error("Required "+u+" `"+a+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,i,a)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function i(e){function t(t,n,r,o,i){var a=t[n],u=v(a);if(u!==e){var s=b[o],l=m(a);return new Error("Invalid "+s+" `"+i+"` of type "+("`"+l+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return o(t)}function a(){return o(w.thatReturns(null))}function u(e){function t(t,n,r,o,i){if("function"!=typeof e)return new Error("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){var u=b[o],s=v(a);return new Error("Invalid "+u+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<a.length;l++){var c=e(a,l,r,o,i+"["+l+"]");if(c instanceof Error)return c}return null}return o(t)}function s(){function e(e,t,n,r,o){if(!g.isValidElement(e[t])){var i=b[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+n+"`, expected a single ReactElement."))}return null}return o(e)}function l(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=b[o],u=e.name||E,s=y(t[n]);return new Error("Invalid "+a+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+u+"`."))}return null}return o(t)}function c(e){function t(t,n,o,i,a){for(var u=t[n],s=0;s<e.length;s++)if(r(u,e[s]))return null;var l=b[i],c=JSON.stringify(e);return new Error("Invalid "+l+" `"+a+"` of value `"+u+"` "+("supplied to `"+o+"`, expected one of "+c+"."))}return o(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function p(e){function t(t,n,r,o,i){if("function"!=typeof e)return new Error("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],u=v(a);if("object"!==u){var s=b[o];return new Error("Invalid "+s+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an object."))}for(var l in a)if(a.hasOwnProperty(l)){var c=e(a,l,r,o,i+"."+l);if(c instanceof Error)return c}return null}return o(t)}function f(e){function t(t,n,r,o,i){for(var a=0;a<e.length;a++){var u=e[a];if(null==u(t,n,r,o,i))return null}var s=b[o];return new Error("Invalid "+s+" `"+i+"` supplied to "+("`"+r+"`."))}return o(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 i=b[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return o(e)}function A(e){function t(t,n,r,o,i){var a=t[n],u=v(a);if("object"!==u){var s=b[o];return new Error("Invalid "+s+" `"+i+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `object`."))}for(var l in e){var c=e[l];if(c){var p=c(a,l,r,o,i+"."+l);if(p)return p}}return null}return o(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;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 y(e){return e.constructor&&e.constructor.name?e.constructor.name:E}var g=n(17),b=n(80),w=n(11),_=n(164),E="<<anonymous>>",x={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),any:a(),arrayOf:u,element:s(),instanceOf:l,node:d(),objectOf:p,oneOf:c,oneOfType:f,shape:A};e.exports=x},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=i.getPooled(null),this.useCreateElement=e}var o=n(3),i=n(142),a=n(16),u=n(49),s=n(151),l=n(52),c={initialize:s.getSelectionInformation,close:s.restoreSelection},p={initialize:function(){var e=u.isEnabled();return u.setEnabled(!1),e},close:function(e){u.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},d=[c,p,f],A={getTransactionWrappers:function(){return d},getReactMountReady:function(){return this.reactMountReady},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null}};o(r.prototype,l.Mixin,A),a.addPoolingTo(r),e.exports=r},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=n(333),a={};a.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},a.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},a.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&o(n,e,t._owner)}},e.exports=a},function(e,t){"use strict";var n={isBatchingUpdates:!1,batchedUpdates:function(e){}};e.exports=n},function(e,t,n){"use strict";function r(e,t){var n;try{return f.injection.injectBatchingStrategy(c),n=p.getPooled(t),n.perform(function(){var r=A(e),o=r.mountComponent(n,null,a(),d);return t||(o=l.addChecksumToMarkup(o)),o},null)}finally{p.release(n),f.injection.injectBatchingStrategy(u)}}function o(e){return s.isValidElement(e)?void 0:h(!1),r(e,!1)}function i(e){return s.isValidElement(e)?void 0:h(!1),r(e,!0)}var a=n(145),u=n(147),s=n(17),l=n(152),c=n(337),p=n(339),f=n(10),d=n(24),A=n(86),h=n(1);e.exports={renderToString:o,renderToStaticMarkup:i}},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.useCreateElement=!1}var o=n(3),i=n(16),a=n(52),u=[],s={enqueue:function(){}},l={getTransactionWrappers:function(){return u},getReactMountReady:function(){return s},destructor:function(){}};o(r.prototype,a.Mixin,l),i.addPoolingTo(r),e.exports=r},function(e,t){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},r={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering","in":0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",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",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},o={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(r).forEach(function(e){o.Properties[e]=0,r[e]&&(o.DOMAttributeNames[e]=r[e])}),e.exports=o},function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&l.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(w||null==y||y!==p())return null;var n=r(y);if(!b||!A(b,n)){b=n;var o=c.getPooled(m.select,g,e,t);return o.type="select",o.target=y,a.accumulateTwoPhaseDispatches(o),o}return null}var i=n(12),a=n(29),u=n(6),s=n(5),l=n(151),c=n(13),p=n(98),f=n(167),d=n(14),A=n(55),h=i.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]}},y=null,g=null,b=null,w=!1,_=!1,E=d({onSelect:null}),x={eventTypes:m,extractEvents:function(e,t,n,r){if(!_)return null;var i=t?s.getNodeFromInstance(t):window;switch(e){case h.topFocus:(f(i)||"true"===i.contentEditable)&&(y=i,g=t,b=null);break;case h.topBlur:y=null,g=null,b=null;break;case h.topMouseDown:w=!0;break;case h.topContextMenu:case h.topMouseUp:return w=!1,o(n,r);case h.topSelectionChange:if(v)break;case h.topKeyDown:case h.topKeyUp:return o(n,r)}return null},didPutListener:function(e,t,n){t===E&&(_=!0)}};e.exports=x},function(e,t,n){"use strict";var r=n(12),o=n(96),i=n(29),a=n(5),u=n(343),s=n(344),l=n(13),c=n(347),p=n(349),f=n(51),d=n(346),A=n(350),h=n(351),v=n(30),m=n(352),y=n(11),g=n(83),b=n(1),w=n(14),_=r.topLevelTypes,E={abort:{phasedRegistrationNames:{bubbled:w({onAbort:!0}),captured:w({onAbortCapture:!0})}},animationEnd:{phasedRegistrationNames:{bubbled:w({onAnimationEnd:!0}),captured:w({onAnimationEndCapture:!0})}},animationIteration:{phasedRegistrationNames:{bubbled:w({onAnimationIteration:!0}),captured:w({onAnimationIterationCapture:!0})}},animationStart:{phasedRegistrationNames:{bubbled:w({onAnimationStart:!0}),captured:w({onAnimationStartCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:w({onBlur:!0}),captured:w({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:w({onCanPlay:!0}),captured:w({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:w({onCanPlayThrough:!0}),captured:w({onCanPlayThroughCapture:!0})}},click:{phasedRegistrationNames:{bubbled:w({onClick:!0}),captured:w({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:w({onContextMenu:!0}),captured:w({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:w({onCopy:!0}),captured:w({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:w({onCut:!0}),captured:w({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:w({onDoubleClick:!0}),captured:w({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:w({onDrag:!0}),captured:w({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:w({onDragEnd:!0}),captured:w({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:w({onDragEnter:!0}),captured:w({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:w({onDragExit:!0}),captured:w({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:w({onDragLeave:!0}),captured:w({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:w({onDragOver:!0}),captured:w({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:w({onDragStart:!0}),captured:w({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:w({onDrop:!0}),captured:w({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:w({onDurationChange:!0}),captured:w({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:w({onEmptied:!0}),captured:w({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:w({onEncrypted:!0}),captured:w({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:w({onEnded:!0}),captured:w({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:w({onError:!0}),captured:w({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:w({onFocus:!0}),captured:w({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:w({onInput:!0}),captured:w({onInputCapture:!0})}},invalid:{phasedRegistrationNames:{bubbled:w({onInvalid:!0}),captured:w({onInvalidCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:w({onKeyDown:!0}),captured:w({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:w({onKeyPress:!0}),captured:w({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:w({onKeyUp:!0}),captured:w({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:w({onLoad:!0}),captured:w({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:w({onLoadedData:!0}),captured:w({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:w({onLoadedMetadata:!0}),captured:w({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:w({onLoadStart:!0}),captured:w({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:w({onMouseDown:!0}),captured:w({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:w({onMouseMove:!0}),captured:w({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:w({onMouseOut:!0}),captured:w({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:w({onMouseOver:!0}),captured:w({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:w({onMouseUp:!0}),captured:w({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:w({onPaste:!0}),captured:w({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:w({onPause:!0}),captured:w({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:w({onPlay:!0}),captured:w({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:w({onPlaying:!0}),captured:w({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:w({onProgress:!0}),captured:w({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:w({onRateChange:!0}),captured:w({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:w({onReset:!0}),captured:w({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:w({onScroll:!0}),captured:w({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:w({onSeeked:!0}),captured:w({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:w({onSeeking:!0}),captured:w({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:w({onStalled:!0}),captured:w({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:w({onSubmit:!0}),captured:w({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:w({onSuspend:!0}),captured:w({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:w({onTimeUpdate:!0}),captured:w({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:w({onTouchCancel:!0}),captured:w({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:w({onTouchEnd:!0}),captured:w({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:w({onTouchMove:!0}),captured:w({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:w({onTouchStart:!0}),captured:w({onTouchStartCapture:!0})}},transitionEnd:{phasedRegistrationNames:{bubbled:w({onTransitionEnd:!0}),captured:w({onTransitionEndCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:w({onVolumeChange:!0}),captured:w({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:w({onWaiting:!0}),captured:w({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:w({onWheel:!0}),captured:w({onWheelCapture:!0})}}},x={topAbort:E.abort,topAnimationEnd:E.animationEnd,topAnimationIteration:E.animationIteration,topAnimationStart:E.animationStart,topBlur:E.blur,topCanPlay:E.canPlay,topCanPlayThrough:E.canPlayThrough,topClick:E.click,topContextMenu:E.contextMenu,topCopy:E.copy,topCut:E.cut,topDoubleClick:E.doubleClick,topDrag:E.drag,topDragEnd:E.dragEnd,topDragEnter:E.dragEnter,topDragExit:E.dragExit,topDragLeave:E.dragLeave,topDragOver:E.dragOver,topDragStart:E.dragStart,topDrop:E.drop,topDurationChange:E.durationChange,topEmptied:E.emptied,topEncrypted:E.encrypted,topEnded:E.ended,topError:E.error,topFocus:E.focus,topInput:E.input,topInvalid:E.invalid,topKeyDown:E.keyDown,topKeyPress:E.keyPress,topKeyUp:E.keyUp,topLoad:E.load,topLoadedData:E.loadedData,topLoadedMetadata:E.loadedMetadata,topLoadStart:E.loadStart,topMouseDown:E.mouseDown,topMouseMove:E.mouseMove,topMouseOut:E.mouseOut,topMouseOver:E.mouseOver,topMouseUp:E.mouseUp,topPaste:E.paste,topPause:E.pause,topPlay:E.play,topPlaying:E.playing,topProgress:E.progress,topRateChange:E.rateChange,topReset:E.reset,topScroll:E.scroll,topSeeked:E.seeked,topSeeking:E.seeking,topStalled:E.stalled,topSubmit:E.submit,topSuspend:E.suspend,topTimeUpdate:E.timeUpdate,topTouchCancel:E.touchCancel,topTouchEnd:E.touchEnd,topTouchMove:E.touchMove,topTouchStart:E.touchStart,topTransitionEnd:E.transitionEnd,topVolumeChange:E.volumeChange,topWaiting:E.waiting,topWheel:E.wheel};for(var C in x)x[C].dependencies=[C];var S=w({onClick:null}),P={},T={eventTypes:E,extractEvents:function(e,t,n,r){var o=x[e];if(!o)return null;var a;switch(e){case _.topAbort:case _.topCanPlay:case _.topCanPlayThrough:case _.topDurationChange:case _.topEmptied:case _.topEncrypted:case _.topEnded:case _.topError:case _.topInput:case _.topInvalid:case _.topLoad:case _.topLoadedData:case _.topLoadedMetadata:case _.topLoadStart:case _.topPause:case _.topPlay:case _.topPlaying:case _.topProgress:case _.topRateChange:case _.topReset:case _.topSeeked:case _.topSeeking:case _.topStalled:case _.topSubmit:case _.topSuspend:case _.topTimeUpdate:case _.topVolumeChange:case _.topWaiting:a=l;break;case _.topKeyPress:if(0===g(n))return null;case _.topKeyDown:case _.topKeyUp:a=p;break;case _.topBlur:case _.topFocus:a=c;break;case _.topClick:if(2===n.button)return null;case _.topContextMenu:case _.topDoubleClick:case _.topMouseDown:case _.topMouseMove:case _.topMouseOut:case _.topMouseOver:case _.topMouseUp:a=f;break;case _.topDrag:case _.topDragEnd:case _.topDragEnter:case _.topDragExit:case _.topDragLeave:case _.topDragOver:case _.topDragStart:case _.topDrop:a=d;break;case _.topTouchCancel:case _.topTouchEnd:case _.topTouchMove:case _.topTouchStart:a=A;break;case _.topAnimationEnd:case _.topAnimationIteration:case _.topAnimationStart:a=u;break;case _.topTransitionEnd:a=h;break;case _.topScroll:a=v;break;case _.topWheel:a=m;break;case _.topCopy:case _.topCut:case _.topPaste:a=s}a?void 0:b(!1);var y=a.getPooled(o,t,n,r);return i.accumulateTwoPhaseDispatches(y),y},didPutListener:function(e,t,n){if(t===S){var r=e._rootNodeID,i=a.getNodeFromInstance(e);P[r]||(P[r]=o.listen(i,"click",y))}},willDeleteListener:function(e,t){if(t===S){var n=e._rootNodeID;P[n].remove(),delete P[n]}}};e.exports=T},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(13),i={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(13),i={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(13),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(51),i={dataTransfer:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(30),i={relatedTarget:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(13),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(30),i=n(83),a=n(357),u=n(84),s={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:u,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,s),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(30),i=n(84),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(13),i={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(51),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),e.exports=r},function(e,t){"use strict";function n(e){for(var t=1,n=0,o=0,i=e.length,a=-4&i;a>o;){for(var u=Math.min(o+4096,a);u>o;o+=4)n+=(t+=e.charCodeAt(o))+(t+=e.charCodeAt(o+1))+(t+=e.charCodeAt(o+2))+(t+=e.charCodeAt(o+3));t%=r,n%=r}for(;i>o;o++)n+=t+=e.charCodeAt(o);return t%=r,n%=r,t|n<<16}var r=65521;e.exports=n},function(e,t,n){"use strict";function r(e,t,n){var r=null==t||"boolean"==typeof t||""===t;if(r)return"";var o=isNaN(t);return o||0===t||i.hasOwnProperty(e)&&i[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var o=n(141),i=(n(2),o.isUnitlessNumber);e.exports=r},function(e,t,n){"use strict";function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=i.get(e);return t?(t=a(t),t?o.getNodeFromInstance(t):null):void u(("function"==typeof e.render,!1))}var o=(n(20),n(5)),i=n(79),a=n(165),u=n(1);n(2),e.exports=r},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 i(e,r,t),t}var i=(n(75),n(90));n(2),e.exports=o},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=n(83),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"};e.exports=r},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function o(e,t){for(var o=n(e),i=0,a=0;o;){if(3===o.nodeType){if(a=i+o.textContent.length,t>=i&&a>=t)return{node:o,offset:t-i};i=a}o=n(r(o))}}e.exports=o},function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(u[e])return u[e];if(!a[e])return e;var t=a[e];for(var n in t)if(t.hasOwnProperty(n)&&n in s)return u[e]=t[n];return""}var i=n(6),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},u={},s={};i.canUseDOM&&(s=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),e.exports=o},function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=n(53);e.exports=r},function(e,t,n){"use strict";var r=n(153);e.exports=r.renderSubtreeIntoContainer; },function(e,t,n){"use strict";function r(e,t,n){return!o(e.props,t)||!o(e.state,n)}var o=n(55);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 i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(69),l=r(s),c=n(44),p=r(c),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(4),A=r(d),h=n(46),v=n(370),m=r(v),y=n(31),g=r(y),b=function(e,t,n){var r=e.asyncValidate,s=e.blur,c=e.change,v=e.focus,y=e.getFormState,b=e.initialValues,w=t.deepEqual,_=t.getIn,E=function(e){function t(){return i(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return u(t,e),f(t,[{key:"shouldComponentUpdate",value:function(e){return!w(this.props,e)}},{key:"getRenderedComponent",value:function(){return this.refs.renderedComponent}},{key:"render",value:function(){var e=this.props,t=e.component,i=e.defaultValue,a=e.withRef,u=o(e,["component","defaultValue","withRef"]),s=(0,m["default"])(_,n,u,this.syncError,b&&_(b,n),i,r);return a&&(s.ref="renderedComponent"),A["default"].createElement(t,s)}},{key:"syncError",get:function(){var e=this.context._reduxForm.getSyncErrors,t=g["default"].getIn(e(),n);return t&&t._error?t._error:t}},{key:"valid",get:function(){var e=this.props,t=e.asyncError,n=e.submitError,r=this.syncError||t||n;return!r}}]),t}(d.Component);E.propTypes={component:d.PropTypes.oneOfType([d.PropTypes.func,d.PropTypes.string]).isRequired,defaultValue:d.PropTypes.any},E.contextTypes={_reduxForm:d.PropTypes.object};var x=(0,l["default"])({blur:s,change:c,focus:v},function(e){return(0,p["default"])(e,n)}),C=(0,h.connect)(function(e,t){return{initial:_(y(e),"initial."+n),value:_(y(e),"values."+n),state:_(y(e),"fields."+n),asyncError:_(y(e),"asyncErrors."+n),submitError:_(y(e),"submitErrors."+n),asyncValidating:_(y(e),"asyncValidating")===n,_value:t.value}},x,void 0,{withRef:!0});return C(E)};t["default"]=b},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 i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(69),l=r(s),c=n(44),p=r(c),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(4),A=r(d),h=n(46),v=n(369),m=r(v),y=n(31),g=r(y),b=n(71),w=r(b),_=function(e,t,n){var r=e.arrayInsert,s=e.arrayPop,c=e.arrayPush,v=e.arrayRemove,y=e.arrayShift,b=e.arraySplice,_=e.arraySwap,E=e.arrayUnshift,x=(e.asyncValidate,e.blur,e.change,e.focus,e.getFormState),C=e.initialValues,S=t.deepEqual,P=t.getIn,T=t.size,O=function(e){function t(){return i(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return u(t,e),f(t,[{key:"shouldComponentUpdate",value:function(e){return(0,w["default"])(this,e)}},{key:"getRenderedComponent",value:function(){return this.refs.renderedComponent}},{key:"render",value:function(){var e=this.props,t=e.component,r=e.withRef,i=o(e,["component","withRef"]),a=(0,m["default"])(S,P,T,n,i,this.syncError,C&&P(C,n));return r&&(a.ref="renderedComponent"),A["default"].createElement(t,a)}},{key:"syncError",get:function(){var e=this.context._reduxForm.getSyncErrors;return g["default"].getIn(e(),n+"._error")}},{key:"valid",get:function(){var e=this.props,t=e.asyncError,n=e.submitError,r=this.syncError||t||n;return!r}}]),t}(d.Component);O.propTypes={component:d.PropTypes.oneOfType([d.PropTypes.func,d.PropTypes.string]).isRequired,defaultValue:d.PropTypes.any},O.contextTypes={_reduxForm:d.PropTypes.object};var M=(0,l["default"])({arrayInsert:r,arrayPop:s,arrayPush:c,arrayRemove:v,arrayShift:y,arraySplice:b,arraySwap:_,arrayUnshift:E},function(e){return(0,p["default"])(e,n)}),I=(0,h.connect)(function(e){return{initial:P(x(e),"initial."+n),value:P(x(e),"values."+n),asyncError:P(x(e),"asyncErrors."+n+"._error"),submitError:P(x(e),"submitErrors."+n+"._error")}},M,void 0,{withRef:!0});return I(O)};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 i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=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},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(4),c=r(l),p=n(33),f=r(p),d=n(363),A=r(d),h=n(71),v=r(h),m=0,y=function(){return"redux-form-field-"+m++},g=function(e){var t=e.deepEqual,n=e.getIn,r=function(e){function r(e,a){o(this,r);var u=i(this,Object.getPrototypeOf(r).call(this,e,a));if(!a._reduxForm)throw new Error("Field must be inside a component decorated with reduxForm()");return u.key=y(),u.ConnectedField=(0,A["default"])(a._reduxForm,{deepEqual:t,getIn:n},e.name),u}return a(r,e),s(r,[{key:"shouldComponentUpdate",value:function(e){var t=u({},this.props),n=u({},e);return delete t.component,delete n.component,console.info(t,n),(0,v["default"])({props:t},n)}},{key:"componentWillMount",value:function(){this.context._reduxForm.register(this.key,this)}},{key:"componentWillReceiveProps",value:function(e){this.props.name!==e.name&&(this.ConnectedField=(0,A["default"])(this.context._reduxForm,{deepEqual:t,getIn:n},e.name))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.key)}},{key:"getRenderedComponent",value:function(){return(0,f["default"])(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to Field"),this.refs.connected.getWrappedInstance().getRenderedComponent()}},{key:"render",value:function(){var e=this.ConnectedField;return c["default"].createElement(e,u({},this.props,{ref:"connected"}))}},{key:"valid",get:function(){return this.refs.connected.getWrappedInstance().valid}},{key:"name",get:function(){return this.props.name}}]),r}(l.Component);return r.propTypes={name:l.PropTypes.string.isRequired,component:l.PropTypes.oneOfType([l.PropTypes.func,l.PropTypes.string]).isRequired,defaultValue:l.PropTypes.any},r.contextTypes={_reduxForm:l.PropTypes.object},r};t["default"]=g},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 i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=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},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(4),c=r(l),p=n(33),f=r(p),d=n(364),A=r(d),h=n(71),v=r(h),m=0,y=function(){return"redux-form-field-array-"+m++},g=function(e){var t=e.deepEqual,n=e.getIn,r=e.size,p=function(e){function l(e,a){o(this,l);var u=i(this,Object.getPrototypeOf(l).call(this,e,a));if(!a._reduxForm)throw new Error("FieldArray must be inside a component decorated with reduxForm()");return u.key=y(),u.ConnectedFieldArray=(0,A["default"])(a._reduxForm,{deepEqual:t,getIn:n,size:r},e.name),u}return a(l,e),s(l,[{key:"shouldComponentUpdate",value:function(e){var t=u({},this.props),n=u({},e);return delete t.component,delete n.component,(0,v["default"])({props:t},n)}},{key:"componentWillMount",value:function(){this.context._reduxForm.register(this.key,this)}},{key:"componentWillReceiveProps",value:function(e){this.props.name!==e.name&&(this.ConnectedFieldArray=(0,A["default"])(this.context._reduxForm,{deepEqual:t,getIn:n,size:r},e.name))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.key)}},{key:"getRenderedComponent",value:function(){return(0,f["default"])(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to FieldArray"),this.refs.connected.getWrappedInstance().getRenderedComponent()}},{key:"render",value:function(){var e=this.ConnectedFieldArray;return c["default"].createElement(e,u({},this.props,{ref:"connected"}))}},{key:"valid",get:function(){return this.refs.connected.getWrappedInstance().valid}},{key:"name",get:function(){return this.props.name}}]),l}(l.Component);return p.propTypes={name:l.PropTypes.string.isRequired,component:l.PropTypes.func.isRequired},p.contextTypes={_reduxForm:l.PropTypes.object},p};t["default"]=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(56),i=r(o),a=function(e,t,n,r){t(r);var o=e();if(!(0,i["default"])(o))throw new Error("asyncValidate function passed to reduxForm must return a promise");var a=function(e){return function(t){if(t&&Object.keys(t).length)return n(t),Promise.reject();if(e)throw n(),new Error("Asynchronous validation promise was rejected without errors.");return n(),Promise.resolve()}};return o.then(a(!1),a(!0))};t["default"]=a},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}}Object.defineProperty(t,"__esModule",{value:!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},a=n(383),u=o(a),s=n(384),l=o(s),c=n(365),p=o(c),f=n(366),d=o(f),A=n(378),h=o(A),v=n(391),m=o(v),y=n(169),g=o(y),b=n(382),w=o(b),_=n(170),E=r(_),x=n(92),C=r(x),S=function(e){return i({actionTypes:C},E,{Field:(0,p["default"])(e),FieldArray:(0,d["default"])(e),formValueSelector:(0,h["default"])(e),propTypes:w["default"],reduxForm:(0,l["default"])(e),reducer:(0,u["default"])(e),SubmissionError:g["default"],values:(0,m["default"])(e)})};t["default"]=S},function(e,t){"use strict";function n(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}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(e,t,o,i,a,u,s){var l=a.arrayInsert,c=a.arrayPop,p=a.arrayPush,f=a.arrayRemove,d=a.arrayShift,A=(a.arraySplice,a.arraySwap),h=a.arrayUnshift,v=a.asyncError,m=a.initial,y=(a.state,a.submitError),g=(a.submitFailed,a.value),b=n(a,["arrayInsert","arrayPop","arrayPush","arrayRemove","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncError","initial","state","submitError","submitFailed","value"]),w=u||v||y,_=m||s,E=g||_,x=e(g,_),C=o(E);return r({dirty:!x,error:w,forEach:function(e){return(E||[]).forEach(function(t,n){return e(i+"["+n+"]",n)})},insert:l,invalid:!!w,length:C,map:function(e){return(E||[]).map(function(t,n){return e(i+"["+n+"]",n)})},pop:function(){return c(),t(E,C-1)},pristine:x,push:p,remove:f,shift:function(){return d(),t(E,0)},swap:A,unshift:h,valid:!w},b)};t["default"]=o},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}Object.defineProperty(t,"__esModule",{value:!0});var i=n(136),a=r(i),u=n(44),s=r(u),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},c=n(373),p=r(c),f=n(374),d=r(f),A=n(171),h=r(A),v=n(375),m=r(v),y=n(376),g=r(y),b=function(e,t){var n=e.type,r=e.value,i=o(e,["type","value"]);return"checkbox"===n?l({},i,{checked:!!r,type:n}):"radio"===n?l({},i,{checked:r===t,type:n,value:t}):"select-multiple"===n?l({},i,{type:n,value:r||[]}):e},w=function(e,t,n,r,i){var u=n.asyncError,c=n.blur,f=n.change,A=n.focus,v=n.initial,y=n.state,w=n.submitError,_=n.value,E=n._value,x=o(n,["asyncError","blur","change","focus","initial","state","submitError","value","_value"]),C=arguments.length<=5||void 0===arguments[5]?"":arguments[5],S=arguments.length<=6||void 0===arguments[6]?a["default"]:arguments[6],P=r||u||w,T=(0,d["default"])(f),O=v||i;return b(l({active:y&&!!e(y,"active"),dirty:_!==O,error:P,invalid:!!P,name:t,onBlur:(0,p["default"])(c,(0,s["default"])(S,t)),onChange:T,onDragStart:(0,h["default"])(t,_),onDrop:(0,m["default"])(t,f),onFocus:(0,g["default"])(t,A),onUpdate:T,pristine:_===O,touched:!(!y||!e(y,"touched")),valid:!P,value:null==_?C:_,visited:y&&!!e(y,"visited")},x),E)};t["default"]=w},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=t.defaultShouldAsyncValidate=function(e){var t=e.initialized,n=e.trigger,r=e.pristine,o=e.syncValidationPasses;if(!o)return!1;switch(n){case"blur":return!0;case"submit":return!r||!t;default:return!1}};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(45),i=r(o),a=function(e){var t=e.deepEqual,n=e.empty,r=e.getIn,o=e.deleteIn,a=e.setIn,u=function s(e,u){if("]"===u[u.length-1]){var l=(0,i["default"])(u);l.pop();var c=r(e,l.join("."));return c?a(e,u,void 0):e}var p=o(e,u),f=u.lastIndexOf(".");if(f>0){var d=u.substring(0,f),A=r(p,d);if(t(A,n))return s(p,d)}return p};return u};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(172),i=r(o),a=n(175),u=r(a),s=function(e,t){return function(n){var r=(0,i["default"])(n,u["default"]);e(r),t&&t(r)}};t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(172),i=r(o),a=n(175),u=r(a),s=function(e){return function(t){return e((0,i["default"])(t,u["default"]))}};t["default"]=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(171),o=function(e,t){return function(n){t(e,n.dataTransfer.getData(r.dataKey))}};t["default"]=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return function(){return t(e)}};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(174),i=r(o),a=function(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;n>o;o++)r[o-1]=arguments[o];return(0,i["default"])(t)?e.apply(void 0,r):e.apply(void 0,[t].concat(r))}};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(33),i=r(o),a=n(31),u=r(a),s=function(e){var t=e.getIn;return function(e){var n=arguments.length<=1||void 0===arguments[1]?function(e){return t(e,"form")}:arguments[1];return(0,i["default"])(e,"Form value must be specified"),function(r){for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;o>s;s++)a[s-1]=arguments[s];return(0,i["default"])(a.length,"No fields specified"),1===a.length?t(n(r),e+".values."+a[0]):a.reduce(function(o,i){var a=t(n(r),e+".values."+i);return void 0===a?o:u["default"].setIn(o,i,a)},{})}}};t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(56),a=r(i),u=n(169),s=r(u),l=function(e,t,n,r,i){var u=t.dispatch,l=t.startSubmit,c=t.stopSubmit,p=t.setSubmitFailed,f=t.syncErrors,d=t.returnRejectedSubmitPromise,A=t.values;if(n){var h=function(){var t=e(A,u);return(0,a["default"])(t)?(l(),t.then(function(e){return c(),e})["catch"](function(e){return c(e instanceof s["default"]?e.errors:void 0),d?Promise.reject(e):void 0})):t},v=r&&r();return v?v.then(h,function(e){return p.apply(void 0,o(i)),d?Promise.reject(e):void 0}):h()}return p.apply(void 0,o(i)),d?Promise.reject(f):void 0};t["default"]=l},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){var t=e.getIn,n=e.some,r=function o(e){if(!e)return!1;var r=t(e,"_error");return r?!0:"string"==typeof e?!!e:!!e&&n(e,o)};return r};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.values=t.untouch=t.touch=t.swapArrayValues=t.SubmissionError=t.stopSubmit=t.stopAsyncValidation=t.startSubmit=t.startAsyncValidation=t.setSubmitFailed=t.reset=t.propTypes=t.initialize=t.removeArrayValue=t.reduxForm=t.reducer=t.formValueSelector=t.focus=t.FieldArray=t.Field=t.destroy=t.change=t.blur=t.addArrayValue=t.actionTypes=void 0;var o=n(368),i=r(o),a=n(31),u=r(a),s=(0,i["default"])(u["default"]),l=s.actionTypes,c=s.addArrayValue,p=s.blur,f=s.change,d=s.destroy,A=s.Field,h=s.FieldArray,v=s.focus,m=s.formValueSelector,y=s.reducer,g=s.reduxForm,b=s.removeArrayValue,w=s.initialize,_=s.propTypes,E=s.reset,x=s.setSubmitFailed,C=s.startAsyncValidation,S=s.startSubmit,P=s.stopAsyncValidation,T=s.stopSubmit,O=s.SubmissionError,M=s.swapArrayValues,I=s.touch,k=s.untouch,R=s.values;t.actionTypes=l,t.addArrayValue=c,t.blur=p,t.change=f,t.destroy=d,t.Field=A,t.FieldArray=h,t.focus=v,t.formValueSelector=m,t.reducer=y,t.reduxForm=g,t.removeArrayValue=b,t.initialize=w,t.propTypes=_,t.reset=E,t.setSubmitFailed=x,t.startAsyncValidation=C,t.startSubmit=S,t.stopAsyncValidation=P,t.stopSubmit=T,t.SubmissionError=O,t.swapArrayValues=M,t.touch=I,t.untouch=k,t.values=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.propTypes=void 0;var r=n(4),o=r.PropTypes.any,i=r.PropTypes.bool,a=r.PropTypes.func;t.propTypes={asyncValidating:i.isRequired,dirty:i.isRequired,error:o,invalid:i.isRequired,pristine:i.isRequired,submitting:i.isRequired,submitFailed:i.isRequired,valid:i.isRequired,asyncValidate:a.isRequired,destroy:a.isRequired,handleSubmit:a.isRequired,initialize:a.isRequired,reset:a.isRequired,touch:a.isRequired,untouch:a.isRequired}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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}Object.defineProperty(t,"__esModule",{value:!0});var a=n(92),u=n(372),s=r(u),l=function(e){function t(e){return e}var n,r=e.splice,u=e.empty,l=e.getIn,c=e.setIn,p=e.deleteIn,f=e.fromJS,d=e.size,A=(0,s["default"])(e),h=function(e,t,n,o,i,a,u){var s=l(e,t+"."+n);return s||u?c(e,t+"."+n,r(s,o,i,a)):e},v=["values","fields","submitErrors","asyncErrors"],m=function(e,t,n,r,o){var i=e;return i=h(i,"values",t,n,r,o,!0),i=h(i,"fields",t,n,r,u),i=h(i,"submitErrors",t,n,r,u),i=h(i,"asyncErrors",t,n,r,u)},y=(n={},o(n,a.ARRAY_INSERT,function(e,t){var n=t.meta,r=n.field,o=n.index,i=t.payload;return m(e,r,o,0,i)}),o(n,a.ARRAY_POP,function(e,t){var n=t.meta.field,r=l(e,"values."+n),o=r?d(r):0;return o?m(e,n,o-1,1):e}),o(n,a.ARRAY_PUSH,function(e,t){var n=t.meta.field,r=t.payload,o=l(e,"values."+n),i=o?d(o):0;return m(e,n,i,0,r)}),o(n,a.ARRAY_REMOVE,function(e,t){var n=t.meta,r=n.field,o=n.index;return m(e,r,o,1)}),o(n,a.ARRAY_SHIFT,function(e,t){var n=t.meta.field;return m(e,n,0,1)}),o(n,a.ARRAY_SPLICE,function(e,t){var n=t.meta,r=n.field,o=n.index,i=n.removeNum,a=t.payload;return m(e,r,o,i,a)}),o(n,a.ARRAY_SWAP,function(e,t){var n=t.meta,r=n.field,o=n.indexA,i=n.indexB,a=e;return v.forEach(function(e){var t=l(a,e+"."+r+"["+o+"]"),n=l(a,e+"."+r+"["+i+"]");void 0===t&&void 0===n||(a=c(a,e+"."+r+"["+o+"]",n),a=c(a,e+"."+r+"["+i+"]",t))}),a}),o(n,a.ARRAY_UNSHIFT,function(e,t){var n=t.meta.field,r=t.payload;return m(e,n,0,0,r)}),o(n,a.BLUR,function(e,t){var n=t.meta,r=n.field,o=n.touch,i=t.payload,a=e,u=l(a,"initial."+r);return void 0===u&&""===i?a=A(a,"values."+r):void 0!==i&&(a=c(a,"values."+r,i)),a=p(a,"active"),a=p(a,"fields."+r+".active"),o&&(a=c(a,"fields."+r+".touched",!0),a=c(a,"anyTouched",!0)),a}),o(n,a.CHANGE,function(e,t){var n=t.meta,r=n.field,o=n.touch,i=t.payload,a=e,u=l(a,"initial."+r);return void 0===u&&""===i?a=A(a,"values."+r):void 0!==i&&(a=c(a,"values."+r,i)),a=A(a,"asyncErrors."+r),a=A(a,"submitErrors."+r),o&&(a=c(a,"fields."+r+".touched",!0),a=c(a,"anyTouched",!0)),a}),o(n,a.FOCUS,function(e,t){var n=t.meta.field,r=e,o=l(e,"active");return r=p(r,"fields."+o+".active"),r=c(r,"fields."+n+".visited",!0),r=c(r,"fields."+n+".active",!0),r=c(r,"active",n)}),o(n,a.INITIALIZE,function(e,t){var n=t.payload,r=f(n),o=u;return o=c(o,"values",r),o=c(o,"initial",r)}),o(n,a.RESET,function(e){var t=l(e,"initial"),n=u;return t?(n=c(n,"values",t),n=c(n,"initial",t)):n=A(n,"values"),n}),o(n,a.START_ASYNC_VALIDATION,function(e,t){var n=t.meta.field;return c(e,"asyncValidating",n||!0)}),o(n,a.START_SUBMIT,function(e){return c(e,"submitting",!0)}),o(n,a.STOP_ASYNC_VALIDATION,function(e,t){var n=t.payload,r=e;if(r=p(r,"asyncValidating"),n&&Object.keys(n).length){var o=n._error,a=i(n,["_error"]);o&&(r=c(r,"error",o)),r=Object.keys(a).length?c(r,"asyncErrors",f(a)):p(r,"asyncErrors")}else r=p(r,"error"),r=p(r,"asyncErrors");return r}),o(n,a.STOP_SUBMIT,function(e,t){var n=t.payload,r=e;if(r=p(r,"submitting"),r=p(r,"submitFailed"),n&&Object.keys(n).length){var o=n._error,a=i(n,["_error"]);o&&(r=c(r,"error",o)),r=Object.keys(a).length?c(r,"submitErrors",f(a)):p(r,"submitErrors"),r=c(r,"submitFailed",!0)}else r=p(r,"error"),r=p(r,"submitErrors");return r}),o(n,a.SET_SUBMIT_FAILED,function(e,t){var n=t.meta.fields,r=e;return r=c(r,"submitFailed",!0),r=p(r,"submitting"),n.forEach(function(e){return r=c(r,"fields."+e+".touched",!0)}),n.length&&(r=c(r,"anyTouched",!0)),r}),o(n,a.TOUCH,function(e,t){var n=t.meta.fields,r=e;return n.forEach(function(e){return r=c(r,"fields."+e+".touched",!0)}),r=c(r,"anyTouched",!0)}),o(n,a.UNTOUCH,function(e,t){var n=t.meta.fields,r=e;return n.forEach(function(e){return r=p(r,"fields."+e+".touched")}),r}),n),g=function(){var e=arguments.length<=0||void 0===arguments[0]?u:arguments[0],t=arguments[1],n=y[t.type];return n?n(e,t):e},b=function(e){return function(){var t=arguments.length<=0||void 0===arguments[0]?u:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=n&&n.meta&&n.meta.form;if(!r)return t;if(n.type===a.DESTROY)return A(t,n.meta.form);var o=l(t,r),i=e(o,n);return i===o?t:c(t,r,i)}};return t(b(g))};t["default"]=l},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 i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function l(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}Object.defineProperty(t,"__esModule",{value:!0});var c=n(282),p=o(c),f=n(44),d=o(f),A=n(69),h=o(A),v=n(273),m=o(v),y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=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},w=n(4),_=o(w),E=n(100),x=o(E),C=n(46),S=n(178),P=n(56),T=o(P),O=n(390),M=o(O),I=n(170),k=r(I),R=n(379),N=o(R),D=n(174),F=o(D),j=n(377),L=o(j),U=n(367),B=o(U),V=n(380),Q=o(V),z=n(371),W=o(z),K=n(31),q=o(K),G=k.arrayInsert,H=k.arrayPop,Y=k.arrayPush,J=k.arrayRemove,Z=k.arrayShift,X=k.arraySplice,$=k.arraySwap,ee=k.arrayUnshift,te=k.blur,ne=k.change,re=k.focus,oe=l(k,["arrayInsert","arrayPop","arrayPush","arrayRemove","arrayShift","arraySplice","arraySwap","arrayUnshift","blur","change","focus"]),ie=[].concat(s(Object.keys(k)),["array","asyncErrors","initialized","initialValues","syncErrors","values"]),ae=function(e){if(!e||"function"!=typeof e)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");return e},ue=function(e){var t=e.deepEqual,n=e.empty,r=e.getIn,o=e.setIn,s=e.fromJS,c=(0,Q["default"])(e),f=(0,Q["default"])(q["default"]);return function(e){var A=b({touchOnBlur:!0,touchOnChange:!1,destroyOnUnmount:!0,shouldAsyncValidate:W["default"],getFormState:function(e){return r(e,"form")}},e);return function(e){var v=function(n){function s(e){i(this,s);var t=a(this,Object.getPrototypeOf(s).call(this,e));return t.submit=t.submit.bind(t),t.reset=t.reset.bind(t),t.asyncValidate=t.asyncValidate.bind(t),t.getSyncErrors=t.getSyncErrors.bind(t),t.register=t.register.bind(t),t.unregister=t.unregister.bind(t),t.submitCompleted=t.submitCompleted.bind(t),t.fields={},t}return u(s,n),g(s,[{key:"getChildContext",value:function(){var e=this;return{_reduxForm:b({},this.props,{getFormState:function(t){return r(e.props.getFormState(t),e.props.form)},asyncValidate:this.asyncValidate,getSyncErrors:this.getSyncErrors,register:this.register,unregister:this.unregister})}}},{key:"initIfNeeded",value:function(e){var t=e.initialize,n=e.initialized,r=e.initialValues;r&&!n&&t(r)}},{key:"componentWillMount",value:function(){this.initIfNeeded(this.props)}},{key:"componentWillReceiveProps",value:function(e){this.initIfNeeded(e)}},{key:"shouldComponentUpdate",value:function(e){var n=this;return Object.keys(e).some(function(r){return!~ie.indexOf(r)&&!t(n.props[r],e[r])})}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.destroyOnUnmount,n=e.destroy;t&&n()}},{key:"getSyncErrors",value:function(){return this.props.syncErrors}},{key:"register",value:function(e,t){this.fields[e]=t}},{key:"unregister",value:function(e){delete this.fields[e]}},{key:"asyncValidate",value:function c(e,t){var n=this,i=this.props,a=i.asyncBlurFields,u=i.asyncErrors,c=i.asyncValidate,s=i.dispatch,l=i.initialized,p=i.pristine,f=i.shouldAsyncValidate,d=i.startAsyncValidation,A=i.stopAsyncValidation,h=i.syncErrors,v=i.values,m=!e;if(c){var g=function(){var i=m?v:o(v,e,t),y=m||!r(h,e),g=!m&&(!a||~a.indexOf(e.replace(/\[[0-9]+\]/g,"[]")));return(g||m)&&f({asyncErrors:u,initialized:l,trigger:m?"submit":"blur",blurredField:e,pristine:p,syncValidationPasses:y})?{v:(0,B["default"])(function(){return c(i,s,n.props)},d,A,e)}:void 0}();if("object"===("undefined"==typeof g?"undefined":y(g)))return g.v}}},{key:"submitCompleted",value:function(e){return delete this.submitPromise,e}},{key:"listenToSubmit",value:function(e){return(0,T["default"])(e)?(this.submitPromise=e,e.then(this.submitCompleted,this.submitCompleted)):e}},{key:"submit",value:function(e){var t=this;if(!this.submitPromise){var n=this.props.onSubmit;return!e||(0,F["default"])(e)?this.listenToSubmit((0,N["default"])(ae(n),this.props,this.valid,this.asyncValidate,this.fieldList)):(0,L["default"])(function(){return t.listenToSubmit((0,N["default"])(ae(e),t.props,t.valid,t.asyncValidate,t.fieldList))})}}},{key:"reset",value:function(){this.props.reset()}},{key:"render",value:function(){var t=this.props,n=(t.arrayInsert,t.arrayPop,t.arrayPush,t.arrayRemove,t.arrayShift,t.arraySplice,t.arraySwap,t.arrayUnshift,t.asyncErrors,t.reduxMountPoint,t.destroyOnUnmount,t.form,t.getFormState,t.touchOnBlur,t.touchOnChange,t.syncErrors,t.values,l(t,["arrayInsert","arrayPop","arrayPush","arrayRemove","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncErrors","reduxMountPoint","destroyOnUnmount","form","getFormState","touchOnBlur","touchOnChange","syncErrors","values"]));return _["default"].createElement(e,b({},n,{handleSubmit:this.submit}))}},{key:"values",get:function(){return this.props.values}},{key:"valid",get:function(){return(0,m["default"])(this.fields,function(e){return e.valid})}},{key:"invalid",get:function(){return!this.valid}},{key:"fieldList",get:function(){var e=this;return Object.keys(this.fields).map(function(t){return e.fields[t].name})}}]),s}(w.Component);v.displayName="Form("+(0,M["default"])(e)+")",v.WrappedComponent=e,v.childContextTypes={_reduxForm:w.PropTypes.object.isRequired},v.propTypes={destroyOnUnmount:w.PropTypes.bool,form:w.PropTypes.string.isRequired,initialValues:w.PropTypes.object,getFormState:w.PropTypes.func,validate:w.PropTypes.func, touchOnBlur:w.PropTypes.bool,touchOnChange:w.PropTypes.bool};var E=(0,C.connect)(function(e,o){var i=o.form,a=o.getFormState,u=o.initialValues,s=o.validate,l=r(a(e)||n,i)||n,p=r(l,"initial"),d=u||p||n,A=r(l,"values")||d,h=t(d,A),v=r(l,"asyncErrors"),m=r(l,"submitErrors"),y=s&&s(A,o)||{},g=f(y),b=c(v),w=c(m),_=!(g||b||w),E=!!r(l,"anyTouched"),x=!!r(l,"submitting"),C=!!r(l,"submitFailed"),S=r(l,"error");return{anyTouched:E,asyncErrors:v,asyncValidating:r(l,"asyncValidating"),dirty:!h,error:S,initialized:!!p,invalid:!_,pristine:h,submitting:x,submitFailed:C,syncErrors:y,values:A,valid:_}},function(e,t){return b({},(0,S.bindActionCreators)((0,h["default"])(b({},oe),function(e){return(0,d["default"])(e,t.form)}),e),{array:(0,S.bindActionCreators)((0,h["default"])({insert:G,pop:H,push:Y,remove:J,shift:Z,splice:X,swap:$,unshift:ee},function(e){return(0,d["default"])(e,t.form)}),e)},(0,h["default"])({arrayInsert:G,arrayPop:H,arrayPush:Y,arrayRemove:J,arrayShift:Z,arraySplice:X,arraySwap:$,arrayUnshift:ee,blur:(0,p["default"])(te,!!t.touchOnBlur),change:(0,p["default"])(ne,!!t.touchOnChange),focus:re},function(e){return(0,d["default"])(e,t.form)}),{dispatch:e})},void 0,{withRef:!0}),P=(0,x["default"])(E(v),e);return P.defaultProps=A,function(e){function t(){return i(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return u(t,e),g(t,[{key:"submit",value:function(){return this.refs.wrapped.getWrappedInstance().submit()}},{key:"reset",value:function(){return this.refs.wrapped.getWrappedInstance().reset()}},{key:"render",value:function(){var e=this.props,t=e.initialValues,n=l(e,["initialValues"]);return _["default"].createElement(P,b({ref:"wrapped",initialValues:s(t)},n))}},{key:"valid",get:function(){return this.refs.wrapped.getWrappedInstance().valid}},{key:"invalid",get:function(){return this.refs.wrapped.getWrappedInstance().invalid}},{key:"values",get:function(){return this.refs.wrapped.getWrappedInstance().values}},{key:"fieldList",get:function(){return this.refs.wrapped.getWrappedInstance().fieldList}}]),t}(w.Component)}}};t["default"]=ue},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(277),i=r(o),a=function(e,t){return e==t?!0:null==e&&""===t?!0:""===e&&null==t?!0:void 0},u=function(e,t){return(0,i["default"])(e,t,a)};t["default"]=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(45),u=r(a),s=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=function p(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),a=2;n>a;a++)r[a-2]=arguments[a];if(void 0===e||void 0===t)return e;if(r.length){if(Array.isArray(e)){if(t<e.length){var u=[].concat(i(e));return u[t]=p.apply(void 0,[e&&e[t]].concat(r)),u}return e}return t in e?s({},e,o({},t,p.apply(void 0,[e&&e[t]].concat(r)))):e}if(Array.isArray(e)){if(isNaN(t))throw new Error("Cannot delete non-numerical index from an array");if(t<e.length){var l=[].concat(i(e));return l.splice(t,1),l}return e}if(t in e){var c=s({},e);return delete c[t],c}return e},c=function(e,t){return l.apply(void 0,[e].concat(i((0,u["default"])(t))))};t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(45),a=r(i),u=function l(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o];if(!e)return e;var i=e[t];return r.length?l.apply(void 0,[i].concat(r)):i},s=function(e,t){return u.apply(void 0,[e].concat(o((0,a["default"])(t))))};t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(45),u=r(a),s=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=function p(e,t,n){for(var r=arguments.length,a=Array(r>3?r-3:0),u=3;r>u;u++)a[u-3]=arguments[u];if(void 0===n)return t;var l=p.apply(void 0,[e&&e[n],t].concat(a));if(!e){var c=isNaN(n)?{}:[];return c[n]=l,c}if(Array.isArray(e)){var f=[].concat(i(e));return f[n]=l,f}return s({},e,o({},n,l))},c=function(e,t,n){return l.apply(void 0,[e,n].concat(i((0,u["default"])(t))))};t["default"]=c},function(e,t){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=arguments[1],r=arguments[2],o=arguments[3],i=[].concat(n(e));return r?i.splice(t,r):i.splice(t,0,o),i};t["default"]=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e.displayName||e.name||"Component"};t["default"]=n},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(46),a=function(e){var t=e.empty,n=e.getIn;return function(e){var a=o({prop:"values",getFormState:function(e){return n(e,"form")}},e),u=a.form,s=a.prop,l=a.getFormState;return(0,i.connect)(function(e){return r({},s,n(l(e),u+".values")||t)})}};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return function(e){return function(n,r,o){var a=e(n,r,o),s=a.dispatch,l=[],c={getState:a.getState,dispatch:function(e){return s(e)}};return l=t.map(function(e){return e(c)}),s=u["default"].apply(void 0,l)(a.dispatch),i({},a,{dispatch:s})}}}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"]=o;var a=n(176),u=r(a)},function(e,t){"use strict";function n(e,t){return function(){return t(e.apply(void 0,arguments))}}function r(e,t){if("function"==typeof e)return n(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var r=Object.keys(e),o={},i=0;i<r.length;i++){var a=r[i],u=e[a];"function"==typeof u&&(o[a]=n(u,t))}return o}t.__esModule=!0,t["default"]=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n=t&&t.type,r=n&&'"'+n.toString()+'"'||"an action";return"Given action "+r+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state.'}function i(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:u.ActionTypes.INIT});if("undefined"==typeof r)throw new Error('Reducer "'+t+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var o="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof n(void 0,{type:o}))throw new Error('Reducer "'+t+'" returned undefined when probed with a random type. '+("Don't try to handle "+u.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function a(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var a=t[r];"function"==typeof e[a]&&(n[a]=e[a])}var u,s=Object.keys(n);try{i(n)}catch(l){u=l}return function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];if(u)throw u;for(var r=!1,i={},a=0;a<s.length;a++){var l=s[a],c=n[l],p=e[l],f=c(p,t);if("undefined"==typeof f){var d=o(l,t);throw new Error(d)}i[l]=f,r=r||f!==p}return r?i:e}}t.__esModule=!0,t["default"]=a;var u=n(177),s=n(67),l=(r(s),n(179));r(l)},function(e,t,n){(function(t){"use strict";e.exports=n(396)(t||window||this)}).call(t,function(){return this}())},function(e,t){"use strict";e.exports=function(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}}])})},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 i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(167),l=r(s),c=n(115),p=r(c),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(7),A=n(85),h=n(709),v=r(h),m=n(89),y=r(m),g=function(e,t,n){var r=e.asyncValidate,s=e.blur,c=e.change,h=e.focus,m=e.getFormState,g=e.initialValues,b=t.deepEqual,w=t.getIn,_=g&&w(g,n),E=function(e){function t(){return i(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return u(t,e),f(t,[{key:"shouldComponentUpdate",value:function(e){return!b(this.props,e)}},{key:"getRenderedComponent",value:function(){return this.refs.renderedComponent}},{key:"render",value:function(){var e=this.props,t=e.component,i=e.defaultValue,a=e.withRef,u=o(e,["component","defaultValue","withRef"]),s=(0,v["default"])(w,n,u,this.syncError,i,r);return a&&(s.ref="renderedComponent"),(0,d.createElement)(t,s)}},{key:"syncError",get:function(){var e=this.context._reduxForm.getSyncErrors,t=y["default"].getIn(e(),n);return t&&t._error?t._error:t}},{key:"dirty",get:function(){return this.props.dirty}},{key:"pristine",get:function(){return this.props.pristine}},{key:"value",get:function(){return this.props.value}}]),t}(d.Component);E.propTypes={component:d.PropTypes.oneOfType([d.PropTypes.func,d.PropTypes.string]).isRequired,defaultValue:d.PropTypes.any,props:d.PropTypes.object},E.contextTypes={_reduxForm:d.PropTypes.object};var x=(0,l["default"])({blur:s,change:c,focus:h},function(e){return(0,p["default"])(e,n)}),C=(0,A.connect)(function(e,t){var r=w(m(e),"initial."+n)||_,o=w(m(e),"values."+n),i=o===r;return{asyncError:w(m(e),"asyncErrors."+n),asyncValidating:w(m(e),"asyncValidating")===n,dirty:!i,pristine:i,state:w(m(e),"fields."+n),submitError:w(m(e),"submitErrors."+n),value:o,_value:t.value}},x,void 0,{withRef:!0});return C(E)};t["default"]=g},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 i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(167),l=r(s),c=n(115),p=r(c),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(7),A=n(85),h=n(708),v=r(h),m=n(89),y=r(m),g=n(168),b=r(g),w=function(e,t,n){var r=e.arrayInsert,s=e.arrayPop,c=e.arrayPush,h=e.arrayRemove,m=e.arrayShift,g=e.arraySplice,w=e.arraySwap,_=e.arrayUnshift,E=(e.asyncValidate,e.blur,e.change,e.focus,e.getFormState),x=e.initialValues,C=t.deepEqual,S=t.getIn,P=t.size,T=x&&S(x,n),O=function(e){function t(){return i(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return u(t,e),f(t,[{key:"shouldComponentUpdate",value:function(e){return(0,b["default"])(this,e)}},{key:"getRenderedComponent",value:function(){return this.refs.renderedComponent}},{key:"render",value:function(){var e=this.props,t=e.component,r=e.withRef,i=o(e,["component","withRef"]),a=(0,v["default"])(S,P,n,i,this.syncError);return r&&(a.ref="renderedComponent"),(0,d.createElement)(t,a)}},{key:"syncError",get:function(){var e=this.context._reduxForm.getSyncErrors;return y["default"].getIn(e(),n+"._error")}},{key:"dirty",get:function(){return this.props.dirty}},{key:"pristine",get:function(){return this.props.pristine}},{key:"value",get:function(){return this.props.value}}]),t}(d.Component);O.propTypes={component:d.PropTypes.oneOfType([d.PropTypes.func,d.PropTypes.string]).isRequired,defaultValue:d.PropTypes.any,props:d.PropTypes.object},O.contextTypes={_reduxForm:d.PropTypes.object};var M=(0,l["default"])({arrayInsert:r,arrayPop:s,arrayPush:c,arrayRemove:h,arrayShift:m,arraySplice:g,arraySwap:w,arrayUnshift:_},function(e){return(0,p["default"])(e,n)}),I=(0,A.connect)(function(e){var t=S(E(e),"initial."+n)||T,r=S(E(e),"values."+n),o=C(r,t);return{asyncError:S(E(e),"asyncErrors."+n+"._error"),dirty:!o,pristine:o,submitError:S(E(e),"submitErrors."+n+"._error"),value:r}},M,void 0,{withRef:!0});return I(O)};t["default"]=w},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 i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=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},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(7),c=n(52),p=r(c),f=n(702),d=r(f),A=n(168),h=r(A),v=function(e){var t=e.deepEqual,n=e.getIn,r=function(e){function r(e,a){o(this,r);var u=i(this,Object.getPrototypeOf(r).call(this,e,a));if(!a._reduxForm)throw new Error("Field must be inside a component decorated with reduxForm()");return u.ConnectedField=(0,d["default"])(a._reduxForm,{deepEqual:t,getIn:n},e.name),u}return a(r,e),s(r,[{key:"shouldComponentUpdate",value:function(e){return(0,h["default"])(this,e)}},{key:"componentWillMount",value:function(){this.context._reduxForm.register(this.name,"Field")}},{key:"componentWillReceiveProps",value:function(e){this.props.name!==e.name&&(this.ConnectedField=(0,d["default"])(this.context._reduxForm,{deepEqual:t,getIn:n},e.name))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.name)}},{key:"getRenderedComponent",value:function(){return(0,p["default"])(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to Field"),this.refs.connected.getWrappedInstance().getRenderedComponent()}},{key:"render",value:function(){return(0,l.createElement)(this.ConnectedField,u({},this.props,{ref:"connected"}))}},{key:"name",get:function(){return this.props.name}},{key:"dirty",get:function(){return this.refs.connected.getWrappedInstance().dirty}},{key:"pristine",get:function(){return this.refs.connected.getWrappedInstance().pristine}},{key:"value",get:function(){return this.refs.connected.getWrappedInstance().value}}]),r}(l.Component);return r.propTypes={name:l.PropTypes.string.isRequired,component:l.PropTypes.oneOfType([l.PropTypes.func,l.PropTypes.string]).isRequired,defaultValue:l.PropTypes.any,props:l.PropTypes.object},r.contextTypes={_reduxForm:l.PropTypes.object},r};t["default"]=v},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 i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=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},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(7),c=n(52),p=r(c),f=n(703),d=r(f),A=n(168),h=r(A),v=function(e){var t=e.deepEqual,n=e.getIn,r=e.size,c=function(e){function c(e,a){o(this,c);var u=i(this,Object.getPrototypeOf(c).call(this,e,a));if(!a._reduxForm)throw new Error("FieldArray must be inside a component decorated with reduxForm()");return u.ConnectedFieldArray=(0,d["default"])(a._reduxForm,{deepEqual:t,getIn:n,size:r},e.name),u}return a(c,e),s(c,[{key:"shouldComponentUpdate",value:function(e){return(0,h["default"])(this,e)}},{key:"componentWillMount",value:function(){this.context._reduxForm.register(this.name,"FieldArray")}},{key:"componentWillReceiveProps",value:function(e){this.props.name!==e.name&&(this.ConnectedFieldArray=(0,d["default"])(this.context._reduxForm,{deepEqual:t,getIn:n,size:r},e.name))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.name)}},{key:"getRenderedComponent",value:function(){return(0,p["default"])(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to FieldArray"),this.refs.connected.getWrappedInstance().getRenderedComponent()}},{key:"render",value:function(){return(0,l.createElement)(this.ConnectedFieldArray,u({},this.props,{ref:"connected"}))}},{key:"name",get:function(){return this.props.name}},{key:"dirty",get:function(){return this.refs.connected.getWrappedInstance().dirty}},{key:"pristine",get:function(){return this.refs.connected.getWrappedInstance().pristine}},{key:"value",get:function(){return this.refs.connected.getWrappedInstance().value}}]),c}(l.Component);return c.propTypes={name:l.PropTypes.string.isRequired,component:l.PropTypes.func.isRequired,props:l.PropTypes.object},c.contextTypes={_reduxForm:l.PropTypes.object},c};t["default"]=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(155),i=r(o),a=function(e,t,n,r){t(r);var o=e();if(!(0,i["default"])(o))throw new Error("asyncValidate function passed to reduxForm must return a promise");var a=function(e){return function(t){if(t&&Object.keys(t).length)return n(t),Promise.reject();if(e)throw n(),new Error("Asynchronous validation promise was rejected without errors.");return n(),Promise.resolve()}};return o.then(a(!1),a(!0))};t["default"]=a},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}}Object.defineProperty(t,"__esModule",{value:!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},a=n(722),u=o(a),s=n(723),l=o(s),c=n(704),p=o(c),f=n(705),d=o(f),A=n(717),h=o(A),v=n(729),m=o(v),y=n(308),g=o(y),b=n(721),w=o(b),_=n(309),E=r(_),x=n(196),C=r(x),S=function(e){return i({actionTypes:C},E,{Field:(0,p["default"])(e),FieldArray:(0,d["default"])(e),formValueSelector:(0,h["default"])(e),propTypes:w["default"],reduxForm:(0,l["default"])(e),reducer:(0,u["default"])(e),SubmissionError:g["default"],values:(0,m["default"])(e)})};t["default"]=S},function(e,t){"use strict";function n(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}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(e,t,o,i,a){var u=i.arrayInsert,s=i.arrayMove,l=i.arrayPop,c=i.arrayPush,p=i.arrayRemove,f=i.arrayRemoveAll,d=i.arrayShift,A=(i.arraySplice,i.arraySwap),h=i.arrayUnshift,v=i.asyncError,m=i.dirty,y=i.pristine,g=(i.state,i.submitError),b=(i.submitFailed,i.value),w=i.props,_=n(i,["arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncError","dirty","pristine","state","submitError","submitFailed","value","props"]),E=a||v||g,x=t(b);return r({fields:{dirty:m,error:E,forEach:function(e){return(b||[]).forEach(function(t,n){return e(o+"["+n+"]",n)})},insert:u,invalid:!!E,length:x,map:function(e){return(b||[]).map(function(t,n){return e(o+"["+n+"]",n)})},move:s,pop:function(){return l(),e(b,x-1)},pristine:y,push:c,remove:p,removeAll:f,shift:function(){return d(),e(b,0)},swap:A,unshift:h,valid:!E}},w,_)};t["default"]=o},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}Object.defineProperty(t,"__esModule",{value:!0});var i=n(268),a=r(i),u=n(115),s=r(u),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},c=n(712),p=r(c),f=n(713),d=r(f),A=n(310),h=r(A),v=n(714),m=r(v),y=n(715),g=r(y),b=function(e,t){var n=e.type,r=e.value,i=o(e,["type","value"]);return"checkbox"===n?l({},i,{checked:!!r,type:n}):"radio"===n?l({},i,{checked:r===t,type:n,value:t}):"select-multiple"===n?l({},i,{type:n,value:r||[]}):e},w=function(e,t,n,r){var i=n.asyncError,u=n.blur,c=n.change,f=n.dirty,A=n.focus,v=n.pristine,y=n.state,w=n.submitError,_=n.value,E=n._value,x=n.props,C=o(n,["asyncError","blur","change","dirty","focus","pristine","state","submitError","value","_value","props"]),S=arguments.length<=4||void 0===arguments[4]?"":arguments[4],P=arguments.length<=5||void 0===arguments[5]?a["default"]:arguments[5],T=r||i||w,O=(0,d["default"])(c);return b(l({active:y&&!!e(y,"active"),dirty:f,error:T,invalid:!!T,name:t,onBlur:(0,p["default"])(u,(0,s["default"])(P,t)),onChange:O,onDragStart:(0,h["default"])(t,_),onDrop:(0,m["default"])(t,c),onFocus:(0,g["default"])(t,A),onUpdate:O,pristine:v,touched:!(!y||!e(y,"touched")),valid:!T,value:null==_?S:_,visited:y&&!!e(y,"visited")},x,C),E)};t["default"]=w},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){var t=e.initialized,n=e.trigger,r=e.pristine,o=e.syncValidationPasses;if(!o)return!1;switch(n){case"blur":return!0;case"submit":return!r||!t;default:return!1}};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(116),i=r(o),a=function(e){var t=e.deepEqual,n=e.empty,r=e.getIn,o=e.deleteIn,a=e.setIn,u=function s(e,u){if("]"===u[u.length-1]){var l=(0,i["default"])(u);l.pop();var c=r(e,l.join("."));return c?a(e,u,void 0):e}var p=o(e,u),f=u.lastIndexOf(".");if(f>0){var d=u.substring(0,f);if("]"!==d[d.length-1]){var A=r(p,d);if(t(A,n))return s(p,d)}}return p};return u};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(311),i=r(o),a=n(315),u=r(a),s=function(e,t){return function(n){var r=(0,i["default"])(n,u["default"]);e(r),t&&t(r)}};t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(311),i=r(o),a=n(315),u=r(a),s=function(e){return function(t){return e((0,i["default"])(t,u["default"]))}};t["default"]=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(310),o=function(e,t){return function(n){t(e,n.dataTransfer.getData(r.dataKey))}};t["default"]=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return function(){return t(e)}};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(313),i=r(o),a=function(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;n>o;o++)r[o-1]=arguments[o];return(0,i["default"])(t)?e.apply(void 0,r):e.apply(void 0,[t].concat(r))}};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(52),i=r(o),a=n(89),u=r(a),s=function(e){var t=e.getIn;return function(e){var n=arguments.length<=1||void 0===arguments[1]?function(e){return t(e,"form")}:arguments[1];return(0,i["default"])(e,"Form value must be specified"),function(r){for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;o>s;s++)a[s-1]=arguments[s];return(0,i["default"])(a.length,"No fields specified"),1===a.length?t(n(r),e+".values."+a[0]):a.reduce(function(o,i){var a=t(n(r),e+".values."+i);return void 0===a?o:u["default"].setIn(o,i,a)},{})}}};t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(155),a=r(i),u=n(308),s=r(u),l=function(e,t,n,r,i){var u=t.dispatch,l=t.startSubmit,c=t.stopSubmit,p=t.setSubmitFailed,f=t.syncErrors,d=t.returnRejectedSubmitPromise,A=t.touch,h=t.values;if(A.apply(void 0,o(i)),n){var v=function(){var t=e(h,u);return(0,a["default"])(t)?(l(),t.then(function(e){return c(),e})["catch"](function(e){return c(e instanceof s["default"]?e.errors:void 0),d?Promise.reject(e):void 0})):t},m=r&&r();return m?m.then(v,function(e){return p.apply(void 0,o(i)),d?Promise.reject(e):void 0}):v()}return p.apply(void 0,o(i)),d?Promise.reject(f):void 0};t["default"]=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(316),i=r(o),a=function(e,t){switch(t){case"Field":return e;case"FieldArray":return e+"._error"}},u=function(e){var t=e.getIn,n=function(e,n,r,o){var u=t(e,"name"),s=t(e,"type");if(!n&&!r&&!o)return!1;var l=a(u,s),c=(0,i["default"])(n,l);if(c&&"string"==typeof c)return!0;var p=t(r,l);if(p&&"string"==typeof p)return!0;var f=t(o,l);return!(!f||"string"!=typeof f)};return n};t["default"]=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){var t=e.getIn,n=function(e){if(!e)return!1;var n=t(e,"_error");return n?!0:"string"==typeof e?!!e:!1};return n};t["default"]=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.propTypes=void 0;var r=n(7),o=r.PropTypes.any,i=r.PropTypes.bool,a=r.PropTypes.func;t.propTypes={asyncValidating:i.isRequired,autofilled:i,dirty:i.isRequired,error:o,invalid:i.isRequired,pristine:i.isRequired,submitting:i.isRequired,submitFailed:i.isRequired,valid:i.isRequired,asyncValidate:a.isRequired,destroy:a.isRequired,handleSubmit:a.isRequired,initialize:a.isRequired,reset:a.isRequired,touch:a.isRequired,untouch:a.isRequired}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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}Object.defineProperty(t,"__esModule",{value:!0});var a=n(196),u=n(711),s=r(u),l=function(e){function t(e){return e.plugin=function(e){var n=this;return t(function(){var t=arguments.length<=0||void 0===arguments[0]?u:arguments[0],r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return Object.keys(e).reduce(function(t,n){var o=l(t,n),i=e[n](o,r);return i===o?t:c(t,n,i)},n(t,r))})},e}var n,r=e.splice,u=e.empty,l=e.getIn,c=e.setIn,p=e.deleteIn,f=e.fromJS,d=e.size,A=e.some,h=(0,s["default"])(e),v=function(e,t,n,o,i,a,u){var s=l(e,t+"."+n);return s||u?c(e,t+"."+n,r(s,o,i,a)):e},m=["values","fields","submitErrors","asyncErrors"],y=function(e,t,n,r,o){var i=e;return i=v(i,"values",t,n,r,o,!0),i=v(i,"fields",t,n,r,u),i=v(i,"submitErrors",t,n,r,u),i=v(i,"asyncErrors",t,n,r,u)},g=(n={},o(n,a.ARRAY_INSERT,function(e,t){var n=t.meta,r=n.field,o=n.index,i=t.payload;return y(e,r,o,0,i)}),o(n,a.ARRAY_MOVE,function(e,t){var n=t.meta,o=n.field,i=n.from,a=n.to,u=l(e,"values."+o),s=u?d(u):0,p=e;return s&&m.forEach(function(e){var t=e+"."+o;if(l(p,t)){var n=l(p,t+"["+i+"]");p=c(p,t,r(l(p,t),i,1)),p=c(p,t,r(l(p,t),a,0,n))}}),p}),o(n,a.ARRAY_POP,function(e,t){var n=t.meta.field,r=l(e,"values."+n),o=r?d(r):0;return o?y(e,n,o-1,1):e}),o(n,a.ARRAY_PUSH,function(e,t){var n=t.meta.field,r=t.payload,o=l(e,"values."+n),i=o?d(o):0;return y(e,n,i,0,r)}),o(n,a.ARRAY_REMOVE,function(e,t){var n=t.meta,r=n.field,o=n.index;return y(e,r,o,1)}),o(n,a.ARRAY_REMOVE_ALL,function(e,t){var n=t.meta.field,r=l(e,"values."+n),o=r?d(r):0;return o?y(e,n,0,o):e}),o(n,a.ARRAY_SHIFT,function(e,t){var n=t.meta.field;return y(e,n,0,1)}),o(n,a.ARRAY_SPLICE,function(e,t){var n=t.meta,r=n.field,o=n.index,i=n.removeNum,a=t.payload; return y(e,r,o,i,a)}),o(n,a.ARRAY_SWAP,function(e,t){var n=t.meta,r=n.field,o=n.indexA,i=n.indexB,a=e;return m.forEach(function(e){var t=l(a,e+"."+r+"["+o+"]"),n=l(a,e+"."+r+"["+i+"]");void 0===t&&void 0===n||(a=c(a,e+"."+r+"["+o+"]",n),a=c(a,e+"."+r+"["+i+"]",t))}),a}),o(n,a.ARRAY_UNSHIFT,function(e,t){var n=t.meta.field,r=t.payload;return y(e,n,0,0,r)}),o(n,a.BLUR,function(e,t){var n=t.meta,r=n.field,o=n.touch,i=t.payload,a=e,u=l(a,"initial."+r);return void 0===u&&""===i?a=h(a,"values."+r):void 0!==i&&(a=c(a,"values."+r,i)),r===l(a,"active")&&(a=p(a,"active")),a=p(a,"fields."+r+".active"),o&&(a=c(a,"fields."+r+".touched",!0),a=c(a,"anyTouched",!0)),a}),o(n,a.CHANGE,function(e,t){var n=t.meta,r=n.field,o=n.touch,i=t.payload,a=e,u=l(a,"initial."+r);return void 0===u&&""===i?a=h(a,"values."+r):void 0!==i&&(a=c(a,"values."+r,i)),a=h(a,"asyncErrors."+r),a=h(a,"submitErrors."+r),o&&(a=c(a,"fields."+r+".touched",!0),a=c(a,"anyTouched",!0)),a}),o(n,a.FOCUS,function(e,t){var n=t.meta.field,r=e,o=l(e,"active");return r=p(r,"fields."+o+".active"),r=c(r,"fields."+n+".visited",!0),r=c(r,"fields."+n+".active",!0),r=c(r,"active",n)}),o(n,a.INITIALIZE,function(e,t){var n=t.payload,r=f(n),o=u,i=l(e,"registeredFields");return i&&(o=c(o,"registeredFields",i)),o=c(o,"values",r),o=c(o,"initial",r)}),o(n,a.REGISTER_FIELD,function(e,t){var n=t.payload,o=n.name,i=n.type,a=e,u=l(a,"registeredFields");if(A(u,function(e){return l(e,"name")===o}))return e;var s=f({name:o,type:i});return a=c(e,"registeredFields",r(u,d(u),0,s))}),o(n,a.RESET,function(e){var t=u,n=l(e,"registeredFields");n&&(t=c(t,"registeredFields",n));var r=l(e,"initial");return r&&(t=c(t,"values",r),t=c(t,"initial",r)),t}),o(n,a.START_ASYNC_VALIDATION,function(e,t){var n=t.meta.field;return c(e,"asyncValidating",n||!0)}),o(n,a.START_SUBMIT,function(e){return c(e,"submitting",!0)}),o(n,a.STOP_ASYNC_VALIDATION,function(e,t){var n=t.payload,r=e;if(r=p(r,"asyncValidating"),n&&Object.keys(n).length){var o=n._error,a=i(n,["_error"]);o&&(r=c(r,"error",o)),r=Object.keys(a).length?c(r,"asyncErrors",f(a)):p(r,"asyncErrors")}else r=p(r,"error"),r=p(r,"asyncErrors");return r}),o(n,a.STOP_SUBMIT,function(e,t){var n=t.payload,r=e;if(r=p(r,"submitting"),r=p(r,"submitFailed"),n&&Object.keys(n).length){var o=n._error,a=i(n,["_error"]);o&&(r=c(r,"error",o)),r=Object.keys(a).length?c(r,"submitErrors",f(a)):p(r,"submitErrors"),r=c(r,"submitFailed",!0)}else r=p(r,"error"),r=p(r,"submitErrors");return r}),o(n,a.SET_SUBMIT_FAILED,function(e,t){var n=t.meta.fields,r=e;return r=c(r,"submitFailed",!0),r=p(r,"submitting"),n.forEach(function(e){return r=c(r,"fields."+e+".touched",!0)}),n.length&&(r=c(r,"anyTouched",!0)),r}),o(n,a.TOUCH,function(e,t){var n=t.meta.fields,r=e;return n.forEach(function(e){return r=c(r,"fields."+e+".touched",!0)}),r=c(r,"anyTouched",!0)}),o(n,a.UNREGISTER_FIELD,function(e,t){var n=t.payload.name,o=l(e,"registeredFields");if(!o)return e;var i=o.findIndex(function(e){return l(e,"name")===n});return d(o)<=1&&i>=0?h(e,"registeredFields"):c(e,"registeredFields",r(o,i,1))}),o(n,a.UNTOUCH,function(e,t){var n=t.meta.fields,r=e;return n.forEach(function(e){return r=p(r,"fields."+e+".touched")}),r}),n),b=function(){var e=arguments.length<=0||void 0===arguments[0]?u:arguments[0],t=arguments[1],n=g[t.type];return n?n(e,t):e},w=function(e){return function(){var t=arguments.length<=0||void 0===arguments[0]?u:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=n&&n.meta&&n.meta.form;if(!r)return t;if(n.type===a.DESTROY)return h(t,n.meta.form);var o=l(t,r),i=e(o,n);return i===o?t:c(t,r,i)}};return t(w(b))};t["default"]=l},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 i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function l(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}Object.defineProperty(t,"__esModule",{value:!0});var c=n(615),p=o(c),f=n(115),d=o(f),A=n(167),h=o(A),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=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},y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},g=n(7),b=n(236),w=o(b),_=n(85),E=n(197),x=n(155),C=o(x),S=n(728),P=o(S),T=n(309),O=r(T),M=n(718),I=o(M),k=n(313),R=o(k),N=n(716),D=o(N),F=n(706),j=o(F),L=n(720),U=o(L),B=n(719),V=o(B),Q=n(710),z=o(Q),W=n(89),K=o(W),q=function(e){return Boolean(e&&e.prototype&&"object"===y(e.prototype.isReactComponent))},G=O.arrayInsert,H=O.arrayPop,Y=O.arrayPush,J=O.arrayRemove,Z=O.arrayShift,X=O.arraySplice,$=O.arraySwap,ee=O.arrayUnshift,te=O.blur,ne=O.change,re=O.focus,oe=l(O,["arrayInsert","arrayPop","arrayPush","arrayRemove","arrayShift","arraySplice","arraySwap","arrayUnshift","blur","change","focus"]),ie={arrayInsert:G,arrayPop:H,arrayPush:Y,arrayRemove:J,arrayShift:Z,arraySplice:X,arraySwap:$,arrayUnshift:ee},ae=[].concat(s(Object.keys(O)),["array","asyncErrors","initialized","initialValues","syncErrors","values","registeredFields"]),ue=function(e){if(!e||"function"!=typeof e)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");return e},se=function(e){var t=e.deepEqual,n=e.empty,r=e.getIn,o=e.setIn,s=e.fromJS,c=e.some,f=(0,U["default"])(e),A=(0,V["default"])(e),b=(0,U["default"])(K["default"]);return function(e){var x=m({touchOnBlur:!0,touchOnChange:!1,destroyOnUnmount:!0,shouldAsyncValidate:z["default"],getFormState:function(e){return r(e,"form")}},e);return function(e){var S=function(n){function s(e){i(this,s);var t=a(this,Object.getPrototypeOf(s).call(this,e));return t.submit=t.submit.bind(t),t.reset=t.reset.bind(t),t.asyncValidate=t.asyncValidate.bind(t),t.getSyncErrors=t.getSyncErrors.bind(t),t.register=t.register.bind(t),t.unregister=t.unregister.bind(t),t.submitCompleted=t.submitCompleted.bind(t),t}return u(s,n),v(s,[{key:"getChildContext",value:function(){var e=this;return{_reduxForm:m({},this.props,{getFormState:function(t){return r(e.props.getFormState(t),e.props.form)},asyncValidate:this.asyncValidate,getSyncErrors:this.getSyncErrors,register:this.register,unregister:this.unregister})}}},{key:"initIfNeeded",value:function(e){var t=e.initialize,n=e.initialized,r=e.initialValues;r&&!n&&t(r)}},{key:"componentWillMount",value:function(){this.initIfNeeded(this.props)}},{key:"componentWillReceiveProps",value:function(e){this.initIfNeeded(e)}},{key:"shouldComponentUpdate",value:function(e){var n=this;return Object.keys(e).some(function(r){return!~ae.indexOf(r)&&!t(n.props[r],e[r])})}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.destroyOnUnmount,n=e.destroy;t&&(this.destroyed=!0,n())}},{key:"getSyncErrors",value:function(){return this.props.syncErrors}},{key:"register",value:function(e,t){this.props.registerField(e,t)}},{key:"unregister",value:function(e){this.destroyed||this.props.unregisterField(e)}},{key:"asyncValidate",value:function c(e,t){var n=this,i=this.props,a=i.asyncBlurFields,u=i.asyncErrors,c=i.asyncValidate,s=i.dispatch,l=i.initialized,p=i.pristine,f=i.shouldAsyncValidate,d=i.startAsyncValidation,A=i.stopAsyncValidation,h=i.syncErrors,v=i.values,m=!e;if(c){var g=function(){var i=m?v:o(v,e,t),y=m||!r(h,e),g=!m&&(!a||~a.indexOf(e.replace(/\[[0-9]+\]/g,"[]")));return(g||m)&&f({asyncErrors:u,initialized:l,trigger:m?"submit":"blur",blurredField:e,pristine:p,syncValidationPasses:y})?{v:(0,j["default"])(function(){return c(i,s,n.props)},d,A,e)}:void 0}();if("object"===("undefined"==typeof g?"undefined":y(g)))return g.v}}},{key:"submitCompleted",value:function(e){return delete this.submitPromise,e}},{key:"listenToSubmit",value:function(e){return(0,C["default"])(e)?(this.submitPromise=e,e.then(this.submitCompleted,this.submitCompleted)):e}},{key:"submit",value:function(e){var t=this,n=this.props.onSubmit;return e&&!(0,R["default"])(e)?(0,D["default"])(function(){return!t.submitPromise&&t.listenToSubmit((0,I["default"])(ue(e),t.props,t.valid,t.asyncValidate,t.fieldList))}):this.submitPromise?void 0:this.listenToSubmit((0,I["default"])(ue(n),this.props,this.valid,this.asyncValidate,this.fieldList))}},{key:"reset",value:function(){this.props.reset()}},{key:"render",value:function(){var t=this.props,n=(t.arrayInsert,t.arrayPop,t.arrayPush,t.arrayRemove,t.arrayShift,t.arraySplice,t.arraySwap,t.arrayUnshift,t.asyncErrors,t.reduxMountPoint,t.destroyOnUnmount,t.getFormState,t.touchOnBlur,t.touchOnChange,t.syncErrors,t.values,t.registerField,t.unregisterField,l(t,["arrayInsert","arrayPop","arrayPush","arrayRemove","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncErrors","reduxMountPoint","destroyOnUnmount","getFormState","touchOnBlur","touchOnChange","syncErrors","values","registerField","unregisterField"]));return q(e)&&(n.ref="wrapped"),(0,g.createElement)(e,m({},n,{handleSubmit:this.submit}))}},{key:"values",get:function(){return this.props.values}},{key:"valid",get:function(){return this.props.valid}},{key:"invalid",get:function(){return this.props.invalid}},{key:"dirty",get:function(){return this.props.dirty}},{key:"pristine",get:function(){return this.props.pristine}},{key:"fieldList",get:function(){return this.props.registeredFields.map(function(e){return r(e,"name")})}}]),s}(g.Component);S.displayName="Form("+(0,P["default"])(e)+")",S.WrappedComponent=e,S.childContextTypes={_reduxForm:g.PropTypes.object.isRequired},S.propTypes={destroyOnUnmount:g.PropTypes.bool,form:g.PropTypes.string.isRequired,initialValues:g.PropTypes.object,getFormState:g.PropTypes.func,validate:g.PropTypes.func,touchOnBlur:g.PropTypes.bool,touchOnChange:g.PropTypes.bool,registeredFields:g.PropTypes.any};var T=(0,_.connect)(function(e,o){var i=o.form,a=o.getFormState,u=o.initialValues,s=o.validate,l=r(a(e)||n,i)||n,p=r(l,"initial"),d=u||p||n,h=r(l,"values")||d,v=t(d,h),m=r(l,"asyncErrors"),y=r(l,"submitErrors"),g=s&&s(h,o)||{},w=b(g),_=f(m),E=f(y),x=!(w||_||E||c(r(l,"registeredFields"),function(e){return A(e,g,m,y)})),C=!!r(l,"anyTouched"),S=!!r(l,"submitting"),P=!!r(l,"submitFailed"),T=r(l,"error"),O=r(l,"registeredFields");return{anyTouched:C,asyncErrors:m,asyncValidating:r(l,"asyncValidating"),dirty:!v,error:T,initialized:!!p,invalid:!x,pristine:v,registeredFields:O,submitting:S,submitFailed:P,syncErrors:g,values:h,valid:x}},function(e,t){var n=function(e){return(0,d["default"])(e,t.form)},r=(0,h["default"])(oe,n),o=(0,h["default"])(ie,n),i=(0,p["default"])(n(te),!!t.touchOnBlur),a=(0,p["default"])(n(ne),!!t.touchOnChange),u=n(re),s=(0,E.bindActionCreators)(r,e),l={insert:(0,E.bindActionCreators)(o.arrayInsert,e),pop:(0,E.bindActionCreators)(o.arrayPop,e),push:(0,E.bindActionCreators)(o.arrayPush,e),remove:(0,E.bindActionCreators)(o.arrayRemove,e),shift:(0,E.bindActionCreators)(o.arrayShift,e),splice:(0,E.bindActionCreators)(o.arraySplice,e),swap:(0,E.bindActionCreators)(o.arraySwap,e),unshift:(0,E.bindActionCreators)(o.arrayUnshift,e)},c=m({},s,o,{blur:i,change:a,array:l,focus:u,dispatch:e});return function(){return c}},void 0,{withRef:!0}),O=(0,w["default"])(T(S),e);return O.defaultProps=x,function(e){function t(){return i(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return u(t,e),v(t,[{key:"submit",value:function(){return this.refs.wrapped.getWrappedInstance().submit()}},{key:"reset",value:function(){return this.refs.wrapped.getWrappedInstance().reset()}},{key:"render",value:function(){var e=this.props,t=e.initialValues,n=l(e,["initialValues"]);return(0,g.createElement)(O,m({},n,{ref:"wrapped",initialValues:s(t)}))}},{key:"valid",get:function(){return this.refs.wrapped.getWrappedInstance().valid}},{key:"invalid",get:function(){return this.refs.wrapped.getWrappedInstance().invalid}},{key:"pristine",get:function(){return this.refs.wrapped.getWrappedInstance().pristine}},{key:"dirty",get:function(){return this.refs.wrapped.getWrappedInstance().dirty}},{key:"values",get:function(){return this.refs.wrapped.getWrappedInstance().values}},{key:"fieldList",get:function(){return this.refs.wrapped.getWrappedInstance().fieldList}},{key:"wrappedInstance",get:function(){return this.refs.wrapped.getWrappedInstance().refs.wrapped}}]),t}(g.Component)}}};t["default"]=se},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(611),i=r(o),a=function(e,t){return e==t?!0:null==e&&""===t?!0:""===e&&null==t?!0:void 0},u=function(e,t){return(0,i["default"])(e,t,a)};t["default"]=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(116),u=r(a),s=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=function p(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),a=2;n>a;a++)r[a-2]=arguments[a];if(void 0===e||void 0===t)return e;if(r.length){if(Array.isArray(e)){if(t<e.length){var u=p.apply(void 0,[e&&e[t]].concat(r));if(u!==e[t]){var l=[].concat(i(e));return l[t]=u,l}}return e}if(t in e){var c=p.apply(void 0,[e&&e[t]].concat(r));return e[t]===c?e:s({},e,o({},t,c))}return e}if(Array.isArray(e)){if(isNaN(t))throw new Error("Cannot delete non-numerical index from an array");if(t<e.length){var f=[].concat(i(e));return f.splice(t,1),f}return e}if(t in e){var d=s({},e);return delete d[t],d}return e},c=function(e,t){return l.apply(void 0,[e].concat(i((0,u["default"])(t))))};t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(116),u=r(a),s=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=function p(e,t,n){for(var r=arguments.length,a=Array(r>3?r-3:0),u=3;r>u;u++)a[u-3]=arguments[u];if(void 0===n)return t;var l=p.apply(void 0,[e&&e[n],t].concat(a));if(!e){var c=isNaN(n)?{}:[];return c[n]=l,c}if(Array.isArray(e)){var f=[].concat(i(e));return f[n]=l,f}return s({},e,o({},n,l))},c=function(e,t,n){return l.apply(void 0,[e,n].concat(i((0,u["default"])(t))))};t["default"]=c},function(e,t){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=arguments[1],r=arguments[2],o=arguments[3],i=[].concat(n(e));return r?i.splice(t,r):t<i.length?i.splice(t,0,o):i[t]=o,i};t["default"]=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e.displayName||e.name||"Component"};t["default"]=n},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(85),a=function(e){var t=e.getIn;return function(e){var n=o({prop:"values",getFormState:function(e){return t(e,"form")}},e),a=n.form,u=n.prop,s=n.getFormState;return(0,i.connect)(function(e){return r({},u,t(s(e),a+".values"))},function(){return{}})}};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return function(e){return function(n,r,o){var a=e(n,r,o),s=a.dispatch,l=[],c={getState:a.getState,dispatch:function(e){return s(e)}};return l=t.map(function(e){return e(c)}),s=u["default"].apply(void 0,l)(a.dispatch),i({},a,{dispatch:s})}}}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"]=o;var a=n(317),u=r(a)},function(e,t){"use strict";function n(e,t){return function(){return t(e.apply(void 0,arguments))}}function r(e,t){if("function"==typeof e)return n(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var r=Object.keys(e),o={},i=0;i<r.length;i++){var a=r[i],u=e[a];"function"==typeof u&&(o[a]=n(u,t))}return o}t.__esModule=!0,t["default"]=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n=t&&t.type,r=n&&'"'+n.toString()+'"'||"an action";return"Given action "+r+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state.'}function i(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:u.ActionTypes.INIT});if("undefined"==typeof r)throw new Error('Reducer "'+t+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var o="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof n(void 0,{type:o}))throw new Error('Reducer "'+t+'" returned undefined when probed with a random type. '+("Don't try to handle "+u.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function a(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var a=t[r];"function"==typeof e[a]&&(n[a]=e[a])}var u,s=Object.keys(n);try{i(n)}catch(l){u=l}return function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];if(u)throw u;for(var r=!1,i={},a=0;a<s.length;a++){var l=s[a],c=n[l],p=e[l],f=c(p,t);if("undefined"==typeof f){var d=o(l,t);throw new Error(d)}i[l]=f,r=r||f!==p}return r?i:e}}t.__esModule=!0,t["default"]=a;var u=n(318),s=n(165),l=(r(s),n(319));r(l)},function(e,t,n){(function(t,n){!function(t){"use strict";function r(e,t,n,r){var o=Object.create((t||i).prototype),a=new A(r||[]);return o._invoke=p(e,n,a),o}function o(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}function i(){}function a(){}function u(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function l(e){this.arg=e}function c(e){function t(n,r,i,a){var u=o(e[n],e,r);if("throw"!==u.type){var s=u.arg,c=s.value;return c instanceof l?Promise.resolve(c.arg).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(c).then(function(e){s.value=e,i(s)},a)}a(u.arg)}function r(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return i=i?i.then(r,r):r()}"object"==typeof n&&n.domain&&(t=n.domain.bind(t));var i;this._invoke=r}function p(e,t,n){var r=x;return function(i,a){if(r===S)throw new Error("Generator is already running");if(r===P){if("throw"===i)throw a;return v()}for(;;){var u=n.delegate;if(u){if("return"===i||"throw"===i&&u.iterator[i]===m){n.delegate=null;var s=u.iterator["return"];if(s){var l=o(s,u.iterator,a);if("throw"===l.type){i="throw",a=l.arg;continue}}if("return"===i)continue}var l=o(u.iterator[i],u.iterator,a);if("throw"===l.type){n.delegate=null,i="throw",a=l.arg;continue}i="next",a=m;var c=l.arg;if(!c.done)return r=C,c;n[u.resultName]=c.value,n.next=u.nextLoc,n.delegate=null}if("next"===i)n.sent=n._sent=a;else if("throw"===i){if(r===x)throw r=P,a;n.dispatchException(a)&&(i="next",a=m)}else"return"===i&&n.abrupt("return",a);r=S;var l=o(e,t,n);if("normal"===l.type){r=n.done?P:C;var c={value:l.arg,done:n.done};if(l.arg!==T)return c;n.delegate&&"next"===i&&(a=m)}else"throw"===l.type&&(r=P,i="throw",a=l.arg)}}}function f(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function d(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)}function h(e){if(e){var t=e[b];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function o(){for(;++n<e.length;)if(y.call(e,n))return o.value=e[n],o.done=!1,o;return o.value=m,o.done=!0,o};return r.next=r}}return{next:v}}function v(){return{value:m,done:!0}}var m,y=Object.prototype.hasOwnProperty,g="function"==typeof Symbol?Symbol:{},b=g.iterator||"@@iterator",w=g.toStringTag||"@@toStringTag",_="object"==typeof e,E=t.regeneratorRuntime;if(E)return void(_&&(e.exports=E));E=t.regeneratorRuntime=_?e.exports:{},E.wrap=r;var x="suspendedStart",C="suspendedYield",S="executing",P="completed",T={},O=u.prototype=i.prototype;a.prototype=O.constructor=u,u.constructor=a,u[w]=a.displayName="GeneratorFunction",E.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return t?t===a||"GeneratorFunction"===(t.displayName||t.name):!1},E.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,w in e||(e[w]="GeneratorFunction")),e.prototype=Object.create(O),e},E.awrap=function(e){return new l(e)},s(c.prototype),E.async=function(e,t,n,o){var i=new c(r(e,t,n,o));return E.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},s(O),O[b]=function(){return this},O[w]="Generator",O.toString=function(){return"[object Generator]"},E.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},E.values=h,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.tryEntries.forEach(d),!e)for(var t in this)"t"===t.charAt(0)&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=m)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return i.type="throw",i.arg=e,n.next=t,!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=y.call(o,"catchLoc"),u=y.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&y.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?this.next=o.finallyLoc:this.complete(i),T},complete:function(e,t){if("throw"===e.type)throw e.arg;"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=e.arg,this.next="end"):"normal"===e.type&&t&&(this.next=t)},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),d(n),T}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;d(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:h(e),resultName:t,nextLoc:n},T}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(t,function(){return this}(),n(622))},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=d[r.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](r.parts[i]);for(;i<r.parts.length;i++)o.parts.push(l(r.parts[i],t))}else{for(var a=[],i=0;i<r.parts.length;i++)a.push(l(r.parts[i],t));d[r.id]={id:r.id,refs:1,parts:a}}}}function o(e){for(var t=[],n={},r=0;r<e.length;r++){var o=e[r],i=o[0],a=o[1],u=o[2],s=o[3],l={css:a,media:u,sourceMap:s};n[i]?n[i].parts.push(l):t.push(n[i]={id:i,parts:[l]})}return t}function i(e,t){var n=v(),r=g[g.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),g.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function a(e){e.parentNode.removeChild(e);var t=g.indexOf(e);t>=0&&g.splice(t,1)}function u(e){var t=document.createElement("style");return t.type="text/css",i(e,t),t}function s(e){var t=document.createElement("link");return t.rel="stylesheet",i(e,t),t}function l(e,t){var n,r,o;if(t.singleton){var i=y++;n=m||(m=u(t)),r=c.bind(null,n,i,!1),o=c.bind(null,n,i,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=s(t),r=f.bind(null,n),o=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=u(t),r=p.bind(null,n),o=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function c(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function p(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function f(e,t){var n=t.css,r=t.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),i=e.href;e.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}var d={},A=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},h=A(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=A(function(){return document.head||document.getElementsByTagName("head")[0]}),m=null,y=0,g=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=h()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=o(e);return r(n,t),function(e){for(var i=[],a=0;a<n.length;a++){var u=n[a],s=d[u.id];s.refs--,i.push(s)}if(e){var l=o(e);r(l,t)}for(var a=0;a<i.length;a++){var s=i[a];if(0===s.refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete d[s.id]}}}};var b=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t,n){var r=n(505);"string"==typeof r&&(r=[[e.id,r,""]]);n(734)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){(function(t){"use strict";e.exports=n(737)(t||window||this)}).call(t,function(){return this}())},function(e,t){"use strict";e.exports=function(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}},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 i(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(r,o){function a(e,n){var r=d.getLinkName(e),i=this.props[o[e]];r&&s(this.props,r)&&!i&&(i=this.props[r].requestChange);for(var a=arguments.length,u=Array(a>2?a-2:0),l=2;a>l;l++)u[l-2]=arguments[l];t(this,e,i,n,u)}function s(e,t){return void 0!==e[t]}var c,f=arguments.length<=2||void 0===arguments[2]?[]:arguments[2],A=r.displayName||r.name||"Component",h=d.getType(r).propTypes,v=d.isReactComponent(r);c=d.uncontrolledPropTypes(o,h,A),(0,p["default"])(v||!f.length,"[uncontrollable] stateless function components cannot pass through methods becasue they have no associated instances. Check component: "+A+", attempting to pass through methods: "+f.join(", ")),f=d.transform(f,function(e,t){e[t]=function(){var e;return(e=this.refs.inner)[t].apply(e,arguments)}},{});var m=l["default"].createClass(u({displayName:"Uncontrolled("+A+")",mixins:e,propTypes:c},f,{componentWillMount:function(){var e=this.props,t=Object.keys(o);this._values=d.transform(t,function(t,n){t[n]=e[d.defaultKey(n)]},{})},componentWillReceiveProps:function(e){var t=this,n=this.props,r=Object.keys(o);r.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={},n=this.props,c=(n.valueLink,n.checkedLink,i(n,["valueLink","checkedLink"]));return d.each(o,function(n,r){var o=d.getLinkName(r),i=e.props[r];o&&!s(e.props,r)&&s(e.props,o)&&(i=e.props[o].value),t[r]=void 0!==i?i:e._values[r],t[n]=a.bind(e,r)}),t=u({},c,t,{ref:v?"inner":null}),l["default"].createElement(r,t)}}));return m.ControlledComponent=r,m.deferControlTo=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments[2];return n(e,u({},o,t),r)},m}return n}t.__esModule=!0;var u=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 s=n(7),l=o(s),c=n(52),p=o(c),f=n(739),d=r(f);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){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 `"+c(o)+"`. Otherwise, set `"+e+"`"):void 0}}function i(e,t,n){var r={};return r}function a(e){return g[0]>=15||0===g[0]&&g[1]>=13?e:e.type}function u(e,t){var n=l(t);return n&&!s(e,t)&&s(e,n)?e[n].value:e[t]}function s(e,t){return void 0!==e[t]}function l(e){return"value"===e?"valueLink":"checked"===e?"checkedLink":null; }function c(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function p(e,t,n){return function(){for(var r=arguments.length,o=Array(r),i=0;r>i;i++)o[i]=arguments[i];t&&t.call.apply(t,[e].concat(o)),n&&n.call.apply(n,[e].concat(o))}}function f(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)h(e,r)&&t.call(n,e[r],r,e)}function A(e){return!!(e&&e.prototype&&e.prototype.isReactComponent)}function h(e,t){return e?Object.prototype.hasOwnProperty.call(e,t):!1}t.__esModule=!0,t.version=void 0,t.customPropType=o,t.uncontrolledPropTypes=i,t.getType=a,t.getValue=u,t.getLinkName=l,t.defaultKey=c,t.chain=p,t.transform=f,t.each=d,t.isReactComponent=A,t.has=h;var v=n(7),m=r(v),y=n(52),g=(r(y),t.version=m["default"].version.split(".").map(parseFloat))},function(e,t){e.exports="data:application/font-woff;base64,d09GRgABAAAAAA0EAA4AAAAAFggAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABRAAAAEQAAABWPihITmNtYXAAAAGIAAAAOgAAAUrQFxm3Y3Z0IAAAAcQAAAAKAAAACgAAAABmcGdtAAAB0AAABZQAAAtwiJCQWWdhc3AAAAdkAAAACAAAAAgAAAAQZ2x5ZgAAB2wAAAKrAAADcINMARNoZWFkAAAKGAAAADYAAAA2BXNMlGhoZWEAAApQAAAAIAAAACQHUQNSaG10eAAACnAAAAAbAAAAIBXBAABsb2NhAAAKjAAAABIAAAASA2gCOG1heHAAAAqgAAAAIAAAACAAvwv2bmFtZQAACsAAAAGMAAAC5b2OKE5wb3N0AAAMTAAAAE8AAABt6Me+4nByZXAAAAycAAAAZQAAAHvdawOFeJxjYGTawTiBgZWBg6mKaQ8DA0MPhGZ8wGDIyMTAwMTAysyAFQSkuaYwOLxgeMHGHPQ/iyGKOZhhGlCYESQHAP1fC/N4nGNgYGBmgGAZBkYGEHAB8hjBfBYGDSDNBqQZGZgYGF6w/f8PUvCCAURLMELVAwEjG8OIBwBqdQa0AAAAAAAAAAAAAAAAAAB4nK1WaXMTRxCd1WHLNj6CDxI2gVnGcox2VpjLCBDG7EoW4BzylexCjl1Ldu6LT/wG/ZpekVSRb/y0vB4d2GAnVVQoSv2m9+1M9+ueXpPQksReWI+k3HwpprY2aWTnSUg3bFqO4kPZ2QspU0z+LoiCaLXUvu04JCISgap1hSWC2PfI0iTjQ48yWrYlvWpSbulJd9kaD+qt+vbT0FGO3QklNZuhQ+uRLanCqBJFMu2RkjYtw9VfSVrh5yvMfNUMJYLoJJLGm2EMj+Rn44xWGa3GdhxFkU2WG0WKRDM8iCKPslpin1wxQUD5oBlSXvk0onyEH5EVe5TTCnHJdprf9yU/6R3OvyTieouyJQf+QHZkB3unK/ki0toK46adbEehivB0fSfEI5uT6p/sUV7TaOB2RaYnzQiWyleQWPkJZfYPyWrhfMqXPBrVkoOcCFovc2Jf8g60HkdMiWsmyILujk6IoO6XnKHYY/q4+OO9XSwXIQTIOJb1jkq4EEYpYbOaJG0EOYiSskWV1HpHTJzyOi3iLWG/Tu3oS2e0Sag7MZ6th46tnKjkeDSp00ymTu2k5tGUBlFKOhM85tcBlB/RJK+2sZrEyqNpbDNjJJFQoIVzaSqIZSeWNAXRPJrRm7thmmvXokWaPFDPPXpPb26Fmzs9p+3AP2v8Z3UqpoO9MJ2eDshKfJp2uUnRun56hn8m8UPWAiqRLTbDlMVDtn4H5eVjS47CawNs957zK+h99kTIpIH4G/AeL9UpBUyFmFVQC9201rUsy9RqVotUZOq7IU0rX9ZpAk05Dn1jX8Y4/q+ZGUtMCd/vxOnZEZeeufYlyDSH3GZdj+Z1arFdgM5sz+k0y/Z9nebYfqDTPNvzOh1ha+t0lO2HOi2w/UinY2wvaEGT7jsEchGBXMAGEoGwdRAI20sIhK1CIGwXEQjbIgJhu4RA2H6MQNguIxC2l7Wsmn4qaRw7E8sARYgDoznuyGVuKldTyaUSrotGpzbkKXKrpKJ4Vv0rA/3ikTesgbVAukTW/IpJrnxUleOPrmh508S5Ao5Vf3tzXJ8TD2W/WPhT8L/amqqkV6x5ZHIVeSPQk+NE1yYVj67p8rmqR9f/i4oOa4F+A6UQC0VZlg2+mZDwUafTUA1c5RAzGzMP1/W6Zc3P4fybGCEL6H78NxQaC9yDTllJWe1gr9XXj2W5twflsCdYkmK+zOtb4YuMzEr7RWYpez7yecAVMCqVYasNXK3gzXsS85DpTfJMELcVZYOkjceZILGBYx4wb76TICRMXbWB2imcsIG8YMwp2O+EQ1RvlOVwe6F9Ho2Uf2tX7MgZFU0Q+G32Rtjrs1DyW6yBhCe/1NdAVSFNxbipgEsj5YZq8GFcrdtGMk6gr6jYDcuyig8fR9x3So5lIPlIEatHRz+tvUKd1Ln9yihu3zv9CIJBaWL+9r6Z4qCUd7WSZVZtA1O3GpVT15rDxasO3c2j7nvH2Sdy1jTddE/c9L6mVbeDg7lZEO3bHJSlTC6o68MOG6jLzaXQ6mVckt52DzAsMKDfoRUb/1f3cfg8V6oKo+NIvZ2oH6PPYgzyDzh/R/UF6OcxTLmGlOd7lxOfbtzD2TJdxV2sn+LfwKy15mbpGnBD0w2Yh6xaHbrKDXynBjo90tyO9BDwse4K8QBgE8Bi8InuWsbzKYDxfMYcH+Bz5jBoMofBFnMYbDNnDWCHOQx2mcNgjzkMvmDOOsCXzGEQModBxBwGT5gTADxlDoOvmMPga+Yw+IY59wG+ZQ6DmDkMEuYw2Nd0ayhzixd0F6htUBXowPQTFvewONRUGbK/44Vhf28Qs38wiKk/aro9pP7EC0P92SCm/mIQU3/VdGdI/Y0Xhvq7QUz9wyCmPtMvxnKZwV9GvkuFA8ouNp/z98T7B8IaQLYAAQAB//8AD3icXVJBaxNBFH5vNmzibLpp62ZTtUmb3SSVpE0l2WxKU9MqlgoiLaaIJ/VQrVQpovVirQcFkRKCFCliT1PEg3pxgwgi9JKK1R4l/oUi6KmnYBNnNxGLC/Pe23nve983bwaw0QAgOdwCGcQyJTiQiCpiX1hL4iiaqR5USU7x1b0+hXhrNERr9LWsohKSapTWJAAE/uEsuQdtHC8JHI8diqgNYsywG6h4Rek94BR3d5ELda+sSjzkS21hT5Alh1ty2VjFh6IWy3QYeeTceMLGqSqvp3hRtlEy7ja1tLjJCP5sav+Ht8nNdDjFtdMWGYdx3Vt2C8lpyaE+gMacwIQCCOAGif8fhAAcgR7QIQ1ZyMEoTMJt0Md6LxfOnMqPDA+ZxuBRrTfUfbhLVTrbZS/1iC4CvoFEIJ3R7dW3z+N/XsgYsT5dE91+Rc2mUybuq8+2ckFs5rJ8iHrYmYSZw4xhBtIpNcgRzSjg52aCsU3L2vxrca1crloWvmGsWi5XvGLETbFp15ytKmOd1KN7qGO+93f//hWMx4OnjWgkalTNiB41cCIYn2SMRSzLirC9CqvZJmLhMeY0Y24v0nqM5xi7vm+rfy9jtyJfg3EzYqIRNVsuzucsNPYab4VLggQKhCEJ9H0i2tPVLgj8vvyKmEAtdhxbx8whP5yRRFkIkTxmFRm1JA9SIcRd6rFs7UvUHfHQnXPLL4tTZPrxq0fnF2992vk8L979uPvhPtFqbupUVHjxdmF5mkyV1ku8crlwp7KwUPlhGyCNhnP3beDhmjzvDkmiQLgeTi2GMI/ovGFRt9ldIRJQ3AGVPHy6veoqfSui1j+sbMwsTq1cGyMjN0ovijeHhPENPz6YXSGrX56JxfrzYNy/MZ6fe7Jemh92nby6enZxZsMPfwARpcxGAAABAAAAAQAAesaxU18PPPUACwPoAAAAANFbGZEAAAAA0VrvYf/9/2oDoQNTAAAACAACAAAAAAAAeJxjYGRgYA76n8UQxfyCgeH/d+ZFDEARFMABAIt1Bal4nGN+wcDAZM3AwJgKwSA28wIgjoTQAELTA9QAAAAAAAAgAD4AXgB+ATIBfAG4AAAAAQAAAAgAdAAPAAAAAAACAAAAEABzAAAANAtwAAAAAHicdZLNTsJAFIXPIGKExIUa3d6VwRjLT+JCNpKQ4MrEuGDhrsDQlpQOmQ4QnsE38B18JRPfxEOZiCbYZnq/e+b0zp1pAZziEwrb645jywpVZlsu4QgPng+o9z2Xyc+eD1HDq+cKde25ihsYzzWc4Z0VVPmY2RQfnhXO1aXnEk7UjecD6veey+Qnz4e4UKHnCvWV5yoG6s1zDVfqq2fma5tEsZN671razdadDNdiKCVZmEq4cLGxuXRlYjKn09QEIzOzq9tVMo60y190tEhDuxN2NNA2T0wmraC5Ex91pm3o9HizSr6M2s5NZGLNTPq+vsytmeqRC2Ln5p1G4/e66PGg5ljDIkGEGA6COtVrxjaaaPGDCIZ0CJ1bV4IMIVIqIRZ8Iy5mcuZdjgmzjKqmIyUHGPE5o2OFW44EY9bQdOR4YYxYI2Ulu9exTxswbtZLipWEPQbsdJ/zkTEr3GHR0fhnLzmWdLWpOna86doWXQp/tL/9C89nMzelMqIeFKfkqHbQ4P3Pfr8BfuKKaXicbcbBDYAgDADAFgWruzhUU1CIBEzVuL4Rv97rwMBngn8EgAY77NGiwwHJXfvsk1IOy/lm1LTGNvL1Li3CORTPaiVX2dwRWCUCPHGuFEMAeJxj8N7BcCIoYiMjY1/kBsadHAwcDMkFGxlYnTYyMGhBaA4UeicDAwMnMouZwWWjCmNHYMQGh46IjcwpLhvVQLxdHA0MjCwOHckhESAlkUCwkYFHawfj/9YNLL0bmRhcAAfTIrgAAAA="},function(e,t){e.exports="data:image/png;base64,R0lGODlhIAAgAOMAAAQCBKyqrBweHAwODPz6/Ly+vCwqLBQWFP///wAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQIBgAAACwAAAAAIAAgAAAEMBDJSau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94rl+FcAQsAwAwIKyERKOq9/NEAAAh+QQIBgAAACwAAAAAIAAgAIMEAgSEgoTs6uxMSkykpqQ0MjT09vRsbmwcGhyMjoxUVlSsrqz8/vz///8AAAAAAAAENLDJSau9OOvNu/9gKI5kaZ5oqq5s675wLM90TRnEwrADABwrgw+AYBV8CpYgkDDYntDoKgIAIfkECAYAAAAsAAAAACAAIACDBAIEjIqMzMrMNDI07OrsHBoc/Pr8BAYEnJqc1NLUREJEHB4c/P78////AAAAAAAABDOwyUmrvTjrzbv/YCiOZGmeaKqubOt+iaII7AAABbMW92GsiFugRSC8jsikcslsOp/QUAQAIfkECAYAAAAsAAAAACAAIACEBAIEjIqMREJEzMrMZGZkLC4stLa05ObkFBIUfH58nJ6cbG5s/P78BAYEVFZU3N7cbGpsxMLE7OrsFBYUpKKk////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABUdgJY5kaZ5oqq5s675wLM90bd94rleHgCS7CgRAjOwIRIBR9yg0IEERI0qtWq/YrHbL7eYeAUNQMiFSdoakY3dAEBVBsFgVAgAh+QQIBgAAACwAAAAAIAAgAIQEAgSEhoTU1tRERkTs7uwsKiysqqzk4uR0cnT8+vw0MjQMDgyUlpRUVlTs6uwEBgTc3tz08vQsLiy8vrzk5uR8enz8/vw0NjScnpxcXlz///8AAAAAAAAAAAAAAAAAAAAFTKAmjmRpnmiqrmzrvnAszzRsXA1Vm9QDAJldSfADDISlDGAxQZYOBKd0Sq1ar9isdsvtek+WigSRmBqKmCmjGJgSJICCbmqBlL/4UwgAIfkECAYAAAAsAAAAACAAIACEBAIEpKKkTE5M3N7cbGpsNDY07O7sDAoMxMLEXF5c5ObkdHJ0VFJU5OLkbG5sPDo89PL0DA4MzMrM////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABUbgJI5kaZ5oqq5s675wrCrO0sjqAwAFnh47gA9F2BGGKAQCyWw6n9CodErFSQZSwS4AHQR7T0hkl4giGA5Ddc1uu9/wODUEACH5BAgGAAAALAAAAAAgACAAhQQCBIyKjMTGxDw+PCQiJKyqrOTm5BQWFLy6vGxqbPT29AwKDNze3CwuLJSSlLSytMTCxHR2dPz+/DQ2NAQGBMzKzExOTKyurOzu7BwaHLy+vGxubPz6/AwODOTi5DQyNJSWlP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZiwJBwSCwaj8ikcslsKjEajNPJyAAOnikzAOgGtMtLF3ABL0EWkHnNbrvf8Lh8LYDMhZFu4r7oUu4DXR93BhsJWXeJiouMjY6PbBUTDQh3DV0HHHNWABSacgULFA6JCgqQREEAIfkECAYAAAAsAAAAACAAIACEBAIEhIKExMLEREJE5ObkLCostLK01NLUZGJkFBIUdHZ0lJaU9PL0DA4MzM7M3NrcbGps/Pr8BAYEjIqMxMbENDI0vLq8HBocfHp8nJ6c9Pb03N7cbG5s////AAAAAAAABVlgJ45kaZ5oqq5kNEEOK48KACTMLA82EOurjK0SAbIchpxxyWw6nx3HYgMtCWwNalVUsy22IkPvAA4rKOW0es1uu9/wuHxeVHMAhUeZ0kOUHX1pGBcDBHMyIQAh+QQIBgAAACwAAAAAIAAgAIQEAgSMiozExsRMTkzk5uQsKiysqqxsbmz09vQMCgyUlpRUVlTs7uw8Pjy0trR0dnT8/vycnpwEBgTk4uRUUlTs6uw0MjT8+vwMDgycmpy8urx8enz///8AAAAAAAAAAAAFXCAnjmRpnihJCFfqpo4ENO1rjwOgC3f/6BJC74Z4UDTDpHLJ5FwigUoTddAVIFNTQQeYZEs/gKX2FUEMCkZ5zW673/C4fC5H5AaItoKr0PPbCBQJFHl0hoeIiYchACH5BAgGAAAALAAAAAAgACAAhQQCBISChMTCxERCROTm5CwqLJyenNTS1GxqbPT29BQWFDw6POzu7KyurNza3Hx6fAwKDJyanMzKzFxeXDQyNPz+/BweHLS2tAQGBISGhMTGxExOTOzq7CwuLNTW1HRydPz6/BwaHDw+PPTy9LSytNze3Hx+fP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ6wJNwSCwaj0hiArGIJJ/JAGAqgVqJiCmgce0eFIBFotsdeSrkY6URYaStj2kH/U52tI568jMtjPVHIBEZBICGh4iJiouMjY5GDRsmIIweWhmMF1oTjCN3GBqNCRocj4gMI44ZABgGjCAYUyGvYAAdjQILIgemvb6/QkEAIfkECAYAAAAsAAAAACAAIACEBAIEhIaExMbE5ObkREZEpKKk9Pb0HBoclJKU5OLkXFpczM7M7O7sJCYkjI6MTE5MrK6s/P78DA4MjIqMzMrM7OrsTEpM/Pr8HB4cnJqcZGZk1NLU9PL0LCostLK0////BW3gJ46kIXBkqq5qcgDHwM50ANwTravQDUA7mmFhGDkIjuDMBWhUlEHbLQnVFXyequ4SIOS04LB4TC6bxRuCZXEeNW6Ntkhyk8g/Dtz9M0js/4CBgoOEhYYfF093Ai8adw8+G3IKPn5tCQQdGVUhACH5BAgGAAAALAAAAAAgACAAhQQCBIyOjERCRMzKzCQiJGRiZOTm5LSytBQWFHRydNze3Pz6/AwKDJyenFRSVDw+PGxqbNTW1CwqLOzu7Ly+vFxaXAQGBJSWlMzOzCQmJGRmZOzq7BweHHx+fOTi5Pz+/AwODKSipFRWVGxubMTGxP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZywJJwSCwNRo2icskUehgAwKVJZR6igEq1utgMJ5zoYduMhB0f4aaBITcLWIqbPMK259WJIxPA+/+AgYKDgAMEIFOERA9YE4pDjFGOj0YECImUmZqbnJ2en6B/JAObGlEdmQtYCJoSUQ+aChoQBqG2t1VBACH5BAgGAAAALAAAAAAgACAAhQQCBISChMTCxERCROTi5CQiJJyanGRmZNTS1PTy9BQSFDQyNIyOjKSmpMzKzFxaXHx+fPz6/BwaHExOTOzq7CwqLKSipGxubNze3Dw+PJSWlAQGBISGhMTGxERGRJyenGxqbNTW1PT29BQWFDQ2NJSSlKyurMzOzPz+/BweHOzu7CwuLP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaPQJZwSGRFAh5LcclsChmAaMdJbV6igEaVShgUNMKTAlBJbJ0PLEao6kTOzgkWAT+fJIBDHR4R7f+ATARvgU0iAwApa4VLJlgXjEsdWBCRSwwrB2aWnJ2en6ChoqNDhEQCHyqFAhIbHEQaUQWmexlYFEOIUQ6Buhu4QhBRI5t/IQspBkQRGhCLpNDR0tPUTkEAIfkECAYAAAAsAAAAACAAIACFBAIEhIKEzM7MREJEJCIk7OrsnJ6cFBIUNDI09Pb0lJKU3N7cbGpsrK6sDAoMjIqM1NbULC4s9PL0PDo8/P78dHZ0tLa0BAYEhIaE1NLUREZEJCYk7O7spKKkHB4c/Pr8nJqc5OLktLK0DA4MPD48fH58////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABo1Ak3BIFEI0CEtxyWwKSQCAI+GsCj8PhkAYiQI41molegA3HIBSuAqNbk0S8NppiEY+87mgQc03Pxl4flYLHgARcoNNAV4gik4KXkqPTB8VCA+UmpucnZ6foIB9nwUbAB4hoJFRAaANXgagJgETJRSyuLm6u7yaEhK4JRcODaASXhGgCWgAJLIWERoQYUEAIfkECAYAAAAsAAAAACAAIACFBAIEhIKEREJExMLE5OLkJCIkZGZktLa09Pb0NDY0dHJ0FBIUVFJU1NLUnJ6c7OrsDAoMjIqMLCosbG5svL68/P78PD48fHp8XFpc3N7cBAYEhIaETE5MxMbE5ObkbGpsvLq8/Pr8PDo8dHZ0HBoc1NbU7O7sLC4sXF5c////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABonAlHBIHDpIiUZxySx6OqHUQwMACJrY4oEqCnmqAFF2nOKAO6kNhIQmYxVVjUcYirqxiBEDdM+WlH1uG1UKgWQLcRWGWQlVBYtZGSgMJZCWl5iZmpspAwd2nAFVHJxCJGAPpQyOipwmIx8ZpbO0tba3uJAdFK2cI1UGsxBgoJoCVSezHhMTBLmLQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEgoTExsRERkSkoqTk5uRkZmQcHhxUVlS0trT09vScnpwUFhSMiozc3txMTkysqqzs7ux0cnQMCgw0NjRcXly8vrz8/vx8enwEBgSEhoTMzsxMSkykpqTs6uwsKixcWly8urz8+vyMjozk4uRUUlSsrqz08vR0dnT///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGicCUcEgciioTzqnIbBILqMCyA6hqnFji5VMtpajVQHZ8qgIOKQUIMIiMx5wq6j0WCQpChSlBzyooABkWfXQWZl6EYyQZcolvCSUoCo6UlZaXmEQnIw1umURxbJ9EE2ajQwhdp0IiHQsiq7Gys7S1toQJBgSxG2a7pwtmEqskDIECsQUQDrfNzoRBACH5BAgGAAAALAAAAAAgACAAhQQCBISGhERCRMTGxGRmZOTm5CQmJKSipPT29FRSVBQWFJSSlHR2dDQ2NLSytExKTOTi5Ozu7AwKDIyOjMzOzCwuLPz+/Hx+fLy6vAQGBIyKjERGRMzKzHRydOzq7CwqLKSmpPz6/FxeXBweHJyanHx6fDw6PLS2tExOTPTy9P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaIQJVwSCRCGpJOcckkWhgGUUpFAFgHzSzRYQVoqF2sVgvqllTHjHK8RFAQqtAGYCiwtZAR3SOM3McBXRN/dwddDoRsIQECg4mPkJGQCCUJGJJNHVYZdphFKGGeRScZAA0hokUFA6iprq+wsbKzHCYbFLF6AB+wFhJWCrEaViSyHnyzycrLzM2iQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEgoTEwsRERkTk5uRcXlwkIiSkoqTU0tT09vS0srRUUlRsamw0MjQUEhSMiozMzsxMTkzs7uwsKiysrqzc3tz8/vy8vrx0cnQMDgzExsRMSkzs6uxkYmQkJiSkpqTU1tT8+vy0trRUVlRsbmw8OjwcHhyMjoz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGiUCUcEhMVIYCj0dBbDqfGgcgYkEZAABH9cltLrAADcqEzYS63BBHyAAfKY7MAf0EkRcWTqH0GYa2dE0dYBeBhkIkYBCHhhILHg+MkpOUlUMWDAYFCZZPFGAnnU4HYAGiTQkDABNrp6iusLGys7MIERsIsx5YHrMZZbMPWJGzBAS0yMnKy8zNzq5BACH5BAgGAAAALAAAAAAgACAAhQQCBISChExKTMTGxCQiJGRmZKyqrOTm5BQSFFxaXPT29JyanDw6PHR2dLS2tFRSVNze3AwKDIyKjCwqLOzu7BwaHPz+/Hx+fLy+vISGhExOTNTS1GxqbKyurOzq7GRiZPz6/JyenDw+PHx6fLy6vFRWVOTi5AwODCwuLBweHP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaNQJVwSAR1HCBhaCIwEZ/QaAkAKKhMVEAiyoWCsifVJivociENiULFoJZVHwBiYPYSqB/V4XKhDClJdU9YVBOCh0NtAAGIiAoGGI11IBaShwsRJwaWZiARVCmcXRYnhaJdDhModKetrq+wsaIUDwQXskIjWayxHFkOuBApABqBshZ+uMrLzM3Oz9DR0s9BACH5BAgGAAAALAAAAAAgACAAhQQCBISChMTGxERCRKSipOTm5CQiJNTW1GxqbLSytBQWFJSWlPT29DQyNMzOzFRWVKyqrAwKDIyKjOzu7CwuLNze3HR2dLy6vBweHJyenPz+/Dw6PMzKzExKTKSmpOzq7CQmJGxubLS2tBwaHJyanPz6/DQ2NNTS1FxaXKyurAwODIyOjOTi5P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaPwJZwSGxxQpmhZCApOp9EVgQAWLQ8VAAEym0xhIksqhXIrrrOTwPQYUww1FSrAMcU0MUyldD6ZBxDDCdfeEQSWVuFhQwPIwgail0lJyWRhRVwFBOWaHoAJJxdC1kioVwlFiZNpqytrqeEr0QeERGgskMjVBGQuC0gVAq+QgIUFBfDycrLzM3Oz9DR0tPUkUEAIfkECAYAAAAsAAAAACAAIACFBAIEhIKEzMrMPD487O7sLCosnJqcXF5c3N7cFBIUjI6MVFZU/Pr8NDY0pKakbG5s1NLUDAoMREZE9Pb0NDI0pKKklJaUdHZ0BAYEhIaEzM7M9PL0LC4snJ6cZGZk5OLkFBYUlJKUXFpc/P78PDo8rK6sdHJ01NbUTEpM////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABozAlHBITDECkopwonhAitAoUQGoClKmKmgjlU4MlknqUQU4UqTyswtdVFEpTQJQ4HaqFAYbGikLCQJiQgIlgntEbgBwh4cnTxMWYYx7GVUmk5NzABgjmIcNVQWehwgHCyejqaqrowJXrFFZAJewRRhVGLVFoAAUukQIHh4Iv8XGx8jJysvMzc7P0NHOQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEgoTEwsRERkTk5uQkIiSkoqRkZmT09vQ0MjS0srSUkpTU0tQcHhxUVlTs7uwsKix8fnwMCgysrqxsbmz8/vw8Pjy8urycmpzc3tyMjozMysxMTkzs6uwkJiSkpqRsamz8+vw0NjS0trSUlpTU1tRkYmT08vQsLiwMDgz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGjkCVcEgUlgaJ0bBzORWfUKIFAJAgVBsJoPCIRgMFhxNCBXRB5Y/3KShHVBPtW7Uob9ZFRZkiPHWFIRoOE3hFIRwAHhmFeAgHEHMPIYx4dVQKlIwRZRiZhQQeABZOnnghBKWpqoYkGn+rTyZUIrBQDWWvtUIHVBa6RRUGJKS/xcbHyMnKy8zNzs/Q0dLTQkEAIfkECAYAAAAsAAAAACAAIACFBAIEjIqMREJExMbELCos5ObkrKqsbG5sNDY09Pb0HBoclJaUDAoMTE5M5OLkNDI07O7stLa0dHZ0PD48/P78nJ6cBAYE1NLULC4s7OrsPDo8/Pr8nJqcVFJUvLq8fHp8////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpFAkHBIHFYUiEtxySwWBhtQxgIACIQUCeYQbS4jVM2mUAVohIYyx7tslAeggEUBBy3KAXZRUrUUhBsUQxAPAAQZehALBhsJEh0ebAVdXhSFABJ6mkQOZQSboBsEVQegoAUBHJSmrK1LCR+Qrmx8AH6zTW5VdbhFYAAIq71DT8LDx8jJysvMzc7P0NHS09TV1slBACH5BAgGAAAALAAAAAAgACAAhQQCBISChMTGxERCRGRmZOTm5KSipBweHFRWVPT29JSSlHR2dLS2tBQWFNze3ExKTOzu7CwqLAwKDIyOjNTS1GxubKyqrFxeXPz+/AQGBISGhMzKzERGRGxqbOzq7CQiJFxaXPz6/JyanHx6fLy6vExOTPTy9DQyNKyurP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaLwJRwSByGLpKHqchsEguLwNICqGqGJobD2cREqoiUoQoICCEHQEbALZrIh1QCkeFAhNQqoS0MCR9VC04UZAptDl97ISgMbQwXExhtBGRsfJdDHZWYnAUDDYKcoqN8GB0fIAmkbShkE6tcImRmsE0JHAARHrVcqry/wMHCw8TFxsfIycrLzM3Oz9BCQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEgoTEwsRMSkwkIiTk4uSkoqR0cnQ0MjQUEhSUkpTU0tT08vRUVlSMiowsKiy0trT8+vwMCgzMysx8fnw8OjwcGhzc2txcXlwEBgSEhoRMTkwkJiTk5uSkpqR0dnQUFhScmpzU1tT09vRcWlyMjowsLiy8vrz8/vzMzsw8Pjz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGjsCVcEgslhImUXHJHKI+HNJoVQBYN80sEWIFOFaX7mAIaQQiWqKnSxFSMoSUMGzVaC8fRWQ0AHA6TVxWJFkjIFYHQgxaDA8AGQJZC10VaUMjJwVaESZWCpagQwwGJ6GWIgclaKZpDAlWH6xpKV0qspudAJ+3WQweE7zBwsPExcbHyMnKy8zNzs/Q0dLTz0EAIfkECAYAAAAsAAAAACAAIACFBAIEjI6MzMrMTE5M5ObkJCIktLa0bGpsnJ6cDA4M3N7cXF5c9Pb0PDo81NLUpKakDAoMlJaUVFZU7O7sLCosxMbEfH58FBYUZGZk/P78BAYElJKUzM7MVFJU7OrsJCYkvL68dHJ0pKKkFBIU5OLkZGJk/Pr8PD481NbUrKqs////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABo5AlXBIZCiInFNDQGw6nZURYJARfgCAwnPr7GABFaEUkOBuTR4h5ntUbQCaDVGRInBRBUAnM1k0HkQTaUMVEAAXdk8LXyBmRCFfCFuQWByOQyJfTE8eAx8Bl0QiGAZPDmGhqSoWWBiqoRdfDK+OJ1gftI4kGCVtub/AwcLDxMXGx8jJysvMzc7P0NHS005BACH5BAgGAAAALAAAAAAgACAAhQQCBISChMTCxERCROTi5GRiZCQiJKyqrPTy9HRydJSWlNTS1DQ2NBQSFFRSVIyKjOzq7GxqbLS2tPz6/MzKzCwqLHx+fNze3Dw+PBwaHFxaXAQGBISGhExKTOTm5GRmZKyurPT29HR2dJyenNTW1Dw6PBQWFFRWVIyOjOzu7GxubLy+vPz+/MzOzCwuLP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaNwJdwSJyAJJPh5KFaEJ9Q6AkA+AwTVBMiyi1SAY1h6evsPi+ix5ZBHQxHVEbSrDRQCy+IxZIiUkBbdEMEXxWCRC0OGhdcYwABh0ITGVQYXCEHK5FCKV8ZRB4DDSKbTypUCkRYVAKlRAuMRBFfmq5dBC5VLLZ0u7y/wMHCw8TFxsfIycrLzM3Oz9DR0sVBACH5BAgGAAAALAAAAAAgACAAhQQCBISChMTCxDw+POTi5KSmpBweHFxaXJSSlNTS1PTy9BQWFExOTLSytMzKzCwuLGxqbJyanPz6/AwKDIyKjERGROzq7KyurNze3AQGBMTGxKyqrCQiJFxeXJSWlNTW1PT29BwaHFRWVLy6vMzOzDQ2NHRydJyenPz+/IyOjExKTOzu7P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaRQJZwSGQpTAcS0TJSFJ/Q4QEAWICEjgyAs4pGr8IHFUAQQsYFb9FSAqiuESpjiBgr1cMAWvgRSIYoFCIbeEQUY4SFikYiIRAoi2oaEB6QkUQfJSEnQxgTVCmXRBVUGV0sDWMHokMDY2UsKwZUI6xCAgsZFEQrGx+2RH/Aw8TFxsfIycrLzM3Oz9DR0tPU1daFQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEgoTEwsRMSkzk4uRsamwkIiSsrqzU0tRUVlQMDgyUlpT09vR0dnQ8Ojy8urwMCgzMzsxUUlQsKizc3txcXlycnpz8/vwEBgSEhoTExsRMTkzs7uxsbmwkJiS0trTU1tRcWlwUEhScmpz8+vx8eny8vrz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGi8CTcEgUciSGUnHJbApLgKiAGFlQnEXGaMEQFqKAz/ARVRCww0R0IKQYABvSsAO2oIUQ8JDBKR6iGCB3JxJraB8NEWggCCcMC1yDaBlRDZKSIoAXl3cOUR6cdxQVCYKhRRybp04khQZXq0wfYAWxTBpglrZLJQYbfbvBwsPExcbHyMnKy8zNzs/Qy0EAIfkECAYAAAAsAAAAACAAIACFBAIEhIKEREZExMLEJCIkZGZk5OLkpKKk9PL0VFZUFBIUNDY0tLK0DAoMTE5MfHp87Ors/Pr8lJKULCosXF5cvL68BAYEhIaETEpM3N7cJCYkbG5s5ObkrKqs9Pb0XFpcHB4cPD48tLa0DA4MVFJUfH587O7s/P78////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpFAlHBIHEYoDQyiyGw6UR2A9PKsCgOExBJ1kAICxUwlYkVVvA+hJ2ERmIiiBmDhsTK8GyvJO7BGHAAaGVYPUhYGTR4FEyVCJmRWHg8kFU4SXgxlmkIlXgebmgYaACFboFYnHKerrK2ur7CxskMMIBOVsygnClIEuSgRI1Igv1wjCpnFESfFzc7P0NHS09TV1rBBACH5BAgGAAAALAAAAAAgACAAhQQCBISChMTCxERCRCQiJKSipOTi5BQSFJSWlGxubPTy9DQyNLSytIyKjNTS1ExOTAwKDCwqLOzq7BweHPz6/Ly6vNze3AQGBISGhExKTKyqrBQWFJyenHR2dDw6PLS2tIyOjNTW1FRWVCwuLOzu7Pz+/P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaPQJNwSCyCDqNQcckcWhqfoQFAfTSvQ9KGyhFaqIAMFlsBi4aBy8QxvkoO3LZgMWAvSQhNyWTBMNoUWwALSyULVB1tRBQXVBNLX1QRikQYABddRSUEVAmURBIKTRIYHBSfqKmqq6ytrq+wsbKztLW2t7hjFBwNErQJVAR7shFgFrMdVCPDsSUaCCS50tPUsUEAIfkECAYAAAAsAAAAACAAIACFBAIEhIKExMLEREJELCos5OLkpKKkFBIUZGZk1NLUtLK0dHZ0DAoM/Pr8vLq8zMrMPD48HB4cbG5s3NrcBAYEjI6MxMbETEpMLC4s5ObkrKqsFBYUbGpstLa0fHp8DA4M/P78vL683N7c////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoPAkXBILAoLHEnGyGRWDoQEkQAAQJpYYaYKGAxBlOoniy1wvUNJdUEuNoaVD0ZKtDzaQxEVge+PEFwCfm0cXBaDQw4BdEMZEAceiEIKVQwikliAVQaYTR1il51MAhUToqeoqaqrrK2ur7CxsrO0tba0IREbGq1UAAxvq77ArA4RB7x4QQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEgoTEwsRERkQkIiTs6uykoqRsamwUEhTU0tQ0MjT09vSsrqx0dnSUkpTMyswsKiwMCgxUVlT08vSsqqx0cnQcGhz8/vyMjozExsRMSkwkJiTs7uykpqRsbmwUFhTc2tw8Ojz8+vy0trR8fnycmpzMzswsLiwMDgz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGjsCUcEgUMUYi4jCpbDpTEgDgoBx9IqWnNiWSAlDKjZe5bSqkA+VJilqUU6CGg1kgBTjKzMnCeC8+UhVvg0IJXiGEgyJrAA6JgxMGAo+UlZaXmE0JHhhkmUIcCFIkn0QPXmmlQgsQUgaqQxMdJrC1tre4uaoLHQwXthpSVLALXh+2ZwAStnUYbrrQ0dLThEEAIfkECAYAAAAsAAAAACAAIACFBAIEjIqMREJExMbE5ObkJCIkZGZkrKqsFBYU1NbU9Pb0NDI0fHp8DAoMnJqczM7M7O7sbG5svLq8XFpcLCosHB4c3N7c/P78PD48BAYElJaUTE5MzMrM7OrsbGpstLK0HBoc/Pr8NDY0fH58DA4MpKak1NLU9PL0dHJ0xMLELC4s5OLk////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABopAlnBIZJ1Qk0dxyWwKJwAAQrEMnZxYVRSwKh4aGQ1WSNAMho7oZlmJZkJYCCJ6GCZS8KJWmm9+thNjLAMiKhJjKw1RDoKNQyYoJY6TlJWWl5iZmpucnY4mAhgcnkILUSAXpCBufZxpAAGkQh0EnBYGHrWkFFEYpApbCLIGUSOyg0rHysvMzc7PzUEAIfkECAYAAAAsAAAAACAAIACFBAIEjIqMxMbEREJE5ObkrKqsLC4sZGZk9Pb0vL68dHZ0DA4MnJqc1NbU7O7stLK0PD48bG5s1NLUTE5MNDY0/P78FBYUpKKkBAYElJaUzMrM7OrsrK6sNDI0bGps/Pr8xMLEfH58FBIUnJ6c3N7c9PL0tLa0dHJ0VFZU////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoXAlHBIHBIgi1NxyWwKPYAoyElNfSQlIlRabSIMAFHDSAEcus1CFOBBCzkBklOwDrgzUYvDyYCcEG4TawluaHgAeoVoDwEEio+QjwQDIiGRTlsAApdMB2tTnEUkBhhtoUwfp6qrrK2ur7CxsrO0taEkASauGxZRF60mayitBCJRI664D1VBACH5BAgGAAAALAAAAAAgACAAhQQCBISChERCRMTCxKSmpGRiZCQiJOTi5PTy9HRydDQyNJSWlLy6vFRWVBweHKyurCwqLOzq7Pz6/Hx6fAwODIyOjExOTNTW1GxqbDw6PJyenAQGBISGhERGRKyqrCQmJOTm5PT29HR2dDQ2NJyanLy+vFxeXLSytCwuLOzu7Pz+/Hx+fNze3GxubP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaNQJdwSCxKMI5CqMhsOl0EgHTxrAYMDQRxIQVUqs5Sd0IMCQCjFLh56raY2nVTYgF8WPK8MCXRPz0jDSB+cEQgG1ImhEMhdRAHQhddAotCD10iQyYAFAyVLgxdAUQHap8uIg5Zp6ytrq+wsbKztLW2t7i5QioTKAl9sB5dJLFcUhyxKSh2EbIqLMC60mtBACH5BAgGAAAALAAAAAAgACAAhQQCBIyKjERGRMTGxOTi5FxeXCQmJLSytPTy9AwODGxqbFRSVNTW1Ozq7MTCxJyenDQ2NLy6vBQWFHRydAwKDExOTMzKzOTm5GRmZLS2tPz6/BQSFGxubFRWVNze3Ozu7KSipDw6PP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaCQJFwSCwOPYGDcWlEZoyNBADwYFo/kmmVeJgCOlZmxLsoXjba8LKBpjYDT7XwwpkQREilXB2aQvaAIhRegXsKUwqFew4Rio6PkJGSk5SVlgx3lkIYaZYfXgZCFh6TGm0CIhVTIJMDFQUEHl5/lghSAAWaIgMLHB+6wMHCw8TFxseaQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEhoTExsRMTkwkIiSsqqzk5uRsamy8urwUFhQ0MjSUkpTc2tz09vR0dnQMCgy0srQsLizEwsQ8Pjycmpzk4uT8/vx8fnwEBgSMiozMysxkYmQkJiSsrqzs7uxsbmy8vrwcGhw0NjSUlpTc3tz8+vx8enwMDgy0trT///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGjcCUcEhsQBjEpHKpLEUAgA5zSpVAAYNlyaEwWagpD8iTMjygpuXoWqCSQoBEJSXZBBrLwHVBzVwDYGUcABFkUx1XUoElJCWBIwMjgZOUlZaXmJmam5ydSwISnkkOUAeiQ2cAGKdCE1AKrGUfB3Oxtre4ubq7vJoaIhEIsU9xjqdwqsaiBQ8YfLENeL1DQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEgoTEwsREQkTk4uQkIiSsqqxkYmT08vQUEhTU0tR0cnSUlpQMCgzs6uw0MjS8uryMiozMzsxUUlRsamz8+vzc2tx8enwEBgSEhoTExsRERkTk5uQsKiy0srT09vQcGhx0dnScnpwMDgzs7uw8Pjy8vrxsbmzc3tz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGicCUcEgUQkoTVHHJbKY+IwBg46wOKxGKJOWQAjpW60KaIKVOAIwnXC15tymCuUqoVEXShz38GQBASk4SBh9sKQZeIYZsEF4Zi2wBHQeFkJZCEgyBl00CUiObnEUhXgyiTB5eCqeoIRqssLGys7S1tre4ubq7s3u1aB0WtBpeB7QSxbUXICUcvJBBACH5BAgGAAAALAAAAAAgACAAhQQCBISChMTGxERCRCQiJKSmpOTm5GxubBQWFDQyNLS2tPT29JSWlAwKDExOTCwqLNTW1KyurOzu7HR2dLy+vPz+/JyenFRWVAQGBIyKjCQmJKyqrOzq7BweHDw+PLy6vPz6/JyanAwODFRSVCwuLOTi5Hx6fP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaLwJNwSCRSOohCcckkGgSgoQYAaESbWKECA/Bcp9VrtumgAgTCD1I5xk6oGEN7LlxMRh+6fs/vL0EWGRx+WAdUDxWETA9mJYpLbwAkiY9EFQUMEpURJAMQlUQLDVQDoEMcZiSmQwFVCqtDEguwtLW2t30LZQ6zqwxmDLC/VMGrCyMNI724zM3Oz9BNQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEgoTEwsREQkTk4uQsKiycnpxkZmT08vTU0tQUFhQ8Ojx8enycmpzs6uysrqz8+vzc2twMCgyMjozMysxcXlw0MjR0cnQcHhy0trQEBgSEhoTExsRMTkzk5uQsLixsamz09vTU1tQcGhw8Pjx8fnzs7uy0srT8/vzc3tz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGjkCVcEgsEjmnkHFZDIEWDeMEACAxr6oAFUApfrYp7PKwfRTJgJFSXEwoAIv1EBEAhdlGhAiFv6IeDSZ9fQxUH3yDYl9UEYliF1QFco5LEA0bHpSam5ydnp+goaKhDx0lEKIiWxuiGVsVoghfGhyjIRwOo6AmCLobABoGohAaVCPDbwAfowILJAm60dLTWEEAIfkECAYAAAAsAAAAACAAIACFBAIEhIKExMbEREZE5ObkpKKkJCYk9Pb0lJKUZGZk5OLkHBocjIqMzM7MXFpc7O7sTE5MrK6sPDo8/P78DA4MhIaEzMrMTEpM7OrsLCos/Pr8nJqcfHp8HB4cjI6M1NLU9PL0tLK0////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABodAkXBIPAhAxKRyqVQsAAsCc0qtAK4MJoGDOFCTkSsgstQYrgnqoeEVegYepkJsmDoBBsx3KLlypgFicXsiIAVkUwViIYSNEwFwjZKTlJWWl5iZmh8DFw2aSWd4oEQUVxSkQx5YqUMECq2xsrO0tba3uJYaerECT2mtEGIfrQ5isKkKAxkbk0EAIfkECAYAAAAsAAAAACAAIACFBAIEjIqMREJExMbEZGJk5ObkJCIkrK6sdHJ0FBYUVFJU1NbU9Pb0nJ6cPD48DAoMbGpsLCosvL68XFpclJaUzM7M7O7stLa0fH583N7c/P78BAYEjI6MREZEzMrMZGZk7OrsJCYktLK0dHZ0HB4cVFZU/Pr8pKKkDA4MbG5sLC4sXF5c5OLk////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABobAlnBIbHlSjaJyyRSyHgAApUlliqKASbVqAg0tpOhh21yEFRohqFEhNwlYiZucwrbnVYsiFMD7/yYHF2l/TR1RCIVMFlgkikwRUVoeBihTjy0FGAEMLQ5YFphFn1GhokOUCZenrK2ur7CxsrO0QwMesB9RGK4mWAmvkQAOrxkfEAW1ystuQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEgoTEwsREQkTk4uQkIiScmpxkZmTU0tT08vQUEhQ0MjSMjoykpqTMysxcWlx8fnz8+vwcGhxMTkzs6uwsKiykoqRsbmzc3tw8PjyUlpQEBgSEhoTExsRERkScnpxsamzU1tT09vQUFhQ0NjSUkpSsrqzMzsz8/vwcHhzs7uwsLiz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGj0CWcEhkRQIeS3HJbAoZgGjHSW1eooBGlUoYFDTCkwJQSWydDyxGqOpEzs4JFgE/nySAQx0eEe3/gEwEb4FNIgMAKWuFSyZYF4xLHVgQkUsMKwdmlpydnp+goaKjQ4REAh8qhQISGxxEGlEFpnsZWBRDiFEOgbobuEIQUSObfyELKQZEERoQi6TQ0dLT1E5BACH5BAgGAAAALAAAAAAgACAAhQQCBISChMzOzERCRCQiJOzq7JyenBQSFDQyNPT29JSSlNze3GxqbKyurAwKDIyKjNTW1CwuLPTy9Dw6PPz+/HR2dLS2tAQGBISGhNTS1ERGRCQmJOzu7KSipBweHPz6/JyanOTi5LSytAwODDw+PHx+fP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaNQJNwSBRCNAhLcclsCkkAgCPhrAo/D4ZAGIkCONZqJXoANxyAUrgKjW5NEvDaaYhGPvO5oEHNNz8ZeH5WCx4AEXKDTQFeIIpOCl5Kj0wfFQgPlJqbnJ2en6CAfZ8FGwAeIaCRUQGgDV4GoCYBEyUUsri5uru8mhISuCUXDg2gEl4RoAloACSyFhEaEGFBACH5BAgGAAAALAAAAAAgACAAhQQCBISChERCRMTCxOTi5CQiJGRmZLS2tPT29DQ2NHRydBQSFFRSVNTS1JyenOzq7AwKDIyKjCwqLGxubLy+vPz+/Dw+PHx6fFxaXNze3AQGBISGhExOTMTGxOTm5GxqbLy6vPz6/Dw6PHR2dBwaHNTW1Ozu7CwuLFxeXP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaJwJRwSBw6SIlGccksejqh1EMDAAia2OKBKgp5qgBRdpzigDupDYSEJmMVVY1HGIq6sYgRA3TPlpR9bhtVCoFkC3EVhlkJVQWLWRkoDCWQlpeYmZqbKQMHdpwBVRycQiRgD6UMjoqcJiMfGaWztLW2t7iQHRStnCNVBrMQYKCaAlUnsx4TEwS5i0EAIfkECAYAAAAsAAAAACAAIACFBAIEhIKExMbEREZEpKKk5ObkZGZkHB4cVFZUtLa09Pb0nJ6cFBYUjIqM3N7cTE5MrKqs7O7sdHJ0DAoMNDY0XF5cvL68/P78fHp8BAYEhIaEzM7MTEpMpKak7OrsLCosXFpcvLq8/Pr8jI6M5OLkVFJUrK6s9PL0dHZ0////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABonAlHBIHIoqE86pyGwSC6jAsgOoapxY4uVTLaWo1UB2fKoCDikFCDCIjMecKuo9FgkKQoUpQc8qKAAZFn10FmZehGMkGXKJbwklKAqOlJWWl5hEJyMNbplEcWyfRBNmo0MIXadCIh0LIquxsrO0tbaECQYEsRtmu6cLZhKrJAyBArEFEA63zc6EQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEhoREQkTExsRkZmTk5uQkJiSkoqT09vRUUlQUFhSUkpR0dnQ0NjS0srRMSkzk4uTs7uwMCgyMjozMzswsLiz8/vx8fny8urwEBgSMioxERkTMysx0cnTs6uwsKiykpqT8+vxcXlwcHhycmpx8enw8Ojy0trRMTkz08vT///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGiECVcEgkQhqSTnHJJFoYBlFKRQBYB80s0WEFaKhdrFYL6pZUx4xyvERQEKrQBmAosLWQEd0jjNzHAV0Tf3cHXQ6EbCEBAoOJj5CRkAglCRiSTR1WGXaYRShhnkUnGQANIaJFBQOoqa6vsLGysxwmGxSxegAfsBYSVgqxGlYksh58s8nKy8zNokEAIfkECAYAAAAsAAAAACAAIACFBAIEhIKExMLEREZE5ObkXF5cJCIkpKKk1NLU9Pb0tLK0VFJUbGpsNDI0FBIUjIqMzM7MTE5M7O7sLCosrK6s3N7c/P78vL68dHJ0DA4MxMbETEpM7OrsZGJkJCYkpKak1NbU/Pr8tLa0VFZUbG5sPDo8HB4cjI6M////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABolAlHBITFSGAo9HQWw6nxoHIGJBGQAAR/XJbS6wAA3KhM2EutwQR8gAHymOzAH9BJEXFk6h9BmGtnRNHWAXgYZCJGAQh4YSCx4PjJKTlJVDFgwGBQmWTxRgJ51OB2ABok0JAwATa6eorrCxsrOzCBEbCLMeWB6zGWWzD1iRswQEtMjJysvMzc6uQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEgoRMSkzExsQkIiRkZmSsqqzk5uQUEhRcWlz09vScmpw8Ojx0dnS0trRUUlTc3twMCgyMiowsKizs7uwcGhz8/vx8fny8vryEhoRMTkzU0tRsamysrqzs6uxkYmT8+vycnpw8Pjx8eny8urxUVlTk4uQMDgwsLiwcHhz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGjUCVcEgEdRwgYWgiMBGf0GgJACioTFRAIsqFgrIn1SYr6HIhDYlCxaCWVR8AYmD2Eqgf1eFyoQwpSXVPWFQTgodDbQABiIgKBhiNdSAWkocLEScGlmYgEVQpnF0WJ4WiXQ4TKHSnra6vsLGiFA8EF7JCI1mssRxZDrgQKQAagbIWfrjKy8zNzs/Q0dLPQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEgoTExsREQkSkoqTk5uQkIiTU1tRsamy0srQUFhSUlpT09vQ0MjTMzsxUVlSsqqwMCgyMiozs7uwsLizc3tx0dnS8urwcHhycnpz8/vw8OjzMysxMSkykpqTs6uwkJiRsbmy0trQcGhycmpz8+vw0NjTU0tRcWlysrqwMDgyMjozk4uT///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGj8CWcEhscUKZoWQgKTqfRFYEAFi0PFQABMptMYSJLKoVyK66zk8D0GFMMNRUqwDHFNDFMpXQ+mQcQwwnX3hEEllbhYUMDyMIGopdJSclkYUVcBQTlmh6ACScXQtZIqFcJRYmTaasra6nhK9EHhERoLJDI1QRkLgtIFQKvkICFBQXw8nKy8zNzs/Q0dLT1JFBACH5BAgGAAAALAAAAAAgACAAhQQCBISChMzKzDw+POzu7CwqLJyanFxeXNze3BQSFIyOjFRWVPz6/DQ2NKSmpGxubNTS1AwKDERGRPT29DQyNKSipJSWlHR2dAQGBISGhMzOzPTy9CwuLJyenGRmZOTi5BQWFJSSlFxaXPz+/Dw6PKyurHRydNTW1ExKTP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaMwJRwSEwxApKKcKJ4QIrQKFEBqApSpipoI5VODJZJ6lEFOFKk8rMLXVRRKU0CUOB2qhQGGxopCwkCYkICJYJ7RG4AcIeHJ08TFmGMexlVJpOTcwAYI5iHDVUFnocIBwsno6mqq6MCV6xRWQCXsEUYVRi1RaAAFLpECB4eCL/FxsfIycrLzM3Oz9DRzkEAIfkECAYAAAAsAAAAACAAIACFBAIEhIKExMLEREZE5ObkJCIkpKKkZGZk9Pb0NDI0tLK0lJKU1NLUHB4cVFZU7O7sLCosfH58DAoMrK6sbG5s/P78PD48vLq8nJqc3N7cjI6MzMrMTE5M7OrsJCYkpKakbGps/Pr8NDY0tLa0lJaU1NbUZGJk9PL0LC4sDA4M////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABo5AlXBIFJYGidGwczkVn1CiBQCQIFQbCaDwiEYDBYcTQgV0QeWP9ykoR1QT7Vu1KG/WRUWZIjx1hSEaDhN4RSEcAB4ZhXgIBxBzDyGMeHVUCpSMEWUYmYUEHgAWTp54IQSlqaqGJBp/q08mVCKwUA1lr7VCB1QWukUVBiSkv8XGx8jJysvMzc7P0NHS00JBACH5BAgGAAAALAAAAAAgACAAhQQCBIyKjERCRMTGxCwqLOTm5KyqrGxubDQ2NPT29BwaHJSWlAwKDExOTOTi5DQyNOzu7LS2tHR2dDw+PPz+/JyenAQGBNTS1CwuLOzq7Dw6PPz6/JyanFRSVLy6vHx6fP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaRQJBwSBxWFIhLccksFgYbUMYCAAiEFAnmEG0uI1TNplAFaISGMse7bJQHoIBFAQctygF2UVK1FIQbFEMQDwAEGXoQCwYbCRIdHmwFXV4UhQASeppEDmUEm6AbBFUHoKAFARyUpqytSwkfkK5sfAB+s01uVXW4RWAACKu9Q0/Cw8fIycrLzM3Oz9DR0tPU1dbJQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEgoTExsREQkRkZmTk5uSkoqQcHhxUVlT09vSUkpR0dnS0trQUFhTc3txMSkzs7uwsKiwMCgyMjozU0tRsbmysqqxcXlz8/vwEBgSEhoTMysxERkRsamzs6uwkIiRcWlz8+vycmpx8eny8urxMTkz08vQ0MjSsrqz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGi8CUcEgchi6Sh6nIbBILi8DSAqhqhiaGw9nERKqIlKEKCAghB0BGwC2ayIdUApHhQITUKqEtDAkfVQtOFGQKbQ5feyEoDG0MFxMYbQRkbHyXQx2VmJwFAw2CnKKjfBgdHyAJpG0oZBOrXCJkZrBNCRwAER61XKq8v8DBwsPExcbHyMnKy8zNzs/QQkEAIfkECAYAAAAsAAAAACAAIACFBAIEhIKExMLETEpMJCIk5OLkpKKkdHJ0NDI0FBIUlJKU1NLU9PL0VFZUjIqMLCostLa0/Pr8DAoMzMrMfH58PDo8HBoc3NrcXF5cBAYEhIaETE5MJCYk5ObkpKakdHZ0FBYUnJqc1NbU9Pb0XFpcjI6MLC4svL68/P78zM7MPD48////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABo7AlXBILJYSJlFxyRyiPhzSaFUAWDfNLBFiBThWl+5gCGkEIlqip0sRUjKElDBs1WgvH0VkNABwOk1cViRZIyBWB0IMWgwPABkCWQtdFWlDIycFWhEmVgqWoEMMBiehliIHJWimaQwJVh+saSldKrKbnQCft1kMHhO8wcLDxMXGx8jJysvMzc7P0NHS089BACH5BAgGAAAALAAAAAAgACAAhQQCBIyOjMzKzExOTOTm5CQiJLS2tGxqbJyenAwODNze3FxeXPT29Dw6PNTS1KSmpAwKDJSWlFRWVOzu7CwqLMTGxHx+fBQWFGRmZPz+/AQGBJSSlMzOzFRSVOzq7CQmJLy+vHRydKSipBQSFOTi5GRiZPz6/Dw+PNTW1KyqrP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaOQJVwSGQoiJxTQ0BsOp2VEWCQEX4AgMJz6+xgARWhFJDgbk0eIeZ7VG0Amg1RkSJwUQVAJzNZNB5EE2lDFRAAF3ZPC18gZkQhXwhbkFgcjkMiX0xPHgMfAZdEIhgGTw5hoakqFlgYqqEXXwyvjidYH7SOJBglbbm/wMHCw8TFxsfIycrLzM3Oz9DR0tNOQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEgoTEwsREQkTk4uRkYmQkIiSsqqz08vR0cnSUlpTU0tQ0NjQUEhRUUlSMiozs6uxsamy0trT8+vzMyswsKix8fnzc3tw8PjwcGhxcWlwEBgSEhoRMSkzk5uRkZmSsrqz09vR0dnScnpzU1tQ8OjwUFhRUVlSMjozs7uxsbmy8vrz8/vzMzswsLiz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGjcCXcEicgCST4eShWhCfUOgJAPgME1QTIsotUgGNYenr7D4voseWQR0MR1RG0qw0UAsviMWSIlJAW3RDBF8VgkQtDhoXXGMAAYdCExlUGFwhByuRQilfGUQeAw0im08qVApEWFQCpUQLjEQRX5quXQQuVSy2dLu8v8DBwsPExcbHyMnKy8zNzs/Q0dLFQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEgoTEwsQ8Pjzk4uSkpqQcHhxcWlyUkpTU0tT08vQUFhRMTky0srTMyswsLixsamycmpz8+vwMCgyMioxERkTs6uysrqzc3twEBgTExsSsqqwkIiRcXlyUlpTU1tT09vQcGhxUVlS8urzMzsw0NjR0cnScnpz8/vyMjoxMSkzs7uz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGkUCWcEhkKUwHEtEyUhSf0OEBAFiAhI4MgLOKRq/CBxVAEELGBW/RUgKorhEqY4gYK9XDAFr4EUiGKBQiG3hEFGOEhYpGIiEQKItqGhAekJFEHyUhJ0MYE1Qpl0QVVBldLA1jB6JDA2NlLCsGVCOsQgILGRREKxsftkR/wMPExcbHyMnKy8zNzs/Q0dLT1NXWhUEAIfkECAYAAAAsAAAAACAAIACFBAIEhIKExMLETEpM5OLkbGpsJCIkrK6s1NLUVFZUDA4MlJaU9Pb0dHZ0PDo8vLq8DAoMzM7MVFJULCos3N7cXF5cnJ6c/P78BAYEhIaExMbETE5M7O7sbG5sJCYktLa01NbUXFpcFBIUnJqc/Pr8fHp8vL68////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABovAk3BIFHIkhlJxyWwKS4CogBhZUJxFxmjBEBaigM/wEVUQsMNEdCCkGAAb0rADtqCFEPCQwSkeohggdycSa2gfDRFoIAgnDAtcg2gZUQ2SkiKAF5d3DlEenHcUFQmCoUUcm6dOJIUGV6tMH2AFsUwaYJa2SyUGG327wcLDxMXGx8jJysvMzc7P0MtBACH5BAgGAAAALAAAAAAgACAAhQQCBISChERGRMTCxCQiJGRmZOTi5KSipPTy9FRWVBQSFDQ2NLSytAwKDExOTHx6fOzq7Pz6/JSSlCwqLFxeXLy+vAQGBISGhExKTNze3CQmJGxubOTm5KyqrPT29FxaXBweHDw+PLS2tAwODFRSVHx+fOzu7Pz+/P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaRQJRwSBxGKA0MoshsOlEdgPTyrAoDhMQSdZACAsVMJWJFVbwPoSdhEZiIogZg4bEyvBsryTuwRhwAGhlWD1IWBk0eBRMlQiZkVh4PJBVOEl4MZZpCJV4Hm5oGGgAhW6BWJxynq6ytrq+wsbJDDCATlbMoJwpSBLkoESNSIL9cIwqZxREnxc3Oz9DR0tPU1dawQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSEgoTEwsREQkQkIiSkoqTk4uQUEhSUlpRsbmz08vQ0MjS0srSMiozU0tRMTkwMCgwsKizs6uwcHhz8+vy8urzc3twEBgSEhoRMSkysqqwUFhScnpx0dnQ8Ojy0trSMjozU1tRUVlQsLizs7uz8/vz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGj0CTcEgsgg6jUHHJHFoan6EBQH00r0PShsoRWqiADBZbAYuGgcvEMb5KDty2YDFgL0kITclkwTDaFFsAC0slC1QdbUQUF1QTS19UEYpEGAAXXUUlBFQJlEQSCk0SGBwUn6ipqqusra6vsLGys7S1tre4YxQcDRK0CVQEe7IRYBazHVQjw7ElGggkudLT1LFBACH5BAgGAAAALAAAAAAgACAAhQQCBISChMTCxERCRCwqLOTi5KSipBQSFGRmZNTS1LSytHR2dAwKDPz6/Ly6vMzKzDw+PBweHGxubNza3AQGBIyOjMTGxExKTCwuLOTm5KyqrBQWFGxqbLS2tHx6fAwODPz+/Ly+vNze3P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaDwJFwSCwKCxxJxshkVg6EBJEAAECaWGGmChgMQZTqJ4stcL1DSXVBLjaGlQ9GSrQ82kMRFYHvjxBcAn5tHFwWg0MOAXRDGRAHHohCClUMIpJYgFUGmE0dYpedTAIVE6KnqKmqq6ytrq+wsbKztLW2tCERGxqtVAAMb6u+wKwOEQe8eEEAIfkECAYAAAAsAAAAACAAIACFBAIEhIKExMLEREZE7OrsJCIkpKKkbGpsFBIU1NLU9Pb0PDo8rK6slJKUzMrMLCosdHZ0DAoMVFZU9PL0rKqsHBoc/P78jI6MxMbETEpM7O7sJCYkpKakdHJ0FBYU3Nrc/Pr8tLa0nJqczM7MLC4sfH58DA4M////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABn3Ak3BIBDFCIOIwqWw6TxIA4KAMeSKip/YEkgJMyo2XuW0upAMlSWpSlE8fSINJgAQ0SgypwngrPFIdb4NCCV4LhIMgawANiYMTBgKPlJWWl5hNCR0XZJlCGiZSJZ9EDl5ppUIKD1IGqkMTHCOwtba3uLm6u7y9vr/AwcKVQQAh+QQIBgAAACwAAAAAIAAgAIUEAgSUlpTMzsxMTkzs7uwkIiS0srRsamzc3twMDgz8+vw0NjTEwsR8enykpqQMCgzU1tRkZmT09vQsKix0cnTk5uTMyswEBgScmpzU0tRcWlz08vS8urxsbmzk4uQUFhT8/vw8PjzExsR8fnysqqwsLiz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGeUCTcEg0bSgaQXHJbAo1AMBHslRsnNhSFOApkh6XAFZYCYiGmOhgWYheFFjCJ0oaQhjw4iT6yTcNWxpjJiILJRxjHg9RGIOOQxkUDo+UlZaXmJmam5ydnp+goaKjoggRBxWhewAhoBJbH6ERUSOiIkqkubq7vL2+mEEAIfkECAYAAAAsAAAAACAAIACFBAIEjIqMxMbEPD48rKqs5ObkbGpsNDI0vL689PL0DA4MnJqc1NbUTE5MtLK0dHJ01NLU7O7s/Pr8FBYUpKKkBAYElJaUzMrMREJErK6s7OrsbG5sNDY0xMLE9Pb0FBIUnJ6c3N7cVFZUtLa0dHZ0////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABnLAknBIHBYGikdxyWwKDYBox0ktSSAJIlRabXoOgA/DyAEYuk1C1IwWZgIhp2AdaFuik4hzMXh42g1rCG1odwB5hGgOAQWJjo+QkZKTlJWWl5iZmpucnZ6foKGihCEBI5kaE1EUmCNrIpgFH1EgmaUOVUEAIfkECAYAAAAsAAAAACAAIACEBAIEhIKEREJExMLEZGJk5OLkpKakJCIkdHZ09PL0tLK0PDo8/Pr8nJqcTE5MbGpsLC4sfH58HB4cjI6M3N7c7O7srK6sJCYkfHp89Pb0vLq8/P78VFZUbG5s////AAAABVygJ45kyTwSkZVs63oGIDdvHRxcQjYyMNWuQQ9DSggAiwqwpeh1WMpli+EAXCjSrKjC0Hq/Ih24RgVACmOXpYdIM3sBdwshycnv+Lx+z+/7/4CBgoOEhYaHiIlAIQAh+QQIBgAAACwAAAAAIAAgAIQEAgSMiozExsRERkTk4uS0srRcXlz8+vwUFhTs6uycnpzU1tRUUlS8urwUEhTk5uS0trRkZmQkJiTs7uykoqTc3txUVlT///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFVeAljmQ5VkFhriYKmYkDAAprT8hck8UMWDZWw8coPWS04CqmawVeyhVKFa1ar9isdsvter/gsHgcXhDIl0hTPPFJxgfkgCxgGM7ovH7P7/v/gIGCNiEAIfkECAYAAAAsAAAAACAAIACFBAIEhIaExMbETE5MJCIkrKqs5ObkDA4MdHZ0LC4svLq89Pb0lJKU3NrcDAoMtLa0fH58NDY0/P78nJqcBAYEzMrMZGJkJCYkrK6s7O7sFBYUfHp8NDI0xMLE/Pr8lJaU3N7c////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmnAkHBIXDwaxKRyqfQkAAAMc0rtQAGDpQfB2UioSYMDull+rgVwsmMJLJaBK0NNFxougESmXveAPHyBgoOEhYaHiImKi4yNjo+QkZKTlJWWlxURCQqNTwAagIsEUBShigUUFHONHm+XIUEAIfkECAYAAAAsAAAAACAAIACEBAIEhIaEPD483N7cZGJk7O7sJCIkrKqsVFJU5ObkvLq8DAoMREZEdHJ09Pb0NDI0REJE5OLkLCostLK07OrsvL68DA4MdHZ0/Pr8////AAAAAAAAAAAAAAAAAAAAAAAABUtgJo6kqAjIUK5smzkWADBu3VIyINl82ciTnlCUKNgimGHPAQEYVMraIdeI1iq5gLUWkBAc27B4TC6bz+i0es1uu9/wuHxOr9vvrBAAIfkECAYAAAAsAAAAACAAIACEBAIEhIKEJCYk1NbUFBYUpKakREJE7O7stLa0DAoMLC4sHB4c9Pb0rK6svL68DA4MNDI0JCIk/Pr8////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABUbgJI4k6SxEUa5sKwoAkEhu3cIybe/jmfLAoHBILBqPyKRyyVw2FIZBk5GIGZqHGEDRnARkiO7kwBCbz+i0es1uu9/wODMEACH5BAgGAAAALAAAAAAgACAAhAQCBISChMTCxDw+POTi5CwuLPTy9JyenBwaHNTS1GRmZPz6/IyOjDw6PAQGBISGhMTGxERCROzu7DQyNPT29LSytBweHNza3HRydPz+/P///wAAAAAAAAAAAAAAAAAAAAVJoCaOZElCFWWu7MoAwNDObQEDF62TCoyou50hgMkFj8ikcslsOp/QqHRKrVqv2Kx2y91KDNUHwHGYLhw+MwJWoAoag0R3TleGAAAh+QQIBgAAACwAAAAAIAAgAIMEAgSEgoTk5uRkZmQkJiSkoqT09vQ8OjyUkpR8enwsKiy0srT8/vz///8AAAAAAAAENbDJSau9OOvNsQiI0Y0MAQDD2AknQKjdcSYwZxRLre987//AoHBILBqPyKRyyWw6n9CoFBoBACH5BAgGAAAALAAAAAAgACAAgwQCBIyKjOTm5ERGRPT29HR2dBweHKyurPz+/Ozu7FxeXPz6/Hx+fCwuLLS2tP///wQ28MlJq7046827/2AojmRpntdyOAhKDQBQuFISAwYtNbGiPwJGgPArGo/IpHLJbDqf0Kh0Go0AACH5BAgGAAAALAAAAAAgACAAgwQCBISGhDQ2NMTCxOzq7BwaHERGRPz6/AQGBJyenDw+PNTW1Ozu7BweHP///wAAAAQy0MlJq7046827/2AojmRpnmiqrmzrvnAsz7R0tEOBBKwC/ISV4YcIqhaCQqLGbDqfrwgAIfkECAYAAAAsAAAAACAAIACA////////Ah6Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4LmwUAOw=="; },function(e,t){e.exports="data:image/png;base64,R0lGODlhEAAQAPIAAP///zMzM87OzmdnZzMzM4GBgZqamqenpyH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAADMwi63P4wyklrE2MIOggZnAdOmGYJRbExwroUmcG2LmDEwnHQLVsYOd2mBzkYDAdKa+dIAAAh+QQJCgAAACwAAAAAEAAQAAADNAi63P5OjCEgG4QMu7DmikRxQlFUYDEZIGBMRVsaqHwctXXf7WEYB4Ag1xjihkMZsiUkKhIAIfkECQoAAAAsAAAAABAAEAAAAzYIujIjK8pByJDMlFYvBoVjHA70GU7xSUJhmKtwHPAKzLO9HMaoKwJZ7Rf8AYPDDzKpZBqfvwQAIfkECQoAAAAsAAAAABAAEAAAAzMIumIlK8oyhpHsnFZfhYumCYUhDAQxRIdhHBGqRoKw0R8DYlJd8z0fMDgsGo/IpHI5TAAAIfkECQoAAAAsAAAAABAAEAAAAzIIunInK0rnZBTwGPNMgQwmdsNgXGJUlIWEuR5oWUIpz8pAEAMe6TwfwyYsGo/IpFKSAAAh+QQJCgAAACwAAAAAEAAQAAADMwi6IMKQORfjdOe82p4wGccc4CEuQradylesojEMBgsUc2G7sDX3lQGBMLAJibufbSlKAAAh+QQJCgAAACwAAAAAEAAQAAADMgi63P7wCRHZnFVdmgHu2nFwlWCI3WGc3TSWhUFGxTAUkGCbtgENBMJAEJsxgMLWzpEAACH5BAkKAAAALAAAAAAQABAAAAMyCLrc/jDKSatlQtScKdceCAjDII7HcQ4EMTCpyrCuUBjCYRgHVtqlAiB1YhiCnlsRkAAAOwAAAAAAAAAAAA=="},function(e,t,n){"use strict";var r=function(){};e.exports=r}]); //# sourceMappingURL=bundle.js.map
src/components/Ticker.js
tibotiber/rd3
import React from 'react' import PropTypes from 'prop-types' import styled from 'styled-components' import _ from 'lodash' import {transparentize} from 'polished' const {number, object, string, shape, func} = PropTypes const Toggle = styled.span` position: absolute; top: 0; right: 0; margin: 5px; cursor: pointer; ` const CodeBlock = Toggle.withComponent('pre').extend` padding: 15px; border: dashed 2px ${({theme}) => theme.secondaryColor}; color: ${({theme}) => theme.secondaryColor}; background-color: ${({theme}) => transparentize(0.2, theme.secondaryBackground)}; ` const RenderCount = ({component, counts}) => { return ( <div> {component}: {counts.component}{counts.d3 ? ' / ' + counts.d3 : ''} </div> ) } RenderCount.propTypes = { component: string, counts: shape({ component: number, d3: number }) } class Ticker extends React.PureComponent { static propTypes = { tickValue: number, renderCount: object, tick: func } state = { displayPanel: false } componentDidMount() { this.tickInterval = setInterval(this.props.tick, 1000) } componentWillUnmount() { clearInterval(this.tickInterval) } toggleDisplay = e => { this.setState(state => ({displayPanel: !state.displayPanel})) } render() { const {tickValue, renderCount} = this.props return this.state.displayPanel ? <CodeBlock onClick={this.toggleDisplay}> <div>tick: {tickValue}</div> {_.values( _.mapValues(renderCount, (counts, component) => { return ( <RenderCount key={component} component={component} counts={counts} /> ) }) )} </CodeBlock> : <Toggle onClick={this.toggleDisplay}>Show Render Counts</Toggle> } } export default Ticker
src/svg-icons/communication/business.js
pancho111203/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationBusiness = (props) => ( <SvgIcon {...props}> <path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"/> </SvgIcon> ); CommunicationBusiness = pure(CommunicationBusiness); CommunicationBusiness.displayName = 'CommunicationBusiness'; CommunicationBusiness.muiName = 'SvgIcon'; export default CommunicationBusiness;
src/client/components/dialogs/DeleteDialog.js
vanpaz/vbi
import React from 'react' import Dialog from 'material-ui/lib/dialog' import FlatButton from 'material-ui/lib/flat-button' import bindMethods from '../../utils/bindMethods' /** * Usage: * * <DeleteDialog ref="deleteDialog" /> * * this.refs.deleteDialog.show({ * title: 'Delete scenario', * description: <span>Are you sure you want to delete <b>{title}</b>?</span> * }) * .then(doDelete => { * console.log('doDelete?', doDelete) // doDelete is true or false * }) * * this.refs.deleteDialog.hide() * */ export default class DeleteDialog extends React.Component { constructor (props) { super(props) bindMethods(this) this.state = { open: false, title: 'Delete', description: 'Are you sure?', handler: function () {} } } render () { const actions = [ <FlatButton label="Cancel" secondary={true} onTouchTap={this.hide} />, <FlatButton label="Delete" primary={true} keyboardFocused={true} onTouchTap={this._handleDeleteOk} /> ] return <Dialog title={this.state.title} actions={actions} modal={false} open={this.state.open} onRequestClose={this.hide} > <p> {this.state.description} </p> </Dialog> } show ({ title, description }) { return new Promise((resolve, reject) => { this.setState({ open: true, title: title || 'Title', description: description || 'Description', handler: resolve }) }) } hide () { this._handleDelete(false) } _handleDeleteOk () { this._handleDelete(true) } _handleDelete (doDelete) { this.state.handler(doDelete) this.setState({ open: false, handler: function () {} }) } }
node_modules/react-icons/fa/hand-peace-o.js
bengimbel/Solstice-React-Contacts-Project
import React from 'react' import Icon from 'react-icon-base' const FaHandPeaceO = props => ( <Icon viewBox="0 0 40 40" {...props}> <g><path d="m31.8 14.4q1.3 0 2.3 0.6 3.2 1.4 3.2 5v3.9q0 2.2-0.5 4.2l-1.9 7.6q-0.5 1.9-2 3.1t-3.6 1.2h-14.9q-2.3 0-4-1.7t-1.7-4v-9l-5.3-14q-0.4-1-0.4-2 0-2.4 1.7-4.1t4-1.6q1.8 0 3.3 1t2 2.7l0.4 0.9v-2.5q0-2.4 1.7-4t4-1.7 4.1 1.7 1.7 4v5.8q0.6-0.1 1-0.1 1.6 0 2.9 0.8t1.9 2.2z m-4.9-0.1q-0.7 0-1.3 0.4t-0.9 1.1l-1.7 3.6-1.6 3.5h1.2q1.2 0 2.1 0.7t1.1 1.8l3.4-7.6q0.2-0.4 0.2-1 0-1-0.7-1.8t-1.8-0.7z m5 3q-0.5 0-0.9 0.2t-0.7 0.3-0.5 0.7-0.4 0.7-0.4 0.8l-2.9 6.5q-0.2 0.4-0.2 1 0 1 0.7 1.8t1.8 0.7q0.7 0 1.3-0.4t0.9-1.1l3.6-7.8q0.2-0.4 0.2-0.9 0-1.1-0.7-1.8t-1.8-0.7z m-26-8q0 0.5 0.1 1l5.6 14.5v1.6l2.2-2.5q1-1 2.4-1h4.4l2.4-5.2v-12q0-1.2-0.8-2t-2.1-0.8-2 0.8-0.8 2v14.3h-1.4l-4.5-11.7q-0.3-0.9-1.1-1.4t-1.6-0.5q-1.2 0-2 0.9t-0.8 2z m23.4 27.8q1 0 1.8-0.6t1-1.5l1.9-7.6q0.4-1.6 0.4-3.5v-2l-3.1 6.9q-0.4 0.9-1.2 1.4t-1.7 0.5q-1.2 0-2.1-0.8t-1.1-1.9q-1 1.3-2.6 1.3h-4.6v-0.7h4.6q1.1 0 1.8-0.8t0.8-1.7-0.7-1.8-1.7-0.7h-6.6q-1.1 0-1.8 0.8l-2.8 3v6.9q0 1.2 0.8 2t2 0.8h14.9z"/></g> </Icon> ) export default FaHandPeaceO
js/jqwidgets/demos/react/app/chart/chartwithgrid/app.js
luissancheza/sice
import React from 'react'; import ReactDOM from 'react-dom'; import JqxChart from '../../../jqwidgets-react/react_jqxchart.js'; import JqxGrid from '../../../jqwidgets-react/react_jqxgrid.js'; class App extends React.Component { componentDidMount() { this.refs.myGrid.on('filter', () => { let rows = this.refs.myGrid.getrows(); this.refs.myChart.source(rows); this.refs.myChart.refresh(); }); } render() { let sampleData = [ { Day: 'Monday', Keith: 30, Erica: 15, George: 25 }, { Day: 'Tuesday', Keith: 25, Erica: 25, George: 30 }, { Day: 'Wednesday', Keith: 30, Erica: 20, George: 25 }, { Day: 'Thursday', Keith: 35, Erica: 25, George: 45 }, { Day: 'Friday', Keith: 20, Erica: 20, George: 25 }, { Day: 'Saturday', Keith: 30, Erica: 20, George: 30 }, { Day: 'Sunday', Keith: 60, Erica: 45, George: 90 } ]; let adapter = new $.jqx.dataAdapter({ datafields: [ { name: "Day", type: "string" }, { name: "Keith", type: "number" }, { name: "Erica", type: "number" }, { name: "George", type: "number" } ], localdata: sampleData, datatype: 'array' }); let padding = { left: 5, top: 5, right: 5, bottom: 5 }; let titlePadding = { left: 90, top: 0, right: 0, bottom: 10 }; let xAxis = { dataField: 'Day', gridLines: { visible: true } }; let seriesGroups = [ { type: 'column', columnsGapPercent: 50, seriesGapPercent: 0, valueAxis: { visible: true, unitInterval: 10, minValue: 0, maxValue: 100, title: { text: 'Time in minutes' } }, series: [ { dataField: 'Keith', displayText: 'Keith' }, { dataField: 'Erica', displayText: 'Erica' }, { dataField: 'George', displayText: 'George' } ] } ]; let columns = [ { text: "Day", width: '40%', datafield: "Day", filteritems: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], filtertype: "checkedlist" }, { text: "Keith", width: '20%', datafield: "Keith" }, { text: "Erica", width: '20%', datafield: "Erica" }, { text: "George", width: '20%', datafield: "George" } ]; return ( <div> <JqxGrid ref='myGrid' width={850} height={230} filterable={true} source={adapter} columns={columns} showfilterrow={true} /> <JqxChart ref='myChart' style={{ width: 850, height: 500, marginTop: 50 }} title={'Fitness & exercise weekly scorecard'} description={'Time spent in vigorous exercise'} showLegend={true} enableAnimations={true} padding={padding} titlePadding={titlePadding} source={sampleData} xAxis={xAxis} colorScheme={'scheme01'} seriesGroups={seriesGroups} /> </div> ) } } ReactDOM.render(<App />, document.getElementById('app'));
actor-apps/app-web/src/app/components/activity/GroupProfileMembers.react.js
liruqi/actor-platform-v0.9
/* * Copyright (C) 2015 Actor LLC. <https://actor.im> */ import _ from 'lodash'; import React from 'react'; import ReactMixin from 'react-mixin'; import addons from 'react/addons'; import GroupMember from 'components/activity/GroupMember.react'; const {addons: { PureRenderMixin }} = addons; @ReactMixin.decorate(PureRenderMixin) class GroupProfileMembers extends React.Component { static propTypes = { groupId: React.PropTypes.number, members: React.PropTypes.array.isRequired }; constructor(props) { super(props); } render() { const { groupId, members } = this.props; const membersList = _.map(members, (member, index) => { return <GroupMember {...member} gid={groupId} key={index}/>; }, this); return ( <ul className="group_profile__members__list"> {membersList} </ul> ); } } export default GroupProfileMembers;
files/metadata/0.9.206/metadata.min.js
vvo/jsdelivr
/*! &copy; http://www.oknosoft.ru 2014-2015 @license content of this file is covered by Oknosoft Commercial license. Usage without proper license is prohibited. To obtain it contact [email protected] @author Evgeniy Malyarov */ !function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.$p=t()}(this,function(){function MetaEngine(){this.version="0.9.206",this.toString=function(){return"Oknosoft data engine. v:"+this.version},this.injected_data={}}function Messages(){this.toString=function(){return"Интернационализация сообщений"},"undefined"!=typeof window&&"dhtmlx"in window&&(this.show_msg=function(e,t){if(e){if("string"==typeof e){if($p.iface.synctxt)return void $p.iface.synctxt.show_message(e);e={type:"info",text:e}}t&&"function"==typeof t.setText&&t.setText(e.text),dhtmlx.message(e)}},this.check_soap_result=function(e){return e?"limit_query"==e.error?($p.iface.docs.progressOff(),$p.msg.show_msg({type:"alert-warning",text:$p.msg.limit_query.replace("%1",e.queries).replace("%2",e.queries_avalable),title:$p.msg.srv_overload}),!0):"network"==e.error||"empty"==e.error?($p.iface.docs.progressOff(),$p.msg.show_msg({type:"alert-warning",text:$p.msg.error_network,title:$p.msg.error_critical}),!0):e.error&&e.error_description?($p.iface.docs.progressOff(),-1!=e.error_description.indexOf("Недостаточно прав")&&(e.error_type="alert-warning",e.error_title=$p.msg.error_rights),$p.msg.show_msg({type:e.error_type||"alert-error",text:e.error_description,title:e.error_title||$p.msg.error_critical}),!0):e.error&&!e.messages?($p.iface.docs.progressOff(),$p.msg.show_msg({type:"alert-error",title:$p.msg.error_critical,text:$p.msg.unknown_error.replace("%1","unknown_error")}),!0):void 0:($p.msg.show_msg({type:"alert-error",text:$p.msg.empty_response,title:$p.msg.error_critical}),!0)},this.show_not_implemented=function(){$p.msg.show_msg({type:"alert-warning",text:$p.msg.not_implemented,title:$p.msg.main_title})})}function InterfaceObjs(){this.toString=function(){return"Объекты интерфейса пользователя"},this.clear_svgs=function(e){for("string"==typeof e&&(e=document.getElementById(e));e.firstChild;)e.removeChild(e.firstChild)},this.get_offset=function(e){var t={left:0,top:0};if(e.offsetParent)do t.left+=e.offsetLeft,t.top+=e.offsetTop;while(e=e.offsetParent);return t},this.normalize_xml=function(e){if(!e)return"";var t={"&":"&amp;",'"':"&quot;","'":"&apos;","<":"&lt;",">":"&gt;"};return e.replace(/[&"'<>]/g,function(e){return t[e]})},this.scale_svg=function(e,t,n){var a,r,o,i,s,l,c,d,p,_={};s=e.indexOf(">"),c=e.substring(5,s),o=c.split(" "),i=e.substr(s+1),i=i.substr(0,i.length-6);for(a in o)e=o[a].split("="),("width"==e[0]||"height"==e[0])&&(e[1]=Number(e[1].replace(/"/g,"")),_[e[0]]=e[1]);return-1!=(l=c.indexOf("viewBox="))?(d=c.substring(l+9),p='viewBox="'+d.substring(0,d.indexOf('"'))+'"'):p='viewBox="0 0 '+(_.width-n)+" "+(_.height-n)+'"',r=t/(_.height-n),_.height=t,_.width=Math.round(_.width*r),'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="'+_.width+'" height="'+_.height+'" xml:space="preserve" '+p+">"+i+"</svg>"},this.bind_help=function(e,t){function n(e){return e.help_path?void 0:void $p.msg.show_msg({title:"Справка",type:"alert-info",text:$p.msg.not_implemented})}e instanceof dhtmlXCellObject||(!e.help_path&&t&&(e.help_path=t),e.button("help").show(),e.button("help").enable(),e.attachEvent("onHelp",n))},this.set_hash=function(e,t,n,a){var r={},o=$p.job_prm.parse_url();1==arguments.length&&"object"==typeof e&&(r=e,r.hasOwnProperty("obj")&&(e=r.obj,delete r.obj),r.hasOwnProperty("ref")&&(t=r.ref,delete r.ref),r.hasOwnProperty("frm")&&(n=r.frm,delete r.frm),r.hasOwnProperty("view")&&(a=r.view,delete r.view)),void 0===e&&(e=o.obj||""),void 0===t&&(t=o.ref||""),void 0===n&&(n=o.frm||""),void 0===a&&(a=o.view||"");var i="obj="+e+"&ref="+t+"&frm="+n+"&view="+a;for(var s in r)i+="&"+s+"="+r[s];location.hash.substr(1)==i?this.hash_route():location.hash=i},this.hash_route=function(e){var t,n=$p.job_prm.parse_url(),a=$p.eve.hash_route.execute(n);return a===!1||$p.iface.before_route&&$p.iface.before_route(e)===!1||$p.ajax.authorized&&(n.ref&&"undefined"!=typeof _md?(t=_md.mgr_by_class_name(n.obj),t&&t[n.frm||"form_obj"]($p.iface.docs,n.ref)):n.view&&$p.iface.swith_view&&$p.iface.swith_view(n.view)),e?$p.cancel_bubble(e):void 0},this.oninit=null,this.ontimer=null,setTimeout(function(){$p.iface.ontimer&&"function"==typeof $p.iface.ontimer&&setInterval($p.iface.ontimer,9e4)},2e4)}function Modifiers(){var e=[];this.push=function(t){e.push(t)},this.detache=function(t){var n=e.indexOf(t);-1!=n&&e.splice(n,1)},this.execute=function(t){var n,a;return e.forEach(function(e){a="function"==typeof e?e(t):$p.injected_data[e](t),n!==!1&&(n=a)}),n}}function JobPrm(){function e(){return $p.wsql.get_user_param("rest_path")||$p.job_prm.rest_path||"/a/zd/%1/odata/standard.odata/"}this.parse_url=function(){function e(e){var t,n={},a=[];if(("#"===e.substr(0,1)||"?"===e.substr(0,1))&&(e=e.substr(1)),e.length>2){t=decodeURI(e).split("&");for(var r in t)if(a=t[r].split("="),"m"==a[0])try{n[a[0]]=JSON.parse(a[1])}catch(o){n[a[0]]={}}else n[a[0]]=a[1]||""}return n}return e(location.search)._mixin(e(location.hash))},this.check_dhtmlx=!0,this.offline=!1,this.local_storage_prefix="",this.create_tables=!0,"undefined"!=typeof window?this.url_prm=this.parse_url():this.url_prm={},"function"==typeof $p.settings&&$p.settings(this,$p.modifiers);for(var t in this)"url_prm"!==t&&"function"!=typeof this[t]&&this.url_prm.hasOwnProperty[t]&&(this[t]=this.url_prm[t]);this.hs_url=function(){var e=this.hs_path||"/a/zd/%1/hs/upzp",t=$p.wsql.get_user_param("zone","number");return t?e.replace("%1",t):e.replace("%1/","")},this.rest_url=function(){var t=e(),n=$p.wsql.get_user_param("zone","number");return n?t.replace("%1",n):t.replace("%1/","")},this.irest_url=function(){var t=e(),n=$p.wsql.get_user_param("zone","number");return t=t.replace("odata/standard.odata","hs/rest"),n?t.replace("%1",n):t.replace("%1/","")}}function WSQL(){function e(e,t){if("object"==t){try{e=JSON.parse(e)}catch(n){e={}}return e}return"number"==t?$p.fix_number(e,!0):"date"==t?$p.fix_date(e,!0):"boolean"==t?$p.fix_boolean(e):e}var t,n=this,a={};"undefined"==typeof localStorage?"undefined"==typeof WorkerGlobalScope&&"undefined"==typeof localStorage&&(t=new require("node-localstorage").LocalStorage("./localstorage")):t=localStorage,n.promise=function(e,t){return new Promise(function(a,r){n.alasql(e,t||[],function(e,t){t?r(t):a(e)})})},n.set_user_param=function(e,n){return new Promise(function(r,o){var i=n;"object"==typeof n?i=JSON.stringify(n):n===!1&&(i=""),t&&t.setItem($p.job_prm.local_storage_prefix+e,i),a[e]=n,r()})},n.get_user_param=function(n,r){return!a.hasOwnProperty(n)&&t&&(a[n]=e(t.getItem($p.job_prm.local_storage_prefix+n),r)),a[n]},n.save_options=function(e,t){return n.set_user_param(e+"_"+t.name,t)},n.restore_options=function(e,t){var a=n.get_user_param(e+"_"+t.name,"object");for(var r in a)if("object"!=typeof a[r])t[r]=a[r];else{t[r]||(t[r]={});for(var o in a[r])t[r][o]=a[r][o]}return t},n.init_params=function(e,a){n.alasql=e||alasql,n.aladb=new n.alasql.Database("md");var r,o=[{p:"user_name",v:"",t:"string"},{p:"user_pwd",v:"",t:"string"},{p:"browser_uid",v:$p.generate_guid(),t:"string"},{p:"zone",v:$p.job_prm.hasOwnProperty("zone")?$p.job_prm.zone:1,t:"number"},{p:"enable_save_pwd",v:"",t:"boolean"},{p:"reset_local_data",v:"",t:"boolean"},{p:"autologin",v:"",t:"boolean"},{p:"cache_cat_date",v:0,t:"number"},{p:"margin",v:60,t:"number"},{p:"discount",v:15,t:"number"},{p:"offline",v:$p.job_prm.offline||"",t:"boolean"},{p:"skin",v:"dhx_web",t:"string"},{p:"rest_path",v:"",t:"string"}];return $p.job_prm.additional_params&&(o=o.concat($p.job_prm.additional_params)),t.getItem($p.job_prm.local_storage_prefix+"zone")||(r=$p.job_prm.hasOwnProperty("zone")?$p.job_prm.zone:1),$p.job_prm.url_prm.hasOwnProperty("zone")&&(r=$p.fix_number($p.job_prm.url_prm.zone,!0)),void 0!==r&&n.set_user_param("zone",r),o.forEach(function(e){(void 0==n.get_user_param(e.p,e.t)||!n.get_user_param(e.p,e.t)&&-1!=e.p.indexOf("url"))&&n.set_user_param(e.p,$p.job_prm.hasOwnProperty(e.p)?$p.job_prm[e.p]:e.v)}),n.set_user_param("cache_cat_date",0),n.set_user_param("reset_local_data",""),new Promise(function(e,t){a?n.alasql(a,[],e):$p.job_prm.create_tables?$p.job_prm.create_tables_sql?n.alasql($p.job_prm.create_tables_sql,[],function(){delete $p.job_prm.create_tables_sql,e()}):$p.injected_data["create_tables.sql"]?n.alasql($p.injected_data["create_tables.sql"],[],function(){delete $p.injected_data["create_tables.sql"],e()}):"string"==typeof $p.job_prm.create_tables?$p.ajax.get($p.job_prm.create_tables).then(function(t){n.alasql(t.response,[],e)}):e():e()})},n.drop_tables=function(e){function t(){o--,0>=o?setTimeout(e,10):a()}function a(){var e=i[o-1].tableid;"_"==e.substr(0,1)?t():n.alasql("drop table IF EXISTS "+e,[],t)}function r(e){i=e,(o=e.length)?a():t()}var o=0,i=[];n.alasql("SHOW TABLES",[],r)},n.backup_database=function(e){},n.restore_database=function(){},n.idx_connect=function(e,t){return e||(e=n.idx_name||$p.job_prm.local_storage_prefix||"md"),new Promise(function(a,r){var o=indexedDB.open(e,1);o.onerror=function(e){r(e)},o.onsuccess=function(){a(o.result)},o.onupgradeneeded=function(a){return a.currentTarget.result.createObjectStore(t,{keyPath:"ref"}),n.idx_connect(e,t)}})},n.idx_save=function(e,t,a){return new Promise(function(r,o){function i(t){var n=t.transaction([a],"readwrite").objectStore(a).put(e instanceof DataObj?e._obj:e);n.onerror=function(e){o(e)},n.onsuccess=function(){r(n.result)}}!a&&e._manager&&(a=e._manager.table_name),t?i(t):n.idx_connect(null,a).then(i)})},n.idx_get=function(e,t,a){return new Promise(function(r,o){function i(t){var n=t.transaction([a],"readonly").objectStore(a).get(e);n.onerror=function(e){o(e)},n.onsuccess=function(){r(n.result)}}t?i(t):n.idx_connect(null,a).then(i)})},n.idx_delete=function(e,t,a){return new Promise(function(r,o){function i(t){var n=t.transaction([a],"readwrite").objectStore(a)["delete"](e instanceof DataObj?e.ref:e);n.onerror=function(e){o(e)},n.onsuccess=function(){r(n.result)}}!a&&e._manager&&(a=e._manager.table_name),t?i(t):n.idx_connect(null,a).then(i)})},n.idx_clear=function(e,t,a){return new Promise(function(r,o){function i(e){var t=e.transaction([a],"readwrite").objectStore(a).clear();t.onerror=function(e){o(e)},t.onsuccess=function(){r(t.result)}}!a&&e._manager&&(a=e._manager.table_name),t?i(t):n.idx_connect(null,a).then(i)})}}function eXcell_ocombo(e){if(e){var t=this;t.cell=e,t.grid=e.parentNode.grid,t.setValue=function(e){t.setCValue(e instanceof DataObj?e.presentation:e||"")},t.getValue=function(){return t.grid.get_cell_value()},t.shiftNext=function(){t.grid.editStop()},t.edit=function(){t.combo||(t.val=t.getValue(),t.cell.innerHTML="",t.combo=new OCombo({parent:t.cell}._mixin(t.grid.get_cell_field())),t.combo.getInput().focus())},t.detach=function(){if(t.combo&&t.combo.getComboText){t.setValue(t.combo.getComboText()),t.combo.getSelectedValue()||t.combo.callEvent("onChange");var e=!$p.is_equal(t.val,t.getValue());return t.combo.unload(),e}return!0}}}function eXcell_pwd(e){var t;e&&(this.cell=e,this.grid=e.parentNode.grid,eXcell_ed.call(this),t=this.edit,this.edit=function(){t.call(this),this.obj.type="password"},this.setValue=function(){this.setCValue("*********")},this.getValue=function(){return this.grid.get_cell_value()},this.detach=function(){if(this.grid.get_cell_field){var e=this.grid.get_cell_field();e.obj[e.field]=this.obj.value}return this.setValue(),t=null,this.val!=this.getValue()})}function ODropdownList(e){function t(t){o.innerHTML=e.values[o.getAttribute("current")],e.event_name&&!t&&dhx4.callEvent(e.event_name,[o.getAttribute("current")])}function n(){r.classList.remove("open")}var a,r,o,i=document.createElement("ul");e.container.innerHTML='<div class="dropdown_list">'+e.title+'<a href="#" class="dropdown_list"></a></div>',r=e.container.firstChild,o=r.querySelector("a"),o.setAttribute("current",Array.isArray(e.values)?"0":Object.keys(e.values)[0]),r.onclick=function(e){if(r.classList.contains("open")){if("LI"==e.target.tagName)for(var a in i.childNodes)if(i.childNodes[a]==e.target){o.setAttribute("current",e.target.getAttribute("current")),t();break}n()}else r.classList.add("open");return $p.cancel_bubble(e)},r.appendChild(i),i.className="dropdown_menu",e.class_name&&(r.classList.add(e.class_name),i.classList.add(e.class_name));for(var s in e.values){a=document.createElement("li");var l=e.values[s].indexOf("<i");a.innerHTML=e.values[s].substr(l)+" "+e.values[s].substr(0,l),a.setAttribute("current",s),i.appendChild(a)}document.body.addEventListener("keydown",function(e){27==e.keyCode&&r.classList.remove("open")}),document.body.addEventListener("click",n),this.unload=function(){for(var t;t=r.lastChild;)r.removeChild(t);e.container.removeChild(r),a=i=r=o=e=null},t(!0)}function OCombo(e){function t(e){var t,n={_top:30};d&&d.metadata().hierarchical&&d.metadata().group_hierarchy&&("elm"==c.choice_groups_elm?n.is_folder=!1:("grp"==c.choice_groups_elm||"parent"==l)&&(n.is_folder=!0));for(var a in c.choice_links)t=c.choice_links[a],t.name&&"selection"==t.name[0]&&(s instanceof TabularSectionRow?t.path.length<2?n[t.name[1]]="function"==typeof t.path[0]?t.path[0]:s._owner._owner[t.path[0]]:n[t.name[1]]=s[t.path[1]]:n[t.name[1]]="function"==typeof t.path[0]?t.path[0]:s[t.path[0]]);return e&&(n.presentation={like:e}),n}function n(e){if("select"==this.name)d?d.form_selection(f,{initial_value:s[l].ref,selection:[t()]}):n.call({name:"type"});else if("add"==this.name)d&&d.create({},!0).then(function(e){e._set_loaded(e.ref),e.form_obj()});else if("open"==this.name)s&&s[l]&&!s[l].empty()&&s[l].form_obj();else if("type"==this.name){var a,r,o=[],i=s,p=l;c.type.types.forEach(function(e){a=_md.mgr_by_class_name(e),r=a.metadata(),o.push({presentation:r.synonym||r.name,mgr:a,selected:d===a})}),$p.iface.select_from_list(o).then(function(e){(!i[p]||i[p]&&i[p]._manager!=e.mgr)&&(d=e.mgr,s=i,l=p,c=s._metadata.fields[l],d.form_selection({on_select:function(e){s[l]=e,s=null,l=null,c=null}},{selection:[t()]})),d=null,a=null,r=null,i=null,p=null})}return e?$p.cancel_bubble(e):void 0}function a(){_=!1,setTimeout(function(){_||$p.iface.popup.hide()},300)}function r(){if(!(d instanceof EnumManager)){_=!0;var e=document.createElement("div"),t="<a href='#' name='select' title='Форма выбора {F4}'>Показать все</a><a href='#' name='open' style='margin-left: 9px;' title='Открыть форму элемента {Ctrl+Shift+F4}'><i class='fa fa-external-link fa-fw'></i></a>";$p.ajax.root&&(t+="&nbsp;<a href='#' name='add' title='Создать новый элемент {F8}'><i class='fa fa-plus fa-fwfa-fw'></i></a>"),c.type.types.length>1&&(t+="&nbsp;<a href='#' name='type' title='Выбрать тип значения {Alt+T}'><i class='fa fa-level-up fa-fw'></i></a>"),e.innerHTML=t;for(var r=0;r<e.children.length;r++)e.children[r].onclick=n;$p.iface.popup.clear(),$p.iface.popup.attachObject(e),$p.iface.popup.show(dhx4.absLeft(u.getButton())-77,dhx4.absTop(u.getButton()),u.getButton().offsetWidth,u.getButton().offsetHeight),$p.iface.popup.p.onmouseover=function(){_=!0},$p.iface.popup.p.onmouseout=a}}function o(e){u&&u.getBase&&(u.getBase().parentElement?s instanceof TabularSectionRow||e.forEach(function(e){e.name==l&&i(s[l])}):setTimeout(u.unload))}function i(e){if(e&&e instanceof DataObj&&!e.empty()){if(u.getOption(e.ref)||u.addOption(e.ref,e.presentation),u.getSelectedValue()==e.ref)return;u.setComboValue(e.ref)}else u.getSelectedValue()||(u.setComboValue(""),u.setComboText(""))}var s,l,c,d,p,_,u=this,f={on_select:e.on_select||function(e){s[l]=e}};OCombo.superclass.constructor.call(u,e),e.on_select?(u.getBase().style.border="none",u.getInput().style.left="-3px",e.is_tabular||(u.getButton().style.right="9px")):u.getBase().style.marginBottom="4px",e.left&&(u.getBase().style.left=left+"px"),this.attachEvent("onChange",function(){s[l]=this.getSelectedValue()}),this.attachEvent("onBlur",function(){!this.getSelectedValue()&&this.getComboText()&&this.setComboText("")}),this.attachEvent("onDynXLS",function(e){d||(d=_md.value_mgr(s,l,c.type)),d&&(u.clearAll(),d.get_option_list(null,t(e)).then(function(e){u.addOption&&(u.addOption(e),u.openSelect())}))}),dhtmlxEvent(u.getButton(),"mouseover",r),dhtmlxEvent(u.getButton(),"mouseout",a),dhtmlxEvent(u.getBase(),"click",function(e){return $p.cancel_bubble(e)}),dhtmlxEvent(u.getBase(),"contextmenu",function(e){return setTimeout(r,10),e.preventDefault(),!1}),dhtmlxEvent(u.getInput(),"keyup",function(e){return d instanceof EnumManager?void 0:115==e.keyCode?(e.ctrlKey&&e.shiftKey?s[l].empty()||s[l].form_obj():e.ctrlKey||e.shiftKey||d&&d.form_selection(f,{initial_value:s[l].ref,selection:[t()]}),$p.cancel_bubble(e)):void 0}),dhtmlxEvent(u.getInput(),"focus",function(e){setTimeout(function(){u&&u.getInput&&u.getInput().select()},50)}),this.attach=function(e){s&&Object.unobserve(s,o),s=e.obj,l=e.field,p=e.property,e.meta?c=e.meta:p?(c=s._metadata.fields[l]._clone(),c.type=p.type):c=s._metadata.fields[l],u.clearAll(),d=_md.value_mgr(s,l,c.type),d&&d.get_option_list(s[l],t()).then(function(e){u.addOption&&(u.addOption(e),i(s[l]))}),s instanceof TabularSectionRow?Object.observe(s._owner._owner,o,["row"]):Object.observe(s,o,["update"])};var m=this.unload;this.unload=function(){a(),s&&Object.unobserve(s,o),u.conf&&u.conf.tm_confirm_blur&&clearTimeout(u.conf.tm_confirm_blur),s=null,l=null,c=null,d=null,f=null;try{m.call(u)}catch(e){}},e.obj&&e.field&&this.attach(e),this.enableFilteringMode("between","dummy",!1,!1)}function _clear_all(){$p.iface.docs.__define({clear_all:{value:function(){this.detachToolbar(),this.detachStatusBar(),this.detachObject(!0)},enumerable:!1},"Очистить":{get:function(){return this.clear_all},enumerable:!1},"Контейнер":{get:function(){return this.cell.querySelector(".dhx_cell_cont_layout")},enumerable:!1}})}function OTooolBar(e){function t(e){for(var t=0;t<c.children.length;t++){var n=c.children[t];n.classList.contains("selected")&&n.classList.remove("selected")}e&&!this.classList.contains("selected")&&this.classList.add("selected")}function n(){o=!1,setTimeout(function(){o||$p.iface.popup.hide()},300)}function a(){var t=this.name.replace(e.name+"_","");e.onclick&&e.onclick.call(l,t)}var r,o,i,s,l=this,c=document.createElement("div");e.image_path||(e.image_path=dhtmlx.image_path),e.hasOwnProperty("class_name")?c.className=e.class_name:c.className="md_otooolbar",l.cell=c,l.buttons={},this.add=function(t){function d(e){if(e||(e=p),e.subdiv&&!i&&!s){for(;e.subdiv.firstChild;)e.subdiv.removeChild(e.subdiv.firstChild);e.subdiv.parentNode.removeChild(e.subdiv),e.subdiv=null}}var p=$p.iface.add_button(c,e,t);p.onclick=a,p.onmouseover=function(){t.title&&!t.sub&&(o=!0,$p.iface.popup.clear(),$p.iface.popup.attachHTML(t.title),$p.iface.popup.show(dhx4.absLeft(p),dhx4.absTop(p),p.offsetWidth,p.offsetHeight),$p.iface.popup.p.onmouseover=function(){o=!0},$p.iface.popup.p.onmouseout=n)},p.onmouseout=n,l.buttons[t.name]=p,t.sub&&(p.onmouseover=function(){for(var n=0;n<p.parentNode.children.length;n++)if(p.parentNode.children[n]!=p&&p.parentNode.children[n].subdiv){d(p.parentNode.children[n]);break}if(s=!0,!this.subdiv){this.subdiv=document.createElement("div"),this.subdiv.className="md_otooolbar",r=$p.iface.get_offset(p),"right"==t.sub.align?this.subdiv.style.left=r.left+p.offsetWidth-(parseInt(t.sub.width.replace(/\D+/g,""))||56)+"px":this.subdiv.style.left=r.left+"px",this.subdiv.style.top=r.top+c.offsetHeight+"px",this.subdiv.style.height=t.sub.height||"198px",this.subdiv.style.width=t.sub.width||"56px";for(var n in t.sub.buttons){var o=$p.iface.add_button(this.subdiv,e,t.sub.buttons[n]);o.onclick=a}e.wrapper.appendChild(this.subdiv),this.subdiv.onmouseover=function(){i=!0},this.subdiv.onmouseout=function(){i=!1,setTimeout(d,500)},t.title&&$p.iface.popup.show(dhx4.absLeft(this.subdiv),dhx4.absTop(this.subdiv),this.subdiv.offsetWidth,this.subdiv.offsetHeight)}},p.onmouseout=function(){s=!1,setTimeout(d,500)})},this.select=function(n){for(var a=0;a<c.children.length;a++){var r=c.children[a];if(r.name==e.name+"_"+n)return void t.call(r,!0)}},this.get_selected=function(){for(var e=0;e<c.children.length;e++){var t=c.children[e];if(t.classList.contains("selected"))return t.name}},this.unload=function(){for(;c.firstChild;)c.removeChild(c.firstChild);e.wrapper.removeChild(c)},e.wrapper.appendChild(c),c.style.width=e.width||"28px",c.style.height=e.height||"150px",c.style.position="absolute",e.top&&(c.style.top=e.top),e.left&&(c.style.left=e.left),e.bottom&&(c.style.bottom=e.bottom),e.right&&(c.style.right=e.right),e.buttons&&e.buttons.forEach(function(e){l.add(e)})}function eXcell_addr(e){if(e){var t,n=this,a=function(e){return eXcell_proto.input_keydown(e,n)},r=function(e){var t={grid:n.grid}._mixin(n.grid.get_cell_field());return wnd_address(t),$p.cancel_bubble(e)};n.cell=e,n.grid=n.cell.parentNode.grid,n.open_selection=r,n.setValue=function(e){n.setCValue(e)},n.getValue=function(){return n.grid.get_cell_value()},n.edit=function(){var e;n.val=n.getValue(),n.cell.innerHTML='<div class="ref_div21"><input type="text" class="dhx_combo_edit" style="height: 20px;"><div class="ref_field21">&nbsp;</div></div>',t=n.cell.firstChild,e=t.childNodes[0],e.value=n.val,e.onclick=$p.cancel_bubble,e.readOnly=!0,e.focus(),e.onkeydown=a,t.childNodes[1].onclick=r},n.detach=function(){return n.setValue(n.getValue()),!$p.is_equal(n.val,n.getValue())}}}function wnd_address(e){function t(){var e={name:"wnd_addr",wnd:{id:"wnd_addr",top:130,left:200,width:800,height:560,modal:!0,center:!0,pwnd:g,allow_close:!0,allow_minmax:!0,on_close:f,caption:h.shipping_address}};g&&g.getHeight&&e.wnd.height>g.getHeight()&&(e.wnd.height=g.getHeight()),m=$p.iface.dat_blank(null,e.wnd),m.elmnts.layout=m.attachLayout("2E"),m.elmnts.cell_frm=m.elmnts.layout.cells("a"),m.elmnts.cell_frm.setHeight("110"),m.elmnts.cell_frm.hideHeader(),m.elmnts.cell_frm.fixSize(0,1),m.elmnts.pgrid=m.elmnts.cell_frm.attachPropertyGrid(),m.elmnts.pgrid.setDateFormat("%d.%m.%Y %H:%i"),m.elmnts.pgrid.init(),m.elmnts.pgrid.parse(h._manager.get_property_grid_xml({" ":[{id:"delivery_area",path:"o.delivery_area",synonym:"Район доставки",type:"ref",txt:y.delivery_area.presentation},{id:"region",path:"o.region",synonym:"Регион",type:"ro",txt:y.region},{id:"city",path:"o.city",synonym:"Населенный пункт",type:"ed",txt:y.city},{id:"street",path:"o.street",synonym:"Улица, дом, корпус, литера, квартира",type:"ed",txt:y.street}]},y),function(){m.elmnts.pgrid.enableAutoHeight(!0),m.elmnts.pgrid.setInitWidthsP("40,60"),m.elmnts.pgrid.setSizes(),m.elmnts.pgrid.attachEvent("onPropertyChanged",u)},"xml"),m.elmnts.pgrid.get_cell_field=function(){return{obj:y,field:"delivery_area",on_select:a,pwnd:m,meta:{synonym:"Район",tooltip:"Район (зона, направление) доставки для группировки при планировании и оптимизации маршрута геокодером",choice_groups_elm:"elm",type:{types:["cat.delivery_areas"],is_ref:!0}}}},m.elmnts.toolbar=m.attachToolbar({icons_path:dhtmlx.image_path+"dhxtoolbar"+dhtmlx.skin_suffix()}),m.elmnts.toolbar.loadStruct('<toolbar><item id="btn_select" type="button" title="Установить адрес" text="&lt;b&gt;Выбрать&lt;/b&gt;" /></toolbar>',function(){this.attachEvent("onclick",n)}),m.elmnts.cell_map=m.elmnts.layout.cells("b"),m.elmnts.cell_map.hideHeader();var t={center:new google.maps.LatLng(y.latitude,y.longitude),zoom:y.street?15:12,mapTypeId:google.maps.MapTypeId.ROADMAP};m.elmnts.map=m.elmnts.cell_map.attachMap(t),y.marker=new google.maps.Marker({map:m.elmnts.map,draggable:!0,animation:google.maps.Animation.DROP,position:t.center}),google.maps.event.addListener(y.marker,"click",p),google.maps.event.addListener(y.marker,"dragend",_),o()}function n(e){"btn_select"==e&&(h.delivery_area=y.delivery_area,l(),h.coordinates=JSON.stringify([y.latitude,y.longitude])),m.close()}function a(e){if(void 0!==e){var t,n=b;b=$p.is_data_obj(e)?e:$p.cat.delivery_areas.get(e,!1),t=n!=b,$p.is_data_obj(b)||(b=$p.cat.delivery_areas.get()),m.elmnts.pgrid.cells().setValue(e.presentation),r(t)}}function r(e){if(!y.delivery_area.empty()&&e&&(y.street=""),y.delivery_area.region?(y.region=y.delivery_area.region,m.elmnts.pgrid.cells("region",1).setValue(y.region)):e&&(y.region=""),y.delivery_area.city?(y.city=y.delivery_area.city,m.elmnts.pgrid.cells("city",1).setValue(y.city)):e&&(y.city=""),y.delivery_area.latitude&&y.delivery_area.longitude){var t=new google.maps.LatLng(y.delivery_area.latitude,y.delivery_area.longitude);m.elmnts.map.setCenter(t),y.marker.setPosition(t)}o()}function o(){m.elmnts.pgrid.cells("region",1).setValue(y.region),m.elmnts.pgrid.cells("city",1).setValue(y.city),m.elmnts.pgrid.cells("street",1).setValue(y.street)}function i(){var e=y.street?15:12;m.elmnts.map.getZoom()!=e&&m.elmnts.map.setZoom(e),d(function(e,t){if(t==google.maps.GeocoderStatus.OK){var n=e[0].geometry.location;m.elmnts.map.setCenter(n),y.marker.setPosition(n),y.latitude=n.lat(),y.longitude=n.lng(),y.postal_code=$p.ipinfo.components({},e[0].address_components).postal_code||""}})}function s(){return(y.street?y.street.replace(/,/g," ")+", ":"")+(y.city?y.city+", ":"")+(y.region?y.region+", ":"")+y.country+(y.postal_code?", "+y.postal_code:"")}function l(){h.shipping_address=s();var e='<КонтактнаяИнформация xmlns="http://www.v8.1c.ru/ssl/contactinfo" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Представление="%1"> <Комментарий/> <Состав xsi:type="Адрес" Страна="РОССИЯ"> <Состав xsi:type="АдресРФ">'.replace("%1",h.shipping_address);if(y.region&&(e+="\n<СубъектРФ>"+y.region+"</СубъектРФ>"),y.city&&(e+=-1!=y.city.indexOf("г.")||-1!=y.city.indexOf("г ")||-1!=y.city.indexOf(" г")?"\n<Город>"+y.city+"</Город>":"\n<НаселПункт>"+y.city+"</НаселПункт>"),y.street){var t,n,a,r,o,i=y.street.replace(/,/g," ");for(var l in $p.fias){if(1==$p.fias[l].type)for(var c in $p.fias[l].syn)if(-1!=(n=i.indexOf($p.fias[l].syn[c]))){r=l,t=i.substr(n+$p.fias[l].syn[c].length).trim(),i=i.substr(0,n).trim();break}if(r)break}if(r||(r="1010",-1!=(n=i.indexOf(" "))&&(t=i.substr(n),i=i.substr(0,n))),e+="\n<Улица>"+i.trim()+"</Улица>",t){a=t.toLowerCase(),t="";for(var l in $p.fias){if(3==$p.fias[l].type)for(var c in $p.fias[l].syn)if(-1!=(n=a.indexOf($p.fias[l].syn[c]))){o=l,t=a.substr(n+$p.fias[l].syn[c].length),a=a.substr(0,n);break}if(o)break}o||(o="2010",-1!=(n=a.indexOf(" "))&&(t=a.substr(n),a=a.substr(0,n))),e+='\n<ДопАдрЭл><Номер Тип="'+r+'" Значение="'+a.trim()+'"/></ДопАдрЭл>'}t&&(e+='\n<ДопАдрЭл><Номер Тип="'+o+'" Значение="'+t.trim()+'"/></ДопАдрЭл>')}y.postal_code&&(e+='<ДопАдрЭл ТипАдрЭл="10100000" Значение="'+y.postal_code+'"/>'),e+="</Состав> </Состав></КонтактнаяИнформация>",h.address_fields=e}function c(e){function t(e){if(e.attributes&&2==e.attributes.length){var t={};return t[e.attributes[0].value]=e.attributes[1].value,t}}if(h.address_fields){y.xml=(new DOMParser).parseFromString(h.address_fields,"text/xml");var n,a={},r={building_room:""},o=[],i="СубъектРФ,Округ,СвРайМО,СвРайМО,ВнутригРайон,НаселПункт,Улица,Город,ДопАдрЭл,Адрес_по_документу,Местоположение".split(",");for(var s in i)a[i[s]]=y.xml.getElementsByTagName(i[s]);for(var s in a)for(var l in a[s])if("length"!=l&&a[s].hasOwnProperty(l))if(n=t(a[s][l]))r[s]||(r[s]=[]),r[s].push(n);else if(a[s][l].childNodes.length)for(var c in a[s][l].childNodes)"length"!=c&&a[s][l].childNodes.hasOwnProperty(c)&&((n=t(a[s][l].childNodes[c]))?(r[s]||(r[s]=[]),r[s].push(n)):a[s][l].childNodes[c].nodeValue&&(r[s]?r[s]+=" "+a[s][l].childNodes[c].nodeValue:r[s]=a[s][l].childNodes[c].nodeValue));for(var s in r["ДопАдрЭл"]){for(var l in $p.fias)4==l.length&&r["ДопАдрЭл"][s][l]&&(o[$p.fias[l].type]=$p.fias[l].name+" "+r["ДопАдрЭл"][s][l]);r["ДопАдрЭл"][s][101e5]&&(y.postal_code=r["ДопАдрЭл"][s][101e5])}y.address_fields=r,y.region=r["СубъектРФ"]||r["Округ"]||"",y.city=r["Город"]||r["НаселПункт"]||"",y.street=r["Улица"]||"";for(var s in o)y.street+=" "+o[s]}y.coordinates.length?(y.latitude=y.coordinates[0],y.longitude=y.coordinates[1],e()):h.shipping_address?d(function(t,n){n==google.maps.GeocoderStatus.OK&&(y.latitude=t[0].geometry.location.lat(),y.longitude=t[0].geometry.location.lng()),e()}):$p.ipinfo.latitude&&$p.ipinfo.longitude?(y.latitude=$p.ipinfo.latitude,y.longitude=$p.ipinfo.longitude,e()):(y.latitude=55.635924,y.longitude=37.6066379,e(),$p.msg.show_msg($p.msg.empty_geocoding))}function d(e){var t=s();$p.ipinfo.ggeocoder.geocode({address:t},e)}function p(){null!=y.marker.getAnimation()?y.marker.setAnimation(null):(y.marker.setAnimation(google.maps.Animation.BOUNCE),setTimeout(function(){y.marker.setAnimation(null)},1500))}function _(e){$p.ipinfo.ggeocoder.geocode({latLng:e.latLng},function(t,n){if(n==google.maps.GeocoderStatus.OK&&t[0]){var a=t[0];m.setText(a.formatted_address),$p.ipinfo.components(y,a.address_components),o();var r=y.street?15:12;m.elmnts.map.getZoom()!=r&&(m.elmnts.map.setZoom(r),m.elmnts.map.setCenter(e.latLng)),y.latitude=e.latLng.lat(),y.longitude=e.latLng.lng()}})}function u(e,t,n){e&&(y.delivery_area.empty()?(t=n,$p.msg.show_msg({type:"alert",text:$p.msg.delivery_area_empty,title:$p.msg.addr_title}),setTimeout(function(){m.elmnts.pgrid.selectRowById("delivery_area")},50)):"delivery_area"==e?a(t):(y[m.elmnts.pgrid.getSelectedRowId()]=t,i()))}function f(t){return e.grid.editStop(),!t.error}var m,h=e.obj,g=e.pwnd,b=h.delivery_area,y={coordinates:h.coordinates?JSON.parse(h.coordinates):[],country:"Россия",region:"",city:"",street:"",postal_code:"",marker:{}};return y.__define("delivery_area",{get:function(){return b},set:function(e){a(e)}}),c(t),m}function _load(e){function t(){return r.cachable?$p.wsql.promise(r.get_sql_struct(e),[]).then($p.iface.data_to_tree):void 0}function n(){return r.cachable?$p.wsql.promise(r.get_sql_struct(e),[]).then(function(t){return $p.iface.data_to_grid.call(r,t,e)}):void 0}var a,r=_md.mgr_by_class_name(e.class_name);return"get_tree"==e.action&&(a=t())?a:"get_selection"==e.action&&(a=n())?a:$p.job_prm.offline?Promise.reject(Error($p.msg.offline_request)):(e.browser_uid=$p.wsql.get_user_param("browser_uid"),$p.ajax.post_ex($p.job_prm.hs_url(),JSON.stringify(e),!0).then(function(e){return e.response}))}function Meta(e,t){var n,a=e&&e.response?JSON.parse(e.response):e;_md=$p.md=this,t&&Meta._patch(a,t.response?JSON.parse(t.response):t),e=null,"undefined"!=typeof window&&(t=$p.injected_data["log.json"],Meta._patch(a,t),t=null),_md.get=function(e,t){var n=e.split("."),r={multiline_mode:!1,note:"",synonym:"",tooltip:"",type:{is_ref:!1,types:["string"]}},o=-1!="doc,tsk,bp".indexOf(n[0]),i=-1!="cat,tsk".indexOf(n[0]);return t?(o&&"number_doc"==t?(r.synonym="Номер",r.tooltip="Номер документа",r.type.str_len=11):o&&"date"==t?(r.synonym="Дата",r.tooltip="Дата документа",r.type.date_part="date_time",r.type.types[0]="date"):o&&"posted"==t?(r.synonym="Проведен",r.type.types[0]="boolean"):i&&"id"==t?r.synonym="Код":i&&"name"==t?r.synonym="Наименование":"deleted"==t?(r.synonym="Пометка удаления",r.type.types[0]="boolean"):"is_folder"==t?(r.synonym="Это группа",r.type.types[0]="boolean"):"lc_changed"==t?(r.synonym="Изменено в 1С",r.tooltip="Время записи в 1С",r.type.types[0]="number",r.type.digits=15,r.type.fraction_figits=0):"ref"==t?(r.synonym="Ссылка",r.type.is_ref=!0,r.type.types[0]=e):r=t?a[n[0]][n[1]].fields[t]:a[n[0]][n[1]],r):a[n[0]][n[1]]},_md.get_classes=function(){var e={};for(var t in a){e[t]=[];for(var n in a[t])e[t].push(n)}return e},_md.create_tables=function(e,t){function n(t){"number"==typeof t?(o--,0==o?e?setTimeout(function(){e(l)},10):alasql.utils.saveFile("create_tables.sql",l):a()):t&&t.hasOwnProperty("message")&&$p.iface&&$p.iface.docs&&($p.iface.docs.progressOff(),$p.msg.show_msg({title:$p.msg.error_critical,type:"alert-error",text:t.message}))}function a(){var e=i[o-1];l+=e["class"][e.name].get_sql_struct(t)+";\n",n(1)}var r,o=0,i=[],s=_md.get_classes(),l=t&&t.postgres?"":"USE md;\n";"enm,cch,cacc,cat,bp,tsk,doc,ireg,areg".split(",").forEach(function(e){for(r in s[e])i.push({"class":$p[e],name:s[e][r]})}),o=i.length,a()},_md.sql_type=function(e,t,n,a){ var r;return r="type"==t&&"cch_properties"==e.table_name||"svg"==t&&"cat_production_params"==e.table_name?" JSON":n.is_ref||-1!=n.types.indexOf("guid")?a?n.types.every(function(e){return 0==e.indexOf("enm.")})?" character varying(100)":n.hasOwnProperty("str_len")?" character varying("+Math.max(36,n.str_len)+")":" uuid":" CHAR":n.hasOwnProperty("str_len")?a?n.str_len?" character varying("+n.str_len+")":" text":" CHAR":n.date_part?a&&"date"!=n.date_part?"date_time"==n.date_part?" timestamp with time zone":" time without time zone":" Date":n.hasOwnProperty("digits")?0==n.fraction_figits?a?n.digits<7?" integer":" bigint":" INT":a?" numeric("+n.digits+","+n.fraction_figits+")":" FLOAT":-1!=n.types.indexOf("boolean")?" BOOLEAN":-1!=n.types.indexOf("json")?" JSON":a?" character varying(255)":" CHAR"},_md.sql_composite=function(e,t,n,a){var r="";return e[t].type.types.length>1&&"type"!=t&&(n=n?n.substr(0,29)+"_T":t.substr(0,29)+"_T",r=a?', "'+n+'" character varying(255)':_md.sql_mask(n)+" CHAR"),r},_md.sql_mask=function(e,t){return", "+(t?"_t_.":"")+("`"+e+"`")},_md.mgr_by_class_name=function(e){if(e){var t=e.split(".");if(t[1]&&$p[t[0]])return $p[t[0]][t[1]]}},_md.value_mgr=function(e,t,n,a,r){function o(e){return e&&1==n.types.length&&(n._mgr=e),e}var i,s,l,c,d;if(n._mgr)return n._mgr;if(1==n.types.length){if(l=n.types[0].split("."),l.length>1&&$p[l[0]])return o($p[l[0]][l[1]])}else if(r&&r.type&&(l=r.type.split("."),l.length>1&&$p[l[0]]))return o($p[l[0]][l[1]]);if(i=e.property||e.param,"value"==t&&i){if(s=_cch.properties.get(i,!1),$p.is_data_obj(s)){if(s.is_new())return _cat.property_values;for(c in s.type.types)if(s.type.types[c].indexOf(".")>-1){l=s.type.types[c].split(".");break}return l&&l.length>1&&$p[l[0]]?o($p[l[0]][l[1]]):s.type}}else{if(c=[],n.types.forEach(function(e){l=e.split("."),l.length>1&&$p[l[0]][l[1]]&&c.push($p[l[0]][l[1]])}),1==c.length)return o(c[0]);if(a)return c;if((i=e[t])instanceof DataObj)return i._manager;if($p.is_guid(i)&&i!=$p.blank.guid)for(var p in c)if(d=c[p],d.get(i,!1,!0))return d}},_md.control_by_type=function(e){var t;return t=e.is_ref?-1==e.types.join().indexOf("enm.")?"ocombo":"refc":e.date_part?"dhxCalendar":e.digits?e.fraction_figits<5?"calck":"edn":"boolean"==e.types[0]?"ch":e.hasOwnProperty("str_len")&&(e.str_len>=100||0==e.str_len)?"txt":"ed"},_md.ts_captions=function(e,t,n){n||(n={});var a,r=_md.get(e).tabular_sections[t],o=_md.get(e).form,i=r.fields;if(o&&o.obj){if(!o.obj.tabular_sections[t])return;n._mixin(o.obj.tabular_sections[t])}else{"contact_information"===t&&(i={type:"",kind:"",presentation:""}),n.fields=["row"],n.headers="№",n.widths="40",n.min_widths="",n.aligns="",n.sortings="na",n.types="cntr";for(var s in i)a=r.fields[s],a.hide||(n.fields.push(s),n.headers+=","+(a.synonym?a.synonym.replace(/,/g," "):s),n.types+=","+_md.control_by_type(a.type),n.sortings+=",na")}return!0},_md.syns_js=function(e){var t={DeletionMark:"deleted",Description:"name",DataVersion:"data_version",IsFolder:"is_folder",Number:"number_doc",Date:"date","Дата":"date",Posted:"posted",Code:"id",Parent_Key:"parent",Owner_Key:"owner",Owner:"owner",Ref_Key:"ref","Ссылка":"ref",LineNumber:"row"};return t[e]?t[e]:a.syns_js[a.syns_1с.indexOf(e)]||e},_md.syns_1с=function(e){var t={deleted:"DeletionMark",name:"Description",data_version:"DataVersion",is_folder:"IsFolder",number_doc:"Number",date:"Date",posted:"Posted",id:"Code",ref:"Ref_Key",parent:"Parent_Key",owner:"Owner_Key",row:"LineNumber"};return t[e]?t[e]:a.syns_1с[a.syns_js.indexOf(e)]||e},_md.printing_plates=function(e){if(e)for(var t in e.doc)a.doc[t].printing_plates=e.doc[t]},_md.class_name_from_1c=function(e){var t=e.split(".");return 1==t.length?"enm."+e:("Перечисление"==t[0]?e="enm.":"Справочник"==t[0]?e="cat.":"Документ"==t[0]?e="doc.":"РегистрСведений"==t[0]?e="ireg.":"РегистрНакопления"==t[0]?e="areg.":"РегистрБухгалтерии"==t[0]?e="aссreg.":"ПланВидовХарактеристик"==t[0]?e="cch.":"ПланСчетов"==t[0]?e="cacc.":"Обработка"==t[0]?e="dp.":"Отчет"==t[0]&&(e="rep."),e+t[1])},_md.class_name_to_1c=function(e){var t=e.split(".");return 1==t.length?"Перечисление."+e:("enm"==t[0]?e="Перечисление.":"cat"==t[0]?e="Справочник.":"doc"==t[0]?e="Документ.":"ireg"==t[0]?e="РегистрСведений.":"areg"==t[0]?e="РегистрНакопления.":"aссreg"==t[0]?e="РегистрБухгалтерии.":"cch"==t[0]?e="ПланВидовХарактеристик.":"cacc"==t[0]?e="ПланСчетов.":"dp"==t[0]?e="Обработка.":"rep"==t[0]&&(e="Отчет."),e+t[1])},_md.dates=function(){return{md_date:a.md_date,cat_date:a.cat_date}};for(n in a.enm)_enm[n]=new EnumManager(a.enm[n],"enm."+n);for(n in a.cat)_cat[n]=new CatManager("cat."+n);for(n in a.doc)_doc[n]=new DocManager("doc."+n);for(n in a.ireg)_ireg[n]="$log"==n?new LogManager("ireg."+n):new InfoRegManager("ireg."+n);for(n in a.areg)_areg[n]=new AccumRegManager("areg."+n);for(n in a.dp)_dp[n]=new DataProcessorsManager("dp."+n);for(n in a.cch)_cch[n]=new ChartOfCharacteristicManager("cch."+n);for(n in a.cacc)_cacc[n]=new ChartOfAccountManager("cacc."+n);for(n in a.tsk)_tsk[n]=new TaskManager("tsk."+n);for(n in a.bp)_bp[n]=new BusinessProcessManager("bp."+n);$p.modifiers.execute($p),$p.eve.callEvent("meta")}function DataManager(class_name){var _metadata=_md.get(class_name),_cachable,_async_write=_metadata.async_write,_events={after_create:[],after_load:[],before_save:[],after_save:[],value_change:[]};_cachable=-1!=class_name.indexOf("enm.")?!0:$p.job_prm.offline?!0:-1!=class_name.indexOf("doc.")||-1!=class_name.indexOf("dp.")||-1!=class_name.indexOf("rep.")?!1:!0,$p.job_prm.offline||void 0==_metadata.cachable||(_cachable="boolean"==typeof _metadata.cachable?_metadata.cachable:"НеКешировать"!=_metadata.cachable),this.__define({cachable:{value:_cachable,writable:!0,enumerable:!1},async_write:{value:_async_write,writable:!1,enumerable:!1},class_name:{value:class_name,writable:!1,enumerable:!1},alatable:{get:function(){return $p.wsql.aladb.tables[this.table_name]?$p.wsql.aladb.tables[this.table_name].data:[]},enumerable:!1},metadata:{value:function(e){return e?_metadata.fields[e]||_metadata.tabular_sections[e]:_metadata},enumerable:!1},attache_event:{value:function(e,t,n){n?_events[e].push(t):_events[e].push(t)},enumerable:!1},handle_event:{value:function(e,t,n){var a,r=[];return _events[t].forEach(function(t){r!==!1&&(a=t.call(e,n),a===!1?r=a:a&&r.push(a))}),r.length?1==r.length?r[0]:r.some(function(e){return"object"==typeof e&&e.then})?Promise.all(r):r:void 0},enumerable:!1}});var _obj_сonstructor=this._obj_сonstructor||DataObj;if(!(this instanceof EnumManager)){var obj_сonstructor_name=class_name.split(".")[1];if(this._obj_сonstructor=eval("(function "+obj_сonstructor_name.charAt(0).toUpperCase()+obj_сonstructor_name.substr(1)+"(attr, manager){manager._obj_сonstructor.superclass.constructor.call(this, attr, manager)})"),this._obj_сonstructor._extend(_obj_сonstructor),this instanceof InfoRegManager){delete this._obj_сonstructor.prototype.deleted,delete this._obj_сonstructor.prototype.ref,delete this._obj_сonstructor.prototype.lc_changed;for(var f in this.metadata().dimensions)this._obj_сonstructor.prototype.__define(f,{get:new Function("return this._getter('"+f+"')"),set:new Function("v","this._setter('"+f+"',v)"),enumerable:!0});for(var f in this.metadata().resources)this._obj_сonstructor.prototype.__define(f,{get:new Function("return this._getter('"+f+"')"),set:new Function("v","this._setter('"+f+"',v)"),enumerable:!0})}else{this._ts_сonstructors={};for(var f in this.metadata().fields)this._obj_сonstructor.prototype.__define(f,{get:new Function("return this._getter('"+f+"')"),set:new Function("v","this._setter('"+f+"',v)"),enumerable:!0});for(var f in this.metadata().tabular_sections){var row_сonstructor_name=obj_сonstructor_name.charAt(0).toUpperCase()+obj_сonstructor_name.substr(1)+f.charAt(0).toUpperCase()+f.substr(1)+"Row";this._ts_сonstructors[f]=eval("(function "+row_сonstructor_name+"(owner) {owner._owner._manager._ts_сonstructors[owner._name].superclass.constructor.call(this, owner)})"),this._ts_сonstructors[f]._extend(TabularSectionRow);for(var rf in this.metadata().tabular_sections[f].fields)this._ts_сonstructors[f].prototype.__define(rf,{get:new Function("return this._getter('"+rf+"')"),set:new Function("v","this._setter('"+rf+"',v)"),enumerable:!0});this._obj_сonstructor.prototype.__define(f,{get:new Function("return this._getter_ts('"+f+"')"),set:new Function("v","this._setter_ts('"+f+"',v)"),enumerable:!0})}}}_obj_сonstructor=null}function RefDataManager(e){var t=this,n={};RefDataManager.superclass.constructor.call(t,e),t.push=function(e,t){t&&t!=e.ref?(delete n[e.ref],n[t]=e):n[e.ref]=e},t.all=function(){return n},t.each=function(e){for(var t in n)if(t&&t!=$p.blank.guid&&1==e.call(this,n[t]))break},t.get=function(e,a,r){var o=n[e]||n[e=$p.fix_guid(e)];if(!o){if(r&&!a)return;o=new t._obj_сonstructor(e,t,!0)}return a===!1?o:void 0===a&&e===$p.blank.guid?o:!t.cachable||o.is_new()?o.load():a?Promise.resolve(o):o},t.create=function(e,a){e&&"object"==typeof e||(e={}),e.ref&&$p.is_guid(e.ref)&&!$p.is_empty_guid(e.ref)||(e.ref=$p.generate_guid());var r=n[e.ref];if(!r){if(r=new t._obj_сonstructor(e,t),!t.cachable&&a){var o={};return $p.ajax.default_attr(o,$p.job_prm.irest_url()),o.url+=t.rest_name+"/Create()",$p.ajax.get_ex(o.url,o).then(function(e){return r._mixin(JSON.parse(e.response),void 0,["ref"])})}if(a){var i=r._obj;for(var s in t.metadata().fields)void 0==i[s]&&(i[s]="")}}return Promise.resolve(r)},t.delete_loc=function(e){var a;delete n[e];for(var r in t.alatable)if(t.alatable[r].ref==e){a=r;break}void 0!=a&&t.alatable.splice(a,1)},t.find=function(e){return $p._find(n,e)},t.find_rows=function(e,a){return $p._find_rows.call(t,n,e,a)},t.save=function(e){return e&&(e.specify||$p.is_guid(e.ref)&&!t.cachable)?_load({class_name:t.class_name,action:e.action||"save",attr:e}).then(JSON.parse):Promise.reject()},t.load_array=function(e,a){var r,o;for(var i in e)r=$p.fix_guid(e[i]),(o=n[r])?(o.is_new()||a)&&(o._mixin(e[i]),o._set_loaded()):(o=new t._obj_сonstructor(e[i],t),a&&o._set_loaded())},t.predefined=function(e){var n=t.metadata().predefined[e];if(n)return t.get(n.ref)},t.first_folder=function(e){for(var a in n){var r=n[a];if(r.is_folder&&(!e||$p.is_equal(e,r.owner)))return r}return t.get()}}function DataProcessorsManager(e){DataProcessorsManager.superclass.constructor.call(this,e),this.create=function(){return new this._obj_сonstructor({},this)}}function EnumManager(e,t){EnumManager.superclass.constructor.call(this,t),this._obj_сonstructor=EnumObj,this.push=function(e,t){this.__define(t,{value:e,enumerable:!1})},this.get=function(e){if(e instanceof EnumObj)return e;e&&e!=$p.blank.guid||(e="_");var t=this[e];return t||(t=new EnumObj({name:e},this)),t},this.each=function(e){this.alatable.forEach(function(t){t.ref&&t.ref!=$p.blank.guid&&e.call(this[t.ref])})};for(var n in e)new EnumObj(e[n],this)}function RegisterManager(e){var t={};this._obj_сonstructor=RegisterRow,RegisterManager.superclass.constructor.call(this,e),this.push=function(e,n){n&&n!=e.ref?(delete t[e.ref],t[n]=e):t[e.ref]=e},this.get=function(e,n,a){e||(e={}),e.action="select";var r,o=$p.wsql.alasql(this.get_sql_struct(e),e._values);if(delete e.action,delete e._values,o.length)if(a)r=t[this.get_ref(o[0])];else{r=[];for(var i in o)r.push(t[this.get_ref(o[i])])}return n?Promise.resolve(r):r},this.load_array=function(e){var n,a,r=[];for(var o in e)n=this.get_ref(e[o]),(a=t[n])?a._mixin(e[o]):new this._obj_сonstructor(e[o],this),r.push(t[n]);return r},this.find_rows=function(e,t){return $p._find_rows.call(this,this.alatable,e,t)}}function InfoRegManager(e){InfoRegManager.superclass.constructor.call(this,e)}function LogManager(){LogManager.superclass.constructor.call(this,"ireg.$log");var e;this.record=function(t){if(t instanceof Error){console&&console.log(t);var n=t;t={"class":"error",note:n.toString()}}"object"!=typeof t&&(t={note:t}),t.date=Date.now()+$p.eve.time_diff(),e||(e=alasql.compile("select MAX(`sequence`) as `sequence` from `ireg_$log` where `date` = ?"));var a=e([t.date]);a.length&&void 0!==a[0].sequence?t.sequence=a[0].sequence+1:t.sequence=0,t["class"]||(t["class"]="note"),$p.wsql.alasql("insert into `ireg_$log` (`date`, `sequence`, `class`, `note`, `obj`) values (?, ?, ?, ?, ?)",[t.date,t.sequence,t["class"],t.note,t.obj?JSON.stringify(t.obj):""])},this.backup=function(e,t){},this.restore=function(e,t){},this.clear=function(e,t){},this.show=function(e){},this.get_sql_struct=function(e){if(e&&"get_selection"==e.action){var t="select * from `ireg_$log`";return e.date_from?t+=e.date_till?" where `date` >= ? and `date` <= ?":" where `date` >= ?":e.date_till&&(t+=" where `date` <= ?"),t}return LogManager.superclass.get_sql_struct.call(this,e)},this.caption_flds=function(e){function t(e,t,n,a,r,o){this.id=e,this.width=t,this.type=n,this.align=a,this.sort=r,this.caption=o}var n='<column id="%1" width="%2" type="%3" align="%4" sort="%5">%6</column>',a=[],r=(this.metadata(),"");if(a.push(new t("date","140","ro","left","server","Дата")),a.push(new t("class","100","ro","left","server","Класс")),a.push(new t("note","*","ro","left","server","Событие")),e.get_header){r="<head>";for(var o in a)r+=n.replace("%1",a[o].id).replace("%2",a[o].width).replace("%3",a[o].type).replace("%4",a[o].align).replace("%5",a[o].sort).replace("%6",a[o].caption);r+="</head>"}return{head:r,acols:a}},this.data_to_grid=function(e,t){var n="<?xml version='1.0' encoding='UTF-8'?><rows total_count='%1' pos='%2' set_parent='%3'>".replace("%1",e.length).replace("%2",t.start).replace("%3",t.set_parent||""),a=this.caption_flds(t),r=$p.eve.time_diff();return n+=a.head,e.forEach(function(e){n+='<row id="'+e.date+"_"+e.sequence+'"><cell>'+$p.dateFormat(e.date-r,$p.dateFormat.masks.date_time)+(e.sequence?"."+e.sequence:"")+"</cell><cell>"+e["class"]+"</cell><cell>"+e.note+"</cell></row>"}),n+"</rows>"}}function AccumRegManager(e){AccumRegManager.superclass.constructor.call(this,e)}function CatManager(e){this._obj_сonstructor=CatObj,CatManager.superclass.constructor.call(this,e),this.metadata().hierarchical&&this.metadata().group_hierarchy&&this._obj_сonstructor.prototype.__define("is_folder",{get:function(){return this._obj.is_folder||!1},set:function(e){this._obj.is_folder=$p.fix_boolean(e)},enumerable:!0})}function ChartOfCharacteristicManager(e){this._obj_сonstructor=CatObj,ChartOfCharacteristicManager.superclass.constructor.call(this,e)}function ChartOfAccountManager(e){this._obj_сonstructor=CatObj,ChartOfAccountManager.superclass.constructor.call(this,e)}function DocManager(e){this._obj_сonstructor=DocObj,DocManager.superclass.constructor.call(this,e)}function TaskManager(e){this._obj_сonstructor=TaskObj,TaskManager.superclass.constructor.call(this,e)}function BusinessProcessManager(e){this._obj_сonstructor=BusinessProcessObj,BusinessProcessManager.superclass.constructor.call(this,e)}function DataObj(e,t){var n,a,r={},o={data_version:""},i=!(this instanceof EnumObj);return t instanceof DataProcessorsManager||t instanceof EnumManager||(a=t.get(e,!1,!0)),a?a:(t instanceof EnumManager?o.ref=n=e.name:t instanceof RegisterManager?n=t.get_ref(e):(o.ref=n=$p.fix_guid(e),o.deleted=!1,o.lc_changed=0),this.__define("_manager",{value:t,enumerable:!1}),this.__define("is_new",{value:function(){return i},enumerable:!1}),this.__define("_set_loaded",{value:function(e){i=!1,t.push(this,e)},enumerable:!1}),this.__define("_obj",{value:o,writable:!1,enumerable:!1}),this.__define("_ts_",{value:function(e){return r[e]||(r[e]=new TabularSection(e,this)),r[e]},enumerable:!1}),void(t.alatable&&t.push&&(t.alatable.push(o),t.push(this,n))))}function CatObj(e,t){var n="";CatObj.superclass.constructor.call(this,e,t),this.__define("presentation",{get:function(){return this.name||this.id?this.name||this.id||this._metadata.obj_presentation:n},set:function(e){e&&(n=String(e))},enumerable:!1}),e&&"object"==typeof e&&(e._not_set_loaded?(delete e._not_set_loaded,this._mixin(e)):(this._mixin(e),$p.is_empty_guid(this.ref)||!e.id&&!e.name||this._set_loaded(this.ref)))}function DocObj(e,t){var n="";DocObj.superclass.constructor.call(this,e,t),this.__define("presentation",{get:function(){return this.number_str||this.number_doc?this._metadata.obj_presentation+" №"+(this.number_str||this.number_doc)+" от "+$p.dateFormat(this.date,$p.dateFormat.masks.ru):n},set:function(e){e&&(n=String(e))},enumerable:!1}),e&&"object"==typeof e&&this._mixin(e),!$p.is_empty_guid(this.ref)&&e.number_doc&&this._set_loaded(this.ref)}function doc_standard_props(e){e.__define({number_doc:{get:function(){return this._obj.number_doc||""},set:function(e){this.__notify("number_doc"),this._obj.number_doc=e},enumerable:!0},date:{get:function(){return this._obj.date||$p.blank.date},set:function(e){this.__notify("date"),this._obj.date=$p.fix_date(e,!0)},enumerable:!0}})}function DataProcessorObj(e,t){DataProcessorObj.superclass.constructor.call(this,e,t);var n,a=t.metadata();for(n in a.fields)e[n]=$p.fetch_type("",a.fields[n].type);for(n in a.tabular_sections)e[n]=[];this._mixin(e)}function TaskObj(e,t){TaskObj.superclass.constructor.call(this,e,t)}function BusinessProcessObj(e,t){BusinessProcessObj.superclass.constructor.call(this,e,t)}function EnumObj(e,t){EnumObj.superclass.constructor.call(this,e,t),e&&"object"==typeof e&&this._mixin(e)}function RegisterRow(e,t){RegisterRow.superclass.constructor.call(this,e,t),e&&"object"==typeof e&&this._mixin(e)}function TabularSection(e,t){t._obj[e]||(t._obj[e]=[]),this.__define("_name",{value:e,enumerable:!1}),this.__define("_owner",{value:t,enumerable:!1}),this.__define("_obj",{value:t._obj[e],writable:!1,enumerable:!1})}function TabularSectionRow(e){var t={};this.__define("_owner",{value:e,enumerable:!1}),this.__define("_obj",{value:t,writable:!1,enumerable:!1})}function Rest(){this.filter_date=function(e,t,n){t||(t=new Date("2015-01-01"));var a=e+" gt datetime'"+$p.dateFormat(t,$p.dateFormat.masks.isoDateTime)+"'";return n&&(a+=" and "+e+" lt datetime'"+$p.dateFormat(n,$p.dateFormat.masks.isoDateTime)+"'"),a},this.to_data=function(e,t){var n,a,r,o,i,s,l={},c=t.metadata().fields,d=t.metadata().tabular_sections;t instanceof RefDataManager?(e.hasOwnProperty("DeletionMark")&&(l.deleted=e.DeletionMark),e.hasOwnProperty("DataVersion")&&(l.data_version=e.DataVersion),e.hasOwnProperty("Ref_Key")&&(l.ref=e.Ref_Key)):c=[]._mixin(t.metadata().dimensions)._mixin(t.metadata().resources),t instanceof DocManager?(e.hasOwnProperty("Number")?l.number_doc=e.Number||e.number_doc:e.hasOwnProperty("number_doc")&&(l.number_doc=e.number_doc),e.hasOwnProperty("Date")?l.date=e.Date:e.hasOwnProperty("date")&&(l.date=e.date),e.hasOwnProperty("Posted")?l.posted=e.Posted:e.hasOwnProperty("posted")&&(l.posted=e.posted)):(t.metadata().main_presentation_name&&(e.hasOwnProperty("Description")?l.name=e.Description:e.hasOwnProperty("name")&&(l.name=e.name)),t.metadata().code_length&&(e.hasOwnProperty("Code")?l.id=e.Code:e.hasOwnProperty("id")&&(l.id=e.id)));for(a in c)if(e.hasOwnProperty(a))l[a]=e[a];else{if(i=_md.syns_1с(a),-1==i.indexOf("_Key")&&c[a].type.is_ref&&e[i+"_Key"]&&(i+="_Key"),!e.hasOwnProperty(i))continue;l[a]=e[i]}for(n in d)s="extra_fields"==n||e.hasOwnProperty(n)?n:_md.syns_1с(n),e.hasOwnProperty(s)&&(l[n]=[],e[s]&&(e[s].sort(function(e,t){return(e.LineNumber||e.row)>(t.LineNumber||t.row)}),e[s].forEach(function(e){o={};for(r in d[n].fields)i=e.hasOwnProperty(r)||"extra_fields"==n&&("property"==r||"value"==r)?r:_md.syns_1с(r),-1==i.indexOf("_Key")&&d[n].fields[r].type.is_ref&&e[i+"_Key"]&&(i+="_Key"),o[r]=e[i];l[n].push(o)})));return l},this.ajax_to_data=function(e,t){return $p.ajax.get_ex(e.url,e).then(function(e){return JSON.parse(e.response)}).then(function(e){var n=[];return e.value.forEach(function(e){n.push(_rest.to_data(e,t))}),n})},this.build_select=function(e,t){function n(e,a){"function"==typeof a?o+=a(t,e):(i=_md.syns_1с(e),s=_md.get(t.class_name,e),s&&(s=s.type,s.is_ref&&-1==i.indexOf("_Key")&&s.types.length&&-1==s.types[0].indexOf("enm.")&&(i+="_Key"),s.types.length&&(-1!=["boolean","number"].indexOf(typeof a)?o+=i+" eq "+a:s.is_ref&&"object"!=typeof a||a instanceof DataObj?o+=i+" eq guid'"+a+"'":"string"==typeof a?o+=i+" eq '"+a+"'":"object"==typeof a&&(a.hasOwnProperty("like")?o+=i+" like '%"+a.like+"%'":a.hasOwnProperty("not")?o+=" not ("+n(e,a.not)+") ":a.hasOwnProperty("in")&&(o+=i+" in ("+(s.is_ref?a["in"].map(function(e){return"guid'"+e+"'"}).join(","):a["in"].join(","))+") ")))))}function a(e){for(var t in e)if(o?o+=" and ":o="&$filter=","or"==t&&Array.isArray(e[t])){var a=!0;e[t].forEach(function(e){a?(o+=" ( ",a=!1):o+=" or ";var t=Object.keys(e)[0];n(t,e[t])}),o+=" ) "}else n(t,e[t])}var r,o,i,s,l="";e||(e={}),e.fields&&(e.fields.forEach(function(e){"ref"==e?i="Ref_Key":(i=_md.syns_1с(e),s=_md.get(t.class_name,e).type,s.is_ref&&-1==i.indexOf("_Key")&&s.types.length&&-1==s.types[0].indexOf("enm.")&&(i+="_Key")),r?r+=",":r="&$select=",r+=i}),l+=r),e.selection&&("function"==typeof e.selection||(Array.isArray(e.selection)?e.selection.forEach(a):a(e.selection)),o&&(l+=o)),$p.job_prm.rest&&-1==t.rest_name.indexOf("Module_")&&-1==t.rest_name.indexOf("DataProcessor_")&&-1==t.rest_name.indexOf("Report_")&&-1==l.indexOf(" like ")&&-1==l.indexOf(" in ")&&!t.metadata().irest?$p.ajax.default_attr(e,$p.job_prm.rest_url()):$p.ajax.default_attr(e,$p.job_prm.irest_url()),e.url+=t.rest_name+"?allowedOnly=true&$format=json&$top="+(e.top||300)+l},this.load_array=function(e,t){return _rest.build_select(e,t),_rest.ajax_to_data(e,t)},this.load_obj=function(e){var t={};return $p.ajax.default_attr(t,!e._metadata.irest&&$p.job_prm.rest?$p.job_prm.rest_url():$p.job_prm.irest_url()),t.url+=e._manager.rest_name+"(guid'"+e.ref+"')?$format=json",$p.ajax.get_ex(t.url,t).then(function(e){return JSON.parse(e.response)}).then(function(t){return e._mixin(_rest.to_data(t,e._manager))._set_loaded(),e})["catch"](function(t){return 404==t.status?e:void $p.record_log(t)})},this.save_irest=function(e,t){var n=JSON.stringify(e),a=(void 0!=t.post?",post="+t.post:"")+(void 0!=t.operational?",operational="+t.operational:"");return $p.ajax.default_attr(t,$p.job_prm.irest_url()),t.url+=e._manager.rest_name+"(guid'"+e.ref+"'"+a+")",$p.ajax.post_ex(t.url,n,t).then(function(e){return JSON.parse(e.response)}).then(function(t){return e._mixin(t)})},this.save_rest=function(e,t){var n,a=e.to_atom();return $p.ajax.default_attr(t,$p.job_prm.rest_url()),n=t.url+e._manager.rest_name,t.url=n+"(guid'"+e.ref+"')?$format=json&$select=Ref_Key,DeletionMark",$p.ajax.get_ex(t.url,t)["catch"](function(e){return 404==e.status?{response:JSON.stringify({is_new:!0})}:Promise.reject(e)}).then(function(e){return JSON.parse(e.response)}).then(function(r){return r.is_new?$p.ajax.post_ex(n,a,t):$p.ajax.patch_ex(n+"(guid'"+e.ref+"')",a,t)}).then(function(t){var n=xmlToJSON.parseString(t.response,{mergeCDATA:!1,grokAttr:!0,grokText:!1,normalize:!0,xmlns:!1,namespaceKey:"_ns",textKey:"_text",valueKey:"_value",attrKey:"_attr",cdataKey:"_cdata",attrsAsObject:!1,stripAttrPrefix:!0,stripElemPrefix:!0,childrenAsArray:!1});if(n.entry&&n.entry.content&&n.entry.updated){var a,r=n.entry.content.properties,o={};o.lc_changed=new Date(n.entry.updated._text);for(var i in r)if(0!=i.indexOf("_"))if(a=r[i].element)if(o[i]=[],Array.isArray(a))for(var s in a){o[i][s]={};for(var l in a[s])0!=l.indexOf("_")&&(o[i][s][l]="false"===a[s][l]._text?!1:a[s][l]._text)}else{o[i][0]={};for(var l in a)0!=l.indexOf("_")&&(o[i][0][l]="false"===a[l]._text?!1:a[l]._text)}else o[i]="false"===r[i]._text?!1:r[i]._text;return _rest.to_data(o,e._manager)}}).then(function(t){return e._mixin(t)})}}function wnd_appcache(e){function t(){n.wnd_appcache=e.iface.w.createWindow("wnd_appcache",0,0,490,250);var t=[{type:"block",name:"form_block_1",list:[{type:"label",name:"form_label_1",label:e.msg.sync_script},{type:"block",name:"form_block_2",list:[{type:"template",name:"img_long",className:"img_long"},{type:"newcolumn"},{type:"template",name:"text_processed"},{type:"template",name:"text_current"},{type:"template",name:"text_bottom"}]}]},{type:"button",name:"form_button_1",value:e.msg.sync_break}];n.frm_appcache=n.wnd_appcache.attachForm(t),n.frm_appcache.attachEvent("onButtonClick",function(e){n&&(n.do_break=!0)}),n.wnd_appcache.setText(e.msg.long_operation),n.wnd_appcache.denyResize(),n.wnd_appcache.centerOnScreen(),n.wnd_appcache.button("park").hide(),n.wnd_appcache.button("minmax").hide(),n.wnd_appcache.button("close").hide()}var n,a=e.iface.appcache={};a.create=function(e){n=e,t()},a.update=function(){n.frm_appcache.setItemValue("text_processed","Обработано элементов: "+n.loaded+" из "+n.total)},a.close=function(){n&&n.wnd_appcache&&(n.wnd_appcache.close(),delete n.wnd_appcache)}}function SocketMsg(){function e(e){if(e&&"react"==e.type)try{var t=_md?_md.mgr_by_class_name(e.class_name):null;t&&t.load_array([e.obj],!0)}catch(n){$p.record_log(n)}}var t,n,a,r=0,o=this;o.connect=function(e){if(t||(t=$p.job_prm.parse_url().socket_uid||""),e&&(r=0),r++,$p.job_prm.ws_url&&(!n||!a))try{n=new WebSocket($p.job_prm.ws_url),n.onopen=function(){a=!0,n.send(JSON.stringify({socket_uid:t,zone:$p.wsql.get_user_param("zone"),browser_uid:$p.wsql.get_user_param("browser_uid"),_side:"js",_mirror:!0}))},n.onclose=function(){a=!1,setTimeout(o.connect,3>r?3e4:6e5)},n.onmessage=function(e){var t;try{t=JSON.parse(e.data)}catch(n){t=e.data}$p.eve.callEvent("socket_msg",[t])},n.onerror=$p.record_log}catch(i){setTimeout(o.connect,3>r?3e4:6e5),$p.record_log(i)}},o.send=function(e){n&&a&&(e?"object"!=typeof e&&(e={data:e}):e={},e.socket_uid=t,e._side="js",n.send(JSON.stringify(e)))},$p.eve.attachEvent("socket_msg",e)}var $p=new MetaEngine;"undefined"!=typeof window&&($p.load_script=function(e,t,n){var a=document.createElement(t);"script"==t?(a.type="text/javascript",a.src=e,n?(a.async=!0,a.addEventListener("load",n,!1)):a.async=!1):(a.type="text/css",a.rel="stylesheet",a.href=e),document.head.appendChild(a)}),Object.defineProperty(Object.prototype,"__define",{value:function(e,t){return t?Object.defineProperty(this,e,t):Object.defineProperties(this,e),this},enumerable:!1}),Object.prototype.__define({_extend:{value:function(e){var t=function(){};t.prototype=e.prototype,this.prototype=new t,this.prototype.constructor=this,this.__define("superclass",{value:e.prototype,enumerable:!1})},enumerable:!1},_mixin:{value:function(e,t,n){var a,r,o={};if(t&&t.length)for(a=0;a<t.length;a++)r=t[a],n&&-1!=n.indexOf(r)||("undefined"==typeof o[r]||o[r]!=e[r])&&(this[r]=e[r]);else for(r in e)n&&-1!=n.indexOf(r)||("undefined"==typeof o[r]||o[r]!=e[r])&&(this[r]=e[r]);return this},enumerable:!1},_clone:{value:function(){if(!this||"object"!=typeof this)return this;var e,t,n="function"==typeof this.pop?[]:{};for(e in this)this.hasOwnProperty(e)&&(t=this[e],t?"function"==typeof t||t instanceof DataObj||t instanceof DataManager?n[e]=t:"object"==typeof t?n[e]=t._clone():n[e]=t:n[e]=t);return n},enumerable:!1}}),Object.observe||Object.unobserve||Object.getNotifier||Object.prototype.__define({observe:{value:function(e,t){e._observers||e.__define({_observers:{value:[],enumerable:!1},_notis:{value:[],enumerable:!1}}),e._observers.push(t)},enumerable:!1},unobserve:{value:function(e,t){if(e._observers)for(var n in e._observers)if(e._observers[n]===t){e._observers.splice(n,1);break}},enumerable:!1},getNotifier:{value:function(e){var t;return{notify:function(n){e._observers&&(e._notis.push(n),t||(t=!0,setTimeout(function(){e._observers.forEach(function(t){t(e._notis)}),e._notis.length=0,t=!1},10)))}}},enumerable:!1}}),$p.dateFormat=function(){var e=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,t=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,a=function(e,t){for(e=String(e),t=t||2;e.length<t;)e="0"+e;return e};return function(r,o,i){var s=$p.dateFormat;o||(o=$p.dateFormat.masks.ru),1!=arguments.length||"[object String]"!=Object.prototype.toString.call(r)||/\d/.test(r)||(o=r,r=void 0),r=r?new Date(r):new Date,isNaN(r)&&(r=new Date(0)),o=String(s.masks[o]||o||s.masks["default"]),"UTC:"==o.slice(0,4)&&(o=o.slice(4),i=!0);var l=i?"getUTC":"get",c=r[l+"Date"](),d=r[l+"Day"](),p=r[l+"Month"](),_=r[l+"FullYear"](),u=r[l+"Hours"](),f=r[l+"Minutes"](),m=r[l+"Seconds"](),h=r[l+"Milliseconds"](),g=i?0:r.getTimezoneOffset(),b={d:c,dd:a(c),ddd:s.i18n.dayNames[d],dddd:s.i18n.dayNames[d+7],m:p+1,mm:a(p+1),mmm:s.i18n.monthNames[p],mmmm:s.i18n.monthNames[p+12],yy:String(_).slice(2),yyyy:_,h:u%12||12,hh:a(u%12||12),H:u,HH:a(u),M:f,MM:a(f),s:m,ss:a(m),l:a(h,3),L:a(h>99?Math.round(h/10):h),t:12>u?"a":"p",tt:12>u?"am":"pm",T:12>u?"A":"P",TT:12>u?"AM":"PM",Z:i?"UTC":(String(r).match(t)||[""]).pop().replace(n,""),o:(g>0?"-":"+")+a(100*Math.floor(Math.abs(g)/60)+Math.abs(g)%60,4),S:["th","st","nd","rd"][c%10>3?0:(c%100-c%10!=10)*c%10]};return o.replace(e,function(e){return e in b?b[e]:e.slice(1,e.length-1)})}}(),$p.dateFormat.masks={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",atom:"yyyy-mm-dd'T'HH:MM:ss'Z'",ru:"dd.mm.yyyy HH:MM",short_ru:"dd.mm.yyyy",date:"dd.mm.yy",date_time:"dd.mm.yy HH:MM"},$p.ajax=new function(){function e(e,t,n,a,r){return new Promise(function(o,i){if("undefined"==typeof window&&a&&a.request)a.request({url:encodeURI(t),headers:{Authorization:a.auth}},function(e,t,n){e?i(e):200!=t.statusCode?i({message:t.statusMessage,description:n,status:t.statusCode}):o({response:n})});else{var s=new XMLHttpRequest;if(window.dhx4&&window.dhx4.isIE&&(t=encodeURI(t)),a){var l,c;"object"==typeof a&&a.username&&a.hasOwnProperty("password")?(l=a.username,c=a.password):$p.ajax.username&&$p.ajax.authorized?(l=$p.ajax.username,c=$p.ajax.password):(l=$p.wsql.get_user_param("user_name"),c=$p.wsql.get_user_param("user_pwd"),!l&&$p.job_prm&&$p.job_prm.guest_name&&(l=$p.job_prm.guest_name,c=$p.job_prm.guest_pwd)),s.open(e,t,!0,l,c),s.withCredentials=!0,s.setRequestHeader("Authorization","Basic "+btoa(unescape(encodeURIComponent(l+":"+c))))}else s.open(e,t,!0);r&&r.call(this,s),"GET"!=e?this.hide_headers||a.hide_headers||(s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.setRequestHeader("X-Requested-With","XMLHttpRequest")):n=null,s.onload=function(){200==s.status&&(s.response instanceof Blob||"<!DOCTYPE"!==s.response.substr(0,9))?(void 0==s.responseURL&&(s.responseURL=t),o(s)):i(s.response?{message:s.statusText,description:s.response,status:s.status}:Error(s.statusText))},s.onerror=function(){i(Error("Network Error"))},s.send(n)}})}this.username="",this.password="",this.authorized=!1,this.get=function(t){return e.call(this,"GET",t)},this.post=function(t,n){return 1==arguments.length?n="":2==arguments.length&&"function"==typeof n?(onLoad=n,n=""):n=String(n),e.call(this,"POST",t,n)},this.get_ex=function(t,n,a){return e.call(this,"GET",t,null,n,a)},this.post_ex=function(t,n,a,r){return e.call(this,"POST",t,n,a,r)},this.put_ex=function(t,n,a,r){return e.call(this,"PUT",t,n,a,r)},this.patch_ex=function(t,n,a,r){return e.call(this,"PATCH",t,n,a,r)},this.delete_ex=function(t,n,a){return e.call(this,"DELETE",t,null,n,a)},this.get_and_show_blob=function(e,t,n){function a(t){return e=window.URL.createObjectURL(t.response),r=window.open(e,"wnd_print",o),r.onload=function(t){window.URL.revokeObjectURL(e)},r}var r,o="menubar=no,toolbar=no,location=no,status=no,directories=no,resizable=yes,scrollbars=yes";return!n||"string"==typeof n&&-1!=n.toLowerCase().indexOf("post")?this.post_ex(e,"object"==typeof t?JSON.stringify(t):t,!0,function(e){e.responseType="blob"}).then(a):this.get_ex(e,!0,function(e){e.responseType="blob"}).then(a)},this.get_and_save_blob=function(e,t,n){return this.post_ex(e,"object"==typeof t?JSON.stringify(t):t,!0,function(e){ e.responseType="blob"}).then(function(e){saveAs(e.response,n)})},this.default_attr=function(e,t){e.url||(e.url=t),e.username||(e.username=this.username),e.password||(e.password=this.password),e.hide_headers=!0,$p.job_prm["1c"]&&(e.auth=$p.job_prm["1c"].auth,e.request=$p.job_prm["1c"].request)}},$p.m={point_pos:function(e,t,n,a,r,o){return Math.abs(n-r)<.2?(e-n)*(a-o):Math.abs(a-o)<.2?(t-a)*(r-n):(t-a)*(r-n)-(o-a)*(e-n)},arc_cntr:function(e,t,n,a,r,o){var i,s,l,c,d,p,_,u,f;if(o){var m=e,h=t;e=n,t=a,n=m,a=h}return e!=n?(i=(e*e-n*n-a*a+t*t)/(2*(e-n)),s=(a-t)/(e-n),l=s*s+1,c=-2*((e-i)*s+t),d=(e-i)*(e-i)-r*r+t*t,p=(-c+Math.sqrt(c*c-4*l*d))/(2*l),_=i+s*p,u=(-c-Math.sqrt(c*c-4*l*d))/(2*l),f=i+s*u):(i=(t*t-a*a-n*n+e*e)/(2*(t-a)),s=(n-e)/(t-a),l=s*s+1,c=-2*((t-i)*s+e),d=(t-i)*(t-i)-r*r+e*e,_=(-c-Math.sqrt(c*c-4*l*d))/(2*l),p=i+s*_,f=(-c+Math.sqrt(c*c-4*l*d))/(2*l),u=i+s*f),$p.m.point_pos(_,p,e,t,n,a)>0?{x:_,y:p}:{x:f,y:u}},arc_point:function(e,t,n,a,r,o,i){var s={x:(e+n)/2,y:(t+a)/2};if(r>0){var l,c,d,p=e-n,_=t-a,u=r*r-(p*p+_*_)/4;u>=0&&(d=$p.m.arc_cntr(e,t,n,a,r,o),p=d.x-s.x,_=s.y-d.y,l=Math.sqrt(p*p+_*_),c=i?r+Math.sqrt(u):r-Math.sqrt(u),s.x+=p*c/l,s.y+=_*c/l)}return s}},$p.blank=new function(){this.date=new Date("0001-01-01"),this.guid="00000000-0000-0000-0000-000000000000",this.by_type=function(e){var t;return t=e.is_ref?$p.blank.guid:e.date_part?$p.blank.date:e.digits?0:e.types&&"boolean"==e.types[0]?!1:""}},$p.is_guid=function(e){return"string"!=typeof e||e.length<36?!1:(e.length>36&&(e=e.substr(0,36)),/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(e))},$p.is_empty_guid=function(e){return!e||e===$p.blank.guid},$p.generate_guid=function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:7&n|8).toString(16)})},$p.fix_guid=function(e,t){if(e&&"string"==typeof e);else{if(e instanceof DataObj)return e.ref;if(e&&"object"==typeof e)if(e.presentation){if(e.ref)return e.ref;if(e.name)return e.name}else e="object"==typeof e.ref&&e.ref.hasOwnProperty("ref")?e.ref.ref:e.ref}return $p.is_guid(e)||t===!1?e:t?$p.generate_guid():$p.blank.guid},$p.fix_number=function(e,t){var n=parseFloat(e);return isNaN(n)?t?0:e:n},$p.fix_boolean=function(e){return"string"==typeof e?!(!e||"false"==e.toLowerCase()):!!e},$p.fix_date=function(e,t){var n=/(^\d{1,4}[\.|\\/|-]\d{1,2}[\.|\\/|-]\d{1,4})(\s*(?:0?[1-9]:[0-5]|1(?=[012])\d:[0-5])\d\s*[ap]m)?$/;if(e instanceof Date)return e;if(e&&"string"==typeof e&&n.test(e.substr(0,10))){var a,r,o=e.split(" "),i=o[0].split(".");if(1==i.length&&(i=o[0].split("/"),1==i.length&&(i=o[0].split("-"))),3==i.length&&4==i[2].length){r=i[2]+"-"+i[1]+"-"+i[0];for(var s=1;s<o.length;s++)r+=" "+o[s];a=new Date(r)}else a=new Date(e);if(a&&a.getFullYear()>0)return a}return t?$p.blank.date:e},$p.date_add_day=function(e,t){var n=new Date;return n.setDate(e.getDate()+t),n},$p.cancel_bubble=function(e){var t=e||event;return t&&t.stopPropagation&&t.stopPropagation(),t&&!t.cancelBubble&&(t.cancelBubble=!0),!1},$p.msg=new Messages,$p.iface=new InterfaceObjs,$p.Modifiers=Modifiers,$p.eve="undefined"!=typeof window&&window.dhx4?dhx4:{},$p.eve.__define({onload:{value:new Modifiers,enumerable:!1,configurable:!1},hash_route:{value:new Modifiers,enumerable:!1,configurable:!1}}),$p.__define("modifiers",{value:new Modifiers,enumerable:!1,configurable:!1}),$p.JobPrm=JobPrm,$p.wsql=new WSQL;var msg=$p.msg;$p.dateFormat.i18n={dayNames:["Вс","Пн","Вт","Ср","Чт","Пт","Сб","Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],monthNames:["Янв","Фев","Maр","Aпр","Maй","Июн","Июл","Aвг","Сен","Окт","Ноя","Дек","Январь","Февраль","Март","Апрель","Maй","Июнь","Июль","Август","Сентябрь","Oктябрь","Ноябрь","Декабрь"]},"undefined"!=typeof window&&window.dhx4&&(dhx4.dateFormat.ru="%d.%m.%Y",dhx4.dateLang="ru",dhx4.dateStrings={ru:{monthFullName:["Январь","Февраль","Март","Апрель","Maй","Июнь","Июль","Август","Сентябрь","Oктябрь","Ноябрь","Декабрь"],monthShortName:["Янв","Фев","Maр","Aпр","Maй","Июн","Июл","Aвг","Сен","Окт","Ноя","Дек"],dayFullName:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],dayShortName:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"]}}),$p.msg.russian_names=function(){$p.job_prm.russian_names&&(window.__define({"Метаданные":{get:function(){return _md},enumerable:!1},"Справочники":{get:function(){return _cat},enumerable:!1},"Документы":{get:function(){return _doc},enumerable:!1},"РегистрыСведений":{get:function(){return _ireg},enumerable:!1},"РегистрыНакопления":{get:function(){return _areg},enumerable:!1},"РегистрыБухгалтерии":{get:function(){return _aссreg},enumerable:!1},"Обработки":{get:function(){return _dp},enumerable:!1},"Отчеты":{get:function(){return _rep},enumerable:!1},"ОбластьКонтента":{get:function(){return $p.iface.docs},enumerable:!1},"Сообщить":{get:function(){return $p.msg.show_msg},enumerable:!1},"Истина":{value:!0,enumerable:!1},"Ложь":{value:!1,enumerable:!1}}),DataManager.prototype.__define({"ФормаВыбора":{get:function(){return this.form_selection},enumerable:!1},"ФормаОбъекта":{get:function(){return this.form_obj},enumerable:!1},"Найти":{get:function(){return this.find},enumerable:!1},"НайтиСтроки":{get:function(){return this.find_rows},enumerable:!1},"НайтиПоНаименованию":{get:function(){return this.by_name},enumerable:!1}}),DataObj.prototype.__define({"ФормаОбъекта":{get:function(){return this.form_obj},enumerable:!1}}))},$p.fias=function(){},function(e){e.toString=function(){return"Коды адресного классификатора"},e.types=["владение","здание","помещение"],e[1010]={name:"дом",type:1,order:1,fid:2,syn:[" д."," д "," дом"]},e[1020]={name:"владение",type:1,order:2,fid:1,syn:[" вл."," вл "," влад."," влад "," владен."," владен "," владение"]},e[1030]={name:"домовладение",type:1,order:3,fid:3},e[1050]={name:"корпус",type:2,order:1,syn:[" к."," к "," корп."," корп ","корпус"]},e[1060]={name:"строение",type:2,order:2,fid:1,syn:[" стр."," стр "," строен."," строен ","строение"]},e[1080]={name:"литера",type:2,order:3,fid:3,syn:[" л."," л "," лит."," лит ","литера"]},e[1070]={name:"сооружение",type:2,order:4,fid:2,syn:[" соор."," соор "," сооруж."," сооруж ","сооружение"]},e[1040]={name:"участок",type:2,order:5,syn:[" уч."," уч ","участок"]},e[2010]={name:"квартира",type:3,order:1,syn:["кв.","кв ","кварт.","кварт ","квартира","-"]},e[2030]={name:"офис",type:3,order:2,syn:["оф.","оф ","офис","-"]},e[2040]={name:"бокс",type:3,order:3},e[2020]={name:"помещение",type:3,order:4},e[2050]={name:"комната",type:3,order:5,syn:["комн.","комн ","комната"]},e[101e5]={name:"Почтовый индекс"},e[102e5]={name:"Адресная точка"},e[103e5]={name:"Садовое товарищество"},e[104e5]={name:"Элемент улично-дорожной сети, планировочной структуры дополнительного адресного элемента"},e[105e5]={name:"Промышленная зона"},e[106e5]={name:"Гаражно-строительный кооператив"},e[107e5]={name:"Территория"}}($p.fias),msg.store_url_od="https://chrome.google.com/webstore/detail/hcncallbdlondnoadgjomnhifopfaage",msg.align_node_right="Уравнять вертикально вправо",msg.align_node_bottom="Уравнять горизонтально вниз",msg.align_node_top="Уравнять горизонтально вверх",msg.align_node_left="Уравнять вертикально влево",msg.align_set_right="Установить размер сдвигом вправо",msg.align_set_bottom="Установить размер сдвигом вниз",msg.align_set_top="Установить размер сдвигом вверх",msg.align_set_left="Установить размер сдвигом влево",msg.align_invalid_direction="Неприменимо для элемента с данной ориентацией",msg.argument_is_not_ref="Аргумент не является ссылкой",msg.addr_title="Ввод адреса",msg.cache_update_title="Обновление кеша браузера",msg.cache_update="Выполняется загрузка измененных файлов<br/>и их кеширование в хранилище браузера",msg.delivery_area_empty="Укажите район доставки",msg.empty_login_password="Не указаны имя пользователя или пароль",msg.empty_response="Пустой ответ сервера",msg.empty_geocoding="Пустой ответ геокодера. Вероятно, отслеживание адреса запрещено в настройках браузера",msg.error_auth="Авторизация пользователя не выполнена",msg.error_critical="Критическая ошибка",msg.error_metadata="Ошибка загрузки метаданных конфигурации",msg.error_network="Ошибка сети или сервера - запрос отклонен",msg.error_rights="Ограничение доступа",msg.file_size="Запрещена загрузка файлов<br/>размером более ",msg.file_confirm_delete="Подтвердите удаление файла ",msg.file_new_date="Файлы на сервере обновлены<br /> Рекомендуется закрыть браузер и войти<br />повторно для применения обновления",msg.file_new_date_title="Версия файлов",msg.init_catalogues="Загрузка справочников с сервера",msg.init_catalogues_meta=": Метаданные объектов",msg.init_catalogues_tables=": Реструктуризация таблиц",msg.init_catalogues_nom=": Базовые типы + номенклатура",msg.init_catalogues_sys=": Технологические справочники",msg.init_login="Укажите имя пользователя и пароль",msg.requery="Повторите попытку через 1-2 минуты",msg.limit_query="Превышено число обращений к серверу<br/>Запросов за минуту:%1<br/>Лимит запросов:%2<br/>"+msg.requery,msg.long_operation="Длительная операция",msg.main_title="Окнософт: заказ дилера ",msg.meta_cat="Справочники",msg.meta_doc="Документы",msg.meta_cch="Планы видов характеристик",msg.meta_cacc="Планы счетов",msg.meta_tsk="Задачи",msg.meta_ireg="Регистры сведений",msg.meta_areg="Регистры накопления",msg.meta_mgr="Менеджер",msg.meta_cat_mgr="Менеджер справочников",msg.meta_doc_mgr="Менеджер документов",msg.meta_enn_mgr="Менеджер перечислений",msg.meta_ireg_mgr="Менеджер регистров сведений",msg.meta_areg_mgr="Менеджер регистров накопления",msg.meta_accreg_mgr="Менеджер регистров бухгалтерии",msg.meta_dp_mgr="Менеджер обработок",msg.meta_task_mgr="Менеджер задач",msg.meta_bp_mgr="Менеджер бизнес-процессов",msg.meta_reports_mgr="Менеджер отчетов",msg.meta_charts_of_accounts_mgr="Менеджер планов счетов",msg.meta_charts_of_characteristic_mgr="Менеджер планов видов характеристик",msg.meta_extender="Модификаторы объектов и менеджеров",msg.no_metadata="Не найдены метаданные объекта '%1'",msg.no_selected_row="Не выбрана строка табличной части '%1'",msg.no_dhtmlx="Библиотека dhtmlx не загружена",msg.not_implemented="Не реализовано в текущей версии",msg.offline_request="Запрос к серверу в автономном режиме",msg.onbeforeunload="Окнософт: легкий клиент. Закрыть программу?",msg.order_sent_title="Подтвердите отправку заказа",msg.order_sent_message="Отправленный заказ нельзя изменить.<br/>После проверки менеджером<br/>он будет запущен в работу",msg.request_title="Окнософт: Запрос регистрации",msg.request_message="Заявка зарегистрирована. После обработки менеджером будет сформировано ответное письмо",msg.select_from_list="Выбор из списка",msg.select_grp="Укажите группу, а не элемент",msg.select_elm="Укажите элемент, а не группу",msg.select_file_import="Укажите файл для импорта",msg.srv_overload="Сервер перегружен",msg.sub_row_change_disabled="Текущая строка подчинена продукции.<br/>Строку нельзя изменить-удалить в документе<br/>только через построитель",msg.sync_script="Обновление скриптов приложения:",msg.sync_data="Синхронизация с сервером выполняется:<br />* при первом старте программы<br /> * при обновлении метаданных<br /> * при изменении цен или технологических справочников",msg.sync_break="Прервать синхронизацию",msg.sync_no_data="Файл не содержит подходящих элементов для загрузки",msg.unsupported_browser_title="Браузер не поддерживается",msg.unsupported_browser="Несовместимая версия браузера<br/>Рекомендуется Google Chrome",msg.supported_browsers="Рекомендуется Chrome, Safari или Opera",msg.unsupported_mode_title="Режим не поддерживается",msg.unsupported_mode="Программа не установлена<br/> в <a href='"+msg.store_url_od+"'>приложениях Google Chrome</a>",msg.unknown_error="Неизвестная ошибка в функции '%1'",msg.value="Значение",msg.bld_constructor="Конструктор объектов графического построителя",msg.bld_title="Графический построитель",msg.bld_empty_param="Не заполнен обязательный параметр <br />",msg.bld_not_product="В текущей строке нет изделия построителя",msg.bld_not_draw="Отсутствует эскиз или не указана система профилей",msg.bld_wnd_title="Построитель изделия № ",msg.bld_from_blocks_title="Выбор типового блока",msg.bld_from_blocks="Текущее изделие будет заменено конфигурацией типового блока. Продолжить?",msg.bld_split_imp="В параметрах продукции<br />'%1'<br />запрещены незамкнутые контуры<br />Для включения деления импостом,<br />установите это свойство в 'Истина'";var eXcell_proto=new eXcell;eXcell_proto.input_keydown=function(e,t){function n(e){t.source.on_select&&t.source.on_select.call(t.source,e)}if(8===e.keyCode||46===e.keyCode)t.setValue(""),t.grid.editStop(),t.source.on_select&&t.source.on_select.call(t.source,"");else if(9===e.keyCode||13===e.keyCode)t.grid.editStop();else if(115===e.keyCode)t.cell.firstChild.childNodes[1].onclick(e);else if(113===e.keyCode)if(t.source.tabular_section){if(t.mgr=_md.value_mgr(t.source.row,t.source.col,t.source.row._metadata.fields[t.source.col].type),t.mgr){var a=t.source.row[t.source.col];t.mgr.form_obj(t.source.wnd,{o:a,on_select:n})}}else if(1==t.fpath.length&&(t.mgr=_md.value_mgr(t.source.o._obj,t.fpath[0],t.source.o._metadata.fields[t.fpath[0]].type),t.mgr)){var a=t.source.o[t.fpath[0]];t.mgr.form_obj(t.source.wnd,{o:a,on_select:n})}return $p.cancel_bubble(e)},eXcell_ocombo.prototype=eXcell_proto,window.eXcell_ocombo=eXcell_ocombo,window.eXcell_ref=eXcell_ocombo,window.eXcell_refc=eXcell_ocombo,eXcell_pwd.prototype=eXcell_proto,window.eXcell_pwd=eXcell_pwd,dhtmlXCalendarObject.prototype._dateToStr=function(e,t){return e instanceof Date&&e.getFullYear()<1e3?"":window.dhx4.date2str(e,t||this._dateFormat,this._dateStrings())},eXcell_dhxCalendar.prototype.edit=function(){var e=this.grid.getPosition(this.cell);this.grid._grid_calendarA._show(!1,!1),this.grid._grid_calendarA.setPosition(e[0],e[1]+this.cell.offsetHeight),this.grid._grid_calendarA._last_operation_calendar=!1,this.grid.callEvent("onCalendarShow",[this.grid._grid_calendarA,this.cell.parentNode.idd,this.cell._cellIndex]),this.cell._cediton=!0,this.val=this.cell.val,this.val instanceof Date&&this.val.getFullYear()<1e3&&(this.val=new Date),this._val=this.cell.innerHTML;var t=this.grid._grid_calendarA.draw;this.grid._grid_calendarA.draw=function(){},this.grid._grid_calendarA.setDateFormat(this.grid._dtmask||"%d.%m.%Y"),this.grid._grid_calendarA.setDate(this.val||new Date),this.grid._grid_calendarA.draw=t},function(){function e(e,t,n,a){if(-1!=n.indexOf("odata/standard.odata")||-1!=n.indexOf("/hs/rest")){var r,o;$p.ajax.authorized?(r=$p.ajax.username,o=$p.ajax.password):$p.job_prm.guest_name?(r=$p.job_prm.guest_name,o=$p.job_prm.guest_pwd):(r=$p.wsql.get_user_param("user_name"),o=$p.wsql.get_user_param("user_pwd")),e.open(t,n,a,r,o),e.withCredentials=!0,e.setRequestHeader("Authorization","Basic "+btoa(unescape(encodeURIComponent(r+":"+o))))}else e.open(t,n,a)}dhx4.ajax._call=function(t,n,a,r,o,i,s){var l=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),c=null!=navigator.userAgent.match(/AppleWebKit/)&&null!=navigator.userAgent.match(/Qt/)&&null!=navigator.userAgent.match(/Safari/);if(1==r&&(l.onreadystatechange=function(){if(4==l.readyState||1==c&&3==l.readyState){if((200!=l.status||""==l.responseText)&&!dhx4.callEvent("onAjaxError",[{xmlDoc:l,filePath:n,async:r}]))return;window.setTimeout(function(){"function"==typeof o&&o.apply(window,[{xmlDoc:l,filePath:n,async:r}]),null!=i&&("undefined"!=typeof i.postData?dhx4.ajax.postLong(i.url,i.postData,o):dhx4.ajax.getLong(i.url,o)),o=null,l=null},1)}}),"GET"==t&&(n+=this._dhxr(n)),l.open(t,n,r),e(l,t,n,r),null!=s)for(var d in s)l.setRequestHeader(d,s[d]);else"POST"==t||"PUT"==t||"DELETE"==t?l.setRequestHeader("Content-Type","application/x-www-form-urlencoded"):"GET"==t&&(a=null);return l.setRequestHeader("X-Requested-With","XMLHttpRequest"),l.send(a),1!=r&&(4==l.readyState||1==c&&3==l.readyState)&&(200!=l.status||""==l.responseText)&&dhx4.callEvent("onAjaxError",[{xmlDoc:l,filePath:n,async:r}]),{xmlDoc:l,filePath:n,async:r}},dhtmlx.ajax.prototype.send=function(t,n,a){var r=this.getXHR();if("function"==typeof a&&(a=[a]),"object"==typeof n){var o=[];for(var i in n){var s=n[i];(null===s||s===dhtmlx.undefined)&&(s=""),o.push(i+"="+encodeURIComponent(s))}n=o.join("&")}n&&!this.post&&(t=t+(-1!=t.indexOf("?")?"&":"?")+n,n=null),e(r,this.post?"POST":"GET",t,!this._sync),this.post&&r.setRequestHeader("Content-type","application/x-www-form-urlencoded");var l=this;return r.onreadystatechange=function(){if(!r.readyState||4==r.readyState){if(a&&l)for(var e=0;e<a.length;e++)a[e]&&a[e].call(l.master||l,r.responseText,r.responseXML,r);l.master=null,a=l=null}},r.send(n||null),r}}(),$p.iface.data_to_grid=function(e,t){function n(e){var t;return t=e.is_folder?"cell_ref_folder":"cell_ref_elm",e.deleted&&(t+="_deleted"),t}function a(e,t){return"svg"==t?$p.iface.normalize_xml(e[t]):e[t]instanceof Date?e[t].getHours()||e.date.getMinutes()?$p.dateFormat(e[t],$p.dateFormat.masks.date_time):$p.dateFormat(e[t],$p.dateFormat.masks.date):e[t]||""}if(this.data_to_grid)return this.data_to_grid(e,t);var r="<?xml version='1.0' encoding='UTF-8'?><rows total_count='%1' pos='%2' set_parent='%3'>".replace("%1",e.length).replace("%2",t.start).replace("%3",t.set_parent||""),o=this.caption_flds(t);return r+=o.head,e.forEach(function(e){r+='<row id="'+e.ref+'"><cell class="'+n(e)+'">'+a(e,[o.acols[0].id])+"</cell>";for(var t=1;t<o.acols.length;t++)r+="<cell>"+a(e,[o.acols[t].id])+"</cell>";r+="</row>"}),r+"</rows>"},$p.iface.data_to_tree=function(e){function t(e,a){n=n+'<item text="'+e.presentation.replace(/"/g,"'")+'" id="'+e.ref+'" im0="'+dhtmlx.image_cache("tree","folderClosed")+'">',$p._find_rows(a,{parent:e.ref},function(e){t(e,a)}),n+="</item>"}var n="<?xml version='1.0' encoding='UTF-8'?><tree id=\"0\">";return t({presentation:"...",ref:$p.blank.guid},[]),$p._find_rows(e,{parent:$p.blank.guid},function(n){t(n,e)}),n+"</tree>"},$p.iface.ODropdownList=ODropdownList,OCombo._extend(dhtmlXCombo),$p.iface.OCombo=OCombo,$p.iface.select_from_list=function(e,t){return new Promise(function(n,a){function r(e){"cancel"!=e&&(o=c.getSelectedRowId()),l.close()}Array.isArray(e)&&e.length?1==e.length&&n(e[0]):n(void 0);var o,i,s={name:"wnd_select_from_list",wnd:{id:"wnd_select_from_list",width:300,height:300,modal:!0,center:!0,caption:$p.msg.select_from_list,allow_close:!0,on_close:function(){return o&&n(e[parseInt(o)-1]),!0}}},l=$p.iface.dat_blank(null,s.wnd),c=l.attachGrid(),d=l.attachToolbar({items:[{id:"select",type:"button",text:$p.msg.select_from_list},{id:"cancel",type:"button",text:"Отмена"}],onClick:r});c.setIconsPath(dhtmlx.image_path),c.setImagePath(dhtmlx.image_path),c.setHeader($p.msg.value),c.setColTypes("ro"),c.enableAutoWidth(!0,1200,600),c.attachEvent("onRowDblClicked",r),c.enableMultiselect(!!t),c.setNoHeader(!0),c.init(),d.addSpacer("select"),l.hideHeader(),l.cell.offsetParent.querySelector(".dhxwin_brd").style.border="none",e.forEach(function(e,t){var n;n="object"==typeof e?e.presentation||e.text||e.toString():e.toString(),c.addRow(1+t,n),e.selected&&(i=1+t)}),i&&c.selectRowById(i)})},dhtmlXCellObject.prototype.attachHeadFields=function(e){function t(e){if(a)_.entBox&&!_.entBox.parentElement?setTimeout(_.destructor):e.forEach(function(e){"unload"==e.type?p&&p.close?p.close():_.destructor():_.forEachRow(function(t){t==e.name&&_.cells(t,1).setValue(a[e.name])})});else{var r=[];e.forEach(function(e){-1==r.indexOf[e.object]&&(r.push(e.object),Object.unobserve(e.object,t),c&&c instanceof TabularSection&&Object.unobserve(e.object,n))}),r=null}}function n(t){var n;t.forEach(function(t){n||l!=t.tabular||(n=!0,_.clearAll(),_.parse(i.get_property_grid_xml(r,a,{title:e.ts_title,ts:l,selection:s,meta:o}),function(){},"xml"))})}var a,r,o,i,s,l,c,d,p=this,_=this.attachGrid(),u=_.destructor;return new dhtmlXPropertyGrid(_),_.setInitWidthsP("40,60"),_.setDateFormat("%d.%m.%Y %H:%i"),_.init(),_.setSizes(),_.attachEvent("onPropertyChanged",function(e,t,n){return e?d.on_select(t):void 0}),_.attachEvent("onCheckbox",function(e,t,n){return void 0!=a[e]?d.on_select(n,{obj:a,field:e}):void 0}),e.read_only&&_.setEditable(!1),_.get_cell_field=function(){if(a){var e={row_id:_.getSelectedRowId()},t=e.row_id.split("|");if(t.length<2)return{obj:a,field:t[0]}._mixin(d);var n=a[t[0]].find(t[1]);return n?(e.obj=n,n["Значение"]?(e.field="Значение",e.property=n.Свойство||n.Параметр):(e.field="value",e.property=n.property||n.param),e._mixin(d)):void 0}},_.destructor=function(){a&&Object.unobserve(a,t),c&&c instanceof TabularSection&&Object.unobserve(c,n),a=null,c=null,o=null,i=null,d=null,u.call(_)},_.__define("selection",{get:function(){return s},set:function(e){s=e,n([{tabular:l}])},enumerable:!1}),_.attach=function(e){a&&Object.unobserve(a,t),c&&c instanceof TabularSection&&Object.unobserve(a,n),e.oxml&&(r=e.oxml),e.selection&&(s=e.selection),a=e.obj,o=e.meta||a._metadata.fields,i=a._manager,l=e.ts||"",c=l?a[l]:a.extra_fields||a["ДополнительныеРеквизиты"],c&&!l&&(l=a.extra_fields?"extra_fields":"ДополнительныеРеквизиты"),d={on_select:function(e,t){if(t||(t=_.get_cell_field()),t){var n=i.handle_event(a,"value_change",{field:t.field,value:e,tabular_section:t.row_id?l:"",grid:_,cell:_.cells(t.row_id||t.field,1),wnd:d.pwnd});return"boolean"!=typeof n&&(t.obj[t.field]=e,n=!0),n}},pwnd:e.pwnd||p},Object.observe(a,t,["update","unload"]),c&&c instanceof TabularSection&&Object.observe(a,n,["row"]),l&&!e.ts_title&&(e.ts_title=a._metadata.tabular_sections[l].synonym),n([{tabular:l}])},e&&_.attach(e),_},dhtmlXGridObject.prototype.get_cell_value=function(){var e=this.get_cell_field();return e&&e.obj?e.obj[e.field]:void 0},dhtmlXCellObject.prototype.attachTabular=function(e){function t(e){var t=m.getSelectedRowId();return t&&!isNaN(Number(t))?Number(t)-1:void(e||$p.msg.show_msg({type:"alert-warning",text:$p.msg.no_selected_row.replace("%1",s._metadata.tabular_sections[l].synonym||l),title:(s._metadata.obj_presentation||s._metadata.synonym)+": "+s.presentation}))}function n(){var e=c.add();setTimeout(function(){m.selectRowById(e.row)},100)}function a(){var e=t();void 0!=e&&c.del(e)}function r(e,t,n,a,r){if(2!=e||a==r)return!0;var o=m.get_cell_field(),i=d.handle_event(s,"value_change",{field:o.field,value:a,tabular_section:l,grid:m,row:o.obj,cell:t&&n?m.cells(t,n):m.cells(),wnd:b.pwnd});return"boolean"!=typeof i&&(o.obj[o.field]=a,i=!0),i}function o(e){var t;e.forEach(function(e){t||l!=e.tabular||(t=!0,c.sync_grid(m,f))})}function i(e){if(e.length>4)try{c.sync_grid(m,f)}catch(t){}else e.forEach(function(e){if(l==e.tabular)if(m.getSelectedRowId()!=e.row.row)c.sync_grid(m,f);else{var t=m.cells(e.row.row,m.getColIndexById(e.name));t.setCValue($p.is_data_obj(e.row[e.name])?e.row[e.name].presentation:e.row[e.name])}})}var s=e.obj,l=e.ts,c=s[l],d=s._manager,p=e.meta||d.metadata().tabular_sections[l].fields,_=this,u={},f=e.selection;if(_md.ts_captions(d.class_name,l,u)){var m=this.attachGrid(),h=this.attachToolbar(),g=m.destructor,b={on_select:function(e){r(2,null,null,e)},pwnd:e.pwnd||_,is_tabular:!0};return m.setDateFormat("%d.%m.%Y %H:%i"),h.setIconsPath(dhtmlx.image_path+"dhxtoolbar"+dhtmlx.skin_suffix()),h.loadStruct(e.toolbar_struct||$p.injected_data["toolbar_add_del.xml"],function(){this.attachEvent("onclick",function(e){"btn_add"==e?n():"btn_delete"==e&&a()})}),m.setIconsPath(dhtmlx.image_path),m.setImagePath(dhtmlx.image_path),m.setHeader(u.headers),u.min_widths&&m.setInitWidths(u.widths),u.min_widths&&m.setColumnMinWidth(u.min_widths),u.aligns&&m.setColAlign(u.aligns),m.setColSorting(u.sortings),m.setColTypes(u.types),m.setColumnIds(u.fields.join(",")),m.enableAutoWidth(!0,1200,600),m.enableEditTabOnly(!0),m.init(),e.read_only&&(m.setEditable(!1),h.disableItem("btn_add"),h.disableItem("btn_delete")),m.attachEvent("onEditCell",r),m.get_cell_field=function(){var e,n,a=t(!0),r=m.getSelectedCellIndex();return c&&void 0!=a&&r>=0?(e=c.get(a),n=m.getColumnId(r),{obj:e,field:n}._mixin(b)):void 0},m.destructor=function(){s&&(Object.unobserve(s,i),Object.unobserve(s,o)),s=null,c=null,p=null,d=null,b=null,_.detachToolbar(),g.call(m)},m.__define("selection",{get:function(){return f},set:function(e){f=e,o([{tabular:l}])},enumerable:!1}),o([{tabular:l}]),Object.observe(s,i,["row"]),Object.observe(s,o,["rows"]),m}},$p.iface.Toolbar_filter=function(e){function t(){i&&(clearTimeout(i),i=0),e.onchange.call(r,r.get_filter())}function n(){i&&clearTimeout(i),i=setTimeout(function(){i&&t()},600)}function a(e,t){"min"==t?r.сalendar.setSensitiveRange(e.value,null):r.сalendar.setSensitiveRange(null,e.value)}var r=this,o=350,i=0;e.pos||(e.pos=6),(e.manager instanceof DocManager||e.period)&&(o=180,e.toolbar.addText("lbl_date_from",e.pos,"Период с:"),e.pos++,e.toolbar.addInput("input_date_from",e.pos,"",72),e.pos++,e.toolbar.addText("lbl_date_till",e.pos,"по:"),e.pos++,e.toolbar.addInput("input_date_till",e.pos,"",72),e.pos++,r.input_date_from=e.toolbar.getInput("input_date_from"),r.input_date_from.setAttribute("readOnly","true"),r.input_date_from.onclick=function(){a(r.input_date_till,"max")},r.input_date_till=e.toolbar.getInput("input_date_till"),r.input_date_till.setAttribute("readOnly","true"),r.input_date_till.onclick=function(){a(r.input_date_from,"min")},r.сalendar=new dhtmlXCalendarObject([r.input_date_from,r.input_date_till]),r.сalendar.attachEvent("onclick",t),e.date_from||(e.date_from=new Date((new Date).getFullYear().toFixed()+"-01-01")),e.date_till||(e.date_till=$p.date_add_day(new Date,1)),r.input_date_from.value=$p.dateFormat(e.date_from,$p.dateFormat.masks.short_ru),r.input_date_till.value=$p.dateFormat(e.date_till,$p.dateFormat.masks.short_ru)),e.hide_filter?r.input_date_till?e.toolbar.addSpacer("input_date_till"):e.toolbar.getItemText("btn_delete")&&e.toolbar.addSpacer("btn_delete"):(e.toolbar.addText("lbl_filter",e.pos,"Фильтр"),e.pos++,e.toolbar.addInput("input_filter",e.pos,"",o),r.input_filter=e.toolbar.getInput("input_filter"),r.input_filter.onchange=t,r.input_filter.onkeydown=n,r.input_filter.type="search",e.toolbar.addSpacer("input_filter")),r.get_filter=function(){return{date_from:r.input_date_from?dhx4.str2date(r.input_date_from.value):"",date_till:r.input_date_till?dhx4.str2date(r.input_date_till.value):"",filter:r.input_filter?r.input_filter.value:""}}},dhtmlXCellObject.prototype.attachDynTree=function(e,t,n){this.setCollapsedText&&this.setCollapsedText("Дерево"),t||(t={is_folder:!0});var a=this.attachTree();return a.setImagePath(dhtmlx.image_path+"dhxtree"+dhtmlx.skin_suffix()),a.setIconsPath(dhtmlx.image_path+"dhxtree"+dhtmlx.skin_suffix()),"desktop"==$p.device_type&&a.enableKeyboardNavigation(!0),a.__define({filter:{get:function(){},set:function(e){t=e},enumerable:!1,configurable:!1}}),setTimeout(function(){$p.cat.load_soap_to_grid({action:"get_tree",class_name:e.class_name,filter:t},a,n)}),a},$p.iface.dat_blank=function(e,t){t||(t={});var n,a=!1,r=t.id||"wnd_dat_"+dhx4.newId();return n=(e||$p.iface.w).createWindow({id:r,left:t.left||900,top:t.top||20,width:t.width||220,height:t.height||300,move:!0,park:!t.allow_close,center:!!t.center,resize:!0,caption:t.caption||"Tools"}),e=null,t.allow_minmax||n.button("minmax").hide(),t.allow_close?n.button("park").hide():n.button("close").hide(),"function"==typeof t.on_close&&n.attachEvent("onClose",t.on_close),n.setIconCss("without_icon"),n.cell.parentNode.children[1].classList.add("dat_gui"),$p.iface.bind_help(n,t.help_path),n.elmnts={grids:{}},n.__define("modified",{get:function(){return a},set:function(e){a=e;var t=n.getText();a&&t.lastIndexOf("*")!=t.length-1?n.setText(t+" *"):a||t.lastIndexOf("*")!=t.length-1||n.setText(t.replace(" *",""))},enumerable:!1,configurable:!1}),n.wnd_options=function(e){var t=n.getPosition(),a=n.getDimension(),r=n.isParked();e.left=t[0],e.top=t[1],e.width=a[0],e.parked=r,r||(e.height=a[1])},n.bottom_toolbar=function(e){var t={wrapper:n.cell,width:"100%",height:"28px",bottom:"0px",left:"0px",name:"tb_bottom",buttons:[{name:"btn_cancel",text:"Отмена",title:"Закрыть без сохранения",width:"60px","float":"right"},{name:"btn_ok",b:"Ок",title:"Применить изменения",width:"30px","float":"right"}],onclick:function(e){return!1}}._mixin(e),a=new OTooolBar(t),r=n.attachStatusBar({height:12});return r.style.zIndex=-1e3,r.firstChild.style.backgroundColor="transparent",r.firstChild.style.border="none",a},t.modal&&(t.pwnd&&t.pwnd.setModal&&t.pwnd.setModal(0),n.setModal(1)),n},$p.iface.dat_tree=function(e,t){var n=$p.iface.dat_blank(e,t),a=document.createElement("div"),r=document.createElement("div"),o=document.createElement("div");return e=null,n.setMinDimension(250,300),n.attachObject(a),a.appendChild(r),a.appendChild(o),n.cell_a=r,n.tree=new dhtmlXTreeObject(o,"100%","100%",0),n.tree.setImagePath(dhtmlx.image_path+"dhxtree"+dhtmlx.skin_suffix()),n.tree.setIconsPath(dhtmlx.image_path+"dhxtree"+dhtmlx.skin_suffix()),n.tree.enableCheckBoxes(!0,!0),n.tree.enableTreeImages(!1),n},$p.iface.dat_pgrid=function(e,t){var n=$p.iface.dat_blank(e,t);e=null,n.setMinDimension(320,300);var a=n.elmnts.pgrid=n.attachPropertyGrid();return a.setDateFormat("%d.%m.%Y %H:%i"),a.init(),t.grid_struct&&a.parse(t.o._manager.get_property_grid_xml(t.grid_struct,t.v),function(){a.enableAutoHeight(!1),a.setSizes(),a.setUserData("","source",{o:t.v,grid:a,on_select:$p.iface.pgrid_on_select,slist:t.grid_slist,grid_on_change:t.grid_on_change,wnd:n}),a.attachEvent("onPropertyChanged",$p.iface.pgrid_on_change),a.attachEvent("onCheckbox",$p.iface.pgrid_on_checkbox)},"xml"),n},$p.iface.pgrid_on_select=function(e){if(void 0!==e){var t=this.grid instanceof dhtmlXGridObject?this.grid:this,n=t.getUserData("","source"),a=t.getSelectedRowId();if(void 0!=n.o[a])"number"==typeof n.o[a]?n.o[a]=$p.fix_number(e,!0):n.o[a]=e;else if(a.indexOf("fprms")>-1){var r=$p._find(n.o.fprms,a.split("|")[1]);r.value=e}t.cells().setValue($p.is_data_obj(e)?e.presentation:e||""),n.wnd&&(n.wnd.modified=!0),n.grid_on_change&&n.grid_on_change.call(t,a,e)}},$p.iface.pgrid_on_change=function(e,t,n){e&&$p.iface.pgrid_on_select.call(this,t)},$p.iface.pgrid_on_checkbox=function(e,t,n){var a=this.grid instanceof dhtmlXGridObject?this.grid:this,r=a.getUserData("","source");void 0!=r.o[e]&&(r.o[e]=n),r.wnd&&(r.wnd.modified=!0),r.grid_on_change&&r.grid_on_change(e,n)},$p.iface.layout_2u=function(e){var t=$p.iface;return t.main=new dhtmlXLayoutObject({parent:document.body,pattern:"2U"}),t.main.attachEvent("onCollapse",function(e){return"b"==e?(t.docs.expand(),!1):void 0}),t.docs=t.main.cells("b"),_clear_all(),t.cell_tree=t.main.cells("a"),t.cell_tree.setText("Режим"),t.cell_tree.setWidth("190"),t.cell_tree.fixSize(!1,!1),t.cell_tree.collapse(),t.tree=t.cell_tree.attachTree(),t.tree.setImagePath(dhtmlx.image_path+"dhxtree"+dhtmlx.skin_suffix()),t.tree.setIconsPath(dhtmlx.image_path+"dhxtree"+dhtmlx.skin_suffix()),e?(t.tree.attachEvent("onSelect",e.onselect),new Promise(function(n,a){t.tree.loadXML(e.path+"?v="+$p.job_prm.files_date,function(){this.tree_filteres=e.path,n(this)})})):(t.tree.attachEvent("onSelect",function(e){var n=e.split(".");if(n.length>1&&"oper"==t.swith_view(n[0])){var a=$p.md.mgr_by_class_name(e.substr(5));"function"==typeof t.docs.close&&t.docs.close(),a&&a.form_list(t.docs,{})}}),Promise.resolve(t.tree))},$p.iface.layout_1c=function(){var e=$p.iface;return new Promise(function(t,n){try{e.main=new dhtmlXLayoutObject({parent:document.body,pattern:"1C",offsets:{top:4,right:4,bottom:4,left:4}}),e.docs=e.main.cells("a"),_clear_all(),t(!0)}catch(a){n(a)}})},$p.iface.frm_auth=function(e,t,n){function a(a,r,o){$p.ajax.username=a,$p.ajax.password=r,a?(o||$p.wsql.set_user_param("user_name",a),$p.is_guid($p.wsql.get_user_param("browser_uid"))||$p.wsql.set_user_param("browser_uid",$p.generate_guid()),$p.eve.log_in(e.onstep).then(function(){t&&t(),$p.eve.logged_in=!0,dhx4.callEvent("log_in")})["catch"](function(e){i=!0,n&&n(e)}).then(function(){$p.iface.sync&&$p.iface.sync.close(), s&&(s.progressOff(),!i&&e.hide_header&&s.hideHeader()),$p.iface.cell_tree&&!i&&$p.iface.cell_tree.expand()})):this.validate()}function r(e){this.resetValidateCss(),"guest"==this.getCheckedValue("type")?(a.call(this,this.getItemValue("guest"),"",!0),$p.wsql.set_user_param("user_name","")):"auth"==this.getCheckedValue("type")&&a.call(this,this.getItemValue("login"),this.getItemValue("password"))}e||(e={});var o,i,s=e.cell||$p.iface.docs,l=$p.iface.auth=s.attachForm();e.onstep||(e.onstep=function(e){var t=$p.eve.stepper;switch(e){case $p.eve.steps.authorization:t.frm_sync.setItemValue("text_processed","Авторизация");break;case $p.eve.steps.load_meta:s.progressOn(),$p.msg.show_msg($p.msg.init_catalogues+$p.msg.init_catalogues_meta,s),$p.iface.sync||$p.iface.wnd_sync(),$p.iface.sync.create(t);break;case $p.eve.steps.create_managers:t.frm_sync.setItemValue("text_processed","Обработка метаданных"),t.frm_sync.setItemValue("text_bottom","Создаём объекты менеджеров данных...");break;case $p.eve.steps.process_access:break;case $p.eve.steps.load_data_files:t.frm_sync.setItemValue("text_processed","Загрузка начального образа"),t.frm_sync.setItemValue("text_bottom","Читаем файлы данных зоны...");break;case $p.eve.steps.load_data_db:t.frm_sync.setItemValue("text_processed","Загрузка изменений из 1С"),t.frm_sync.setItemValue("text_bottom","Читаем изменённые справочники");break;case $p.eve.steps.load_data_wsql:break;case $p.eve.steps.save_data_wsql:t.frm_sync.setItemValue("text_processed","Кеширование данных"),t.frm_sync.setItemValue("text_bottom","Сохраняем таблицы в локальном SQL...")}}),$p.job_prm.files_date||$p.eve.update_files_version(),l.loadStruct($p.injected_data["form_auth.xml"],function(){$p.wsql.get_user_param("user_name")&&(l.setItemValue("login",$p.wsql.get_user_param("user_name")),l.setItemValue("type","auth"),$p.wsql.get_user_param("enable_save_pwd")&&$p.wsql.get_user_param("user_pwd")&&(l.setItemValue("password",$p.wsql.get_user_param("user_pwd")),$p.wsql.get_user_param("autologin")&&r())),(o=((s.getWidth?s.getWidth():s.cell.offsetWidth)-500)/2)>=10?l.cont.style.paddingLeft=o.toFixed()+"px":l.cont.style.paddingLeft="20px",setTimeout(function(){dhx4.callEvent("on_draw_auth",[l])})}),l.attachEvent("onButtonClick",r),l.attachEvent("onKeyDown",function(e,t,n,a){13==t.keyCode&&("password"==n||"guest"==this.getCheckedValue("type"))&&r.call(this)}),$p.msg.show_msg($p.msg.init_login,s),l.onerror=function(e){$p.ajax.authorized=!1;var t=e.message.toLowerCase();-1!=t.indexOf("auth")?($p.msg.show_msg({title:$p.msg.main_title+$p.version,type:"alert-error",text:$p.msg.error_auth}),l.setItemValue("password",""),l.validate()):(-1!=t.indexOf("gateway")||-1!=t.indexOf("net"))&&$p.msg.show_msg({title:$p.msg.main_title+$p.version,type:"alert-error",text:$p.msg.error_network})}},$p.iface.open_settings=function(e){var t=e||("undefined"!=typeof event?event:void 0);t&&t.preventDefault();var n=$p.job_prm.parse_url();return $p.iface.set_hash(n.obj,n.ref,n.frm,"settings"),$p.cancel_bubble(t)},$p.iface.swith_view=function(e){var t,n=$p.iface,a=function(e){function t(e,t){return e.text>t.text?1:e.text<t.text?-1:void 0}if(n.tree){if(n.tree._view!=e&&-1==["rep","cal"].indexOf(e)){if(n.tree.deleteChildItems(0),"oper"==e){var a,r,o={id:0,item:[{id:"oper_cat",text:$p.msg.meta_cat,open:!0,item:[]},{id:"oper_doc",text:$p.msg.meta_doc,item:[]},{id:"oper_cch",text:$p.msg.meta_cch,item:[]},{id:"oper_cacc",text:$p.msg.meta_cacc,item:[]},{id:"oper_tsk",text:$p.msg.meta_tsk,item:[]}]},i=o.item[0].item;for(a in _cat)"function"!=typeof _cat[a]&&(r=_cat[a].metadata(),r.hide||i.push({id:"oper.cat."+a,text:r.synonym||r.name,tooltip:r.illustration||r.list_presentation}));i.sort(t),i=o.item[1].item;for(a in _doc)"function"!=typeof _doc[a]&&(r=_doc[a].metadata(),r.hide||i.push({id:"oper.doc."+a,text:r.synonym||r.name,tooltip:r.illustration||r.list_presentation}));i.sort(t),i=o.item[2].item;for(a in _cch)"function"!=typeof _cch[a]&&(r=_cch[a].metadata(),r.hide||i.push({id:"oper.cch."+a,text:r.synonym||r.name,tooltip:r.illustration||r.list_presentation}));i.sort(t),i=o.item[3].item;for(a in _cacc)"function"!=typeof _cacc[a]&&(r=_cacc[a].metadata(),r.hide||i.push({id:"oper.cacc."+a,text:r.synonym||r.name,tooltip:r.illustration||r.list_presentation}));i.sort(t),i=o.item[4].item;for(a in _tsk)"function"!=typeof _tsk[a]&&(r=_tsk[a].metadata(),r.hide||i.push({id:"oper.tsk."+a,text:r.synonym||r.name,tooltip:r.illustration||r.list_presentation}));i.sort(t),n.tree.parse(o,function(){var e=$p.job_prm.parse_url();e.obj&&n.tree.selectItem(e.view+"."+e.obj,!0)},"json")}else n.tree.loadXML(n.tree.tree_filteres+"?v="+$p.job_prm.files_date,function(){});n.tree._view=e}}else{var s=$p.job_prm.parse_url();if(s.obj){var l=s.obj.split(".");if(l.length>1){var c=$p.md.mgr_by_class_name(s.obj);"function"==typeof n.docs.close&&n.docs.close(),c&&c.form_list(n.docs,{})}}}};return 0==e.indexOf(n.docs.getViewName())?n.docs.getViewName():(t=n.docs.showView(e),1==t&&("cal"!=e||window.dhtmlXScheduler||($p.load_script("dist/dhtmlxscheduler.min.js","script",function(){scheduler.config.first_hour=8,scheduler.config.last_hour=22,n.docs.scheduler=n.docs.attachScheduler(new Date("2015-11-20"),"week","scheduler_here"),n.docs.scheduler.attachEvent("onBeforeViewChange",function(e,t,n,a){return"timeline"==n?($p.msg.show_not_implemented(),!1):!0})}),$p.load_script("dist/dhtmlxscheduler.css","link"))),a(e),void("def"==e?n.main.showStatusBar():n.main.hideStatusBar()))},$p.iface.OTooolBar=OTooolBar,$p.iface.add_button=function(e,t,n){var a=document.createElement("div"),r="";return a.name=(t?t.name+"_":"")+n.name,e.appendChild(a),a.className="md_otooolbar_button",n.img&&(r='<img src="'+(t?t.image_path:"")+n.img+'">'),n.b?r+='<b style="vertical-align: super;"> '+n.b+"</b>":n.text?r+='<span style="vertical-align: super;"> '+n.text+"</span>":n.css&&a.classList.add(n.css),a.innerHTML=r,n["float"]&&(a.style["float"]=n["float"]),n.clear&&(a.style.clear=n.clear),n.width&&(a.style.width=n.width),a},"undefined"!=typeof window&&"dhtmlx"in window&&(eXcell_addr.prototype=eXcell_proto,window.eXcell_addr=eXcell_addr),$p.is_data_obj=function(e){return e&&e instanceof DataObj},$p.fetch_type=function(e,t){var n=e;return t.is_ref?n=$p.fix_guid(e):t.date_part?n=$p.fix_date(e,!0):t.digits?n=$p.fix_number(e,!0):"boolean"==t.types[0]&&(n=$p.fix_boolean(e)),n},$p.is_equal=function(e,t){return e==t?!0:typeof e==typeof t?!1:$p.fix_guid(e,!1)==$p.fix_guid(t,!1)},$p._find=function(e,t){var n,a,r;if("object"!=typeof t)for(a in e){n=e[a];for(var o in n)if("function"!=typeof n[o]&&$p.is_equal(n[o],t))return n}else for(a in e){n=e[a],r=!0;for(var o in t)if("function"!=typeof n[o]&&!$p.is_equal(n[o],t[o])){r=!1;break}if(r)return n}},$p._find_rows=function(e,t,n){var a,r,o,i,s,l=[],c=0;t&&(t._top?(s=t._top,delete t._top):s=300);for(o in e){if(r=e[o],a=!0,t)if("function"==typeof t)a=t(r);else for(i in t)if("_"!=i.substr(0,1))if("function"==typeof t[i]){if(a=t[i](r,i),!a)break}else if("or"==i&&Array.isArray(t[i])){if(a=t[i].some(function(e){var t=Object.keys(e)[0];return e[t].hasOwnProperty("like")?-1!=r[t].toLowerCase().indexOf(e[t].like.toLowerCase()):$p.is_equal(r[t],e[t])}),!a)break}else if(t[i].hasOwnProperty("like")){if(-1==r[i].toLowerCase().indexOf(t[i].like.toLowerCase())){a=!1;break}}else if(t[i].hasOwnProperty("not")){if($p.is_equal(r[i],t[i].not)){a=!1;break}}else if(t[i].hasOwnProperty("in")){if(a=t[i]["in"].some(function(e){return $p.is_equal(e,r[i])}),!a)break}else if(!$p.is_equal(r[i],t[i])){a=!1;break}if(a){if(n){if(n.call(this,r)===!1)break}else l.push(r);if(s&&(c++,c>=s))break}}return l};var _cat=$p.cat=new function(){this.toString=function(){return $p.msg.meta_cat_mgr}},_enm=$p.enm=new function(){this.toString=function(){return $p.msg.meta_enn_mgr}},_doc=$p.doc=new function(){this.toString=function(){return $p.msg.meta_doc_mgr}},_ireg=$p.ireg=new function(){this.toString=function(){return $p.msg.meta_ireg_mgr}},_areg=$p.areg=new function(){this.toString=function(){return $p.msg.meta_areg_mgr}},_aссreg=$p.aссreg=new function(){this.toString=function(){return $p.msg.meta_accreg_mgr}},_dp=$p.dp=new function(){this.toString=function(){return $p.msg.meta_dp_mgr}},_rep=$p.rep=new function(){this.toString=function(){return $p.msg.meta_reports_mgr}},_cacc=$p.cacc=new function(){this.toString=function(){return $p.msg.meta_charts_of_accounts_mgr}},_cch=$p.cch=new function(){this.toString=function(){return $p.msg.meta_charts_of_characteristic_mgr}},_tsk=$p.tsk=new function(){this.toString=function(){return $p.msg.meta_task_mgr}},_bp=$p.bp=new function(){this.toString=function(){return $p.msg.meta_bp_mgr}},_md;$p.Meta=Meta,Meta._patch=function(e,t){for(var n in t)"object"==typeof t[n]&&e[n]?Meta._patch(e[n],t[n]):e[n]=t[n]},Meta.init_meta=function(e){return new Promise(function(t,n){function a(e){if(!$p.job_prm.data_url)return $p.wsql.idx_save({ref:"meta"},e,"meta").then(function(){return $p.wsql.idx_save({ref:"meta_patch"},e,"meta")}).then(function(){new Meta({},{})});var a,r,o=[$p.ajax.get($p.job_prm.data_url+"meta.json?v="+$p.job_prm.files_date),$p.ajax.get($p.job_prm.data_url+"meta_patch.json?v="+$p.job_prm.files_date)];$p.eve.reduce_promices(o,function(e){e instanceof XMLHttpRequest&&200==e.status?-1!=e.responseURL.indexOf("meta.json")?a=JSON.parse(e.response):-1!=e.responseURL.indexOf("meta_patch.json")&&(r=JSON.parse(e.response)):$p.record_log(e)}).then(function(){a?(a.ref="meta",$p.wsql.idx_save(a,e,"meta").then(function(){r.ref="meta_patch",$p.wsql.idx_save(r,e,"meta")}).then(function(){t(new Meta(a,r))})):n(new Error("Ошибка чтения файла метаданных"))})}$p.injected_data["meta.json"]?t(new Meta($p.injected_data["meta.json"],$p.injected_data["meta_patch.json"])):$p.injected_data["meta_patch.json"]?t(new Meta($p.injected_data["meta_patch.json"])):$p.wsql.idx_connect(null,"meta").then(function(n){var r;$p.wsql.idx_get("meta",n,"meta").then(function(o){o&&!e?(r=o,$p.wsql.idx_get("meta_patch",n,"meta").then(function(e){t(new Meta(r,e))})):$p.job_prm.files_date?a(n):$p.eve.update_files_version().then(function(){a(n)})})})})},Meta.init_static=function(e){return new Promise(function(e,t){$p.wsql.idx_connect(null,"static").then(function(e){$p.wsql.idx_get("p0",e,"static").then(function(e){})})})},$p.record_log=function(e){$p.ireg&&$p.ireg.$log?$p.ireg.$log.record(e):console.log(e)},_cat.load_soap_to_grid=function(e,t,n){function a(e){"{"==e.substr(0,1)&&(e=JSON.parse(e)),"string"==typeof e?t.parse(e,function(){n&&n(e)},"xml"):n&&n(e)}t.xmlFileUrl="exec";var r=_md.mgr_by_class_name(e.class_name);r.cachable&&!e.rest||!$p.job_prm.rest&&!$p.job_prm.irest_enabled?_load(e).then(a)["catch"]($p.record_log):r.rest_selection(e).then(a)["catch"]($p.record_log)},DataManager.prototype.__define("family_name",{get:function(){return $p.msg["meta_"+this.class_name.split(".")[0]+"_mgr"].replace($p.msg.meta_mgr+" ","")},enumerable:!1}),DataManager.prototype.register_ex=function(){},DataManager.prototype.sync_grid=function(e,t){var n;this.cachable||($p.job_prm.rest||$p.job_prm.irest_enabled||t.rest)&&("get_tree"==t.action?n=this.rest_tree():"get_selection"==t.action&&(n=this.rest_selection()))},DataManager.prototype.get_option_list=function(e,t){function n(t){return $p.is_equal(t.value,e)&&(t.selected=!0),t}var a,r,o,i=this,s=[];if(t.presentation&&(a=i.metadata().input_by_string)&&(r=t.presentation.like,delete t.presentation,t.or=[],a.forEach(function(e){o={},o[e]={like:r},t.or.push(o)})),i.cachable||t&&t._local)return i.find_rows(t,function(e){s.push(n({text:e.presentation,value:e.ref}))}),Promise.resolve(s);var l={selection:t,top:t._top},c=i instanceof DocManager||i instanceof BusinessProcessManager;return delete t._top,c?l.fields=["ref","date","number_doc"]:i.metadata().main_presentation_name?l.fields=["ref","name"]:l.fields=["ref","id"],_rest.load_array(l,i).then(function(e){return e.forEach(function(e){s.push(n({text:c?e.number_doc+" от "+$p.dateFormat(e.date,$p.dateFormat.masks.ru):e.name||e.id,value:e.ref}))}),s})},DataManager.prototype.tabular_captions=function(e,t){},DataManager.prototype.get_property_grid_xml=function(e,t,n){var a,r,o,i,s,l,c,d=this,p="<rows>",_=function(){if(!e)if(o=d.metadata(),o.form&&o.form.obj&&o.form.obj.head)e=o.form.obj.head;else{if(e={" ":[]},t instanceof CatObj?(o.code_length&&e[" "].push("id"),o.main_presentation_name&&e[" "].push("name")):t instanceof DocObj&&(e[" "].push("number_doc"),e[" "].push("date")),!t.is_folder)for(a in o.fields)o.fields[a].hide||e[" "].push(a);o.tabular_sections.extra_fields&&(e["Дополнительные реквизиты"]=[])}},u=function(e,t){l=$p.is_data_obj(e)?e.presentation:e,t.type.is_ref||(t.type.date_part?l=$p.dateFormat(l,""):"boolean"==t.type.types[0]&&(l=l?"1":"0"))},f=function(e){s=_md.control_by_type(o.type),u(e,o)},m=function(e,a){if(a){var r=e.property||e.param||e["Параметр"],_=void 0!=e.value?e.value:e["Значение"];r.empty()?(c=a+"|empty",s="ro",l="",o={synonym:"?"}):(o={synonym:r.presentation,type:r.type},c=a+"|"+r.ref,f(_),"edn"==s&&(s="calck"),r.mandatory&&(s+='" class="cell_mandatory'))}else if("object"==typeof e)o={synonym:e.synonym},c=e.id,s=e.type,l="",e.hasOwnProperty("txt")?l=e.txt:void 0!==(i=t[c])&&u(i,_md.get(d.class_name,c));else if(n&&n.meta&&void 0!==(o=n.meta[e]))c=e,f(i=t[e]);else{if(void 0===(i=t[e]))return;o=_md.get(d.class_name,c=e),f(i)}p+='<row id="'+c+'"><cell>'+(o.synonym||o.name)+'</cell><cell type="'+s+'">'+l+"</cell></row>"};_();for(a in e){" "!=a&&(p+='<row open="1"><cell>'+a+"</cell>");for(r in e[a])m(e[a][r]);if(n&&a==n.title&&t[n.ts]){t[n.ts].find_rows(n.selection,function(e){m(e,n.ts)})}" "!=a&&(p+="</row>")}return p+="</rows>"},DataManager.prototype.__define("table_name",{get:function(){return this.class_name.replace(".","_")},enumerable:!1}),DataManager.prototype.print=function(e,t,n){function a(e){n&&n.progressOff&&n.progressOff(),e&&e.focus()}n&&n.progressOn&&n.progressOn();var r={};$p.ajax.default_attr(r,$p.job_prm.irest_url()),r.url+=this.rest_name+"(guid'"+$p.fix_guid(e)+"')/Print(model="+t+", browser_uid="+$p.wsql.get_user_param("browser_uid")+")",$p.ajax.get_and_show_blob(r.url,r,"get").then(a)["catch"]($p.record_log),setTimeout(a,3e3)},DataManager.prototype.printing_plates=function(){var e={},t=this;return $p.job_prm.offline?Promise.resolve({}):(t.metadata().printing_plates&&(t._printing_plates=t.metadata().printing_plates),t._printing_plates?Promise.resolve(t._printing_plates):($p.ajax.default_attr(e,$p.job_prm.irest_url()),e.url+=t.rest_name+"/Print()",$p.ajax.get_ex(e.url,e).then(function(e){return t.__define("_printing_plates",{value:JSON.parse(e.response),enumerable:!1}),t._printing_plates})["catch"](function(){}).then(function(e){return e||(t._printing_plates={})})))},RefDataManager._extend(DataManager),RefDataManager.prototype.get_sql_struct=function(e){function t(){function t(){var e=[],t="_t_.ref, _t_.`deleted`";return s.form&&s.form.selection?s.form.selection.fields.forEach(function(t){e.push(t)}):i instanceof DocManager?(e.push("posted"),e.push("date"),e.push("number_doc")):(s.hierarchical&&s.group_hierarchy?e.push("is_folder"):e.push("0 as is_folder"),i instanceof ChartOfAccountManager?(e.push("id"),e.push("name as presentation")):s.main_presentation_name?e.push("name as presentation"):s.code_length?e.push("id as presentation"):e.push("'...' as presentation"),s.has_owners&&e.push("owner"),s.code_length&&e.push("id")),e.forEach(function(e){t+=-1!=e.indexOf(" as ")?", "+e:_md.sql_mask(e,!0)}),t}function n(){var e,t="";if(s.form&&s.form.selection)for(var n in s.form.selection.fields)-1!=s.form.selection.fields[n].indexOf(" as ")&&-1==s.form.selection.fields[n].indexOf("_t_.")&&(e=s.form.selection.fields[n].split(" as "),e[0]=e[0].split("."),e[0].length>1&&(t&&(t+="\n"),t+="left outer join "+e[0][0]+" on "+e[0][0]+".ref = _t_."+e[1]));return t}function a(){var t;return t=i instanceof ChartOfAccountManager?" WHERE ("+(_?0:1):s.hierarchical?s.has_owners?" WHERE ("+(c||_?1:0)+" OR _t_.parent = '"+d+"') AND ("+(l==$p.blank.guid?1:0)+" OR _t_.owner = '"+l+"') AND ("+(_?0:1):" WHERE ("+(c||_?1:0)+" OR _t_.parent = '"+d+"') AND ("+(_?0:1):s.has_owners?" WHERE ("+(l==$p.blank.guid?1:0)+" OR _t_.owner = '"+l+"') AND ("+(_?0:1):" WHERE ("+(_?0:1),i.sql_selection_where_flds?t+=i.sql_selection_where_flds(_):i instanceof DocManager?t+=" OR _t_.number_doc LIKE '"+_+"'":((s.main_presentation_name||i instanceof ChartOfAccountManager)&&(t+=" OR _t_.name LIKE '"+_+"'"),s.code_length&&(t+=" OR _t_.id LIKE '"+_+"'")),t+=") AND (_t_.ref != '"+$p.blank.guid+"')",e.selection&&("function"==typeof e.selection||e.selection.forEach(function(e){for(var n in e)"function"==typeof e[n]?t+="\n AND "+e[n](i,n)+" ":s.fields.hasOwnProperty(n)?t+=e[n]===!0?"\n AND _t_."+n+" ":e[n]===!1?"\n AND (not _t_."+n+") ":"string"==typeof e[n]||"object"==typeof e[n]?"\n AND (_t_."+n+" = '"+e[n]+"') ":"\n AND (_t_."+n+" = "+e[n]+") ":"is_folder"==n&&s.hierarchical&&s.group_hierarchy})),t}function r(){return i instanceof ChartOfAccountManager?"ORDER BY id":s.hierarchical?s.group_hierarchy?"ORDER BY _t_.is_folder desc, is_initial_value, presentation":"ORDER BY _t_.parent desc, is_initial_value, presentation":"ORDER BY is_initial_value, presentation"}function o(){function t(t){t?(u=e.set_parent=t.parent.ref,d=u,c=!1):(_||c)&&"cat.base_blocks"==i.class_name&&(l==$p.blank.guid&&(l=_cat.bases.predefined("main")),d=i.first_folder(l).ref),_&&-1==_.indexOf("%")&&(_="%"+_+"%")}s.has_owners&&(l=e.owner,e.selection&&"function"!=typeof e.selection&&e.selection.forEach(function(e){e.owner&&(l="object"==typeof e.owner?e.owner.valueOf():e.owner,delete e.owner)}),l||(l=$p.blank.guid)),p!=$p.blank.guid&&c&&s.hierarchical?t(i.get(p,!1)):t()}var l,c=!e.parent,d=e.parent||$p.blank.guid,p=e.initial_value||$p.blank.guid,_=e.filter||"",u=$p.blank.guid;o();var f;return f=i.sql_selection_list_flds?i.sql_selection_list_flds(p):("SELECT %2, case when _t_.ref = '"+p+"' then 0 else 1 end as is_initial_value FROM `"+i.table_name+"` AS _t_ %j %3 %4 LIMIT 300").replace("%2",t()).replace("%j",n()),f.replace("%3",a()).replace("%4",r())}function n(){var t="CREATE TABLE IF NOT EXISTS ";if(e&&e.postgres){t+=i.table_name+" (ref uuid PRIMARY KEY NOT NULL, deleted boolean, lc_changed bigint",i instanceof DocManager?t+=", posted boolean, date timestamp with time zone, number_doc character(11)":(s.code_length&&(t+=", id character("+s.code_length+")"),t+=", name character varying(50), is_folder boolean");for(r in s.fields)r.length>30?s.fields[r].short_name?o=s.fields[r].short_name:(c++,o=r[0]+c+r.substr(r.length-27)):o=r,t+=", "+o+_md.sql_type(i,r,s.fields[r].type,!0)+_md.sql_composite(s.fields,r,o,!0);for(r in s.tabular_sections)t+=", ts_"+r+" JSON"}else{t+="`"+i.table_name+"` (ref CHAR PRIMARY KEY NOT NULL, `deleted` BOOLEAN, lc_changed INT",t+=i instanceof DocManager?", posted boolean, date Date, number_doc CHAR":", id CHAR, name CHAR, is_folder BOOLEAN";for(r in s.fields)t+=_md.sql_mask(r)+_md.sql_type(i,r,s.fields[r].type)+_md.sql_composite(s.fields,r);for(r in s.tabular_sections)t+=", `ts_"+r+"` JSON"}return t+=")"}function a(){var e=["ref","deleted","lc_changed"],t="INSERT INTO `"+i.table_name+"` (ref, `deleted`, lc_changed",n="(?";"cat"==i.class_name.substr(0,3)?(t+=", id, name, is_folder",e.push("id"),e.push("name"),e.push("is_folder")):"doc"==i.class_name.substr(0,3)&&(t+=", posted, date, number_doc",e.push("posted"),e.push("date"),e.push("number_doc"));for(r in s.fields)t+=_md.sql_mask(r),e.push(r);for(r in s.tabular_sections)t+=", `ts_"+r+"`",e.push("ts_"+r);for(t+=") VALUES ",r=1;r<e.length;r++)n+=", ?";return n+=")",t+=n,{sql:t,fields:e,values:n}}var r,o,i=this,s=i.metadata(),l={},c=0,d=e&&e.action?e.action:"create_table";return"create_table"==d?l=n():-1!=["insert","update","replace"].indexOf(d)?l[i.table_name]=a():"select"==d?l="SELECT * FROM `"+i.table_name+"` WHERE ref = ?":"select_all"==d?l="SELECT * FROM `"+i.table_name+"`":"delete"==d?l="DELETE FROM `"+i.table_name+"` WHERE ref = ?":"drop"==d?l="DROP TABLE IF EXISTS `"+i.table_name+"`":"get_tree"==d?l=!e.filter||e.filter.is_folder?"SELECT ref, parent, name as presentation FROM `"+i.table_name+"` WHERE is_folder order by parent, name":"SELECT ref, parent, name as presentation FROM `"+i.table_name+"` order by parent, name":"get_selection"==d&&(l=t()),l},RefDataManager.prototype.caption_flds=function(e){function t(e,t,n,a,r,o){this.id=e,this.width=t,this.type=n,this.align=a,this.sort=r,this.caption=o}var n='<column id="%1" width="%2" type="%3" align="%4" sort="%5">%6</column>',a=[],r=this.metadata(),o="";if(r.form&&r.form.selection?a=r.form.selection.cols:this instanceof DocManager?(a.push(new t("date","120","ro","left","server","Дата")),a.push(new t("number_doc","120","ro","left","server","Номер"))):this instanceof ChartOfAccountManager?(a.push(new t("id","120","ro","left","server","Код")),a.push(new t("presentation","*","ro","left","server","Наименование"))):a.push(new t("presentation","*","ro","left","server","Наименование")),e.get_header&&a.length){o="<head>";for(var i in a)o+=n.replace("%1",a[i].id).replace("%2",a[i].width).replace("%3",a[i].type).replace("%4",a[i].align).replace("%5",a[i].sort).replace("%6",a[i].caption);o+="</head>"}return{head:o,acols:a}},RefDataManager.prototype.load_cached_server_array=function(e,t){var n,a=[],r=this,o=t?{class_name:r.class_name,rest_name:t}:r,i=!t;if(e.forEach(function(e){n=r.get(e.ref||e,!1,!0),(!n||i&&n.is_new())&&a.push(e.ref||e)}),a.length){var s={url:"",selection:{ref:{"in":a}}};return i&&(s.fields=["ref"]),$p.rest.build_select(s,o),$p.ajax.get_ex(s.url,s).then(function(t){var n=JSON.parse(t.response);if(i)n=n.value;else{n=n.data;for(var a in n)!n[a].ref&&n[a].id&&(n[a].ref=n[a].id),n[a].Код&&(n[a].id=n[a].Код,delete n[a].Код),n[a]._not_set_loaded=!0}return r.load_array(n),e})}return Promise.resolve(e)},DataProcessorsManager._extend(DataManager),EnumManager._extend(RefDataManager),EnumManager.prototype.get_sql_struct=function(e){var t="CREATE TABLE IF NOT EXISTS ",n=e&&e.action?e.action:"create_table";return e&&e.postgres?"create_table"==n?t+=this.table_name+" (ref character varying(255) PRIMARY KEY NOT NULL, sequence INT, synonym character varying(255))":-1!=["insert","update","replace"].indexOf(n)?(t={},t[this.table_name]={sql:"INSERT INTO "+this.table_name+" (ref, sequence, synonym) VALUES ($1, $2, $3)",fields:["ref","sequence","synonym"],values:"($1, $2, $3)"}):"delete"==n&&(t="DELETE FROM "+this.table_name+" WHERE ref = $1"):"create_table"==n?t+="`"+this.table_name+"` (ref CHAR PRIMARY KEY NOT NULL, sequence INT, synonym CHAR)":-1!=["insert","update","replace"].indexOf(n)?(t={},t[this.table_name]={sql:"INSERT INTO `"+this.table_name+"` (ref, sequence, synonym) VALUES (?, ?, ?)",fields:["ref","sequence","synonym"],values:"(?, ?, ?)"}):"delete"==n&&(t="DELETE FROM `"+this.table_name+"` WHERE ref = ?"),t},EnumManager.prototype.get_option_list=function(e,t){function n(t){return $p.is_equal(t.value,e)&&(t.selected=!0),t}var a=[],r="";if(t)for(var o in t)"_"!=o.substr(0,1)&&(r=t[o]);return"object"==typeof r&&(r=r.like?r.like:""),r=r.toLowerCase(),this.alatable.forEach(function(e){(!r||e.synonym&&-1!=e.synonym.toLowerCase().indexOf(r))&&a.push(n({text:e.synonym||"",value:e.ref}))}),Promise.resolve(a)},RegisterManager._extend(DataManager),RegisterManager.prototype.get_sql_struct=function(e){function t(){var t="CREATE TABLE IF NOT EXISTS ",n=!0;if(e&&e.postgres){t+=o.table_name+" (",i.splitted&&(t+="zone integer",n=!1);for(r in i.dimensions)n?(t+=r,n=!1):t+=", "+r,t+=_md.sql_type(o,r,i.dimensions[r].type,!0)+_md.sql_composite(i.dimensions,r,"",!0);for(r in i.resources)t+=", "+r+_md.sql_type(o,r,i.resources[r].type,!0)+_md.sql_composite(i.resources,r,"",!0);t+=", PRIMARY KEY (",n=!0,i.splitted&&(t+="zone",n=!1);for(r in i.dimensions)n?(t+=r,n=!1):t+=", "+r}else{t+="`"+o.table_name+"` (";for(r in i.dimensions)n?(t+="`"+r+"`",n=!1):t+=_md.sql_mask(r),t+=_md.sql_type(o,r,i.dimensions[r].type)+_md.sql_composite(i.dimensions,r);for(r in i.resources)t+=_md.sql_mask(r)+_md.sql_type(o,r,i.resources[r].type)+_md.sql_composite(i.resources,r);t+=", PRIMARY KEY (",n=!0;for(r in i.dimensions)n?(t+="`"+r+"`",n=!1):t+=_md.sql_mask(r)}return t+="))"}function n(){var e="INSERT OR REPLACE INTO `"+o.table_name+"` (",t=[],n=!0;for(r in i.dimensions)n?(e+=r,n=!1):e+=", "+r,t.push(r);for(r in i.resources)e+=", "+r,t.push(r);for(e+=") VALUES (?",r=1;r<t.length;r++)e+=", ?";return e+=")",{sql:e,fields:t}}function a(){var t="SELECT * FROM `"+o.table_name+"` WHERE ",n=!0;e._values=[];for(var a in i.dimensions)n?n=!1:t+=" and ",t+="`"+a+"`=?",e._values.push(e[a]);return n&&(t+="1"),t}var r,o=this,i=o.metadata(),s={},l=e&&e.action?e.action:"create_table";return"create_table"==l?s=t():l in{insert:"",update:"",replace:""}?s[o.table_name]=n():"select"==l?s=a():"select_all"==l?s=a():"delete"==l?s="DELETE FROM `"+o.table_name+"` WHERE ref = ?":"drop"==l&&(s="DROP TABLE IF EXISTS `"+o.table_name+"`"),s},RegisterManager.prototype.get_ref=function(e){var t="",n=this.metadata().dimensions;e instanceof RegisterRow&&(e=e._obj);for(var a in n)t+=t?"_":"",t+=n[a].type.is_ref?$p.fix_guid(e[a]):!e[a]&&n[a].type.digits?"0":n[a].date_part?$p.dateFormat(e[a]||$p.blank.date,$p.dateFormat.masks.atom):void 0!=e[a]?String(e[a]):"$";return t},InfoRegManager._extend(RegisterManager),InfoRegManager.prototype.slice_first=function(e){},InfoRegManager.prototype.slice_last=function(e){},LogManager._extend(InfoRegManager),AccumRegManager._extend(RegisterManager),CatManager._extend(RefDataManager),CatManager.prototype.by_name=function(e){var t;return this.find_rows({name:e},function(e){return t=e,!1}),t||(t=this.get()),t},CatManager.prototype.by_id=function(e){var t;return this.find_rows({id:e},function(e){return t=e,!1}),t||(t=this.get()),t},CatManager.prototype.path=function(e){var t,n=[];if(t=e instanceof DataObj?e:this.get(e,!1,!0),t&&n.push({ref:t.ref,presentation:t.presentation}),t&&this.metadata().hierarchical)for(;;){if(t=t.parent,t.empty())break;n.push({ref:t.ref,presentation:t.presentation})}return n},ChartOfCharacteristicManager._extend(CatManager),ChartOfAccountManager._extend(CatManager),DocManager._extend(RefDataManager),TaskManager._extend(CatManager),BusinessProcessManager._extend(CatManager),DataObj.prototype.valueOf=function(){return this.ref},DataObj.prototype.toJSON=function(){return this._obj},DataObj.prototype._getter=function(e){var t,n=this._metadata.fields[e].type;return"type"==e&&"object"==typeof this._obj[e]?this._obj[e]:"ref"==e?this._obj[e]:n.is_ref?(t=_md.value_mgr(this._obj,e,n))?t instanceof DataManager?t.get(this._obj[e],!1):$p.fetch_type(this._obj[e],t):this._obj[e]?(console.log([e,n,this._obj]),null):void 0:n.date_part?$p.fix_date(this._obj[e],!0):n.digits?$p.fix_number(this._obj[e],!0):"boolean"==n.types[0]?$p.fix_boolean(this._obj[e]):this._obj[e]||""},DataObj.prototype.__setter=function(e,t){var n,a=this._metadata.fields[e].type;"type"==e&&t.types?this._obj[e]=t:"ref"==e?this._obj[e]=$p.fix_guid(t):a.is_ref?(this._obj[e]=$p.fix_guid(t),n=_md.value_mgr(this._obj,e,a,!1,t),n?n instanceof EnumManager?"string"==typeof t?this._obj[e]=t:t?"object"==typeof t&&(this._obj[e]=t.ref||t.name||""):this._obj[e]="":t&&t.presentation?(!t.type||t instanceof DataObj||delete t.type,n.create(t)):n instanceof DataManager||(this._obj[e]=$p.fetch_type(t,n)):"object"!=typeof t&&(this._obj[e]=t)):a.date_part?this._obj[e]=$p.fix_date(t,!0):a.digits?this._obj[e]=$p.fix_number(t,!0):"boolean"==a.types[0]?this._obj[e]=$p.fix_boolean(t):this._obj[e]=t},DataObj.prototype.__notify=function(e){Object.getNotifier(this).notify({type:"update",name:e,oldValue:this._obj[e]})},DataObj.prototype._setter=function(e,t){this._obj[e]!=t&&(this.__notify(e),this.__setter(e,t))},DataObj.prototype._getter_ts=function(e){return this._ts_(e)},DataObj.prototype._setter_ts=function(e,t){var n=this._ts_(e);n instanceof TabularSection&&Array.isArray(t)&&n.load(t)},DataObj.prototype.load=function(){function e(e){if("string"==typeof e&&(e=JSON.parse(e)),!$p.msg.check_soap_result(e)){var n=$p.fix_guid(e);return t.is_new()&&!$p.is_empty_guid(n)&&t._set_loaded(n),t._mixin(e)}}var t=this;return t._manager.cachable&&!t.is_new()?Promise.resolve(t):t.ref==$p.blank.guid?(t instanceof CatObj?t.id="000000000":t.number_doc="000000000",Promise.resolve(t)):$p.job_prm.rest||$p.job_prm.irest_enabled?_rest.load_obj(t):_load({class_name:t._manager.class_name,action:"load",ref:t.ref}).then(e)},DataObj.prototype.save=function(e,t){var n,a=this._manager.handle_event(this,"before_save");return a===!1?Promise.resolve(this):"object"==typeof a&&a.then?a:(this instanceof DocObj&&$p.blank.date==this.date&&(this.date=new Date),n=$p.job_prm.offline?function(e){return Promise.resolve(e)}:$p.job_prm.irest_enabled?_rest.save_irest:_rest.save_rest,n(this,{post:e,operational:t}).then(function(e){return e._manager.handle_event(e,"after_save")}))},DataObj.prototype.empty=function(){return $p.is_empty_guid(this._obj.ref)},DataObj.prototype.__define({_metadata:{get:function(){return this._manager.metadata()},enumerable:!1},ref:{get:function(){return this._obj.ref},set:function(e){this._obj.ref=$p.fix_guid(e)},enumerable:!0,configurable:!0},unload:{value:function(){for(f in this)this[f]instanceof TabularSection?(this[f].clear(),delete this[f]):"function"!=typeof this[f]&&delete this[f]},enumerable:!1}}),DataObj.prototype.__define("deleted",{get:function(){return this._obj.deleted},set:function(e){this.__notify("deleted"),this._obj.deleted=!!e},enumerable:!0,configurable:!0}),DataObj.prototype.__define("data_version",{get:function(){return this._obj.data_version||""},set:function(e){this.__notify("data_version"),this._obj.data_version=String(e)},enumerable:!0}),DataObj.prototype.__define("lc_changed",{get:function(){return this._obj.lc_changed||0},set:function(e){this.__notify("lc_changed"),this._obj.lc_changed=$p.fix_number(e,!0)},enumerable:!0,configurable:!0}),CatObj._extend(DataObj),CatObj.prototype.__define("id",{get:function(){return this._obj.id||""},set:function(e){this.__notify("id"),this._obj.id=e},enumerable:!0}),CatObj.prototype.__define("name",{get:function(){return this._obj.name||""},set:function(e){this.__notify("name"),this._obj.name=String(e)},enumerable:!0}),DocObj._extend(DataObj),doc_standard_props(DocObj.prototype),DocObj.prototype.__define("posted",{get:function(){return this._obj.posted||!1},set:function(e){this.__notify("posted"),this._obj.posted=$p.fix_boolean(e)},enumerable:!0}),DataProcessorObj._extend(DataObj),TaskObj._extend(CatObj),doc_standard_props(TaskObj.prototype),BusinessProcessObj._extend(CatObj),EnumObj._extend(DataObj),EnumObj.prototype.__define({order:{get:function(){return this._obj.sequence},set:function(e){this._obj.sequence=parseInt(e)},enumerable:!0},name:{get:function(){return this._obj.ref},set:function(e){this._obj.ref=String(e)},enumerable:!0},synonym:{get:function(){return this._obj.synonym||""},set:function(e){this._obj.synonym=String(e)},enumerable:!0},presentation:{get:function(){return this.synonym||this.name},enumerable:!1},empty:{value:function(){return"_"==this.ref}}}),RegisterRow._extend(DataObj),RegisterRow.prototype.__define("_metadata",{get:function(){var e=this._manager.metadata();return e.fields||(e.fields={}._mixin(e.dimensions)._mixin(e.resources)),e},enumerable:!1}),RegisterRow.prototype.__define("ref",{get:function(){return this._manager.get_ref(this)},enumerable:!0}),TabularSection.prototype.toString=function(){return"Табличная часть "+this._owner._manager.class_name+"."+this._name},TabularSection.prototype.get=function(e){return this._obj[e]._row},TabularSection.prototype.count=function(){return this._obj.length},TabularSection.prototype.clear=function(e){for(var t in this._obj)delete this._obj[t];this._obj.length=0,e||Object.getNotifier(this._owner).notify({type:"rows",tabular:this._name})},TabularSection.prototype.del=function(e){var t,n=this._obj,a=0;if("undefined"!=typeof e){if("number"==typeof e)t=e;else if(n[e.row-1]._row===e)t=e.row-1;else for(var r in n)if(n[r]._row===e){ t=Number(r),delete n[r]._row;break}if(void 0!=t){n.splice(t,1);for(var r in n)a++,n[r].row=a;Object.getNotifier(this._owner).notify({type:"rows",tabular:this._name})}}},TabularSection.prototype.find=function(e){var t=$p._find(this._obj,e);return t?t._row:void 0},TabularSection.prototype.find_rows=function(e,t){var n=this,a=t?function(e){return t.call(n,e._row)}:null;return $p._find_rows.call(n,n._obj,e,a)},TabularSection.prototype.swap=function(e,t){var n=this._obj[e];this._obj[e]=this._obj[t],this._obj[t]=n,Object.getNotifier(this._owner).notify({type:"rows",tabular:this._name})},TabularSection.prototype.add=function(e,t){var n=new this._owner._manager._ts_сonstructors[this._name](this);e||(e={});for(var a in n._metadata.fields)n[a]=e[a]||"";return n._obj.row=this._obj.push(n._obj),n._obj.__define("_row",{value:n,enumerable:!1}),t||Object.getNotifier(this._owner).notify({type:"rows",tabular:this._name}),e=null,n},TabularSection.prototype.each=function(e){var t=this;t._obj.forEach(function(n){return e.call(t,n._row)})},TabularSection.prototype.load=function(e){var t,n=this;n.clear(!0),e instanceof TabularSection?t=e._obj:Array.isArray(e)&&(t=e),t&&t.forEach(function(e){n.add(e,!0)}),Object.getNotifier(this._owner).notify({type:"rows",tabular:this._name})},TabularSection.prototype.sync_grid=function(e,t){for(var n={rows:[]},a=[],r=0;r<e.getColumnCount();r++)a.push(e.getColumnId(r));e.clearAll(),this.find_rows(t,function(e){var t=[];a.forEach(function(n){$p.is_data_obj(e[n])?t.push(e[n].presentation):t.push(e[n])}),n.rows.push({id:e.row,data:t})});try{e.parse(n,"json")}catch(o){}e.callEvent("onGridReconstructed",[])},TabularSection.prototype.toJSON=function(){return this._obj},TabularSectionRow.prototype.__define("_metadata",{get:function(){return this._owner._owner._metadata.tabular_sections[this._owner._name]},enumerable:!1}),TabularSectionRow.prototype.__define("row",{get:function(){return this._obj.row||0},enumerable:!0}),TabularSectionRow.prototype.__define("_clone",{value:function(){return new this._owner._owner._manager._ts_сonstructors[this._owner._name](this._owner)._mixin(this._obj)},enumerable:!1}),TabularSectionRow.prototype._getter=DataObj.prototype._getter,TabularSectionRow.prototype._setter=function(e,t){this._obj[e]!=t&&(Object.getNotifier(this._owner._owner).notify({type:"row",row:this,tabular:this._owner._name,name:e,oldValue:this._obj[e]}),DataObj.prototype.__setter.call(this,e,t))};var _rest=$p.rest=new Rest;DataManager.prototype.__define("rest_name",{get:function(){var e=this.class_name.split("."),t={cat:"Catalog",doc:"Document",ireg:"InformationRegister",areg:"AccumulationRegister",cch:"ChartOfCharacteristicTypes",cacc:"ChartOfAccounts",tsk:"Task",bp:"BusinessProcess"};return t[e[0]]+"_"+_md.syns_1с(e[1])},enumerable:!1}),DataManager.prototype.rest_tree=function(e){var t,n,a=this,r=a.metadata(),o=[];return $p.ajax.default_attr(e,!r.irest&&$p.job_prm.rest?$p.job_prm.rest_url():$p.job_prm.irest_url()),e.url+=this.rest_name+"?allowedOnly=true&$format=json&$top=1000&$select=Ref_Key,DeletionMark,Parent_Key,Description&$filter=IsFolder eq true",$p.ajax.get_ex(e.url,e).then(function(e){return JSON.parse(e.response)}).then(function(e){for(var a=0;a<e.value.length;a++)n=e.value[a],t={ref:n.Ref_Key,deleted:n.DeletionMark,parent:n.Parent_Key,presentation:n.Description},o.push(t);return $p.iface.data_to_tree(o)})},DataManager.prototype.rest_selection=function(e){if("get_tree"==e.action)return this.rest_tree(e);var t,n,a,r,o,i,s=this,l=s.metadata(),c=[],d=[];return o=function(){var e="$select=Ref_Key,DeletionMark";return l.form&&l.form.selection?l.form.selection.fields.forEach(function(e){c.push(e)}):s instanceof DocManager?(c.push("posted"),c.push("date"),c.push("number_doc")):s instanceof TaskManager?(c.push("name as presentation"),c.push("date"),c.push("number_doc"),c.push("completed")):s instanceof BusinessProcessManager?(c.push("date"),c.push("number_doc"),c.push("started"),c.push("finished")):(l.hierarchical&&l.group_hierarchy?c.push("is_folder"):c.push("0 as is_folder"),l.main_presentation_name?c.push("name as presentation"):l.code_length?c.push("id as presentation"):c.push("'...' as presentation"),l.has_owners&&c.push("owner"),l.code_length&&c.push("id")),c.forEach(function(t){var n;if(-1!=t.indexOf(" as "))if(n=t.split(" as ")[0].split("."),1==n.length)t=n[0];else{if("_t_"!=n[0])return;t=n[1]}"0"!=t&&(a=_md.syns_1с(t),_md.get(s.class_name,t).type.is_ref&&-1==a.indexOf("_Key")&&_md.get(s.class_name,t).type.types.length&&-1==_md.get(s.class_name,t).type.types[0].indexOf("enm.")&&(a+="_Key"),e+=","+a)}),c.push("ref"),c.push("deleted"),e}(),$p.ajax.default_attr(e,!l.irest&&$p.job_prm.rest?$p.job_prm.rest_url():$p.job_prm.irest_url()),e.url+=(l.irest&&l.irest.selection?l.irest.selection:this.rest_name)+"?allowedOnly=true&$format=json&$top=1000&"+o,_md.get(s.class_name,"date")&&(e.date_from||e.date_till)&&(e.url+="&$filter="+_rest.filter_date("Date",e.date_from,e.date_till),i=!0),l.hierarchical&&e.parent&&(e.url+=i?" and ":"&$filter=",e.url+="Parent_Key eq guid'"+e.parent+"'",i=!0),l.has_owners&&e.owner&&(e.url+=i?" and ":"&$filter=",e.url+="Owner_Key eq guid'"+e.owner+"'",i=!0),e.filter&&(e.url+=i?" and ":"&$filter=",e.url+="$filter eq '"+e.filter+"'",i=!0),$p.ajax.get_ex(e.url,e).then(function(e){return JSON.parse(e.response)}).then(function(o){for(var i=0;i<o.value.length;i++)n=o.value[i],t={},c.forEach(function(e){var o;if("ref"==e)return void(t[e]=n.Ref_Key);if(-1!=e.indexOf(" as ")?(o=e.split(" as ")[1],e=e.split(" as ")[0].split("."),e=e[e.length-1]):o=e,a=_md.syns_1с(e),r=_md.get(s.class_name,e))if(-1==a.indexOf("_Key")&&r.type.is_ref&&r.type.types.length&&-1==r.type.types[0].indexOf("enm.")&&(a+="_Key"),r.type.date_part)t[o]=$p.dateFormat(n[a],$p.dateFormat.masks[r.type.date_part]);else if(r.type.is_ref)if(n[a]&&n[a]!=$p.blank.guid){var i=_md.value_mgr(t,e,r.type,!1,n[a]);i?t[o]=i.get(n[a]).presentation:t[o]=""}else t[o]="";else t[o]=n[a]}),d.push(t);return $p.iface.data_to_grid.call(s,d,e)})},InfoRegManager.prototype.rest_slice_last=function(e){e.period||(e.period=$p.date_add_day(new Date,1));var t=this,n=t.metadata(),a="Period=datetime'"+$p.dateFormat(e.period,$p.dateFormat.masks.isoDateTime)+"'",r="";for(var o in n.dimensions)if(void 0!==e[o]){var i=_md.syns_1с(o),s=n.dimensions[o];-1==i.indexOf("_Key")&&s.type.is_ref&&s.type.types.length&&-1==s.type.types[0].indexOf("enm.")?(i+="_Key",r&&(r+=" and "),r+=i+" eq guid'"+e[o].ref+"'"):(r&&(r+=" and "),r+=s.type.digits?i+" eq "+$p.fix_number(e[o]):s.type.date_part?i+" eq datetime'"+$p.dateFormat(e[o],$p.dateFormat.masks.isoDateTime)+"'":i+" eq '"+e[o]+"'")}return r&&(a+=",Condition='"+r+"'"),$p.ajax.default_attr(e,$p.job_prm.rest_url()),e.url+=this.rest_name+"/SliceLast(%sl)?allowedOnly=true&$format=json&$top=1000".replace("%sl",a),_rest.ajax_to_data(e,t).then(function(e){return t.load_array(e)})},DataObj.prototype.to_atom=function(e){function t(e){var t=e._metadata.fields,r=e instanceof TabularSectionRow?"\n <d:":"\n<d:";for(n in t){if(a=t[n],s=_md.syns_1с(n),l=e[n],l instanceof EnumObj)l=l.empty()?"":l.name;else if(l instanceof DataObj)-1==s.indexOf("_Key")&&(s+="_Key"),l=l.ref;else if(a.type.date_part)l=l.getFullYear()<1e3?"0001-01-01T00:00:00Z":$p.dateFormat(l,$p.dateFormat.masks.atom);else if(void 0==l)continue;d+=r+s+">"+l+"</d:"+s+">"}}var n,a,r,o,i,s,l,c='<entry><category term="StandardODATA.%n" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> \n<title type="text"/><updated>%d</updated><author/><summary/><content type="application/xml"> \n<m:properties xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> %p \n</m:properties></content></entry>'.replace("%n",this._manager.rest_name).replace("%d",$p.dateFormat(new Date,$p.dateFormat.masks.atom)),d="\n<d:Ref_Key>"+this.ref+"</d:Ref_Key>\n<d:DeletionMark>"+this.deleted+"</d:DeletionMark>\n<d:DataVersion>"+this.data_version+"</d:DataVersion>";this instanceof DocObj?(d+="\n<d:Date>"+$p.dateFormat(this.date,$p.dateFormat.masks.atom)+"</d:Date>",d+="\n<d:Number>"+this.number_doc+"</d:Number>"):(this._metadata.main_presentation_name&&(d+="\n<d:Description>"+this.name+"</d:Description>"),this._metadata.code_length&&(d+="\n<d:Code>"+this.id+"</d:Code>"),this._metadata.hierarchical&&this._metadata.group_hierarchy&&(d+="\n<d:IsFolder>"+this.is_folder+"</d:IsFolder>")),t(this);for(r in this._metadata.tabular_sections)i=this._metadata.tabular_sections[r],s="StandardODATA."+this._manager.rest_name+"_"+_md.syns_1с(r)+"_RowType",o=this[r],o.count()?(d+="\n<d:"+_md.syns_1с(r)+' m:type="Collection('+s+')">',o.each(function(e){d+='\n <d:element m:type="'+s+'">',d+="\n <d:LineNumber>"+e.row+"</d:LineNumber>",t(e),d+="\n </d:element>"}),d+="\n</d:"+_md.syns_1с(r)+">"):d+="\n<d:"+_md.syns_1с(r)+' m:type="Collection('+s+')" />';return c.replace("%p",d)},DataManager.prototype["export"]=function(e){function t(){$p.wsql.restore_options("data_manager",l),l.wnd.caption="Экспорт "+s.family_name+" '"+(s.metadata().synonym||s.metadata().name)+"'",i=$p.iface.dat_blank(null,l.wnd),i.bottom_toolbar({buttons:[{name:"btn_cancel",text:'<i class="fa fa-times fa-lg"></i> Отмена',title:"Отмена",width:"80px","float":"right"},{name:"btn_ok",b:'<i class="fa fa-floppy-o"></i> Ок',title:"Выполнить экспорт",width:"50px","float":"right"}],onclick:function(e){return"btn_ok"==e?r():i.close(),!1}}),i.button("close").show(),i.button("park").hide(),i.attachEvent("onClose",o);var t=[{type:"fieldset",name:"form_range",label:"Выгрузить",list:[{type:"settings",labelWidth:320,labelAlign:"left",position:"label-right"},{type:"radio",name:"range",label:"Выделенные строки",value:"selected"},{type:"radio",name:"range",label:"Весь справочник",value:"all"}]},{type:"fieldset",name:"form_fieldset_2",label:"Дополнительно выгрузить",list:[{type:"settings",labelWidth:160,position:"label-right"},{type:"checkbox",name:"meta",label:"Описание метаданных",labelAlign:"left",position:"label-right",checked:l.meta},{type:"newcolumn"},{type:"checkbox",name:"relation",label:"Связанные объекты",position:"label-right",checked:l.relation,tooltip:"Связанные объекты по ссылкам (пока не реализовано)"}]},{type:"fieldset",name:"fieldset_format",label:"Формат файла",list:[{type:"settings",labelWidth:60,labelAlign:"left",position:"label-right"},{type:"radio",name:"format",label:"json",value:"json",tooltip:"Выгрузить в формате JSON"},{type:"newcolumn"},{type:"radio",name:"format",label:"xlsx",value:"xlsx",tooltip:"Выгрузить в офисном формате XLSX"},{type:"newcolumn"},{type:"radio",name:"format",label:"atom",value:"atom",tooltip:"Выгрузить в формате XML Atom"}]}];i.elmnts.frm=i.attachForm(t),i.elmnts.frm.setItemValue("range",l.range||"all"),e.items&&1==e.items.length?(e.obj?i.elmnts.frm.setItemLabel("range","selected","Тек. объект: "+e.items[0].presentation):s.get(e.items[0],!0).then(function(e){i.elmnts.frm.setItemLabel("range","selected","Тек. объект: "+e.presentation)}),i.elmnts.frm.setItemValue("range","selected")):e.items&&e.items.length&&i.elmnts.frm.setItemLabel("range","selected","Выделенные строки ("+e.items.length+" элем.)"),s instanceof DocManager&&i.elmnts.frm.setItemLabel("range","all","Все документы из кеша (0 элем.)"),i.elmnts.frm.setItemValue("format",l.format||"json"),i.elmnts.frm.attachEvent("onChange",n),n(),e.pwnd&&e.pwnd.isModal&&e.pwnd.isModal()&&(e.set_pwnd_modal=!0,e.pwnd.setModal(!1)),i.setModal(!0)}function n(){i.elmnts.frm.setItemValue("relation",!1),i.elmnts.frm.disableItem("relation"),"all"==i.elmnts.frm.getItemValue("range")?(i.elmnts.frm.disableItem("format","atom"),"atom"==i.elmnts.frm.getItemValue("format")&&i.elmnts.frm.setItemValue("format","json")):i.elmnts.frm.enableItem("format","atom"),"json"==i.elmnts.frm.getItemValue("format")?i.elmnts.frm.enableItem("meta"):"sql"==i.elmnts.frm.getItemValue("format")?(i.elmnts.frm.setItemValue("meta",!1),i.elmnts.frm.disableItem("meta")):(i.elmnts.frm.setItemValue("meta",!1),i.elmnts.frm.disableItem("meta"))}function a(){return l.format=i.elmnts.frm.getItemValue("format"),l.range=i.elmnts.frm.getItemValue("range"),l.meta=i.elmnts.frm.getItemValue("meta"),l.relation=i.elmnts.frm.getItemValue("relation"),l}function r(){function t(){e.obj?$p.wsql.alasql("SELECT * INTO XLSX('"+s.table_name+".xlsx',{headers:true}) FROM ?",[e.items[0]._obj]):$p.wsql.alasql("SELECT * INTO XLSX('"+s.table_name+".xlsx',{headers:true}) FROM "+s.table_name)}a();var n={meta:{},items:{}},r=n.items[s.class_name]=[];if(l.meta&&(n.meta[s.class_name]=s.metadata()),"json"==l.format)e.obj?r.push(e.items[0]._obj):s.each(function(t){("all"==l.range||-1!=e.items.indexOf(t.ref))&&r.push(t._obj)}),e.items.length&&!r.length?s.get(e.items[0],!0).then(function(e){r.push(e._obj),alasql.utils.saveFile(s.table_name+".json",JSON.stringify(n,null,4))}):alasql.utils.saveFile(s.table_name+".json",JSON.stringify(n,null,4));else if("xlsx"==l.format)window.xlsx?t():$p.load_script("//cdn.jsdelivr.net/js-xlsx/latest/xlsx.core.min.js","script",t);else if("atom"==l.format&&e.items.length){var o=e.obj?Promise.resolve(e.items[0]):s.get(e.items[0],!0);o.then(function(e){alasql.utils.saveFile(s.table_name+".xml",e.to_atom())})}else $p.msg.show_not_implemented()}function o(t){return $p.iface.popup.hide(),i.wnd_options(l.wnd),$p.wsql.save_options("data_manager",a()),i.setModal(!1),e.set_pwnd_modal&&e.pwnd.setModal&&e.pwnd.setModal(!0),!0}e&&"string"==typeof e?e={items:e.split(",")}:e||(e={items:[]});var i,s=this,l={name:"export",wnd:{top:130,left:200,width:480,height:350}};t()},DataManager.prototype["import"]=function(e,t){function n(e){function n(e,n){var a=_md.mgr_by_class_name(e);if(n.length)if(t){if(t._manager==a)for(var o in n)$p.fix_guid(n[o])==t.ref&&(r=!0,a.load_array([n[o]],!0))}else r=!0,a.load_array(n,!0)}if(i.close(),a.files.length){var o=new FileReader;o.onload=function(e){try{var t=JSON.parse(o.result);if(t.items)for(var a in t.items)n(a,t.items[a]);else["cat","doc","ireg","areg","cch","cacc"].forEach(function(e){if(t[e])for(var a in t[e])n(e+"."+a,t.cat[a])});r||$p.msg.show_msg($p.msg.sync_no_data)}catch(i){$p.msg.show_msg(i.message)}},o.readAsText(a.files[0])}}var a,r;if(!e&&void 0!=typeof window){var o={name:"import",wnd:{width:300,height:100,caption:$p.msg.select_file_import}},i=$p.iface.dat_blank(null,o.wnd);a=document.createElement("input"),a.setAttribute("id","json_file"),a.setAttribute("type","file"),a.setAttribute("accept",".json"),a.setAttribute("value","*.json"),a.onchange=n,i.button("close").show(),i.button("park").hide(),i.attachObject(a),i.centerOnScreen(),i.setModal(!0),setTimeout(function(){a.click()},100)}},$p.iface.wnd_sync=function(){function e(){var e={name:"wnd_sync",wnd:{id:"wnd_sync",top:130,left:200,width:496,height:290,modal:!0,center:!0,caption:"Подготовка данных"}};t.wnd_sync=$p.iface.dat_blank(null,e.wnd);var n=[{type:"block",name:"form_block_1",list:[{type:"label",name:"form_label_1",label:$p.msg.sync_data},{type:"block",name:"form_block_2",list:[{type:"template",name:"img_long",className:"img_long"},{type:"newcolumn"},{type:"template",name:"text_processed"},{type:"template",name:"text_current"},{type:"template",name:"text_bottom"}]}]},{type:"button",name:"form_button_1",value:$p.msg.sync_break}];t.frm_sync=t.wnd_sync.attachForm(n),t.frm_sync.attachEvent("onButtonClick",function(e){t&&(t.do_break=!0)}),t.frm_sync.setItemValue("text_processed","Инициализация"),t.frm_sync.setItemValue("text_bottom","Загружается структура таблиц...")}var t,n=$p.iface.sync={};n.create=function(n){t=n,e()},n.update=function(e){t.frm_sync.setItemValue("text_processed","Обработано элементов: "+t.step*t.step_size+" из "+t.count_all);var n,a="",r=0;for(var o in e){if(r++,r>4)break;a&&(a+="<br />"),n=$p.cat[o].metadata(),a+=(n.list_presentation||n.synonym)+" ("+e[o].length+")"}t.frm_sync.setItemValue("text_current","Текущий запрос: "+t.step+" ("+Math.round(t.step*t.step_size*100/t.count_all)+"%)"),t.frm_sync.setItemValue("text_bottom",a)},n.close=function(){t&&t.wnd_sync&&(t.wnd_sync.close(),delete t.wnd_sync)}},DataManager.prototype.form_obj=function(e,t){function n(){u||((e instanceof dhtmlXLayoutCell||e instanceof dhtmlXSideBarCell||e instanceof dhtmlXCarouselCell)&&(t.bind_pwnd||t.Приклеить)?("function"==typeof e.close&&e.close(!0),p=e,p.close=function(t){var n=p||e;n&&(n.elmnts&&["vault","vault_pop"].forEach(function(e){n.elmnts[e]&&n.elmnts[e].unload()}),m&&m.class_name&&dhx4.callEvent("frm_close",[m.class_name,h?h.ref:""]),n.detachToolbar(),n.detachStatusBar(),n.conf&&(n.conf.unloading=!0),n.detachObject(!0)),c(t)},p.elmnts={grids:{}}):(_={name:"wnd_obj_"+m.class_name,wnd:{id:"wnd_obj_"+m.class_name,top:80+40*Math.random(),left:120+80*Math.random(),width:900,height:600,modal:!0,center:!1,pwnd:e,allow_close:!0,allow_minmax:!0,on_close:d,caption:g.obj_presentation||g.synonym}},p=$p.iface.dat_blank(null,_.wnd)),p.ref||p.__define("ref",{get:function(){return h?h.ref:$p.blank.guid},enumerable:!1,configurable:!0}),p.elmnts.frm_tabs=p.attachTabbar({arrows_mode:"auto",offsets:{top:0,right:0,bottom:0,left:0}}),p.elmnts.frm_tabs.addTab("tab_header","&nbsp;Реквизиты&nbsp;",null,null,!0),p.elmnts.tabs={tab_header:p.elmnts.frm_tabs.cells("tab_header")},p.elmnts.frm_toolbar=p.attachToolbar(),p.elmnts.frm_toolbar.setIconsPath(dhtmlx.image_path+"dhxtoolbar"+dhtmlx.skin_suffix()),p.elmnts.frm_toolbar.loadStruct(t.toolbar_struct||$p.injected_data["toolbar_obj.xml"],function(){this.addSpacer("btn_unpost"),this.attachEvent("onclick",r),m instanceof DocManager&&$p.ajax.root?(this.enableItem("btn_post"),this.enableItem("btn_unpost")):(this.hideItem("btn_post"),this.hideItem("btn_unpost")),$p.ajax.root||(this.hideItem("btn_save_close"),this.disableItem("btn_save")),t.on_select&&this.setItemText("btn_save_close","Записать и выбрать"),m instanceof CatManager||m instanceof DocManager?m.printing_plates().then(function(e){for(var t in e)p.elmnts.frm_toolbar.addListOption("bs_print",t,"~","button",e[t])}):this.disableItem("bs_print"),p!=e&&this.hideItem("btn_close"),p.elmnts.vault_pop=new dhtmlXPopup({toolbar:this,id:"btn_files"}),p.elmnts.vault_pop.attachEvent("onShow",i)}),$p.job_prm.russian_names&&(p.Элементы||p.__define({"Элементы":{get:function(){return this.elmnts},enumerable:!1}}),p.elmnts.Шапка||p.elmnts.__define({"Шапка":{get:function(){return this.pg_header},enumerable:!1}})),u=!0)}function a(){if(u||(clearTimeout(f),n()),t.hide_header||(p.setText&&p.setText((g.obj_presentation||g.synonym)+": "+h.presentation),p.showHeader&&p.showHeader()),t.draw_tabular_sections)t.draw_tabular_sections(h,p,s);else if(!h.is_folder)for(var e in g.tabular_sections)"extra_fields"!==e&&h[e]instanceof TabularSection&&s(e);return t.draw_pg_header?t.draw_pg_header(h,p):(p.elmnts.pg_header=p.elmnts.tabs.tab_header.attachHeadFields({obj:h,pwnd:p,read_only:!$p.ajax.root}),p.attachEvent("onResizeFinish",function(e){p.elmnts.pg_header.enableAutoHeight(!1,p.elmnts.tabs.tab_header._getHeight()-20,!0)})),{wnd:p,o:h}}function r(e){"btn_save_close"==e?l("close"):"btn_save"==e?l("save"):"btn_close"==e?p.close():"btn_go_connection"==e?o():"prn_"==e.substr(0,4)?m.print(h.ref,e,p):"btn_import"==e?m["import"](null,h):"btn_export"==e&&m["export"]({items:[h],pwnd:p,obj:!0})}function o(){$p.msg.show_not_implemented()}function i(){if(!p.elmnts.vault){var e={};$p.ajax.default_attr(e,$p.job_prm.irest_url()),e.url+=m.rest_name+"(guid'"+h.ref+"')/Files?$format=json",p.elmnts.vault=p.elmnts.vault_pop.attachVault(400,250,{uploadUrl:e.url,buttonClear:!1,autoStart:!0,filesLimit:10}),p.elmnts.vault.conf.wnd=p,p.elmnts.vault.attachEvent("onUploadFile",function(e,t){}),p.elmnts.vault.attachEvent("onBeforeFileAdd",function(e){return e.size<=this.getMaxFileSize()?!0:($p.msg.show_msg({type:"alert-warning",text:$p.msg.file_size+this._readableSize(this.getMaxFileSize()),title:$p.msg.main_title}),!1)}),p.elmnts.vault.attachEvent("onBeforeFileRemove",function(e){return p.elmnts.vault.file_data[e.id].delete_confirmed?!0:(dhtmlx.confirm({title:$p.msg.main_title,text:$p.msg.file_confirm_delete+e.name,cancel:"Отмена",callback:function(t){t&&$p.ajax.post_ex(p.elmnts.vault.actionUrl(e.id,"drop"),"",!0).then(function(t){p.elmnts.vault.file_data[e.id].delete_confirmed=!0,p.elmnts.vault._removeFileFromQueue(e.id)})}}),!1)})}}function s(e,t){_md.ts_captions(m.class_name,e)&&(p.elmnts.frm_tabs.addTab("tab_"+e,"&nbsp;"+g.tabular_sections[e].synonym+"&nbsp;"),p.elmnts.tabs["tab_"+e]=p.elmnts.frm_tabs.cells("tab_"+e),p.elmnts.grids[e]=p.elmnts.tabs["tab_"+e].attachTabular({obj:h,ts:e,pwnd:p,read_only:!$p.ajax.root,toolbar_struct:t}))}function l(e){p.progressOn(),h.save().then(function(){p.progressOff(),p.modified=!1,"close"==e&&(t.on_select&&t.on_select(h),p.close())})["catch"](function(e){p.progressOff(),$p.record_log(e)})}function c(n){t&&t.on_close&&!n&&t.on_close(),n||(delete p.ref,m=p=h=g=_=e=t=null)}function d(e){return setTimeout(c),p&&p.elmnts&&["vault","vault_pop"].forEach(function(e){p.elmnts[e]&&p.elmnts[e].unload()}),m&&m.class_name&&dhx4.callEvent("frm_close",[m.class_name,h?h.ref:""]),!0}var p,_,u,f,m=this,h=t.o,g=m.metadata();return f=setTimeout(n),$p.is_data_obj(h)?h.is_new()&&t.on_select?m.create({},!0).then(function(e){return h=e,e=null,a()}):h.is_new()&&!h.empty()?h.load().then(a):Promise.resolve(a()):(e.progressOn(),m.get(t.hasOwnProperty("ref")?t.ref:t,!0).then(function(t){return h=t,t=null,e.progressOff(),a()})["catch"](function(t){e.progressOff(),$p.record_log(t)}))},DataObj.prototype.form_obj=function(e,t){return t||(t={}),t.o=this,this._manager.form_obj(e,t)},DataManager.prototype.form_selection=function(e,t){function n(){e instanceof dhtmlXCellObject?(e instanceof dhtmlXTabBarCell||"function"!=typeof e.close||e.close(!0),u=e,u.close=function(t){(u||e)&&((u||e).detachToolbar(),(u||e).detachStatusBar(),(u||e).conf&&((u||e).conf.unloading=!0),(u||e).detachObject(!0)),c(t)},t.hide_header||setTimeout(function(){u.showHeader()})):(u=$p.iface.w.createWindow("wnd_"+f.class_name.replace(".","_")+"_select",0,0,900,600),u.centerOnScreen(),u.setModal(1),u.button("park").hide(),u.button("minmax").show(),u.button("minmax").enable(),u.attachEvent("onClose",d)),$p.iface.bind_help(u),u.setText&&u.setText("Список "+(-1==f.class_name.indexOf("doc.")?'справочника "':'документов "')+(m.list_presentation||m.synonym)+'"'),document.body.addEventListener("keydown",a,!1),u.elmnts={status_bar:u.attachStatusBar()},u.elmnts.status_bar.setText("<div id='"+f.class_name.replace(".","_")+"_select_recinfoArea'></div>"),u.elmnts.toolbar=u.attachToolbar(),u.elmnts.toolbar.setIconsPath(dhtmlx.image_path+"dhxtoolbar"+dhtmlx.skin_suffix()),u.elmnts.toolbar.loadStruct(t.toolbar_struct||$p.injected_data["toolbar_selection.xml"],function(){this.attachEvent("onclick",i);var e={manager:f,toolbar:this,onchange:r,hide_filter:t.hide_filter};t.date_from&&(e.date_from=t.date_from),t.date_till&&(e.date_till=t.date_till),u.elmnts.filter=new $p.iface.Toolbar_filter(e),$p.ajax.root||(this.hideItem("btn_new"),this.hideItem("btn_edit"),this.hideItem("btn_delete")),v||(this.hideItem("btn_select"),this.hideItem("sep1"),$p.iface.docs&&$p.iface.docs.getViewName&&"oper"==$p.iface.docs.getViewName()&&this.addListOption("bs_more","btn_order_list","~","button","<i class='fa fa-briefcase fa-lg fa-fw'></i> Список заказов")),this.addListOption("bs_more","btn_import","~","button","<i class='fa fa-upload fa-lg fa-fw'></i> Загрузить из файла"),this.addListOption("bs_more","btn_export","~","button","<i class='fa fa-download fa-lg fa-fw'></i> Выгрузить в файл"),f instanceof CatManager||f instanceof DocManager?f.printing_plates().then(function(e){var t;for(var n in e)u.elmnts.toolbar.addListOption("bs_print",n,"~","button",e[n]),t=!0;t||u.elmnts.toolbar.hideItem("bs_print")}):u.elmnts.toolbar.hideItem("bs_print"),o()})}function a(e){function t(){var e;return $p.iface.w.forEachWindow(function(t){t.isModal()&&t!=u&&(e=!0)}),e}if(u)if(113==e.keyCode||115==e.keyCode){if(!t())return setTimeout(function(){u.elmnts.filter.input_filter&&u.elmnts.filter.input_filter.focus()}),$p.cancel_bubble(e)}else if(e.shiftKey&&116==e.keyCode){if(!t())return setTimeout(function(){u.elmnts.grid.reload()}),e.preventDefault&&e.preventDefault(),$p.cancel_bubble(e)}else 27==e.keyCode&&!t()}function r(e){h&&(e.filter?u.elmnts.cell_tree.collapse():u.elmnts.cell_tree.expand()),u.elmnts.grid.reload()}function o(){var e,n,a,r,o,i;h?(e=u.attachLayout("2U"),a=e.cells("b"),a.hideHeader(),n=u.elmnts.cell_tree=e.cells("a"),n.setWidth("220"),n.hideHeader(),r=u.elmnts.tree=n.attachDynTree(f,null,function(){setTimeout(function(){o.reload()},20)}),r.attachEvent("onSelect",function(){this.do_not_reload?delete this.do_not_reload:setTimeout(function(){o.reload()},20)}),r.attachEvent("onDblClick",function(e){s(e)})):(a=u,setTimeout(function(){o.reload()},20)),o=u.elmnts.grid=a.attachGrid(),o.setIconsPath(dhtmlx.image_path),o.setImagePath(dhtmlx.image_path),o.setPagingWTMode(!0,!0,!0,[20,30,60]),o.enablePaging(!0,30,8,f.class_name.replace(".","_")+"_select_recinfoArea"),o.setPagingSkin("toolbar",dhtmlx.skin),o.attachEvent("onBeforeSorting",_),o.attachEvent("onBeforePageChanged",function(){return!!this.getRowsNum()}),o.attachEvent("onXLE",function(){a.progressOff()}),o.attachEvent("onXLS",function(){a.progressOn()}),o.attachEvent("onDynXLS",function(e,t){var n=p(e,t);if(n)return $p.cat.load_soap_to_grid(n,o),!1}),o.attachEvent("onRowDblClicked",function(e,t){var n=null;r&&(n=r.getIndexById(e)),null!=n?r.selectItem(e,!0):s(e)}),$p.iface.docs&&$p.iface.docs.getViewName&&"oper"==$p.iface.docs.getViewName()&&o.enableMultiselect(!0),o.reload=function(){var e=p();e&&(a.progressOn(),o.clearAll(),$p.cat.load_soap_to_grid(e,o,function(n){if("object"==typeof n)$p.msg.check_soap_result(n);else if(!i){if(e.initial_value){var s=n.indexOf("set_parent"),l=n.indexOf("'>",s),c=n.substr(s+12,l-s-12);$p.is_guid(c)&&h&&(r.do_not_reload=!0,r.selectItem(c,!1)),o.selectRowById(e.initial_value)}else e.parent&&$p.is_guid(e.parent)&&h&&(r.do_not_reload=!0,r.selectItem(e.parent,!1));o.setColumnMinWidth(200,o.getColIndexById("presentation")),o.enableAutoWidth(!0,1200,600),o.setSizes(),i=!0,u.elmnts.filter.input_filter&&u.elmnts.filter.input_filter.focus(),t.on_grid_inited&&t.on_grid_inited()}b&&i&&o.setSortImgState(!0,g,b),a.progressOff()}))}}function i(e){if("btn_select"==e)s();else if("btn_new"==e)f.create({},!0).then(function(e){e._set_loaded(e.ref),$p.iface.set_hash(f.class_name,e.ref)});else if("btn_edit"==e){var t=u.elmnts.grid.getSelectedRowId();t?$p.iface.set_hash(f.class_name,t):$p.msg.show_msg({type:"alert-warning",text:$p.msg.no_selected_row.replace("%1",""),title:$p.msg.main_title})}else"prn_"==e.substr(0,4)?l(e):"btn_order_list"==e?$p.iface.set_hash("","","","def"):"btn_delete"==e?$p.msg.show_not_implemented():"btn_import"==e?f["import"]():"btn_export"==e?f["export"](u.elmnts.grid.getSelectedRowId()):"btn_requery"==e&&(y={},u.elmnts.grid.reload())}function s(n){n||(n=u.elmnts.grid.getSelectedRowId());var a;if(t.selection&&t.selection.forEach(function(e){for(var t in e)"is_folder"==t&&(a=e[t])}),u.elmnts.tree&&null!=u.elmnts.tree.getIndexById(n)&&u.elmnts.tree.getSelectedItemId()!=n)return void u.elmnts.tree.selectItem(n,!0);if(n&&a===!0&&u.elmnts.grid.cells(n,0).cell.classList.contains("cell_ref_elm"))return void $p.msg.show_msg($p.msg.select_grp);if(!n&&u.elmnts.tree||u.elmnts.tree&&u.elmnts.tree.getSelectedItemId()==n){if(a===!1)return void $p.msg.show_msg($p.msg.select_elm);n=u.elmnts.tree.getSelectedItemId()}n&&(v?f.get(n,!0).then(function(t){u.close(),v.call(e.grid||e,t)}):$p.iface.set_hash(f.class_name,n))}function l(e){var t=u.elmnts.grid.getSelectedRowId();t?f.print(t,e,u):$p.msg.show_msg({type:"alert-warning",text:$p.msg.no_selected_row.replace("%1",""),title:$p.msg.main_title})}function c(n){document.body.removeEventListener("keydown",a),t&&t.on_close&&!n&&t.on_close(),n||(f=u=m=y=v=e=t=null)}function d(t){return setTimeout(c,10),e.on_unload&&e.on_unload.call(e.grid||e),!0}function p(e,n){var a=u.elmnts.filter.get_filter()._mixin({action:"get_selection",class_name:f.class_name,order_by:g,direction:b,start:e||((u.elmnts.grid.currentPage||1)-1)*u.elmnts.grid.rowsBufferOutSize,count:n||u.elmnts.grid.rowsBufferOutSize,get_header:void 0==y.get_header})._mixin(t),r=h?u.elmnts.tree.getSelectedItemId():null;a.parent=!r&&!t.parent||a.filter?null:r||t.parent,h&&!a.parent&&(a.parent=$p.blank.guid);for(var o in a)if(y[o]!=a[o])return y=a,a}function _(e){var t=u.elmnts.grid.getSortingState();return g=e,b="des"==t[1]?"asc":"des",u.elmnts.grid.reload(),!0}e||(e=t&&t.pwnd?t.pwnd:{}),t||e instanceof dhtmlXCellObject||(t=e,e={}),t||(t={});var u,f=this,m=f.metadata(),h=m.hierarchical&&!(f instanceof ChartOfAccountManager),g=0,b="asc",y={},v=e.on_select||t.on_select;return h&&t.initial_value&&t.initial_value!=$p.blank.guid&&!t.parent?f.get(t.initial_value,!0).then(function(e){t.parent=e.parent.ref,t.set_parent=t.parent,n()}):n(),u},DataManager.prototype.form_list=function(e,t){return this.form_selection(e,t)},$p.eve.socket=new SocketMsg,$p.eve.pop=function(){$p.eve.stepper.cat_ini_date;return $p.job_prm.offline||!$p.job_prm.irest_enabled?Promise.resolve(!1):Promise.resolve(!1)},$p.eve.push=function(){},$p.eve.from_json_to_data_obj=function(e){var t,n=$p.eve.stepper;if("string"==typeof e?e=JSON.parse(e):e instanceof XMLHttpRequest&&(e=e.response?JSON.parse(e.response):{}),n.do_break)$p.iface.sync.close(),$p.eve.redirect=!0,location.reload(!0);else if(e.cat_date||e.force)return e.cat_date>n.cat_ini_date&&(n.cat_ini_date=e.cat_date),e.cat_date>n.cat_date&&(n.cat_date=e.cat_date),e.count_all&&(n.count_all=e.count_all),e.current&&(n.current=e.current),"cch,cacc,cat,bp,tsk,doc,ireg,areg".split(",").forEach(function(n){for(t in e[n])$p[n][t]&&$p[n][t].load_array(e[n][t])}),e.current&&e.current>=n.step_size},$p.eve.reduce_promices=function(e,t){return e.reduce(function(e,n){return e.then(function(){return n}).then(t)["catch"](t)},Promise.resolve())},$p.eve.js_time_diff=-new Date("0001-01-01").valueOf(),$p.eve.time_diff=function(){var e=$p.wsql.get_user_param("time_diff","number");return!e||isNaN(e)||621355716e5>e||e>62135622e6?$p.eve.js_time_diff:e},function(w){var eve=$p.eve,iface=$p.iface,msg=$p.msg,stepper={},timer_setted=!1,cache;eve.set_offline=function(e){var t=$p.job_prm.offline;$p.job_prm.offline=!(!e&&!$p.wsql.get_user_param("offline","boolean")),t!=$p.job_prm.offline&&(t=$p.job_prm.offline)},eve.on_rotate=function(e){$p.device_orient=0==w.orientation||180==w.orientation?"portrait":"landscape","undefined"!=typeof e&&w.dhx4.callEvent("onOrientationChange",[$p.device_orient])},"undefined"==typeof w.orientation?$p.device_orient=w.innerWidth>w.innerHeight?"landscape":"portrait":eve.on_rotate(),w.addEventListener("orientationchange",eve.on_rotate,!1),$p.__define("device_type",{get:function(){var e=$p.wsql.get_user_param("device_type");return e||(e=function(e){return 1024>e?"phone":1280>e?"tablet":"desktop"}(Math.max(screen.width,screen.height)),$p.wsql.set_user_param("device_type",e)),e},set:function(e){$p.wsql.set_user_param("device_type",e)},enumerable:!1,configurable:!1}),w.addEventListener("online",eve.set_offline),w.addEventListener("offline",function(){eve.set_offline(!0)}),w.addEventListener("load",function(){function do_reload(){$p.ajax.authorized||(eve.redirect=!0,location.reload(!0))}function do_cache_update_msg(e){!stepper.wnd_appcache&&$p.iface.appcache?$p.iface.appcache.create(stepper):timer_setted||(timer_setted=!0,setTimeout(do_reload,25e3)),$p.iface.appcache&&(stepper.loaded=e.loaded||0,stepper.total=e.total||140,$p.iface.appcache.update()),stepper.do_break&&($p.iface.appcache.close(),setTimeout(do_reload,1e3))}setTimeout(function(){function IPInfo(){function e(){this.geocode=function(e){return Promise.resolve(!1)}}var t,n,a,r="";this.__define({ipgeo:{value:function(){return $p.ajax.get("//api.sypexgeo.net/").then(function(e){return JSON.parse(e.response)})["catch"]($p.record_log)}},yageocoder:{ get:function(){return t||(t=new e),t},enumerable:!1,configurable:!1},ggeocoder:{get:function(){return n},enumerable:!1,configurable:!1},addr:{get:function(){return r}},parts:{get:function(){return a}},components:{value:function(e,t){var n,a,r,o="",i="",s="";for(n in t){a=t[n];for(r in a.types)switch(a.types[r]){case"route":-1==a.short_name.indexOf("Unnamed")&&(o=a.short_name+(o?" "+o:""),i=a.long_name.replace("улица","").trim());break;case"administrative_area_level_1":e.region=a.long_name;break;case"administrative_area_level_2":e.city=a.short_name,e.city_long=a.long_name;break;case"locality":s=(s?s+" ":"")+a.short_name;break;case"street_number":o=(o?o+" ":"")+a.short_name;break;case"postal_code":e.postal_code=a.short_name}}return e.region&&e.region==e.city_long?-1==e.city.indexOf(s)?e.city=s:e.city="":s&&-1==e.city.indexOf(s)&&-1==e.region.indexOf(s)&&(o=s+", "+o),e.street&&-1!=e.street.indexOf(i)||(e.street=o),e}}}),this.location_callback=function(){n=new google.maps.Geocoder,navigator.geolocation.getCurrentPosition(function(e){$p.ipinfo.latitude=e.coords.latitude,$p.ipinfo.longitude=e.coords.longitude;var t=new google.maps.LatLng($p.ipinfo.latitude,$p.ipinfo.longitude);n.geocode({latLng:t},function(e,t){t==google.maps.GeocoderStatus.OK&&(a=!e[1]||e[0].address_components.length>=e[1].address_components.length?e[0]:e[1],r=a.formatted_address,dhx4.callEvent("geo_current_position",[$p.ipinfo.components({},a.address_components)]))})},$p.record_log,{timeout:3e4})}}function navigate(e){e&&-1==(location.origin+location.pathname).indexOf(e)&&location.replace(e)}function init_params(){$p.wsql.init_params().then(function(){function e(){var e=dhtmlx.codebase,t=!0,n=!0;for(-1!=e.indexOf("cdn.jsdelivr.net")&&(e="//cdn.jsdelivr.net/metadata/latest/"),i=0;i<document.styleSheets.length;i++)document.styleSheets[i].href&&((-1!=document.styleSheets[i].href.indexOf("dhx_web")||-1!=document.styleSheets[i].href.indexOf("dhx_terrace"))&&(t=!1),-1!=document.styleSheets[i].href.indexOf("metadata.css")&&(n=!1));dhtmlx.skin=$p.wsql.get_user_param("skin")||$p.job_prm.skin||"dhx_web",t&&$p.load_script(e+("dhx_web"==dhtmlx.skin?"dhx_web.css":"dhx_terrace.css"),"link"),n&&$p.load_script(e+"metadata.css","link"),$p.job_prm.additional_css&&$p.job_prm.additional_css.forEach(function(e){(dhx4.isIE||-1==e.indexOf("ie_only"))&&$p.load_script(e,"link")}),dhtmlx.image_path="//oknosoft.github.io/metadata.js/lib/imgs/",dhtmlx.skin_suffix=function(){return dhtmlx.skin.replace("dhx","")+"/"},dhx4.ajax.cache=!0,$p.iface.__define("w",{value:new dhtmlXWindows,enumerable:!1}),$p.iface.w.setSkin(dhtmlx.skin),$p.iface.__define("popup",{value:new dhtmlXPopup,enumerable:!1})}if("dhtmlx"in w&&e(),eve.stepper={step:0,count_all:0,cat_date:0,step_size:57,files:0,cat_ini_date:$p.wsql.get_user_param("cache_cat_date","number")||0},eve.set_offline(!navigator.onLine),eve.update_files_version(),document.documentElement.webkitRequestFullScreen&&navigator.userAgent.match(/Android|iPhone|iPad|iPod/i)&&($p.job_prm.request_full_screen||$p.wsql.get_user_param("request_full_screen"))){var t=function(){document.documentElement.webkitRequestFullScreen(),w.removeEventListener("touchstart",t)};w.addEventListener("touchstart",t,!1)}eve.onload.execute($p),document&&document.querySelector("#splash")&&document.querySelector("#splash").parentNode.removeChild(document.querySelector("#splash")),setTimeout(function(){$p.Meta.init_meta()["catch"]($p.record_log),iface.oninit()},20),$p.msg.russian_names(),$p.wsql.get_user_param("use_service_worker","boolean")&&"undefined"!=typeof navigator&&"serviceWorker"in navigator&&-1!=location.protocol.indexOf("https")?navigator.serviceWorker.register("metadata_service_worker.js",{scope:"/"}).then(function(e){$p.record_log("serviceWorker register succeeded")})["catch"]($p.record_log):(cache=w.applicationCache)&&(cache.addEventListener("noupdate",function(e){},!1),cache.addEventListener("cached",function(e){timer_setted=!0,$p.iface.appcache&&$p.iface.appcache.close()},!1),cache.addEventListener("downloading",do_cache_update_msg,!1),cache.addEventListener("progress",do_cache_update_msg,!1),cache.addEventListener("updateready",function(e){try{cache.swapCache(),$p.iface.appcache&&$p.iface.appcache.close()}catch(e){}do_reload()},!1),cache.addEventListener("error",$p.record_log,!1))})}if($p.job_prm=new JobPrm,($p.job_prm.use_ip_geo||$p.job_prm.use_google_geo)&&($p.ipinfo=new IPInfo),navigator.geolocation&&$p.job_prm.use_google_geo&&(window.google&&window.google.maps?location_callback():$p.eve.onload.push(function(){setTimeout(function(){$p.load_script(location.protocol+"//maps.google.com/maps/api/js?callback=$p.ipinfo.location_callback","script",function(){})},100)})),$p.job_prm.allow_post_message&&w.addEventListener("message",function(event){if(("*"==$p.job_prm.allow_post_message||$p.job_prm.allow_post_message==event.origin)&&"string"==typeof event.data)try{var res=eval(event.data);if(res&&event.source){if("object"==typeof res)res=JSON.stringify(res);else if("function"==typeof res)return;event.source.postMessage(res,"*")}}catch(e){$p.record_log(e)}}),eve.socket.connect(),!w.JSON||!w.indexedDB)throw eve.redirect=!0,msg.show_msg({type:"alert-error",text:msg.unsupported_browser,title:msg.unsupported_browser_title}),msg.unsupported_browser;setTimeout(function(){"function"!=typeof Promise?$p.load_script("//cdn.jsdelivr.net/es6-promise/latest/es6-promise.min.js","script",function(){ES6Promise.polyfill(),init_params()}):init_params()},20)},20)},!1),w.onbeforeunload=function(){return eve.redirect?void 0:msg.onbeforeunload},w.addEventListener("popstat",$p.iface.hash_route),w.addEventListener("hashchange",$p.iface.hash_route)}(window),$p.eve.steps={load_meta:0,authorization:1,create_managers:2,process_access:3,load_data_files:4,load_data_db:5,load_data_wsql:6,save_data_wsql:7},$p.eve.log_in=function(e){var t,n,a=$p.eve.stepper,r={},o=$p.job_prm.data_url||"/data/",i=[];return e($p.eve.steps.load_meta),$p.ajax.default_attr(r,$p.job_prm.irest_url()),t=$p.job_prm.offline?Promise.resolve({responseURL:""}):$p.ajax.get_ex(r.url,r),t.then(function(e){return $p.job_prm.offline||($p.job_prm.irest_enabled=!0),"{"==e.response[0]?JSON.parse(e.response):void 0})["catch"](function(){}).then(function(t){return e($p.eve.steps.authorization),n=t||_md.dates(),n.root=!0,$p.job_prm.offline||$p.job_prm.irest_enabled?n:$p.ajax.get_ex($p.job_prm.rest_url()+"?$format=json",!0).then(function(){return n})})["catch"](function(e){throw $p.iface.auth.onerror&&$p.iface.auth.onerror(e),e}).then(function(t){return e($p.eve.steps.load_data_files),$p.job_prm.offline?t:(dhx4.callEvent("authorized",[$p.ajax.authorized=!0]),"string"==typeof t&&(t=JSON.parse(t)),void($p.msg.check_soap_result(t)||($p.wsql.get_user_param("enable_save_pwd")?$p.wsql.set_user_param("user_pwd",$p.ajax.password):$p.wsql.get_user_param("user_pwd")&&$p.wsql.set_user_param("user_pwd",""),t.now_1с&&t.now_js&&$p.wsql.set_user_param("time_diff",t.now_1с-t.now_js))))}).then(function(){return a.zone=($p.job_prm.demo?"1":$p.wsql.get_user_param("zone"))+"/",$p.ajax.get(o+"zones/"+a.zone+"p_0.json?v="+$p.job_prm.files_date)}).then(function(e){var t=JSON.parse(e.response);a.files=t.files-1,a.step_size=t.files>0?Math.round(t.count_all/t.files):57,a.cat_ini_date=t.cat_date,$p.eve.from_json_to_data_obj(t)}).then(function(){i=[];for(var e=1;e<=a.files;e++)i.push($p.ajax.get(o+"zones/"+a.zone+"p_"+e+".json?v="+$p.job_prm.files_date));return i.push($p.ajax.get(o+"zones/"+a.zone+"ireg.json?v="+$p.job_prm.files_date)),$p.eve.reduce_promices(i,$p.eve.from_json_to_data_obj)}).then(function(){return e($p.eve.steps.load_data_db),a.step_size=57,$p.eve.pop()}).then(function(){n.access&&(n.access.force=!0,$p.eve.from_json_to_data_obj(n.access)),_md.printing_plates(n.printing_plates),$p.ajax.hasOwnProperty("root")&&delete $p.ajax.root,$p.ajax.__define("root",{value:!!n.root,writable:!1,enumerable:!1})}).then(function(){e($p.eve.steps.save_data_wsql)})},$p.eve.auto_log_in=function(){var e,t=$p.eve.stepper,n=$p.job_prm.data_url||"/data/",a=[];return t.zone=$p.wsql.get_user_param("zone")+"/",$p.ajax.get(n+"zones/"+t.zone+"p_0.json?v="+$p.job_prm.files_date).then(function(n){e=JSON.parse(n.response),t.files=e.files-1,t.step_size=e.files>0?Math.round(e.count_all/e.files):57,t.cat_ini_date=e.cat_date,$p.eve.from_json_to_data_obj(e)}).then(function(){for(var e=1;e<=t.files;e++)a.push($p.ajax.get(n+"zones/"+t.zone+"p_"+e+".json?v="+$p.job_prm.files_date));return a.push($p.ajax.get(n+"zones/"+t.zone+"ireg.json?v="+$p.job_prm.files_date)),$p.eve.reduce_promices(a,$p.eve.from_json_to_data_obj)}).then(function(){t.step_size=57})},$p.eve.update_files_version=function(){return $p.job_prm&&!$p.job_prm.offline&&$p.job_prm.data_url?($p.job_prm.files_date||($p.job_prm.files_date=$p.wsql.get_user_param("files_date","number")),$p.ajax.get($p.job_prm.data_url+"sync.json?v="+Date.now()).then(function(e){var t=JSON.parse(e.response);return $p.job_prm.confirmation||$p.job_prm.files_date==t.files_date||($p.wsql.set_user_param("files_date",t.files_date),t.clear_meta?$p.wsql.idx_connect(null,"meta").then(function(e){return $p.wsql.idx_clear(null,e,"meta")}).then(function(){return $p.wsql.idx_clear(null,db,"static")})["catch"]($p.record_log):t.clear_static&&$p.wsql.idx_connect(null,"static").then(function(e){return $p.wsql.idx_clear(null,e,"static")})["catch"]($p.record_log),$p.job_prm.files_date?($p.job_prm.confirmation=!0,dhtmlx.confirm({title:$p.msg.file_new_date_title,text:$p.msg.file_new_date,ok:"Перезагрузка",cancel:"Продолжить",callback:function(e){delete $p.job_prm.confirmation,e&&($p.eve.redirect=!0,location.reload(!0))}})):$p.job_prm.files_date=t.files_date),t.files_date})["catch"]($p.record_log)):Promise.resolve($p.wsql.get_user_param("files_date","number")||20160122e4)},$p.eve.ontimer=function(){$p.eve.update_files_version()},setInterval($p.eve.ontimer,18e4),$p.injected_data._mixin({"form_auth.xml":'<?xml version="1.0" encoding="UTF-8"?>\n<items>\n <item type="settings" position="label-left" labelWidth="150" inputWidth="230" noteWidth="230"/>\n <item type="fieldset" name="data" inputWidth="auto" label="Авторизация">\n\n <item type="radio" name="type" labelWidth="auto" position="label-right" checked="true" value="guest" label="Гостевой (демо) режим">\n <item type="select" name="guest" label="Роль">\n <option value="Дилер" label="Дилер"/>\n </item>\n </item>\n\n <item type="radio" name="type" labelWidth="auto" position="label-right" value="auth" label="Есть учетная запись">\n <item type="input" value="" name="login" label="Имя пользователя" validate="NotEmpty" />\n <item type="password" value="" name="password" label="Пароль" validate="NotEmpty" />\n </item>\n\n <item type="button" value="Войти" name="submit"/>\n\n <item type="template" name="text_options" className="order_dealer_options" inputWidth="231"\n value="&lt;a href=\'#\' onclick=\'$p.iface.open_settings();\' &gt; &lt;i class=\'fa fa-cog fa-lg\'&gt;&lt;/i&gt; Настройки &lt;/a&gt; &lt;a href=\'//www.oknosoft.ru/feedback\' target=\'_blank\' style=\'margin-left: 9px;\' &gt; &lt;i class=\'fa fa-question-circle fa-lg\'&gt;&lt;/i&gt; Задать вопрос &lt;/a&gt;" />\n\n </item>\n</items>',"toolbar_add_del.xml":'<?xml version="1.0" encoding=\'utf-8\'?>\r\n<toolbar>\r\n <item id="sep0" type="separator"/>\r\n <item type="button" id="btn_add" text="&lt;i class=\'fa fa-plus-circle fa-lg\'&gt;&lt;/i&gt; Добавить" title="Добавить строку" />\r\n <item type="button" id="btn_delete" text="&lt;i class=\'fa fa-times fa-lg\'&gt;&lt;/i&gt; Удалить" title="Удалить строку" />\r\n</toolbar>',"toolbar_obj.xml":'<?xml version="1.0" encoding=\'utf-8\'?>\r\n<toolbar>\r\n <item id="sep0" type="separator"/>\r\n <item type="button" id="btn_save_close" text="&lt;b&gt;Записать и закрыть&lt;/b&gt;" title="Рассчитать, записать и закрыть" />\r\n <item type="button" id="btn_save" text="&lt;i class=\'fa fa-floppy-o fa-lg fa-fw\'&gt;&lt;/i&gt;" title="Рассчитать и записать данные"/>\r\n <item type="button" id="btn_post" enabled="false" text="&lt;i class=\'fa fa-check-square-o fa-lg fa-fw\'&gt;&lt;/i&gt;" title="Провести документ" />\r\n <item type="button" id="btn_unpost" enabled="false" text="&lt;i class=\'fa fa-square-o fa-lg fa-fw\'&gt;&lt;/i&gt;" title="Отмена проведения" />\r\n\r\n <item type="button" id="btn_files" text="&lt;i class=\'fa fa-paperclip fa-lg fa-fw\'&gt;&lt;/i&gt;" title="Присоединенные файлы"/>\r\n\r\n <item type="buttonSelect" id="bs_print" text="&lt;i class=\'fa fa-print fa-lg fa-fw\'&gt;&lt;/i&gt;" title="Печать" openAll="true">\r\n </item>\r\n\r\n <item type="buttonSelect" id="bs_create_by_virtue" text="&lt;i class=\'fa fa-bolt fa-lg fa-fw\'&gt;&lt;/i&gt;" title="Создать на основании" openAll="true" >\r\n <item type="button" id="btn_message" enabled="false" text="Сообщение" />\r\n </item>\r\n\r\n <item type="buttonSelect" id="bs_go_to" text="&lt;i class=\'fa fa-external-link fa-lg fa-fw\'&gt;&lt;/i&gt;" title="Перейти" openAll="true" >\r\n <item type="button" id="btn_go_connection" enabled="false" text="Связи" />\r\n </item>\r\n\r\n <item type="buttonSelect" id="bs_more" text="&lt;i class=\'fa fa-th-large fa-lg fa-fw\'&gt;&lt;/i&gt;" title="Дополнительно" openAll="true">\r\n\r\n <item type="button" id="btn_import" text="&lt;i class=\'fa fa-upload fa-lg fa-fw\'&gt;&lt;/i&gt; Загрузить из файла" />\r\n <item type="button" id="btn_export" text="&lt;i class=\'fa fa-download fa-lg fa-fw\'&gt;&lt;/i&gt; Выгрузить в файл" />\r\n </item>\r\n\r\n <item id="sep1" type="separator"/>\r\n <item type="button" id="btn_close" text="&lt;i class=\'fa fa-times fa-lg fa-fw\'&gt;&lt;/i&gt;" title="Закрыть форму"/>\r\n <item id="sep2" type="separator"/>\r\n\r\n</toolbar>\r\n',"toolbar_ok_cancel.xml":'<?xml version="1.0" encoding=\'utf-8\'?>\r\n<toolbar>\r\n <item id="btn_ok" type="button" img="" imgdis="" text="&lt;b&gt;Ок&lt;/b&gt;" />\r\n <item id="btn_cancel" type="button" img="" imgdis="" text="Отмена" />\r\n</toolbar>',"toolbar_selection.xml":'<?xml version="1.0" encoding=\'utf-8\'?>\r\n<toolbar>\r\n\r\n <item id="sep0" type="separator"/>\r\n\r\n <item id="btn_select" type="button" title="Выбрать элемент списка" text="&lt;b&gt;Выбрать&lt;/b&gt;" />\r\n\r\n <item id="sep1" type="separator"/>\r\n <item id="btn_new" type="button" text="&lt;i class=\'fa fa-plus-circle fa-lg\'&gt;&lt;/i&gt;" title="Создать" />\r\n <item id="btn_edit" type="button" text="&lt;i class=\'fa fa-pencil fa-lg\'&gt;&lt;/i&gt;" title="Изменить" />\r\n <item id="btn_delete" type="button" text="&lt;i class=\'fa fa-times fa-lg\'&gt;&lt;/i&gt;" title="Удалить" />\r\n <item id="sep2" type="separator"/>\r\n\r\n <item type="buttonSelect" id="bs_print" text="&lt;i class=\'fa fa-print fa-lg\'&gt;&lt;/i&gt; Печать" openAll="true" >\r\n </item>\r\n\r\n <item type="buttonSelect" id="bs_more" text="&lt;i class=\'fa fa-th-large fa-lg\'&gt;&lt;/i&gt;" title="Дополнительно" openAll="true">\r\n <item id="btn_requery" type="button" text="&lt;i class=\'fa fa-refresh fa-lg fa-fw\'&gt;&lt;/i&gt; Обновить список" />\r\n </item>\r\n\r\n <item id="sep3" type="separator"/>\r\n\r\n</toolbar>',"log.json":{ireg:{$log:{name:"$log",note:"",synonym:"Журнал событий",dimensions:{date:{synonym:"Дата",multiline_mode:!1,tooltip:"Время события",type:{types:["number"],digits:15,fraction_figits:0}},sequence:{synonym:"Порядок",multiline_mode:!1,tooltip:"Порядок следования",type:{types:["number"],digits:6,fraction_figits:0}}},resources:{"class":{synonym:"Класс",multiline_mode:!1,tooltip:"Класс события",type:{types:["string"],str_len:100}},note:{synonym:"Комментарий",multiline_mode:!0,tooltip:"Текст события",type:{types:["string"],str_len:0}},obj:{synonym:"Объект",tooltip:"Объект, к которому относится событие",type:{types:["string"],str_len:0}}}}}}});var xmlToJSON=function(){this.version="1.3";var e={mergeCDATA:!0,grokAttr:!0,grokText:!0,normalize:!0,xmlns:!0,namespaceKey:"_ns",textKey:"_text",valueKey:"_value",attrKey:"_attr",cdataKey:"_cdata",attrsAsObject:!0,stripAttrPrefix:!0,stripElemPrefix:!0,childrenAsArray:!0},t=new RegExp(/(?!xmlns)^.*:/),n=new RegExp(/^\s+|\s+$/g);return this.grokType=function(e){return/^\s*$/.test(e)?null:/^(?:true|false)$/i.test(e)?"true"===e.toLowerCase():isFinite(e)?parseFloat(e):e},this.parseString=function(e,t){return this.parseXML(this.stringToXML(e),t)},this.parseXML=function(a,r){for(var o in r)e[o]=r[o];var i={},s=0,l="";if(e.xmlns&&a.namespaceURI&&(i[e.namespaceKey]=a.namespaceURI),a.attributes&&a.attributes.length>0){var c={};for(s;s<a.attributes.length;s++){var d=a.attributes.item(s);f={};var p="";p=e.stripAttrPrefix?d.name.replace(t,""):d.name,e.grokAttr?f[e.valueKey]=this.grokType(d.value.replace(n,"")):f[e.valueKey]=d.value.replace(n,""),e.xmlns&&d.namespaceURI&&(f[e.namespaceKey]=d.namespaceURI),e.attrsAsObject?c[p]=f:i[e.attrKey+p]=f}e.attrsAsObject&&(i[e.attrKey]=c)}if(a.hasChildNodes())for(var _,u,f,m=0;m<a.childNodes.length;m++)_=a.childNodes.item(m),4===_.nodeType?e.mergeCDATA?l+=_.nodeValue:i.hasOwnProperty(e.cdataKey)?(i[e.cdataKey].constructor!==Array&&(i[e.cdataKey]=[i[e.cdataKey]]),i[e.cdataKey].push(_.nodeValue)):e.childrenAsArray?(i[e.cdataKey]=[],i[e.cdataKey].push(_.nodeValue)):i[e.cdataKey]=_.nodeValue:3===_.nodeType?l+=_.nodeValue:1===_.nodeType&&(0===s&&(i={}),u=e.stripElemPrefix?_.nodeName.replace(t,""):_.nodeName,f=xmlToJSON.parseXML(_),i.hasOwnProperty(u)?(i[u].constructor!==Array&&(i[u]=[i[u]]),i[u].push(f)):(e.childrenAsArray?(i[u]=[],i[u].push(f)):i[u]=f,s++));else l||(e.childrenAsArray?(i[e.textKey]=[],i[e.textKey].push(null)):i[e.textKey]=null);if(l)if(e.grokText){var h=this.grokType(l.replace(n,""));null!==h&&void 0!==h&&(i[e.textKey]=h)}else e.normalize?i[e.textKey]=l.replace(n,"").replace(/\s+/g," "):i[e.textKey]=l.replace(n,"");return i},this.xmlToString=function(e){try{var t=e.xml?e.xml:(new XMLSerializer).serializeToString(e);return t}catch(n){return null}},this.stringToXML=function(e){try{var t=null;if(window.DOMParser){var n=new DOMParser;return t=n.parseFromString(e,"text/xml")}return t=new ActiveXObject("Microsoft.XMLDOM"),t.async=!1,t.loadXML(e),t}catch(a){return null}},this}();"undefined"!=typeof module&&null!==module&&module.exports?module.exports=xmlToJSON:"function"==typeof define&&define.amd&&define(function(){return xmlToJSON});/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ var saveAs=saveAs||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,n=function(){return e.URL||e.webkitURL||e},a=t.createElementNS("http://www.w3.org/1999/xhtml","a"),r="download"in a,o=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},i=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),s=e.webkitRequestFileSystem,l=e.requestFileSystem||s||e.mozRequestFileSystem,c=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},d="application/octet-stream",p=0,_=500,u=function(t){var a=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};e.chrome?a():setTimeout(a,_)},f=function(e,t,n){t=[].concat(t);for(var a=t.length;a--;){var r=e["on"+t[a]];if("function"==typeof r)try{r.call(e,n||e)}catch(o){c(o)}}},m=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e},h=function(t,c,_){_||(t=m(t));var h,g,b,y=this,v=t.type,w=!1,$=function(){f(y,"writestart progress write writeend".split(" "))},x=function(){if(g&&i&&"undefined"!=typeof FileReader){var a=new FileReader;return a.onloadend=function(){var e=a.result;g.location.href="data:attachment/file"+e.slice(e.search(/[,;]/)),y.readyState=y.DONE,$()},a.readAsDataURL(t),void(y.readyState=y.INIT)}if((w||!h)&&(h=n().createObjectURL(t)),g)g.location.href=h;else{var r=e.open(h,"_blank");void 0==r&&i&&(e.location.href=h)}y.readyState=y.DONE,$(),u(h)},j=function(e){return function(){return y.readyState!==y.DONE?e.apply(this,arguments):void 0}},O={create:!0,exclusive:!1};return y.readyState=y.INIT,c||(c="download"),r?(h=n().createObjectURL(t),void setTimeout(function(){a.href=h,a.download=c,o(a),$(),u(h),y.readyState=y.DONE})):(e.chrome&&v&&v!==d&&(b=t.slice||t.webkitSlice,t=b.call(t,0,t.size,d),w=!0),s&&"download"!==c&&(c+=".download"),(v===d||s)&&(g=e),l?(p+=t.size,void l(e.TEMPORARY,p,j(function(e){e.root.getDirectory("saved",O,j(function(e){var n=function(){e.getFile(c,O,j(function(e){e.createWriter(j(function(n){n.onwriteend=function(t){g.location.href=e.toURL(),y.readyState=y.DONE,f(y,"writeend",t),u(e)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&x()},"writestart progress write abort".split(" ").forEach(function(e){n["on"+e]=y["on"+e]}),n.write(t),y.abort=function(){n.abort(),y.readyState=y.DONE},y.readyState=y.WRITING}),x)}),x)};e.getFile(c,{create:!1},j(function(e){e.remove(),n()}),j(function(e){e.code===e.NOT_FOUND_ERR?n():x()}))}),x)}),x)):void x())},g=h.prototype,b=function(e,t,n){return new h(e,t,n)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,n){return n||(e=m(e)),navigator.msSaveOrOpenBlob(e,t||"download")}:(g.abort=function(){var e=this;e.readyState=e.DONE,f(e,"abort")},g.readyState=g.INIT=0,g.WRITING=1,g.DONE=2,g.error=g.onwritestart=g.onprogress=g.onwrite=g.onabort=g.onerror=g.onwriteend=null,b)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);return"undefined"!=typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!=typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs}),$p});
packages/website/builder/pages/docs/nav.js
christianalfoni/cerebral
import React from 'react' function Navigation(props) { // To understand how navigation is composed, start from the bottom function Headings({ toc, path }) { if (!toc.length) { return null } return ( <ul> {toc.map(function(item, index) { const href = `${path}#${item.id}` return ( <li key={index}> {item.children.length > 0 && <input id={href} className="nav_toggle" type="checkbox" defaultChecked={false} />} <a className={`nav_toggle-label nav_item-name nav_sublink ${item.children.length ? '' : 'nav_childless'}`} href={href} > {item.title} </a> <Headings toc={item.children} path={path} /> </li> ) })} </ul> ) } function Pages(props) { return ( <ul> {Object.keys(props.pages).map((pageKey, index) => { const page = props.pages[pageKey].toc[0] const path = index === 0 ? `/docs/${props.sectionKey}/index.html` : `/docs/${props.sectionKey}/${pageKey}.html` const open = pageKey === props.docName && props.sectionOpen return ( <li key={index} className={`nav_page-item ${open ? 'nav_open' : ''}`} > {page.children.length > 0 && <input id={path} className="nav_toggle" type="checkbox" defaultChecked={open} />} <a className={`nav_toggle-label nav_item-name nav_link nav_page ${page.children.length ? '' : 'nav_childless'}`} href={path} > {page.title} </a> <Headings toc={page.children} path={path} /> </li> ) })} </ul> ) } function Sections(props) { return ( <ul> {Object.keys(props.docs).map(function(sectionKey, index) { const open = props.sectionName === sectionKey return ( <li key={index} className={`nav_section-item ${open ? 'nav_open' : ''}`} > <input id={sectionKey} className="nav_toggle" type="checkbox" defaultChecked={open} /> <div className="nav_item-name nav_toggle-label nav_section"> {sectionKey.replace('_', ' ').toUpperCase()} </div> <Pages docName={props.docName} sectionKey={sectionKey} sectionOpen={open} pages={props.docs[sectionKey]} /> </li> ) })} </ul> ) } function Search() { return ( <div id="nav_search"> <input id="search-docs" autoFocus type="text" placeholder="search..." /> <div id="search-result" /> </div> ) } function Header() { return ( <div id="nav_header"> <a className="logo" href="/" /> <span style={{ fontSize: '24px' }}>Cerebral</span> <Search /> <a href="https://github.com/cerebral/cerebral" className="nav_button" target="_new" title="GitHub" > <div className="nav_button-github" /> Open repo </a> <a href="https://discord.gg/0kIweV4bd2bwwsvH" className="nav_button" target="_new" title="Chat" > <div className="nav_button-discord" /> Talk to us </a> <a href="https://twitter.com/cerebraljs" className="nav_button" target="_new" title="Chat" > <div className="nav_button-twitter" /> Tweet about Cerebral </a> </div> ) } return ( <div id="nav"> <Header /> <Sections docs={props.docs} docName={props.docName} sectionName={props.sectionName} /> </div> ) } export default Navigation
ajax/libs/asynquence-contrib/0.1.10-i/contrib.js
dlueth/cdnjs
/*! asynquence-contrib v0.1.10-i (c) Kyle Simpson MIT License: http://getify.mit-license.org */ !function(n,t){"undefined"!=typeof module&&module.exports?module.exports=t(require(n)):"function"==typeof define&&define.amd?define([n],t):t(n)}(this.ASQ||"asynquence",function(n){"use strict";var t=Array.prototype.slice,e=Object.create(null);return n.extend("all",function(n){return n.gate}),n.extend("any",function(r,a){return function(){if(a("seq_error")||a("seq_aborted")||0===arguments.length)return r;var u=t.call(arguments);return r.then(function(r){function a(){var n;o===u.length&&(n=[],l?(u.forEach(function(t,e){n.push(s["s"+e])}),r.apply(e,n)):(u.forEach(function(t,e){n.push(c["s"+e])}),r.fail.apply(e,n)))}var l=!1,o=0,s={},c={},i=n.apply(e,t.call(arguments,1));u=u.map(function(u,i){return function(p){var f=t.call(arguments);f[0]=function(){l=!0,o++,s["s"+i]=arguments.length>1?n.messages.apply(e,arguments):arguments[0],a()},f[0].fail=function(){o++,c["s"+i]=arguments.length>1?n.messages.apply(e,arguments):arguments[0],a()},f[0].abort=function(){l||(p.abort(),r.abort())},u.apply(e,f)}}),i.gate.apply(e,u)}),r}}),n.extend("errfcb",function(n){return function(){var r={then:function(n){return r.then_cb=n,r},or:function(n){return r.or_cb=n,r},__ASQ__:!0,next:!0};return n.seq(r),function(n){n?r.or_cb(n):r.then_cb.apply(e,t.call(arguments,1))}}}),n.extend("first",function(r,a){return function(){if(a("seq_error")||a("seq_aborted")||0===arguments.length)return r;var u=t.call(arguments);return r.then(function(r){var a=0,l={},o=!1,s=n.apply(e,t.call(arguments,1));u=u.map(function(c,i){return function(p){var f=t.call(arguments);f[0]=function(){o||(o=!0,a++,r(arguments.length>1?n.messages.apply(e,arguments):arguments[0]),s.abort())},f[0].fail=function(){var t=[];a++,l["s"+i]=arguments.length>1?n.messages.apply(e,arguments):arguments[0],o||a!==u.length||(u.forEach(function(n,e){t.push(l["s"+e])}),r.fail.apply(e,t))},f[0].abort=function(){o||(p.abort(),r.abort())},c.apply(e,f)}}),s.gate.apply(e,u)}),r}}),function(){var r;n.iterable=function(){function a(n){return"undefined"!=typeof setImmediate?setImmediate(n):setTimeout(n,0)}function u(){var n;if(h=null,q.length>0)for(;_.length>0;){n=_.shift();try{n.apply(e,q)}catch(t){checkBranding(t)?q=q.concat(t):(q.push(t),t.stack&&q.push(t.stack)),0===_.length&&console.error.apply(console,q)}}}function l(){return v||d||0===arguments.length?m:(b.push.apply(b,arguments),m)}function o(){return d||0===arguments.length?m:(_.push.apply(_,arguments),h||(h=a(u)),m)}function s(){return d||0===arguments.length?m:(t.call(arguments).forEach(function(n){l(n).or(n.fail)}),m)}function c(){if(v||d||0===b.length)return b.length>0&&i("Sequence cannot be iterated"),{done:!0};try{return{value:b.shift().apply(e,arguments)}}catch(t){return n.isMessageWrapper(t)?i.apply(e,t):t.stack?i(t,t.stack):i(t),{}}}function i(){return v||d?m:(q.push.apply(q,arguments),v=!0,h||(h=a(u)),m)}function p(){v||d||(d=!0,clearTimeout(h),h=null,b.length=0,_.length=0,q.length=0)}function f(){var t;return r={val_queue:b.slice(0),or_queue:_.slice(0)},t=n.iterable(),r=null,t}function g(n){return Object.defineProperty(n,y,{enumerable:!1,value:!0}),n}var m,h,y="__ASQ__",v=!1,d=!1,b=[],_=[],q=[];return m=g({val:l,then:l,or:o,pipe:s,next:c,"throw":i,abort:p,duplicate:f}),m["object"==typeof Symbol&&null!=Symbol&&Symbol.iterator||"@@iterator"]=function(){return m},r&&(b=r.val_queue.slice(0),_=r.or_queue.slice(0)),m.val.apply(e,arguments),m}}(),n.extend("last",function(r,a){return function(){if(a("seq_error")||a("seq_aborted")||0===arguments.length)return r;var u=t.call(arguments);return r.then(function(r){function a(){var n;o===u.length&&(n=[],l?r(s):(u.forEach(function(t,e){n.push(c["s"+e])}),r.fail.apply(e,n)))}var l=!1,o=0,s={},c={},i=n.apply(e,t.call(arguments,1));u=u.map(function(u,i){return function(p){var f=t.call(arguments);f[0]=function(){l=!0,o++,s=arguments.length>1?n.messages.apply(e,arguments):arguments[0],a()},f[0].fail=function(){o++,c["s"+i]=arguments.length>1?n.messages.apply(e,arguments):arguments[0],a()},f[0].abort=function(){l||(p.abort(),r.abort())},u.apply(e,f)}}),i.gate.apply(e,u)}),r}}),n.extend("map",function(r,a){return function(u,l){return a("seq_error")||a("seq_aborted")?r:(r.seq(function(){var r,a=t.call(arguments);return l||(l=a.shift()),u||(u=a.shift()),"function"==typeof u&&Array.isArray(l)&&(r=u,u=l,l=r),n.apply(e,a).gate.apply(e,u.map(function(n){return function(){l.apply(e,[n].concat(t.call(arguments)))}}))}).val(function(){return t.call(arguments)}),r)}}),n.extend("none",function(r,a){return function(){if(a("seq_error")||a("seq_aborted")||0===arguments.length)return r;var u=t.call(arguments);return r.then(function(r){function a(){var n;o===u.length&&(n=[],l?(u.forEach(function(t,e){n.push(s["s"+e])}),r.fail.apply(e,n)):(u.forEach(function(t,e){n.push(c["s"+e])}),r.apply(e,n)))}var l=!1,o=0,s={},c={},i=n.apply(e,t.call(arguments,1));u=u.map(function(u,i){return function(p){var f=t.call(arguments);f[0]=function(){l=!0,o++,s["s"+i]=arguments.length>1?n.messages.apply(e,arguments):arguments[0],a()},f[0].fail=function(){o++,c["s"+i]=arguments.length>1?n.messages.apply(e,arguments):arguments[0],a()},f[0].abort=function(){l||(p.abort(),r.abort())},u.apply(e,f)}}),i.gate.apply(e,u)}),r}}),n.react=function(t){function r(){var n=a.duplicate();return n.unpause.apply(e,arguments),n}var a;return n(function(){t(r)}),a=n().duplicate()},n.extend("runner",function(r,a){return function(){if(a("seq_error")||a("seq_aborted")||0===arguments.length)return r;var u=t.call(arguments);return r.then(function(r){var a,l,o,s=t.call(arguments,1);u=u.map(function(t){var u=t;return"function"==typeof t&&t.constructor&&"GeneratorFunction"===t.constructor.name?(u=t.apply(e,s),s=[]):n.isSequence(t)&&"next"in t||(a=s.slice(),s=[],u=n.iterable().val(function(){return t.apply(e,a)})),n.isSequence(u)&&u.or(function(){r.fail.apply(e,arguments)}),u}),function c(){l=u.shift();try{o=l.next.apply(l,s)}catch(a){return r.fail(a)}n.isSequence(o.value)||(o.value=null!==o.value&&("object"==typeof o.value||"function"==typeof o.value)&&"then"in o.value?n().promise(o.value):n.apply(e,"undefined"!=typeof o.value?[o.value]:[])),o.value.val(function(){arguments.length>0&&(s=t.call(arguments)),o.done||u.push(l),u.length>0?c():r.apply(e,s)}).or(function(){l["throw"].apply(e,arguments)})}()}),r}}),n.extend("try",function(r,a){return function(){if(a("seq_error")||a("seq_aborted")||0===arguments.length)return r;var u=t.call(arguments).map(function(r){return function(a){var u=t.call(arguments),l=n.apply(e,u.slice(1));l.then(function(){r.apply(e,arguments)}).val(function(){a.apply(e,arguments)}).or(function(){var t=n.messages.apply(e,arguments);a({"catch":t.length>1?t:t[0]})})}});return r.then.apply(e,u),r}}),n.extend("until",function(r,a){return function(){if(a("seq_error")||a("seq_aborted")||0===arguments.length)return r;var u=t.call(arguments).map(function(r){return function a(u){var l=t.call(arguments),o=n.apply(e,l.slice(1));o.then(function(){var n=t.call(arguments);n[0]["break"]=function(){u.fail.apply(e,arguments),o.abort()},r.apply(e,n)}).val(function(){u.apply(e,arguments)}).or(function(){a.apply(e,l)})}});return r.then.apply(e,u),r}}),n.extend("waterfall",function(r,a){return function(){if(a("seq_error")||a("seq_aborted")||0===arguments.length)return r;var u=n.messages();return t.call(arguments).forEach(function(t){r.then(t).val(function(){var t=n.messages.apply(e,arguments);return u.push(t.length>1?t:t[0]),u})}),r}}),{}});
ajax/libs/yui/3.17.1/datatable-core/datatable-core-debug.js
askehansen/cdnjs
/* YUI 3.17.1 (build 0eb5a52) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add('datatable-core', function (Y, NAME) { /** The core implementation of the `DataTable` and `DataTable.Base` Widgets. @module datatable @submodule datatable-core @since 3.5.0 **/ var INVALID = Y.Attribute.INVALID_VALUE, Lang = Y.Lang, isFunction = Lang.isFunction, isObject = Lang.isObject, isArray = Lang.isArray, isString = Lang.isString, isNumber = Lang.isNumber, toArray = Y.Array, keys = Y.Object.keys, Table; /** _API docs for this extension are included in the DataTable class._ Class extension providing the core API and structure for the DataTable Widget. Use this class extension with Widget or another Base-based superclass to create the basic DataTable model API and composing class structure. @class DataTable.Core @for DataTable @since 3.5.0 **/ Table = Y.namespace('DataTable').Core = function () {}; Table.ATTRS = { /** Columns to include in the rendered table. If omitted, the attributes on the configured `recordType` or the first item in the `data` collection will be used as a source. This attribute takes an array of strings or objects (mixing the two is fine). Each string or object is considered a column to be rendered. Strings are converted to objects, so `columns: ['first', 'last']` becomes `columns: [{ key: 'first' }, { key: 'last' }]`. DataTable.Core only concerns itself with a few properties of columns. These properties are: * `key` - Used to identify the record field/attribute containing content for this column. Also used to create a default Model if no `recordType` or `data` are provided during construction. If `name` is not specified, this is assigned to the `_id` property (with added incrementer if the key is used by multiple columns). * `children` - Traversed to initialize nested column objects * `name` - Used in place of, or in addition to, the `key`. Useful for columns that aren't bound to a field/attribute in the record data. This is assigned to the `_id` property. * `id` - For backward compatibility. Implementers can specify the id of the header cell. This should be avoided, if possible, to avoid the potential for creating DOM elements with duplicate IDs. * `field` - For backward compatibility. Implementers should use `name`. * `_id` - Assigned unique-within-this-instance id for a column. By order of preference, assumes the value of `name`, `key`, `id`, or `_yuid`. This is used by the rendering views as well as feature module as a means to identify a specific column without ambiguity (such as multiple columns using the same `key`. * `_yuid` - Guid stamp assigned to the column object. * `_parent` - Assigned to all child columns, referencing their parent column. @attribute columns @type {Object[]|String[]} @default (from `recordType` ATTRS or first item in the `data`) @since 3.5.0 **/ columns: { // TODO: change to setter to clone input array/objects validator: isArray, setter: '_setColumns', getter: '_getColumns' }, /** Model subclass to use as the `model` for the ModelList stored in the `data` attribute. If not provided, it will try really hard to figure out what to use. The following attempts will be made to set a default value: 1. If the `data` attribute is set with a ModelList instance and its `model` property is set, that will be used. 2. If the `data` attribute is set with a ModelList instance, and its `model` property is unset, but it is populated, the `ATTRS` of the `constructor of the first item will be used. 3. If the `data` attribute is set with a non-empty array, a Model subclass will be generated using the keys of the first item as its `ATTRS` (see the `_createRecordClass` method). 4. If the `columns` attribute is set, a Model subclass will be generated using the columns defined with a `key`. This is least desirable because columns can be duplicated or nested in a way that's not parsable. 5. If neither `data` nor `columns` is set or populated, a change event subscriber will listen for the first to be changed and try all over again. @attribute recordType @type {Function} @default (see description) @since 3.5.0 **/ recordType: { getter: '_getRecordType', setter: '_setRecordType' }, /** The collection of data records to display. This attribute is a pass through to a `data` property, which is a ModelList instance. If this attribute is passed a ModelList or subclass, it will be assigned to the property directly. If an array of objects is passed, a new ModelList will be created using the configured `recordType` as its `model` property and seeded with the array. Retrieving this attribute will return the ModelList stored in the `data` property. @attribute data @type {ModelList|Object[]} @default `new ModelList()` @since 3.5.0 **/ data: { valueFn: '_initData', setter : '_setData', lazyAdd: false }, /** Content for the `<table summary="ATTRIBUTE VALUE HERE">`. Values assigned to this attribute will be HTML escaped for security. @attribute summary @type {String} @default '' (empty string) @since 3.5.0 **/ //summary: {}, /** HTML content of an optional `<caption>` element to appear above the table. Leave this config unset or set to a falsy value to remove the caption. @attribute caption @type HTML @default '' (empty string) @since 3.5.0 **/ //caption: {}, /** Deprecated as of 3.5.0. Passes through to the `data` attribute. WARNING: `get('recordset')` will NOT return a Recordset instance as of 3.5.0. This is a break in backward compatibility. @attribute recordset @type {Object[]|Recordset} @deprecated Use the `data` attribute @since 3.5.0 **/ recordset: { setter: '_setRecordset', getter: '_getRecordset', lazyAdd: false }, /** Deprecated as of 3.5.0. Passes through to the `columns` attribute. WARNING: `get('columnset')` will NOT return a Columnset instance as of 3.5.0. This is a break in backward compatibility. @attribute columnset @type {Object[]} @deprecated Use the `columns` attribute @since 3.5.0 **/ columnset: { setter: '_setColumnset', getter: '_getColumnset', lazyAdd: false } }; Y.mix(Table.prototype, { // -- Instance properties ------------------------------------------------- /** The ModelList that manages the table's data. @property data @type {ModelList} @default undefined (initially unset) @since 3.5.0 **/ //data: null, // -- Public methods ------------------------------------------------------ /** Gets the column configuration object for the given key, name, or index. For nested columns, `name` can be an array of indexes, each identifying the index of that column in the respective parent's "children" array. If you pass a column object, it will be returned. For columns with keys, you can also fetch the column with `instance.get('columns.foo')`. @method getColumn @param {String|Number|Number[]} name Key, "name", index, or index array to identify the column @return {Object} the column configuration object @since 3.5.0 **/ getColumn: function (name) { var col, columns, i, len, cols; if (isObject(name) && !isArray(name)) { if (name && name._node) { col = this.body.getColumn(name); } else { col = name; } } else { col = this.get('columns.' + name); } if (col) { return col; } columns = this.get('columns'); if (isNumber(name) || isArray(name)) { name = toArray(name); cols = columns; for (i = 0, len = name.length - 1; cols && i < len; ++i) { cols = cols[name[i]] && cols[name[i]].children; } return (cols && cols[name[i]]) || null; } return null; }, /** Returns the Model associated to the record `id`, `clientId`, or index (not row index). If none of those yield a Model from the `data` ModelList, the arguments will be passed to the `view` instance's `getRecord` method if it has one. If no Model can be found, `null` is returned. @method getRecord @param {Number|String|Node} seed Record `id`, `clientId`, index, Node, or identifier for a row or child element @return {Model} @since 3.5.0 **/ getRecord: function (seed) { var record = this.data.getById(seed) || this.data.getByClientId(seed); if (!record) { if (isNumber(seed)) { record = this.data.item(seed); } // TODO: this should be split out to base somehow if (!record && this.view && this.view.getRecord) { record = this.view.getRecord.apply(this.view, arguments); } } return record || null; }, // -- Protected and private properties and methods ------------------------ /** This tells `Y.Base` that it should create ad-hoc attributes for config properties passed to DataTable's constructor. This is useful for setting configurations on the DataTable that are intended for the rendering View(s). @property _allowAdHocAttrs @type Boolean @default true @protected @since 3.6.0 **/ _allowAdHocAttrs: true, /** A map of column key to column configuration objects parsed from the `columns` attribute. @property _columnMap @type {Object} @default undefined (initially unset) @protected @since 3.5.0 **/ //_columnMap: null, /** The Node instance of the table containing the data rows. This is set when the table is rendered. It may also be set by progressive enhancement, though this extension does not provide the logic to parse from source. @property _tableNode @type {Node} @default undefined (initially unset) @protected @since 3.5.0 **/ //_tableNode: null, /** Updates the `_columnMap` property in response to changes in the `columns` attribute. @method _afterColumnsChange @param {EventFacade} e The `columnsChange` event object @protected @since 3.5.0 **/ _afterColumnsChange: function (e) { this._setColumnMap(e.newVal); }, /** Updates the `modelList` attributes of the rendered views in response to the `data` attribute being assigned a new ModelList. @method _afterDataChange @param {EventFacade} e the `dataChange` event @protected @since 3.5.0 **/ _afterDataChange: function (e) { var modelList = e.newVal; this.data = e.newVal; if (!this.get('columns') && modelList.size()) { // TODO: this will cause a re-render twice because the Views are // subscribed to columnsChange this._initColumns(); } }, /** Assigns to the new recordType as the model for the data ModelList @method _afterRecordTypeChange @param {EventFacade} e recordTypeChange event @protected @since 3.6.0 **/ _afterRecordTypeChange: function (e) { var data = this.data.toJSON(); this.data.model = e.newVal; this.data.reset(data); if (!this.get('columns') && data) { if (data.length) { this._initColumns(); } else { this.set('columns', keys(e.newVal.ATTRS)); } } }, /** Creates a Model subclass from an array of attribute names or an object of attribute definitions. This is used to generate a class suitable to represent the data passed to the `data` attribute if no `recordType` is set. @method _createRecordClass @param {String[]|Object} attrs Names assigned to the Model subclass's `ATTRS` or its entire `ATTRS` definition object @return {Model} @protected @since 3.5.0 **/ _createRecordClass: function (attrs) { var ATTRS, i, len; if (isArray(attrs)) { ATTRS = {}; for (i = 0, len = attrs.length; i < len; ++i) { ATTRS[attrs[i]] = {}; } } else if (isObject(attrs)) { ATTRS = attrs; } return Y.Base.create('record', Y.Model, [], null, { ATTRS: ATTRS }); }, /** Tears down the instance. @method destructor @protected @since 3.6.0 **/ destructor: function () { new Y.EventHandle(Y.Object.values(this._eventHandles)).detach(); }, /** The getter for the `columns` attribute. Returns the array of column configuration objects if `instance.get('columns')` is called, or the specific column object if `instance.get('columns.columnKey')` is called. @method _getColumns @param {Object[]} columns The full array of column objects @param {String} name The attribute name requested (e.g. 'columns' or 'columns.foo'); @protected @since 3.5.0 **/ _getColumns: function (columns, name) { // Workaround for an attribute oddity (ticket #2529254) // getter is expected to return an object if get('columns.foo') is called. // Note 'columns.' is 8 characters return name.length > 8 ? this._columnMap : columns; }, /** Relays the `get()` request for the deprecated `columnset` attribute to the `columns` attribute. THIS BREAKS BACKWARD COMPATIBILITY. 3.4.1 and prior implementations will expect a Columnset instance returned from `get('columnset')`. @method _getColumnset @param {Object} ignored The current value stored in the `columnset` state @param {String} name The attribute name requested (e.g. 'columnset' or 'columnset.foo'); @deprecated This will be removed with the `columnset` attribute in a future version. @protected @since 3.5.0 **/ _getColumnset: function (_, name) { return this.get(name.replace(/^columnset/, 'columns')); }, /** Returns the Model class of the instance's `data` attribute ModelList. If not set, returns the explicitly configured value. @method _getRecordType @param {Model} val The currently configured value @return {Model} **/ _getRecordType: function (val) { // Prefer the value stored in the attribute because the attribute // change event defaultFn sets e.newVal = this.get('recordType') // before notifying the after() subs. But if this getter returns // this.data.model, then after() subs would get e.newVal === previous // model before _afterRecordTypeChange can set // this.data.model = e.newVal return val || (this.data && this.data.model); }, /** Initializes the `_columnMap` property from the configured `columns` attribute. If `columns` is not set, but there are records in the `data` ModelList, use `ATTRS` of that class. @method _initColumns @protected @since 3.5.0 **/ _initColumns: function () { var columns = this.get('columns') || [], item; // Default column definition from the configured recordType if (!columns.length && this.data.size()) { // TODO: merge superclass attributes up to Model? item = this.data.item(0); if (item.toJSON) { item = item.toJSON(); } this.set('columns', keys(item)); } this._setColumnMap(columns); }, /** Sets up the change event subscriptions to maintain internal state. @method _initCoreEvents @protected @since 3.6.0 **/ _initCoreEvents: function () { this._eventHandles.coreAttrChanges = this.after({ columnsChange : Y.bind('_afterColumnsChange', this), recordTypeChange: Y.bind('_afterRecordTypeChange', this), dataChange : Y.bind('_afterDataChange', this) }); }, /** Defaults the `data` attribute to an empty ModelList if not set during construction. Uses the configured `recordType` for the ModelList's `model` proeprty if set. @method _initData @protected @return {ModelList} @since 3.6.0 **/ _initData: function () { var recordType = this.get('recordType'), // TODO: LazyModelList if recordType doesn't have complex ATTRS modelList = new Y.ModelList(); if (recordType) { modelList.model = recordType; } return modelList; }, /** Initializes the instance's `data` property from the value of the `data` attribute. If the attribute value is a ModelList, it is assigned directly to `this.data`. If it is an array, a ModelList is created, its `model` property is set to the configured `recordType` class, and it is seeded with the array data. This ModelList is then assigned to `this.data`. @method _initDataProperty @param {Array|ModelList|ArrayList} data Collection of data to populate the DataTable @protected @since 3.6.0 **/ _initDataProperty: function (data) { var recordType; if (!this.data) { recordType = this.get('recordType'); if (data && data.each && data.toJSON) { this.data = data; if (recordType) { this.data.model = recordType; } } else { // TODO: customize the ModelList or read the ModelList class // from a configuration option? this.data = new Y.ModelList(); if (recordType) { this.data.model = recordType; } } // TODO: Replace this with an event relay for specific events. // Using bubbling causes subscription conflicts with the models' // aggregated change event and 'change' events from DOM elements // inside the table (via Widget UI event). this.data.addTarget(this); } }, /** Initializes the columns, `recordType` and data ModelList. @method initializer @param {Object} config Configuration object passed to constructor @protected @since 3.5.0 **/ initializer: function (config) { var data = config.data, columns = config.columns, recordType; // Referencing config.data to allow _setData to be more stringent // about its behavior this._initDataProperty(data); // Default columns from recordType ATTRS if recordType is supplied at // construction. If no recordType is supplied, but the data is // supplied as a non-empty array, use the keys of the first item // as the columns. if (!columns) { recordType = (config.recordType || config.data === this.data) && this.get('recordType'); if (recordType) { columns = keys(recordType.ATTRS); } else if (isArray(data) && data.length) { columns = keys(data[0]); } if (columns) { this.set('columns', columns); } } this._initColumns(); this._eventHandles = {}; this._initCoreEvents(); }, /** Iterates the array of column configurations to capture all columns with a `key` property. An map is built with column keys as the property name and the corresponding column object as the associated value. This map is then assigned to the instance's `_columnMap` property. @method _setColumnMap @param {Object[]|String[]} columns The array of column config objects @protected @since 3.6.0 **/ _setColumnMap: function (columns) { var map = {}; function process(cols) { var i, len, col, key; for (i = 0, len = cols.length; i < len; ++i) { col = cols[i]; key = col.key; // First in wins for multiple columns with the same key // because the first call to genId (in _setColumns) will // return the same key, which will then be overwritten by the // subsequent same-keyed column. So table.getColumn(key) would // return the last same-keyed column. if (key && !map[key]) { map[key] = col; } else {Y.log('Key of column matches existing key or name: ' + key, 'warn', NAME);} if (map[col._id]) {Y.log('Key of column matches existing key or name: ' + col._id, 'warn', NAME);} //TODO: named columns can conflict with keyed columns map[col._id] = col; if (col.children) { process(col.children); } } } process(columns); this._columnMap = map; }, /** Translates string columns into objects with that string as the value of its `key` property. All columns are assigned a `_yuid` stamp and `_id` property corresponding to the column's configured `name` or `key` property with any spaces replaced with dashes. If the same `name` or `key` appears in multiple columns, subsequent appearances will have their `_id` appended with an incrementing number (e.g. if column "foo" is included in the `columns` attribute twice, the first will get `_id` of "foo", and the second an `_id` of "foo1"). Columns that are children of other columns will have the `_parent` property added, assigned the column object to which they belong. @method _setColumns @param {null|Object[]|String[]} val Array of config objects or strings @return {null|Object[]} @protected **/ _setColumns: function (val) { var keys = {}, known = [], knownCopies = [], arrayIndex = Y.Array.indexOf; function copyObj(o) { var copy = {}, key, val, i; known.push(o); knownCopies.push(copy); for (key in o) { if (o.hasOwnProperty(key)) { val = o[key]; if (isArray(val)) { copy[key] = val.slice(); } else if (isObject(val, true)) { i = arrayIndex(known, val); copy[key] = i === -1 ? copyObj(val) : knownCopies[i]; } else { copy[key] = o[key]; } } } return copy; } function genId(name) { // Sanitize the name for use in generated CSS classes. // TODO: is there more to do for other uses of _id? name = name.replace(/\s+/, '-'); if (keys[name]) { name += (keys[name]++); } else { keys[name] = 1; } return name; } function process(cols, parent) { var columns = [], i, len, col, yuid; for (i = 0, len = cols.length; i < len; ++i) { columns[i] = // chained assignment col = isString(cols[i]) ? { key: cols[i] } : copyObj(cols[i]); yuid = Y.stamp(col); // For backward compatibility if (!col.id) { // Implementers can shoot themselves in the foot by setting // this config property to a non-unique value col.id = yuid; } if (col.field) { // Field is now known as "name" to avoid confusion with data // fields or schema.resultFields col.name = col.field; } if (parent) { col._parent = parent; } else { delete col._parent; } // Unique id based on the column's configured name or key, // falling back to the yuid. Duplicates will have a counter // added to the end. col._id = genId(col.name || col.key || col.id); if (isArray(col.children)) { col.children = process(col.children, col); } } return columns; } return val && process(val); }, /** Relays attribute assignments of the deprecated `columnset` attribute to the `columns` attribute. If a Columnset is object is passed, its basic object structure is mined. @method _setColumnset @param {Array|Columnset} val The columnset value to relay @deprecated This will be removed with the deprecated `columnset` attribute in a later version. @protected @since 3.5.0 **/ _setColumnset: function (val) { this.set('columns', val); return isArray(val) ? val : INVALID; }, /** Accepts an object with `each` and `getAttrs` (preferably a ModelList or subclass) or an array of data objects. If an array is passes, it will create a ModelList to wrap the data. In doing so, it will set the created ModelList's `model` property to the class in the `recordType` attribute, which will be defaulted if not yet set. If the `data` property is already set with a ModelList, passing an array as the value will call the ModelList's `reset()` method with that array rather than replacing the stored ModelList wholesale. Any non-ModelList-ish and non-array value is invalid. @method _setData @protected @since 3.5.0 **/ _setData: function (val) { if (val === null) { val = []; } if (isArray(val)) { this._initDataProperty(); // silent to prevent subscribers to both reset and dataChange // from reacting to the change twice. // TODO: would it be better to return INVALID to silence the // dataChange event, or even allow both events? this.data.reset(val, { silent: true }); // Return the instance ModelList to avoid storing unprocessed // data in the state and their vivified Model representations in // the instance's data property. Decreases memory consumption. val = this.data; } else if (!val || !val.each || !val.toJSON) { // ModelList/ArrayList duck typing val = INVALID; } return val; }, /** Relays the value assigned to the deprecated `recordset` attribute to the `data` attribute. If a Recordset instance is passed, the raw object data will be culled from it. @method _setRecordset @param {Object[]|Recordset} val The recordset value to relay @deprecated This will be removed with the deprecated `recordset` attribute in a later version. @protected @since 3.5.0 **/ _setRecordset: function (val) { var data; if (val && Y.Recordset && val instanceof Y.Recordset) { data = []; val.each(function (record) { data.push(record.get('data')); }); val = data; } this.set('data', val); return val; }, /** Accepts a Base subclass (preferably a Model subclass). Alternately, it will generate a custom Model subclass from an array of attribute names or an object defining attributes and their respective configurations (it is assigned as the `ATTRS` of the new class). Any other value is invalid. @method _setRecordType @param {Function|String[]|Object} val The Model subclass, array of attribute names, or the `ATTRS` definition for a custom model subclass @return {Function} A Base/Model subclass @protected @since 3.5.0 **/ _setRecordType: function (val) { var modelClass; // Duck type based on known/likely consumed APIs if (isFunction(val) && val.prototype.toJSON && val.prototype.setAttrs) { modelClass = val; } else if (isObject(val)) { modelClass = this._createRecordClass(val); } return modelClass || INVALID; } }); /** _This is a documentation entry only_ Columns are described by object literals with a set of properties. There is not an actual `DataTable.Column` class. However, for the purpose of documenting it, this pseudo-class is declared here. DataTables accept an array of column definitions in their [columns](DataTable.html#attr_columns) attribute. Each entry in this array is a column definition which may contain any combination of the properties listed below. There are no mandatory properties though a column will usually have a [key](#property_key) property to reference the data it is supposed to show. The [columns](DataTable.html#attr_columns) attribute can accept a plain string in lieu of an object literal, which is the equivalent of an object with the [key](#property_key) property set to that string. @class DataTable.Column */ /** Binds the column values to the named property in the [data](DataTable.html#attr_data). Optional if [formatter](#property_formatter), [nodeFormatter](#property_nodeFormatter), or [cellTemplate](#property_cellTemplate) is used to populate the content. It should not be set if [children](#property_children) is set. The value is used for the [\_id](#property__id) property unless the [name](#property_name) property is also set. { key: 'username' } The above column definition can be reduced to this: 'username' @property key @type String */ /** An identifier that can be used to locate a column via [getColumn](DataTable.html#method_getColumn) or style columns with class `yui3-datatable-col-NAME` after dropping characters that are not valid for CSS class names. It defaults to the [key](#property_key). The value is used for the [\_id](#property__id) property. { name: 'fullname', formatter: ... } @property name @type String */ /** An alias for [name](#property_name) for backward compatibility. { field: 'fullname', formatter: ... } @property field @type String */ /** Overrides the default unique id assigned `<th id="HERE">`. __Use this with caution__, since it can result in duplicate ids in the DOM. { name: 'checkAll', id: 'check-all', label: ... formatter: ... } @property id @type String */ /** HTML to populate the header `<th>` for the column. It defaults to the value of the [key](#property_key) property or the text `Column n` where _n_ is an ordinal number. { key: 'MfgvaPrtNum', label: 'Part Number' } @property label @type {String} */ /** Used to create stacked headers. Child columns may also contain `children`. There is no limit to the depth of nesting. Columns configured with `children` are for display only and <strong>should not</strong> be configured with a [key](#property_key). Configurations relating to the display of data, such as [formatter](#property_formatter), [nodeFormatter](#property_nodeFormatter), [emptyCellValue](#property_emptyCellValue), etc. are ignored. { label: 'Name', children: [ { key: 'firstName', label: 'First`}, { key: 'lastName', label: 'Last`} ]} @property children @type Array */ /** Assigns the value `<th abbr="HERE">`. { key : 'forecast', label: '1yr Target Forecast', abbr : 'Forecast' } @property abbr @type String */ /** Assigns the value `<th title="HERE">`. { key : 'forecast', label: '1yr Target Forecast', title: 'Target Forecast for the Next 12 Months' } @property title @type String */ /** Overrides the default [CELL_TEMPLATE](DataTable.HeaderView.html#property_CELL_TEMPLATE) used by `Y.DataTable.HeaderView` to render the header cell for this column. This is necessary when more control is needed over the markup for the header itself, rather than its content. Use the [label](#property_label) configuration if you don't need to customize the `<th>` iteself. Implementers are strongly encouraged to preserve at least the `{id}` and `{_id}` placeholders in the custom value. { headerTemplate: '<th id="{id}" ' + 'title="Unread" ' + 'class="{className}" ' + '{_id}>&#9679;</th>' } @property headerTemplate @type HTML */ /** Overrides the default [CELL_TEMPLATE](DataTable.BodyView.html#property_CELL_TEMPLATE) used by `Y.DataTable.BodyView` to render the data cells for this column. This is necessary when more control is needed over the markup for the `<td>` itself, rather than its content. { key: 'id', cellTemplate: '<td class="{className}">' + '<input type="checkbox" ' + 'id="{content}">' + '</td>' } @property cellTemplate @type String */ /** String or function used to translate the raw record data for each cell in a given column into a format better suited to display. If it is a string, it will initially be assumed to be the name of one of the formatting functions in [Y.DataTable.BodyView.Formatters](DataTable.BodyView.Formatters.html). If one such formatting function exists, it will be used. If no such named formatter is found, it will be assumed to be a template string and will be expanded. The placeholders can contain the key to any field in the record or the placeholder `{value}` which represents the value of the current field. If the value is a function, it will be assumed to be a formatting function. A formatting function receives a single argument, an object with the following properties: * __value__ The raw value from the record Model to populate this cell. Equivalent to `o.record.get(o.column.key)` or `o.data[o.column.key]`. * __data__ The Model data for this row in simple object format. * __record__ The Model for this row. * __column__ The column configuration object. * __className__ A string of class names to add `<td class="HERE">` in addition to the column class and any classes in the column's className configuration. * __rowIndex__ The index of the current Model in the ModelList. Typically correlates to the row index as well. * __rowClass__ A string of css classes to add `<tr class="HERE"><td....` This is useful to avoid the need for nodeFormatters to add classes to the containing row. The formatter function may return a string value that will be used for the cell contents or it may change the value of the `value`, `className` or `rowClass` properties which well then be used to format the cell. If the value for the cell is returned in the `value` property of the input argument, no value should be returned. { key: 'name', formatter: 'link', // named formatter linkFrom: 'website' // extra column property for link formatter }, { key: 'cost', formatter: '${value}' // formatter template string //formatter: '${cost}' // same result but less portable }, { name: 'Name', // column does not have associated field value // thus, it uses name instead of key formatter: '{firstName} {lastName}' // template references other fields }, { key: 'price', formatter: function (o) { // function both returns a string to show if (o.value > 3) { // and a className to apply to the cell o.className += 'expensive'; } return '$' + o.value.toFixed(2); } }, @property formatter @type String || Function */ /** Used to customize the content of the data cells for this column. `nodeFormatter` is significantly slower than [formatter](#property_formatter) and should be avoided if possible. Unlike [formatter](#property_formatter), `nodeFormatter` has access to the `<td>` element and its ancestors. The function provided is expected to fill in the `<td>` element itself. __Node formatters should return `false`__ except in certain conditions as described in the users guide. The function receives a single object argument with the following properties: * __td__ The `<td>` Node for this cell. * __cell__ If the cell `<td> contains an element with class `yui3-datatable-liner, this will refer to that Node. Otherwise, it is equivalent to `td` (default behavior). * __value__ The raw value from the record Model to populate this cell. Equivalent to `o.record.get(o.column.key)` or `o.data[o.column.key]`. * __data__ The Model data for this row in simple object format. * __record__ The Model for this row. * __column__ The column configuration object. * __rowIndex__ The index of the current Model in the ModelList. _Typically_ correlates to the row index as well. @example nodeFormatter: function (o) { if (o.value < o.data.quota) { o.td.setAttribute('rowspan', 2); o.td.setAttribute('data-term-id', this.record.get('id')); o.td.ancestor().insert( '<tr><td colspan"3">' + '<button class="term">terminate</button>' + '</td></tr>', 'after'); } o.cell.setHTML(o.value); return false; } @property nodeFormatter @type Function */ /** Provides the default value to populate the cell if the data for that cell is `undefined`, `null`, or an empty string. { key: 'price', emptyCellValue: '???' } @property emptyCellValue @type {String} depending on the setting of allowHTML */ /** Skips the security step of HTML escaping the value for cells in this column. This is also necessary if [emptyCellValue](#property_emptyCellValue) is set with an HTML string. `nodeFormatter`s ignore this configuration. If using a `nodeFormatter`, it is recommended to use [Y.Escape.html()](Escape.html#method_html) on any user supplied content that is to be displayed. { key: 'preview', allowHTML: true } @property allowHTML @type Boolean */ /** A string of CSS classes that will be added to the `<td>`'s `class` attribute. Note, all cells will automatically have a class in the form of "yui3-datatable-col-XXX" added to the `<td>`, where XXX is the column's configured `name`, `key`, or `id` (in that order of preference) sanitized from invalid characters. { key: 'symbol', className: 'no-hide' } @property className @type String */ /** (__read-only__) The unique identifier assigned to each column. This is used for the `id` if not set, and the `_id` if none of [name](#property_name), [field](#property_field), [key](#property_key), or [id](#property_id) are set. @property _yuid @type String @protected */ /** (__read-only__) A unique-to-this-instance name used extensively in the rendering process. It is also used to create the column's classname, as the input name `table.getColumn(HERE)`, and in the column header's `<th data-yui3-col-id="HERE">`. The value is populated by the first of [name](#property_name), [field](#property_field), [key](#property_key), [id](#property_id), or [_yuid](#property__yuid) to have a value. If that value has already been used (such as when multiple columns have the same `key`), an incrementer is added to the end. For example, two columns with `key: "id"` will have `_id`s of "id" and "id2". `table.getColumn("id")` will return the first column, and `table.getColumn("id2")` will return the second. @property _id @type String @protected */ /** (__read-only__) Used by `Y.DataTable.HeaderView` when building stacked column headers. @property _colspan @type Integer @protected */ /** (__read-only__) Used by `Y.DataTable.HeaderView` when building stacked column headers. @property _rowspan @type Integer @protected */ /** (__read-only__) Assigned to all columns in a column's `children` collection. References the parent column object. @property _parent @type DataTable.Column @protected */ /** (__read-only__) Array of the `id`s of the column and all parent columns. Used by `Y.DataTable.BodyView` to populate `<td headers="THIS">` when a cell references more than one header. @property _headers @type Array @protected */ }, '3.17.1', {"requires": ["escape", "model-list", "node-event-delegate"]});
pnpm-cached/.pnpm-store/1/registry.npmjs.org/react-bootstrap/0.31.0/es/FormGroup.js
JamieMason/npm-cache-benchmark
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from 'babel-runtime/helpers/inherits'; import classNames from 'classnames'; import React from 'react'; import PropTypes from 'prop-types'; import { bsClass, bsSizes, getClassSet, splitBsPropsAndOmit } from './utils/bootstrapUtils'; import { Size } from './utils/StyleConfig'; import ValidComponentChildren from './utils/ValidComponentChildren'; var propTypes = { /** * Sets `id` on `<FormControl>` and `htmlFor` on `<FormGroup.Label>`. */ controlId: PropTypes.string, validationState: PropTypes.oneOf(['success', 'warning', 'error', null]) }; var childContextTypes = { $bs_formGroup: PropTypes.object.isRequired }; var FormGroup = function (_React$Component) { _inherits(FormGroup, _React$Component); function FormGroup() { _classCallCheck(this, FormGroup); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } FormGroup.prototype.getChildContext = function getChildContext() { var _props = this.props, controlId = _props.controlId, validationState = _props.validationState; return { $bs_formGroup: { controlId: controlId, validationState: validationState } }; }; FormGroup.prototype.hasFeedback = function hasFeedback(children) { var _this2 = this; return ValidComponentChildren.some(children, function (child) { return child.props.bsRole === 'feedback' || child.props.children && _this2.hasFeedback(child.props.children); }); }; FormGroup.prototype.render = function render() { var _props2 = this.props, validationState = _props2.validationState, className = _props2.className, children = _props2.children, props = _objectWithoutProperties(_props2, ['validationState', 'className', 'children']); var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['controlId']), bsProps = _splitBsPropsAndOmit[0], elementProps = _splitBsPropsAndOmit[1]; var classes = _extends({}, getClassSet(bsProps), { 'has-feedback': this.hasFeedback(children) }); if (validationState) { classes['has-' + validationState] = true; } return React.createElement( 'div', _extends({}, elementProps, { className: classNames(className, classes) }), children ); }; return FormGroup; }(React.Component); FormGroup.propTypes = propTypes; FormGroup.childContextTypes = childContextTypes; export default bsClass('form-group', bsSizes([Size.LARGE, Size.SMALL], FormGroup));
src/components/nginx/original/NginxOriginal.js
fpoumian/react-devicon
import React from 'react' import PropTypes from 'prop-types' import SVGDeviconInline from '../../_base/SVGDeviconInline' import iconSVG from './NginxOriginal.svg' /** NginxOriginal */ function NginxOriginal({ width, height, className }) { return ( <SVGDeviconInline className={'NginxOriginal' + ' ' + className} iconSVG={iconSVG} width={width} height={height} /> ) } NginxOriginal.propTypes = { className: PropTypes.string, width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), } export default NginxOriginal
src/client.js
Afrostream/react-redux-universal-hot-example
import React from 'react'; import Router from 'react-router'; import BrowserHistory from 'react-router/lib/BrowserHistory'; import routes from './views/routes'; import createRedux from './redux/create'; import { Provider } from 'redux/react'; import ApiClient from './ApiClient'; const history = new BrowserHistory(); const client = new ApiClient(); const dest = document.getElementById('content'); const redux = createRedux(client, window.__data); const element = (<Provider redux={redux}> {() => <Router history={history} children={routes}/> } </Provider>); React.render(element, dest); if (process.env.NODE_ENV !== 'production') { window.React = React; // enable debugger const reactRoot = window.document.getElementById('content'); if (!reactRoot || !reactRoot.firstChild || !reactRoot.firstChild.attributes || !reactRoot.firstChild.attributes['data-react-checksum']) { console.error('Server-side React render was discarded. Make sure that your initial render does not contain any client-side code.'); } }
ajax/libs/yui/3.9.1/scrollview-base/scrollview-base-coverage.js
yogeshsaroya/cdnjs
if (typeof _yuitest_coverage == "undefined"){ _yuitest_coverage = {}; _yuitest_coverline = function(src, line){ var coverage = _yuitest_coverage[src]; if (!coverage.lines[line]){ coverage.calledLines++; } coverage.lines[line]++; }; _yuitest_coverfunc = function(src, name, line){ var coverage = _yuitest_coverage[src], funcId = name + ":" + line; if (!coverage.functions[funcId]){ coverage.calledFunctions++; } coverage.functions[funcId]++; }; } _yuitest_coverage["build/scrollview-base/scrollview-base.js"] = { lines: {}, functions: {}, coveredLines: 0, calledLines: 0, coveredFunctions: 0, calledFunctions: 0, path: "build/scrollview-base/scrollview-base.js", code: [] }; _yuitest_coverage["build/scrollview-base/scrollview-base.js"].code=["YUI.add('scrollview-base', function (Y, NAME) {","","/**"," * The scrollview-base module provides a basic ScrollView Widget, without scrollbar indicators"," *"," * @module scrollview"," * @submodule scrollview-base"," */",""," // Local vars","var getClassName = Y.ClassNameManager.getClassName,"," DOCUMENT = Y.config.doc,"," IE = Y.UA.ie,"," NATIVE_TRANSITIONS = Y.Transition.useNative,"," vendorPrefix = Y.Transition._VENDOR_PREFIX, // Todo: This is a private property, and alternative approaches should be investigated"," SCROLLVIEW = 'scrollview',"," CLASS_NAMES = {"," vertical: getClassName(SCROLLVIEW, 'vert'),"," horizontal: getClassName(SCROLLVIEW, 'horiz')"," },"," EV_SCROLL_END = 'scrollEnd',"," FLICK = 'flick',"," DRAG = 'drag',"," MOUSEWHEEL = 'mousewheel',"," UI = 'ui',"," TOP = 'top',"," LEFT = 'left',"," PX = 'px',"," AXIS = 'axis',"," SCROLL_Y = 'scrollY',"," SCROLL_X = 'scrollX',"," BOUNCE = 'bounce',"," DISABLED = 'disabled',"," DECELERATION = 'deceleration',"," DIM_X = 'x',"," DIM_Y = 'y',"," BOUNDING_BOX = 'boundingBox',"," CONTENT_BOX = 'contentBox',"," GESTURE_MOVE = 'gesturemove',"," START = 'start',"," END = 'end',"," EMPTY = '',"," ZERO = '0s',"," SNAP_DURATION = 'snapDuration',"," SNAP_EASING = 'snapEasing',"," EASING = 'easing',"," FRAME_DURATION = 'frameDuration',"," BOUNCE_RANGE = 'bounceRange',"," _constrain = function (val, min, max) {"," return Math.min(Math.max(val, min), max);"," };","","/**"," * ScrollView provides a scrollable widget, supporting flick gestures,"," * across both touch and mouse based devices."," *"," * @class ScrollView"," * @param config {Object} Object literal with initial attribute values"," * @extends Widget"," * @constructor"," */","function ScrollView() {"," ScrollView.superclass.constructor.apply(this, arguments);","}","","Y.ScrollView = Y.extend(ScrollView, Y.Widget, {",""," // *** Y.ScrollView prototype",""," /**"," * Flag driving whether or not we should try and force H/W acceleration when transforming. Currently enabled by default for Webkit."," * Used by the _transform method."," *"," * @property _forceHWTransforms"," * @type boolean"," * @protected"," */"," _forceHWTransforms: Y.UA.webkit ? true : false,",""," /**"," * <p>Used to control whether or not ScrollView's internal"," * gesturemovestart, gesturemove and gesturemoveend"," * event listeners should preventDefault. The value is an"," * object, with \"start\", \"move\" and \"end\" properties used to"," * specify which events should preventDefault and which shouldn't:</p>"," *"," * <pre>"," * {"," * start: false,"," * move: true,"," * end: false"," * }"," * </pre>"," *"," * <p>The default values are set up in order to prevent panning,"," * on touch devices, while allowing click listeners on elements inside"," * the ScrollView to be notified as expected.</p>"," *"," * @property _prevent"," * @type Object"," * @protected"," */"," _prevent: {"," start: false,"," move: true,"," end: false"," },",""," /**"," * Contains the distance (postive or negative) in pixels by which"," * the scrollview was last scrolled. This is useful when setting up"," * click listeners on the scrollview content, which on mouse based"," * devices are always fired, even after a drag/flick."," *"," * <p>Touch based devices don't currently fire a click event,"," * if the finger has been moved (beyond a threshold) so this"," * check isn't required, if working in a purely touch based environment</p>"," *"," * @property lastScrolledAmt"," * @type Number"," * @public"," * @default 0"," */"," lastScrolledAmt: 0,",""," /**"," * Internal state, defines the minimum amount that the scrollview can be scrolled along the X axis"," *"," * @property _minScrollX"," * @type number"," * @protected"," */"," _minScrollX: null,",""," /**"," * Internal state, defines the maximum amount that the scrollview can be scrolled along the X axis"," *"," * @property _maxScrollX"," * @type number"," * @protected"," */"," _maxScrollX: null,",""," /**"," * Internal state, defines the minimum amount that the scrollview can be scrolled along the Y axis"," *"," * @property _minScrollY"," * @type number"," * @protected"," */"," _minScrollY: null,",""," /**"," * Internal state, defines the maximum amount that the scrollview can be scrolled along the Y axis"," *"," * @property _maxScrollY"," * @type number"," * @protected"," */"," _maxScrollY: null,"," "," /**"," * Designated initializer"," *"," * @method initializer"," * @param {config} Configuration object for the plugin"," */"," initializer: function () {"," var sv = this;",""," // Cache these values, since they aren't going to change."," sv._bb = sv.get(BOUNDING_BOX);"," sv._cb = sv.get(CONTENT_BOX);",""," // Cache some attributes"," sv._cAxis = sv.get(AXIS);"," sv._cBounce = sv.get(BOUNCE);"," sv._cBounceRange = sv.get(BOUNCE_RANGE);"," sv._cDeceleration = sv.get(DECELERATION);"," sv._cFrameDuration = sv.get(FRAME_DURATION);"," },",""," /**"," * bindUI implementation"," *"," * Hooks up events for the widget"," * @method bindUI"," */"," bindUI: function () {"," var sv = this;",""," // Bind interaction listers"," sv._bindFlick(sv.get(FLICK));"," sv._bindDrag(sv.get(DRAG));"," sv._bindMousewheel(true);"," "," // Bind change events"," sv._bindAttrs();",""," // IE SELECT HACK. See if we can do this non-natively and in the gesture for a future release."," if (IE) {"," sv._fixIESelect(sv._bb, sv._cb);"," }",""," // Set any deprecated static properties"," if (ScrollView.SNAP_DURATION) {"," sv.set(SNAP_DURATION, ScrollView.SNAP_DURATION);"," }",""," if (ScrollView.SNAP_EASING) {"," sv.set(SNAP_EASING, ScrollView.SNAP_EASING);"," }",""," if (ScrollView.EASING) {"," sv.set(EASING, ScrollView.EASING);"," }",""," if (ScrollView.FRAME_STEP) {"," sv.set(FRAME_DURATION, ScrollView.FRAME_STEP);"," }",""," if (ScrollView.BOUNCE_RANGE) {"," sv.set(BOUNCE_RANGE, ScrollView.BOUNCE_RANGE);"," }",""," // Recalculate dimension properties"," // TODO: This should be throttled."," // Y.one(WINDOW).after('resize', sv._afterDimChange, sv);"," },",""," /**"," * Bind event listeners"," *"," * @method _bindAttrs"," * @private"," */"," _bindAttrs: function () {"," var sv = this,"," scrollChangeHandler = sv._afterScrollChange,"," dimChangeHandler = sv._afterDimChange;",""," // Bind any change event listeners"," sv.after({"," 'scrollEnd': sv._afterScrollEnd,"," 'disabledChange': sv._afterDisabledChange,"," 'flickChange': sv._afterFlickChange,"," 'dragChange': sv._afterDragChange,"," 'axisChange': sv._afterAxisChange,"," 'scrollYChange': scrollChangeHandler,"," 'scrollXChange': scrollChangeHandler,"," 'heightChange': dimChangeHandler,"," 'widthChange': dimChangeHandler"," });"," },",""," /**"," * Bind (or unbind) gesture move listeners required for drag support"," *"," * @method _bindDrag"," * @param drag {boolean} If true, the method binds listener to enable"," * drag (gesturemovestart). If false, the method unbinds gesturemove"," * listeners for drag support."," * @private"," */"," _bindDrag: function (drag) {"," var sv = this,"," bb = sv._bb;",""," // Unbind any previous 'drag' listeners"," bb.detach(DRAG + '|*');",""," if (drag) {"," bb.on(DRAG + '|' + GESTURE_MOVE + START, Y.bind(sv._onGestureMoveStart, sv));"," }"," },",""," /**"," * Bind (or unbind) flick listeners."," *"," * @method _bindFlick"," * @param flick {Object|boolean} If truthy, the method binds listeners for"," * flick support. If false, the method unbinds flick listeners."," * @private"," */"," _bindFlick: function (flick) {"," var sv = this,"," bb = sv._bb;",""," // Unbind any previous 'flick' listeners"," bb.detach(FLICK + '|*');",""," if (flick) {"," bb.on(FLICK + '|' + FLICK, Y.bind(sv._flick, sv), flick);",""," // Rebind Drag, becuase _onGestureMoveEnd always has to fire -after- _flick"," sv._bindDrag(sv.get(DRAG));"," }"," },",""," /**"," * Bind (or unbind) mousewheel listeners."," *"," * @method _bindMousewheel"," * @param mousewheel {Object|boolean} If truthy, the method binds listeners for"," * mousewheel support. If false, the method unbinds mousewheel listeners."," * @private"," */"," _bindMousewheel: function (mousewheel) {"," var sv = this,"," bb = sv._bb;",""," // Unbind any previous 'mousewheel' listeners"," // TODO: This doesn't actually appear to work properly. Fix. #2532743"," bb.detach(MOUSEWHEEL + '|*');",""," // Only enable for vertical scrollviews"," if (mousewheel) {"," // Bound to document, because that's where mousewheel events fire off of."," Y.one(DOCUMENT).on(MOUSEWHEEL, Y.bind(sv._mousewheel, sv));"," }"," },",""," /**"," * syncUI implementation."," *"," * Update the scroll position, based on the current value of scrollX/scrollY."," *"," * @method syncUI"," */"," syncUI: function () {"," var sv = this,"," scrollDims = sv._getScrollDims(),"," width = scrollDims.offsetWidth,"," height = scrollDims.offsetHeight,"," scrollWidth = scrollDims.scrollWidth,"," scrollHeight = scrollDims.scrollHeight;",""," // If the axis is undefined, auto-calculate it"," if (sv._cAxis === undefined) {"," // This should only ever be run once (for now)."," // In the future SV might post-load axis changes"," sv._cAxis = {"," x: (scrollWidth > width),"," y: (scrollHeight > height)"," };",""," sv._set(AXIS, sv._cAxis);"," }"," "," // get text direction on or inherited by scrollview node"," sv.rtl = (sv._cb.getComputedStyle('direction') === 'rtl');",""," // Cache the disabled value"," sv._cDisabled = sv.get(DISABLED);",""," // Run this to set initial values"," sv._uiDimensionsChange();",""," // If we're out-of-bounds, snap back."," if (sv._isOutOfBounds()) {"," sv._snapBack();"," }"," },",""," /**"," * Utility method to obtain widget dimensions"," *"," * @method _getScrollDims"," * @return {Object} The offsetWidth, offsetHeight, scrollWidth and"," * scrollHeight as an array: [offsetWidth, offsetHeight, scrollWidth,"," * scrollHeight]"," * @private"," */"," _getScrollDims: function () {"," var sv = this,"," cb = sv._cb,"," bb = sv._bb,"," TRANS = ScrollView._TRANSITION,"," // Ideally using CSSMatrix - don't think we have it normalized yet though."," // origX = (new WebKitCSSMatrix(cb.getComputedStyle(\"transform\"))).e,"," // origY = (new WebKitCSSMatrix(cb.getComputedStyle(\"transform\"))).f,"," origX = sv.get(SCROLL_X),"," origY = sv.get(SCROLL_Y),"," origHWTransform,"," dims;",""," // TODO: Is this OK? Just in case it's called 'during' a transition."," if (NATIVE_TRANSITIONS) {"," cb.setStyle(TRANS.DURATION, ZERO);"," cb.setStyle(TRANS.PROPERTY, EMPTY);"," }",""," origHWTransform = sv._forceHWTransforms;"," sv._forceHWTransforms = false; // the z translation was causing issues with picking up accurate scrollWidths in Chrome/Mac.",""," sv._moveTo(cb, 0, 0);"," dims = {"," 'offsetWidth': bb.get('offsetWidth'),"," 'offsetHeight': bb.get('offsetHeight'),"," 'scrollWidth': bb.get('scrollWidth'),"," 'scrollHeight': bb.get('scrollHeight')"," };"," sv._moveTo(cb, -(origX), -(origY));",""," sv._forceHWTransforms = origHWTransform;",""," return dims;"," },",""," /**"," * This method gets invoked whenever the height or width attributes change,"," * allowing us to determine which scrolling axes need to be enabled."," *"," * @method _uiDimensionsChange"," * @protected"," */"," _uiDimensionsChange: function () {"," var sv = this,"," bb = sv._bb,"," scrollDims = sv._getScrollDims(),"," width = scrollDims.offsetWidth,"," height = scrollDims.offsetHeight,"," scrollWidth = scrollDims.scrollWidth,"," scrollHeight = scrollDims.scrollHeight,"," rtl = sv.rtl,"," svAxis = sv._cAxis,"," minScrollX = (rtl ? Math.min(0, -(scrollWidth - width)) : 0),"," maxScrollX = (rtl ? 0 : Math.max(0, scrollWidth - width)),"," minScrollY = 0,"," maxScrollY = Math.max(0, scrollHeight - height);"," "," if (svAxis && svAxis.x) {"," bb.addClass(CLASS_NAMES.horizontal);"," }",""," if (svAxis && svAxis.y) {"," bb.addClass(CLASS_NAMES.vertical);"," }",""," sv._setBounds({"," minScrollX: minScrollX,"," maxScrollX: maxScrollX,"," minScrollY: minScrollY,"," maxScrollY: maxScrollY"," });"," },",""," /**"," * Set the bounding dimensions of the ScrollView"," *"," * @method _setBounds"," * @protected"," * @param bounds {Object} [duration] ms of the scroll animation. (default is 0)"," * @param {Number} [bounds.minScrollX] The minimum scroll X value"," * @param {Number} [bounds.maxScrollX] The maximum scroll X value"," * @param {Number} [bounds.minScrollY] The minimum scroll Y value"," * @param {Number} [bounds.maxScrollY] The maximum scroll Y value"," */"," _setBounds: function (bounds) {"," var sv = this;"," "," // TODO: Do a check to log if the bounds are invalid",""," sv._minScrollX = bounds.minScrollX;"," sv._maxScrollX = bounds.maxScrollX;"," sv._minScrollY = bounds.minScrollY;"," sv._maxScrollY = bounds.maxScrollY;"," },",""," /**"," * Get the bounding dimensions of the ScrollView"," *"," * @method _getBounds"," * @protected"," */"," _getBounds: function () {"," var sv = this;"," "," return {"," minScrollX: sv._minScrollX,"," maxScrollX: sv._maxScrollX,"," minScrollY: sv._minScrollY,"," maxScrollY: sv._maxScrollY"," };",""," },",""," /**"," * Scroll the element to a given xy coordinate"," *"," * @method scrollTo"," * @param x {Number} The x-position to scroll to. (null for no movement)"," * @param y {Number} The y-position to scroll to. (null for no movement)"," * @param {Number} [duration] ms of the scroll animation. (default is 0)"," * @param {String} [easing] An easing equation if duration is set. (default is `easing` attribute)"," * @param {String} [node] The node to transform. Setting this can be useful in"," * dual-axis paginated instances. (default is the instance's contentBox)"," */"," scrollTo: function (x, y, duration, easing, node) {"," // Check to see if widget is disabled"," if (this._cDisabled) {"," return;"," }",""," var sv = this,"," cb = sv._cb,"," TRANS = ScrollView._TRANSITION,"," callback = Y.bind(sv._onTransEnd, sv), // @Todo : cache this"," newX = 0,"," newY = 0,"," transition = {},"," transform;",""," // default the optional arguments"," duration = duration || 0;"," easing = easing || sv.get(EASING); // @TODO: Cache this"," node = node || cb;",""," if (x !== null) {"," sv.set(SCROLL_X, x, {src:UI});"," newX = -(x);"," }",""," if (y !== null) {"," sv.set(SCROLL_Y, y, {src:UI});"," newY = -(y);"," }",""," transform = sv._transform(newX, newY);",""," if (NATIVE_TRANSITIONS) {"," // ANDROID WORKAROUND - try and stop existing transition, before kicking off new one."," node.setStyle(TRANS.DURATION, ZERO).setStyle(TRANS.PROPERTY, EMPTY);"," }",""," // Move"," if (duration === 0) {"," if (NATIVE_TRANSITIONS) {"," node.setStyle('transform', transform);"," }"," else {"," // TODO: If both set, batch them in the same update"," // Update: Nope, setStyles() just loops through each property and applies it."," if (x !== null) {"," node.setStyle(LEFT, newX + PX);"," }"," if (y !== null) {"," node.setStyle(TOP, newY + PX);"," }"," }"," }",""," // Animate"," else {"," transition.easing = easing;"," transition.duration = duration / 1000;",""," if (NATIVE_TRANSITIONS) {"," transition.transform = transform;"," }"," else {"," transition.left = newX + PX;"," transition.top = newY + PX;"," }",""," node.transition(transition, callback);"," }"," },",""," /**"," * Utility method, to create the translate transform string with the"," * x, y translation amounts provided."," *"," * @method _transform"," * @param {Number} x Number of pixels to translate along the x axis"," * @param {Number} y Number of pixels to translate along the y axis"," * @private"," */"," _transform: function (x, y) {"," // TODO: Would we be better off using a Matrix for this?"," var prop = 'translate(' + x + 'px, ' + y + 'px)';",""," if (this._forceHWTransforms) {"," prop += ' translateZ(0)';"," }",""," return prop;"," },",""," /**"," * Utility method, to move the given element to the given xy position"," *"," * @method _moveTo"," * @param node {Node} The node to move"," * @param x {Number} The x-position to move to"," * @param y {Number} The y-position to move to"," * @private"," */"," _moveTo : function(node, x, y) {"," if (NATIVE_TRANSITIONS) {"," node.setStyle('transform', this._transform(x, y));"," } else {"," node.setStyle(LEFT, x + PX);"," node.setStyle(TOP, y + PX);"," }"," },","",""," /**"," * Content box transition callback"," *"," * @method _onTransEnd"," * @param {Event.Facade} e The event facade"," * @private"," */"," _onTransEnd: function () {"," var sv = this;"," "," // If for some reason we're OOB, snapback"," if (sv._isOutOfBounds()) {"," sv._snapBack();"," }"," else {"," /**"," * Notification event fired at the end of a scroll transition"," *"," * @event scrollEnd"," * @param e {EventFacade} The default event facade."," */"," sv.fire(EV_SCROLL_END);"," }"," },",""," /**"," * gesturemovestart event handler"," *"," * @method _onGestureMoveStart"," * @param e {Event.Facade} The gesturemovestart event facade"," * @private"," */"," _onGestureMoveStart: function (e) {",""," if (this._cDisabled) {"," return false;"," }",""," var sv = this,"," bb = sv._bb,"," currentX = sv.get(SCROLL_X),"," currentY = sv.get(SCROLL_Y),"," clientX = e.clientX,"," clientY = e.clientY;",""," if (sv._prevent.start) {"," e.preventDefault();"," }",""," // if a flick animation is in progress, cancel it"," if (sv._flickAnim) {"," sv._cancelFlick();"," sv._onTransEnd();"," }",""," // Reset lastScrolledAmt"," sv.lastScrolledAmt = 0;",""," // Stores data for this gesture cycle. Cleaned up later"," sv._gesture = {",""," // Will hold the axis value"," axis: null,",""," // The current attribute values"," startX: currentX,"," startY: currentY,",""," // The X/Y coordinates where the event began"," startClientX: clientX,"," startClientY: clientY,",""," // The X/Y coordinates where the event will end"," endClientX: null,"," endClientY: null,",""," // The current delta of the event"," deltaX: null,"," deltaY: null,",""," // Will be populated for flicks"," flick: null,",""," // Create some listeners for the rest of the gesture cycle"," onGestureMove: bb.on(DRAG + '|' + GESTURE_MOVE, Y.bind(sv._onGestureMove, sv)),"," "," // @TODO: Don't bind gestureMoveEnd if it's a Flick?"," onGestureMoveEnd: bb.on(DRAG + '|' + GESTURE_MOVE + END, Y.bind(sv._onGestureMoveEnd, sv))"," };"," },",""," /**"," * gesturemove event handler"," *"," * @method _onGestureMove"," * @param e {Event.Facade} The gesturemove event facade"," * @private"," */"," _onGestureMove: function (e) {"," var sv = this,"," gesture = sv._gesture,"," svAxis = sv._cAxis,"," svAxisX = svAxis.x,"," svAxisY = svAxis.y,"," startX = gesture.startX,"," startY = gesture.startY,"," startClientX = gesture.startClientX,"," startClientY = gesture.startClientY,"," clientX = e.clientX,"," clientY = e.clientY;",""," if (sv._prevent.move) {"," e.preventDefault();"," }",""," gesture.deltaX = startClientX - clientX;"," gesture.deltaY = startClientY - clientY;",""," // Determine if this is a vertical or horizontal movement"," // @TODO: This is crude, but it works. Investigate more intelligent ways to detect intent"," if (gesture.axis === null) {"," gesture.axis = (Math.abs(gesture.deltaX) > Math.abs(gesture.deltaY)) ? DIM_X : DIM_Y;"," }",""," // Move X or Y. @TODO: Move both if dualaxis."," if (gesture.axis === DIM_X && svAxisX) {"," sv.set(SCROLL_X, startX + gesture.deltaX);"," }"," else if (gesture.axis === DIM_Y && svAxisY) {"," sv.set(SCROLL_Y, startY + gesture.deltaY);"," }"," },",""," /**"," * gesturemoveend event handler"," *"," * @method _onGestureMoveEnd"," * @param e {Event.Facade} The gesturemoveend event facade"," * @private"," */"," _onGestureMoveEnd: function (e) {"," var sv = this,"," gesture = sv._gesture,"," flick = gesture.flick,"," clientX = e.clientX,"," clientY = e.clientY,"," isOOB;",""," if (sv._prevent.end) {"," e.preventDefault();"," }",""," // Store the end X/Y coordinates"," gesture.endClientX = clientX;"," gesture.endClientY = clientY;",""," // Cleanup the event handlers"," gesture.onGestureMove.detach();"," gesture.onGestureMoveEnd.detach();",""," // If this wasn't a flick, wrap up the gesture cycle"," if (!flick) {"," // @TODO: Be more intelligent about this. Look at the Flick attribute to see"," // if it is safe to assume _flick did or didn't fire."," // Then, the order _flick and _onGestureMoveEnd fire doesn't matter?",""," // If there was movement (_onGestureMove fired)"," if (gesture.deltaX !== null && gesture.deltaY !== null) {"," "," isOOB = sv._isOutOfBounds();"," "," // If we're out-out-bounds, then snapback"," if (isOOB) {"," sv._snapBack();"," }",""," // Inbounds"," else {"," // Fire scrollEnd unless this is a paginated instance and the gesture axis is the same as paginator's"," // Not totally confident this is ideal to access a plugin's properties from a host, @TODO revisit"," if (!sv.pages || (sv.pages && !sv.pages.get(AXIS)[gesture.axis])) {"," sv._onTransEnd();"," }"," }"," }"," }"," },",""," /**"," * Execute a flick at the end of a scroll action"," *"," * @method _flick"," * @param e {Event.Facade} The Flick event facade"," * @private"," */"," _flick: function (e) {"," if (this._cDisabled) {"," return false;"," }",""," var sv = this,"," svAxis = sv._cAxis,"," flick = e.flick,"," flickAxis = flick.axis,"," flickVelocity = flick.velocity,"," axisAttr = flickAxis === DIM_X ? SCROLL_X : SCROLL_Y,"," startPosition = sv.get(axisAttr);",""," // Sometimes flick is enabled, but drag is disabled"," if (sv._gesture) {"," sv._gesture.flick = flick;"," }",""," // Prevent unneccesary firing of _flickFrame if we can't scroll on the flick axis"," if (svAxis[flickAxis]) {"," sv._flickFrame(flickVelocity, flickAxis, startPosition);"," }"," },",""," /**"," * Execute a single frame in the flick animation"," *"," * @method _flickFrame"," * @param velocity {Number} The velocity of this animated frame"," * @param flickAxis {String} The axis on which to animate"," * @param startPosition {Number} The starting X/Y point to flick from"," * @protected"," */"," _flickFrame: function (velocity, flickAxis, startPosition) {",""," var sv = this,"," axisAttr = flickAxis === DIM_X ? SCROLL_X : SCROLL_Y,"," bounds = sv._getBounds(),",""," // Localize cached values"," bounce = sv._cBounce,"," bounceRange = sv._cBounceRange,"," deceleration = sv._cDeceleration,"," frameDuration = sv._cFrameDuration,",""," // Calculate"," newVelocity = velocity * deceleration,"," newPosition = startPosition - (frameDuration * newVelocity),",""," // Some convinience conditions"," min = flickAxis === DIM_X ? bounds.minScrollX : bounds.minScrollY,"," max = flickAxis === DIM_X ? bounds.maxScrollX : bounds.maxScrollY,"," belowMin = (newPosition < min),"," belowMax = (newPosition < max),"," aboveMin = (newPosition > min),"," aboveMax = (newPosition > max),"," belowMinRange = (newPosition < (min - bounceRange)),"," withinMinRange = (belowMin && (newPosition > (min - bounceRange))),"," withinMaxRange = (aboveMax && (newPosition < (max + bounceRange))),"," aboveMaxRange = (newPosition > (max + bounceRange)),"," tooSlow;",""," // If we're within the range but outside min/max, dampen the velocity"," if (withinMinRange || withinMaxRange) {"," newVelocity *= bounce;"," }",""," // Is the velocity too slow to bother?"," tooSlow = (Math.abs(newVelocity).toFixed(4) < 0.015);",""," // If the velocity is too slow or we're outside the range"," if (tooSlow || belowMinRange || aboveMaxRange) {"," // Cancel and delete sv._flickAnim"," if (sv._flickAnim) {"," sv._cancelFlick();"," }",""," // If we're inside the scroll area, just end"," if (aboveMin && belowMax) {"," sv._onTransEnd();"," }",""," // We're outside the scroll area, so we need to snap back"," else {"," sv._snapBack();"," }"," }",""," // Otherwise, animate to the next frame"," else {"," // @TODO: maybe use requestAnimationFrame instead"," sv._flickAnim = Y.later(frameDuration, sv, '_flickFrame', [newVelocity, flickAxis, newPosition]);"," sv.set(axisAttr, newPosition);"," }"," },",""," _cancelFlick: function () {"," var sv = this;",""," if (sv._flickAnim) {"," // Cancel the flick (if it exists)"," sv._flickAnim.cancel();",""," // Also delete it, otherwise _onGestureMoveStart will think we're still flicking"," delete sv._flickAnim;"," }",""," },",""," /**"," * Handle mousewheel events on the widget"," *"," * @method _mousewheel"," * @param e {Event.Facade} The mousewheel event facade"," * @private"," */"," _mousewheel: function (e) {"," var sv = this,"," scrollY = sv.get(SCROLL_Y),"," bounds = sv._getBounds(),"," bb = sv._bb,"," scrollOffset = 10, // 10px"," isForward = (e.wheelDelta > 0),"," scrollToY = scrollY - ((isForward ? 1 : -1) * scrollOffset);",""," scrollToY = _constrain(scrollToY, bounds.minScrollY, bounds.maxScrollY);",""," // Because Mousewheel events fire off 'document', every ScrollView widget will react"," // to any mousewheel anywhere on the page. This check will ensure that the mouse is currently"," // over this specific ScrollView. Also, only allow mousewheel scrolling on Y-axis,"," // becuase otherwise the 'prevent' will block page scrolling."," if (bb.contains(e.target) && sv._cAxis[DIM_Y]) {",""," // Reset lastScrolledAmt"," sv.lastScrolledAmt = 0;",""," // Jump to the new offset"," sv.set(SCROLL_Y, scrollToY);",""," // if we have scrollbars plugin, update & set the flash timer on the scrollbar"," // @TODO: This probably shouldn't be in this module"," if (sv.scrollbars) {"," // @TODO: The scrollbars should handle this themselves"," sv.scrollbars._update();"," sv.scrollbars.flash();"," // or just this"," // sv.scrollbars._hostDimensionsChange();"," }",""," // Fire the 'scrollEnd' event"," sv._onTransEnd();",""," // prevent browser default behavior on mouse scroll"," e.preventDefault();"," }"," },",""," /**"," * Checks to see the current scrollX/scrollY position beyond the min/max boundary"," *"," * @method _isOutOfBounds"," * @param x {Number} [optional] The X position to check"," * @param y {Number} [optional] The Y position to check"," * @return {boolen} Whether the current X/Y position is out of bounds (true) or not (false)"," * @private"," */"," _isOutOfBounds: function (x, y) {"," var sv = this,"," svAxis = sv._cAxis,"," svAxisX = svAxis.x,"," svAxisY = svAxis.y,"," currentX = x || sv.get(SCROLL_X),"," currentY = y || sv.get(SCROLL_Y),"," bounds = sv._getBounds(),"," minX = bounds.minScrollX,"," minY = bounds.minScrollY,"," maxX = bounds.maxScrollX,"," maxY = bounds.maxScrollY;",""," return (svAxisX && (currentX < minX || currentX > maxX)) || (svAxisY && (currentY < minY || currentY > maxY));"," },",""," /**"," * Bounces back"," * @TODO: Should be more generalized and support both X and Y detection"," *"," * @method _snapBack"," * @private"," */"," _snapBack: function () {"," var sv = this,"," currentX = sv.get(SCROLL_X),"," currentY = sv.get(SCROLL_Y),"," bounds = sv._getBounds(),"," minX = bounds.minScrollX,"," minY = bounds.minScrollY,"," maxX = bounds.maxScrollX,"," maxY = bounds.maxScrollY,"," newY = _constrain(currentY, minY, maxY),"," newX = _constrain(currentX, minX, maxX),"," duration = sv.get(SNAP_DURATION),"," easing = sv.get(SNAP_EASING);",""," if (newX !== currentX) {"," sv.set(SCROLL_X, newX, {duration:duration, easing:easing});"," }"," else if (newY !== currentY) {"," sv.set(SCROLL_Y, newY, {duration:duration, easing:easing});"," }"," else {"," sv._onTransEnd();"," }"," },",""," /**"," * After listener for changes to the scrollX or scrollY attribute"," *"," * @method _afterScrollChange"," * @param e {Event.Facade} The event facade"," * @protected"," */"," _afterScrollChange: function (e) {"," if (e.src === ScrollView.UI_SRC) {"," return false;"," }",""," var sv = this,"," duration = e.duration,"," easing = e.easing,"," val = e.newVal,"," scrollToArgs = [];",""," // Set the scrolled value"," sv.lastScrolledAmt = sv.lastScrolledAmt + (e.newVal - e.prevVal);",""," // Generate the array of args to pass to scrollTo()"," if (e.attrName === SCROLL_X) {"," scrollToArgs.push(val);"," scrollToArgs.push(sv.get(SCROLL_Y));"," }"," else {"," scrollToArgs.push(sv.get(SCROLL_X));"," scrollToArgs.push(val);"," }",""," scrollToArgs.push(duration);"," scrollToArgs.push(easing);",""," sv.scrollTo.apply(sv, scrollToArgs);"," },",""," /**"," * After listener for changes to the flick attribute"," *"," * @method _afterFlickChange"," * @param e {Event.Facade} The event facade"," * @protected"," */"," _afterFlickChange: function (e) {"," this._bindFlick(e.newVal);"," },",""," /**"," * After listener for changes to the disabled attribute"," *"," * @method _afterDisabledChange"," * @param e {Event.Facade} The event facade"," * @protected"," */"," _afterDisabledChange: function (e) {"," // Cache for performance - we check during move"," this._cDisabled = e.newVal;"," },",""," /**"," * After listener for the axis attribute"," *"," * @method _afterAxisChange"," * @param e {Event.Facade} The event facade"," * @protected"," */"," _afterAxisChange: function (e) {"," this._cAxis = e.newVal;"," },",""," /**"," * After listener for changes to the drag attribute"," *"," * @method _afterDragChange"," * @param e {Event.Facade} The event facade"," * @protected"," */"," _afterDragChange: function (e) {"," this._bindDrag(e.newVal);"," },",""," /**"," * After listener for the height or width attribute"," *"," * @method _afterDimChange"," * @param e {Event.Facade} The event facade"," * @protected"," */"," _afterDimChange: function () {"," this._uiDimensionsChange();"," },",""," /**"," * After listener for scrollEnd, for cleanup"," *"," * @method _afterScrollEnd"," * @param e {Event.Facade} The event facade"," * @protected"," */"," _afterScrollEnd: function () {"," var sv = this;",""," if (sv._flickAnim) {"," sv._cancelFlick();"," }",""," // Ideally this should be removed, but doing so causing some JS errors with fast swiping"," // because _gesture is being deleted after the previous one has been overwritten"," // delete sv._gesture; // TODO: Move to sv.prevGesture?"," },",""," /**"," * Setter for 'axis' attribute"," *"," * @method _axisSetter"," * @param val {Mixed} A string ('x', 'y', 'xy') to specify which axis/axes to allow scrolling on"," * @param name {String} The attribute name"," * @return {Object} An object to specify scrollability on the x & y axes"," *"," * @protected"," */"," _axisSetter: function (val) {",""," // Turn a string into an axis object"," if (Y.Lang.isString(val)) {"," return {"," x: val.match(/x/i) ? true : false,"," y: val.match(/y/i) ? true : false"," };"," }"," },"," "," /**"," * The scrollX, scrollY setter implementation"," *"," * @method _setScroll"," * @private"," * @param {Number} val"," * @param {String} dim"," *"," * @return {Number} The value"," */"," _setScroll : function(val) {",""," // Just ensure the widget is not disabled"," if (this._cDisabled) {"," val = Y.Attribute.INVALID_VALUE;"," }",""," return val;"," },",""," /**"," * Setter for the scrollX attribute"," *"," * @method _setScrollX"," * @param val {Number} The new scrollX value"," * @return {Number} The normalized value"," * @protected"," */"," _setScrollX: function(val) {"," return this._setScroll(val, DIM_X);"," },",""," /**"," * Setter for the scrollY ATTR"," *"," * @method _setScrollY"," * @param val {Number} The new scrollY value"," * @return {Number} The normalized value"," * @protected"," */"," _setScrollY: function(val) {"," return this._setScroll(val, DIM_Y);"," }",""," // End prototype properties","","}, {",""," // Static properties",""," /**"," * The identity of the widget."," *"," * @property NAME"," * @type String"," * @default 'scrollview'"," * @readOnly"," * @protected"," * @static"," */"," NAME: 'scrollview',",""," /**"," * Static property used to define the default attribute configuration of"," * the Widget."," *"," * @property ATTRS"," * @type {Object}"," * @protected"," * @static"," */"," ATTRS: {",""," /**"," * Specifies ability to scroll on x, y, or x and y axis/axes."," *"," * @attribute axis"," * @type String"," */"," axis: {"," setter: '_axisSetter',"," writeOnce: 'initOnly'"," },",""," /**"," * The current scroll position in the x-axis"," *"," * @attribute scrollX"," * @type Number"," * @default 0"," */"," scrollX: {"," value: 0,"," setter: '_setScrollX'"," },",""," /**"," * The current scroll position in the y-axis"," *"," * @attribute scrollY"," * @type Number"," * @default 0"," */"," scrollY: {"," value: 0,"," setter: '_setScrollY'"," },",""," /**"," * Drag coefficent for inertial scrolling. The closer to 1 this"," * value is, the less friction during scrolling."," *"," * @attribute deceleration"," * @default 0.93"," */"," deceleration: {"," value: 0.93"," },",""," /**"," * Drag coefficient for intertial scrolling at the upper"," * and lower boundaries of the scrollview. Set to 0 to"," * disable \"rubber-banding\"."," *"," * @attribute bounce"," * @type Number"," * @default 0.1"," */"," bounce: {"," value: 0.1"," },",""," /**"," * The minimum distance and/or velocity which define a flick. Can be set to false,"," * to disable flick support (note: drag support is enabled/disabled separately)"," *"," * @attribute flick"," * @type Object"," * @default Object with properties minDistance = 10, minVelocity = 0.3."," */"," flick: {"," value: {"," minDistance: 10,"," minVelocity: 0.3"," }"," },",""," /**"," * Enable/Disable dragging the ScrollView content (note: flick support is enabled/disabled separately)"," * @attribute drag"," * @type boolean"," * @default true"," */"," drag: {"," value: true"," },",""," /**"," * The default duration to use when animating the bounce snap back."," *"," * @attribute snapDuration"," * @type Number"," * @default 400"," */"," snapDuration: {"," value: 400"," },",""," /**"," * The default easing to use when animating the bounce snap back."," *"," * @attribute snapEasing"," * @type String"," * @default 'ease-out'"," */"," snapEasing: {"," value: 'ease-out'"," },",""," /**"," * The default easing used when animating the flick"," *"," * @attribute easing"," * @type String"," * @default 'cubic-bezier(0, 0.1, 0, 1.0)'"," */"," easing: {"," value: 'cubic-bezier(0, 0.1, 0, 1.0)'"," },",""," /**"," * The interval (ms) used when animating the flick for JS-timer animations"," *"," * @attribute frameDuration"," * @type Number"," * @default 15"," */"," frameDuration: {"," value: 15"," },",""," /**"," * The default bounce distance in pixels"," *"," * @attribute bounceRange"," * @type Number"," * @default 150"," */"," bounceRange: {"," value: 150"," }"," },",""," /**"," * List of class names used in the scrollview's DOM"," *"," * @property CLASS_NAMES"," * @type Object"," * @static"," */"," CLASS_NAMES: CLASS_NAMES,",""," /**"," * Flag used to source property changes initiated from the DOM"," *"," * @property UI_SRC"," * @type String"," * @static"," * @default 'ui'"," */"," UI_SRC: UI,",""," /**"," * Object map of style property names used to set transition properties."," * Defaults to the vendor prefix established by the Transition module."," * The configured property names are `_TRANSITION.DURATION` (e.g. \"WebkitTransitionDuration\") and"," * `_TRANSITION.PROPERTY (e.g. \"WebkitTransitionProperty\")."," *"," * @property _TRANSITION"," * @private"," */"," _TRANSITION: {"," DURATION: (vendorPrefix ? vendorPrefix + 'TransitionDuration' : 'transitionDuration'),"," PROPERTY: (vendorPrefix ? vendorPrefix + 'TransitionProperty' : 'transitionProperty')"," },",""," /**"," * The default bounce distance in pixels"," *"," * @property BOUNCE_RANGE"," * @type Number"," * @static"," * @default false"," * @deprecated (in 3.7.0)"," */"," BOUNCE_RANGE: false,",""," /**"," * The interval (ms) used when animating the flick"," *"," * @property FRAME_STEP"," * @type Number"," * @static"," * @default false"," * @deprecated (in 3.7.0)"," */"," FRAME_STEP: false,",""," /**"," * The default easing used when animating the flick"," *"," * @property EASING"," * @type String"," * @static"," * @default false"," * @deprecated (in 3.7.0)"," */"," EASING: false,",""," /**"," * The default easing to use when animating the bounce snap back."," *"," * @property SNAP_EASING"," * @type String"," * @static"," * @default false"," * @deprecated (in 3.7.0)"," */"," SNAP_EASING: false,",""," /**"," * The default duration to use when animating the bounce snap back."," *"," * @property SNAP_DURATION"," * @type Number"," * @static"," * @default false"," * @deprecated (in 3.7.0)"," */"," SNAP_DURATION: false",""," // End static properties","","});","","}, '@VERSION@', {\"requires\": [\"widget\", \"event-gestures\", \"event-mousewheel\", \"transition\"], \"skinnable\": true});"]; _yuitest_coverage["build/scrollview-base/scrollview-base.js"].lines = {"1":0,"11":0,"50":0,"62":0,"63":0,"66":0,"169":0,"172":0,"173":0,"176":0,"177":0,"178":0,"179":0,"180":0,"190":0,"193":0,"194":0,"195":0,"198":0,"201":0,"202":0,"206":0,"207":0,"210":0,"211":0,"214":0,"215":0,"218":0,"219":0,"222":0,"223":0,"238":0,"243":0,"266":0,"270":0,"272":0,"273":0,"286":0,"290":0,"292":0,"293":0,"296":0,"309":0,"314":0,"317":0,"319":0,"331":0,"339":0,"342":0,"347":0,"351":0,"354":0,"357":0,"360":0,"361":0,"375":0,"388":0,"389":0,"390":0,"393":0,"394":0,"396":0,"397":0,"403":0,"405":0,"407":0,"418":0,"432":0,"433":0,"436":0,"437":0,"440":0,"460":0,"464":0,"465":0,"466":0,"467":0,"477":0,"479":0,"501":0,"502":0,"505":0,"515":0,"516":0,"517":0,"519":0,"520":0,"521":0,"524":0,"525":0,"526":0,"529":0,"531":0,"533":0,"537":0,"538":0,"539":0,"544":0,"545":0,"547":0,"548":0,"555":0,"556":0,"558":0,"559":0,"562":0,"563":0,"566":0,"581":0,"583":0,"584":0,"587":0,"600":0,"601":0,"603":0,"604":0,"617":0,"620":0,"621":0,"630":0,"643":0,"644":0,"647":0,"654":0,"655":0,"659":0,"660":0,"661":0,"665":0,"668":0,"708":0,"720":0,"721":0,"724":0,"725":0,"729":0,"730":0,"734":0,"735":0,"737":0,"738":0,"750":0,"757":0,"758":0,"762":0,"763":0,"766":0,"767":0,"770":0,"776":0,"778":0,"781":0,"782":0,"789":0,"790":0,"805":0,"806":0,"809":0,"818":0,"819":0,"823":0,"824":0,"839":0,"867":0,"868":0,"872":0,"875":0,"877":0,"878":0,"882":0,"883":0,"888":0,"895":0,"896":0,"901":0,"903":0,"905":0,"908":0,"921":0,"929":0,"935":0,"938":0,"941":0,"945":0,"947":0,"948":0,"954":0,"957":0,"971":0,"983":0,"994":0,"1007":0,"1008":0,"1010":0,"1011":0,"1014":0,"1026":0,"1027":0,"1030":0,"1037":0,"1040":0,"1041":0,"1042":0,"1045":0,"1046":0,"1049":0,"1050":0,"1052":0,"1063":0,"1075":0,"1086":0,"1097":0,"1108":0,"1119":0,"1121":0,"1122":0,"1143":0,"1144":0,"1164":0,"1165":0,"1168":0,"1180":0,"1192":0}; _yuitest_coverage["build/scrollview-base/scrollview-base.js"].functions = {"_constrain:49":0,"ScrollView:62":0,"initializer:168":0,"bindUI:189":0,"_bindAttrs:237":0,"_bindDrag:265":0,"_bindFlick:285":0,"_bindMousewheel:308":0,"syncUI:330":0,"_getScrollDims:374":0,"_uiDimensionsChange:417":0,"_setBounds:459":0,"_getBounds:476":0,"scrollTo:499":0,"_transform:579":0,"_moveTo:599":0,"_onTransEnd:616":0,"_onGestureMoveStart:641":0,"_onGestureMove:707":0,"_onGestureMoveEnd:749":0,"_flick:804":0,"_flickFrame:837":0,"_cancelFlick:900":0,"_mousewheel:920":0,"_isOutOfBounds:970":0,"_snapBack:993":0,"_afterScrollChange:1025":0,"_afterFlickChange:1062":0,"_afterDisabledChange:1073":0,"_afterAxisChange:1085":0,"_afterDragChange:1096":0,"_afterDimChange:1107":0,"_afterScrollEnd:1118":0,"_axisSetter:1140":0,"_setScroll:1161":0,"_setScrollX:1179":0,"_setScrollY:1191":0,"(anonymous 1):1":0}; _yuitest_coverage["build/scrollview-base/scrollview-base.js"].coveredLines = 223; _yuitest_coverage["build/scrollview-base/scrollview-base.js"].coveredFunctions = 38; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1); YUI.add('scrollview-base', function (Y, NAME) { /** * The scrollview-base module provides a basic ScrollView Widget, without scrollbar indicators * * @module scrollview * @submodule scrollview-base */ // Local vars _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "(anonymous 1)", 1); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 11); var getClassName = Y.ClassNameManager.getClassName, DOCUMENT = Y.config.doc, IE = Y.UA.ie, NATIVE_TRANSITIONS = Y.Transition.useNative, vendorPrefix = Y.Transition._VENDOR_PREFIX, // Todo: This is a private property, and alternative approaches should be investigated SCROLLVIEW = 'scrollview', CLASS_NAMES = { vertical: getClassName(SCROLLVIEW, 'vert'), horizontal: getClassName(SCROLLVIEW, 'horiz') }, EV_SCROLL_END = 'scrollEnd', FLICK = 'flick', DRAG = 'drag', MOUSEWHEEL = 'mousewheel', UI = 'ui', TOP = 'top', LEFT = 'left', PX = 'px', AXIS = 'axis', SCROLL_Y = 'scrollY', SCROLL_X = 'scrollX', BOUNCE = 'bounce', DISABLED = 'disabled', DECELERATION = 'deceleration', DIM_X = 'x', DIM_Y = 'y', BOUNDING_BOX = 'boundingBox', CONTENT_BOX = 'contentBox', GESTURE_MOVE = 'gesturemove', START = 'start', END = 'end', EMPTY = '', ZERO = '0s', SNAP_DURATION = 'snapDuration', SNAP_EASING = 'snapEasing', EASING = 'easing', FRAME_DURATION = 'frameDuration', BOUNCE_RANGE = 'bounceRange', _constrain = function (val, min, max) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_constrain", 49); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 50); return Math.min(Math.max(val, min), max); }; /** * ScrollView provides a scrollable widget, supporting flick gestures, * across both touch and mouse based devices. * * @class ScrollView * @param config {Object} Object literal with initial attribute values * @extends Widget * @constructor */ _yuitest_coverline("build/scrollview-base/scrollview-base.js", 62); function ScrollView() { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "ScrollView", 62); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 63); ScrollView.superclass.constructor.apply(this, arguments); } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 66); Y.ScrollView = Y.extend(ScrollView, Y.Widget, { // *** Y.ScrollView prototype /** * Flag driving whether or not we should try and force H/W acceleration when transforming. Currently enabled by default for Webkit. * Used by the _transform method. * * @property _forceHWTransforms * @type boolean * @protected */ _forceHWTransforms: Y.UA.webkit ? true : false, /** * <p>Used to control whether or not ScrollView's internal * gesturemovestart, gesturemove and gesturemoveend * event listeners should preventDefault. The value is an * object, with "start", "move" and "end" properties used to * specify which events should preventDefault and which shouldn't:</p> * * <pre> * { * start: false, * move: true, * end: false * } * </pre> * * <p>The default values are set up in order to prevent panning, * on touch devices, while allowing click listeners on elements inside * the ScrollView to be notified as expected.</p> * * @property _prevent * @type Object * @protected */ _prevent: { start: false, move: true, end: false }, /** * Contains the distance (postive or negative) in pixels by which * the scrollview was last scrolled. This is useful when setting up * click listeners on the scrollview content, which on mouse based * devices are always fired, even after a drag/flick. * * <p>Touch based devices don't currently fire a click event, * if the finger has been moved (beyond a threshold) so this * check isn't required, if working in a purely touch based environment</p> * * @property lastScrolledAmt * @type Number * @public * @default 0 */ lastScrolledAmt: 0, /** * Internal state, defines the minimum amount that the scrollview can be scrolled along the X axis * * @property _minScrollX * @type number * @protected */ _minScrollX: null, /** * Internal state, defines the maximum amount that the scrollview can be scrolled along the X axis * * @property _maxScrollX * @type number * @protected */ _maxScrollX: null, /** * Internal state, defines the minimum amount that the scrollview can be scrolled along the Y axis * * @property _minScrollY * @type number * @protected */ _minScrollY: null, /** * Internal state, defines the maximum amount that the scrollview can be scrolled along the Y axis * * @property _maxScrollY * @type number * @protected */ _maxScrollY: null, /** * Designated initializer * * @method initializer * @param {config} Configuration object for the plugin */ initializer: function () { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "initializer", 168); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 169); var sv = this; // Cache these values, since they aren't going to change. _yuitest_coverline("build/scrollview-base/scrollview-base.js", 172); sv._bb = sv.get(BOUNDING_BOX); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 173); sv._cb = sv.get(CONTENT_BOX); // Cache some attributes _yuitest_coverline("build/scrollview-base/scrollview-base.js", 176); sv._cAxis = sv.get(AXIS); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 177); sv._cBounce = sv.get(BOUNCE); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 178); sv._cBounceRange = sv.get(BOUNCE_RANGE); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 179); sv._cDeceleration = sv.get(DECELERATION); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 180); sv._cFrameDuration = sv.get(FRAME_DURATION); }, /** * bindUI implementation * * Hooks up events for the widget * @method bindUI */ bindUI: function () { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "bindUI", 189); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 190); var sv = this; // Bind interaction listers _yuitest_coverline("build/scrollview-base/scrollview-base.js", 193); sv._bindFlick(sv.get(FLICK)); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 194); sv._bindDrag(sv.get(DRAG)); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 195); sv._bindMousewheel(true); // Bind change events _yuitest_coverline("build/scrollview-base/scrollview-base.js", 198); sv._bindAttrs(); // IE SELECT HACK. See if we can do this non-natively and in the gesture for a future release. _yuitest_coverline("build/scrollview-base/scrollview-base.js", 201); if (IE) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 202); sv._fixIESelect(sv._bb, sv._cb); } // Set any deprecated static properties _yuitest_coverline("build/scrollview-base/scrollview-base.js", 206); if (ScrollView.SNAP_DURATION) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 207); sv.set(SNAP_DURATION, ScrollView.SNAP_DURATION); } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 210); if (ScrollView.SNAP_EASING) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 211); sv.set(SNAP_EASING, ScrollView.SNAP_EASING); } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 214); if (ScrollView.EASING) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 215); sv.set(EASING, ScrollView.EASING); } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 218); if (ScrollView.FRAME_STEP) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 219); sv.set(FRAME_DURATION, ScrollView.FRAME_STEP); } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 222); if (ScrollView.BOUNCE_RANGE) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 223); sv.set(BOUNCE_RANGE, ScrollView.BOUNCE_RANGE); } // Recalculate dimension properties // TODO: This should be throttled. // Y.one(WINDOW).after('resize', sv._afterDimChange, sv); }, /** * Bind event listeners * * @method _bindAttrs * @private */ _bindAttrs: function () { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_bindAttrs", 237); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 238); var sv = this, scrollChangeHandler = sv._afterScrollChange, dimChangeHandler = sv._afterDimChange; // Bind any change event listeners _yuitest_coverline("build/scrollview-base/scrollview-base.js", 243); sv.after({ 'scrollEnd': sv._afterScrollEnd, 'disabledChange': sv._afterDisabledChange, 'flickChange': sv._afterFlickChange, 'dragChange': sv._afterDragChange, 'axisChange': sv._afterAxisChange, 'scrollYChange': scrollChangeHandler, 'scrollXChange': scrollChangeHandler, 'heightChange': dimChangeHandler, 'widthChange': dimChangeHandler }); }, /** * Bind (or unbind) gesture move listeners required for drag support * * @method _bindDrag * @param drag {boolean} If true, the method binds listener to enable * drag (gesturemovestart). If false, the method unbinds gesturemove * listeners for drag support. * @private */ _bindDrag: function (drag) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_bindDrag", 265); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 266); var sv = this, bb = sv._bb; // Unbind any previous 'drag' listeners _yuitest_coverline("build/scrollview-base/scrollview-base.js", 270); bb.detach(DRAG + '|*'); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 272); if (drag) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 273); bb.on(DRAG + '|' + GESTURE_MOVE + START, Y.bind(sv._onGestureMoveStart, sv)); } }, /** * Bind (or unbind) flick listeners. * * @method _bindFlick * @param flick {Object|boolean} If truthy, the method binds listeners for * flick support. If false, the method unbinds flick listeners. * @private */ _bindFlick: function (flick) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_bindFlick", 285); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 286); var sv = this, bb = sv._bb; // Unbind any previous 'flick' listeners _yuitest_coverline("build/scrollview-base/scrollview-base.js", 290); bb.detach(FLICK + '|*'); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 292); if (flick) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 293); bb.on(FLICK + '|' + FLICK, Y.bind(sv._flick, sv), flick); // Rebind Drag, becuase _onGestureMoveEnd always has to fire -after- _flick _yuitest_coverline("build/scrollview-base/scrollview-base.js", 296); sv._bindDrag(sv.get(DRAG)); } }, /** * Bind (or unbind) mousewheel listeners. * * @method _bindMousewheel * @param mousewheel {Object|boolean} If truthy, the method binds listeners for * mousewheel support. If false, the method unbinds mousewheel listeners. * @private */ _bindMousewheel: function (mousewheel) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_bindMousewheel", 308); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 309); var sv = this, bb = sv._bb; // Unbind any previous 'mousewheel' listeners // TODO: This doesn't actually appear to work properly. Fix. #2532743 _yuitest_coverline("build/scrollview-base/scrollview-base.js", 314); bb.detach(MOUSEWHEEL + '|*'); // Only enable for vertical scrollviews _yuitest_coverline("build/scrollview-base/scrollview-base.js", 317); if (mousewheel) { // Bound to document, because that's where mousewheel events fire off of. _yuitest_coverline("build/scrollview-base/scrollview-base.js", 319); Y.one(DOCUMENT).on(MOUSEWHEEL, Y.bind(sv._mousewheel, sv)); } }, /** * syncUI implementation. * * Update the scroll position, based on the current value of scrollX/scrollY. * * @method syncUI */ syncUI: function () { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "syncUI", 330); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 331); var sv = this, scrollDims = sv._getScrollDims(), width = scrollDims.offsetWidth, height = scrollDims.offsetHeight, scrollWidth = scrollDims.scrollWidth, scrollHeight = scrollDims.scrollHeight; // If the axis is undefined, auto-calculate it _yuitest_coverline("build/scrollview-base/scrollview-base.js", 339); if (sv._cAxis === undefined) { // This should only ever be run once (for now). // In the future SV might post-load axis changes _yuitest_coverline("build/scrollview-base/scrollview-base.js", 342); sv._cAxis = { x: (scrollWidth > width), y: (scrollHeight > height) }; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 347); sv._set(AXIS, sv._cAxis); } // get text direction on or inherited by scrollview node _yuitest_coverline("build/scrollview-base/scrollview-base.js", 351); sv.rtl = (sv._cb.getComputedStyle('direction') === 'rtl'); // Cache the disabled value _yuitest_coverline("build/scrollview-base/scrollview-base.js", 354); sv._cDisabled = sv.get(DISABLED); // Run this to set initial values _yuitest_coverline("build/scrollview-base/scrollview-base.js", 357); sv._uiDimensionsChange(); // If we're out-of-bounds, snap back. _yuitest_coverline("build/scrollview-base/scrollview-base.js", 360); if (sv._isOutOfBounds()) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 361); sv._snapBack(); } }, /** * Utility method to obtain widget dimensions * * @method _getScrollDims * @return {Object} The offsetWidth, offsetHeight, scrollWidth and * scrollHeight as an array: [offsetWidth, offsetHeight, scrollWidth, * scrollHeight] * @private */ _getScrollDims: function () { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_getScrollDims", 374); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 375); var sv = this, cb = sv._cb, bb = sv._bb, TRANS = ScrollView._TRANSITION, // Ideally using CSSMatrix - don't think we have it normalized yet though. // origX = (new WebKitCSSMatrix(cb.getComputedStyle("transform"))).e, // origY = (new WebKitCSSMatrix(cb.getComputedStyle("transform"))).f, origX = sv.get(SCROLL_X), origY = sv.get(SCROLL_Y), origHWTransform, dims; // TODO: Is this OK? Just in case it's called 'during' a transition. _yuitest_coverline("build/scrollview-base/scrollview-base.js", 388); if (NATIVE_TRANSITIONS) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 389); cb.setStyle(TRANS.DURATION, ZERO); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 390); cb.setStyle(TRANS.PROPERTY, EMPTY); } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 393); origHWTransform = sv._forceHWTransforms; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 394); sv._forceHWTransforms = false; // the z translation was causing issues with picking up accurate scrollWidths in Chrome/Mac. _yuitest_coverline("build/scrollview-base/scrollview-base.js", 396); sv._moveTo(cb, 0, 0); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 397); dims = { 'offsetWidth': bb.get('offsetWidth'), 'offsetHeight': bb.get('offsetHeight'), 'scrollWidth': bb.get('scrollWidth'), 'scrollHeight': bb.get('scrollHeight') }; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 403); sv._moveTo(cb, -(origX), -(origY)); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 405); sv._forceHWTransforms = origHWTransform; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 407); return dims; }, /** * This method gets invoked whenever the height or width attributes change, * allowing us to determine which scrolling axes need to be enabled. * * @method _uiDimensionsChange * @protected */ _uiDimensionsChange: function () { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_uiDimensionsChange", 417); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 418); var sv = this, bb = sv._bb, scrollDims = sv._getScrollDims(), width = scrollDims.offsetWidth, height = scrollDims.offsetHeight, scrollWidth = scrollDims.scrollWidth, scrollHeight = scrollDims.scrollHeight, rtl = sv.rtl, svAxis = sv._cAxis, minScrollX = (rtl ? Math.min(0, -(scrollWidth - width)) : 0), maxScrollX = (rtl ? 0 : Math.max(0, scrollWidth - width)), minScrollY = 0, maxScrollY = Math.max(0, scrollHeight - height); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 432); if (svAxis && svAxis.x) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 433); bb.addClass(CLASS_NAMES.horizontal); } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 436); if (svAxis && svAxis.y) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 437); bb.addClass(CLASS_NAMES.vertical); } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 440); sv._setBounds({ minScrollX: minScrollX, maxScrollX: maxScrollX, minScrollY: minScrollY, maxScrollY: maxScrollY }); }, /** * Set the bounding dimensions of the ScrollView * * @method _setBounds * @protected * @param bounds {Object} [duration] ms of the scroll animation. (default is 0) * @param {Number} [bounds.minScrollX] The minimum scroll X value * @param {Number} [bounds.maxScrollX] The maximum scroll X value * @param {Number} [bounds.minScrollY] The minimum scroll Y value * @param {Number} [bounds.maxScrollY] The maximum scroll Y value */ _setBounds: function (bounds) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_setBounds", 459); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 460); var sv = this; // TODO: Do a check to log if the bounds are invalid _yuitest_coverline("build/scrollview-base/scrollview-base.js", 464); sv._minScrollX = bounds.minScrollX; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 465); sv._maxScrollX = bounds.maxScrollX; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 466); sv._minScrollY = bounds.minScrollY; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 467); sv._maxScrollY = bounds.maxScrollY; }, /** * Get the bounding dimensions of the ScrollView * * @method _getBounds * @protected */ _getBounds: function () { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_getBounds", 476); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 477); var sv = this; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 479); return { minScrollX: sv._minScrollX, maxScrollX: sv._maxScrollX, minScrollY: sv._minScrollY, maxScrollY: sv._maxScrollY }; }, /** * Scroll the element to a given xy coordinate * * @method scrollTo * @param x {Number} The x-position to scroll to. (null for no movement) * @param y {Number} The y-position to scroll to. (null for no movement) * @param {Number} [duration] ms of the scroll animation. (default is 0) * @param {String} [easing] An easing equation if duration is set. (default is `easing` attribute) * @param {String} [node] The node to transform. Setting this can be useful in * dual-axis paginated instances. (default is the instance's contentBox) */ scrollTo: function (x, y, duration, easing, node) { // Check to see if widget is disabled _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "scrollTo", 499); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 501); if (this._cDisabled) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 502); return; } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 505); var sv = this, cb = sv._cb, TRANS = ScrollView._TRANSITION, callback = Y.bind(sv._onTransEnd, sv), // @Todo : cache this newX = 0, newY = 0, transition = {}, transform; // default the optional arguments _yuitest_coverline("build/scrollview-base/scrollview-base.js", 515); duration = duration || 0; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 516); easing = easing || sv.get(EASING); // @TODO: Cache this _yuitest_coverline("build/scrollview-base/scrollview-base.js", 517); node = node || cb; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 519); if (x !== null) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 520); sv.set(SCROLL_X, x, {src:UI}); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 521); newX = -(x); } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 524); if (y !== null) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 525); sv.set(SCROLL_Y, y, {src:UI}); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 526); newY = -(y); } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 529); transform = sv._transform(newX, newY); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 531); if (NATIVE_TRANSITIONS) { // ANDROID WORKAROUND - try and stop existing transition, before kicking off new one. _yuitest_coverline("build/scrollview-base/scrollview-base.js", 533); node.setStyle(TRANS.DURATION, ZERO).setStyle(TRANS.PROPERTY, EMPTY); } // Move _yuitest_coverline("build/scrollview-base/scrollview-base.js", 537); if (duration === 0) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 538); if (NATIVE_TRANSITIONS) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 539); node.setStyle('transform', transform); } else { // TODO: If both set, batch them in the same update // Update: Nope, setStyles() just loops through each property and applies it. _yuitest_coverline("build/scrollview-base/scrollview-base.js", 544); if (x !== null) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 545); node.setStyle(LEFT, newX + PX); } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 547); if (y !== null) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 548); node.setStyle(TOP, newY + PX); } } } // Animate else { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 555); transition.easing = easing; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 556); transition.duration = duration / 1000; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 558); if (NATIVE_TRANSITIONS) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 559); transition.transform = transform; } else { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 562); transition.left = newX + PX; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 563); transition.top = newY + PX; } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 566); node.transition(transition, callback); } }, /** * Utility method, to create the translate transform string with the * x, y translation amounts provided. * * @method _transform * @param {Number} x Number of pixels to translate along the x axis * @param {Number} y Number of pixels to translate along the y axis * @private */ _transform: function (x, y) { // TODO: Would we be better off using a Matrix for this? _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_transform", 579); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 581); var prop = 'translate(' + x + 'px, ' + y + 'px)'; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 583); if (this._forceHWTransforms) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 584); prop += ' translateZ(0)'; } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 587); return prop; }, /** * Utility method, to move the given element to the given xy position * * @method _moveTo * @param node {Node} The node to move * @param x {Number} The x-position to move to * @param y {Number} The y-position to move to * @private */ _moveTo : function(node, x, y) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_moveTo", 599); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 600); if (NATIVE_TRANSITIONS) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 601); node.setStyle('transform', this._transform(x, y)); } else { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 603); node.setStyle(LEFT, x + PX); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 604); node.setStyle(TOP, y + PX); } }, /** * Content box transition callback * * @method _onTransEnd * @param {Event.Facade} e The event facade * @private */ _onTransEnd: function () { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_onTransEnd", 616); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 617); var sv = this; // If for some reason we're OOB, snapback _yuitest_coverline("build/scrollview-base/scrollview-base.js", 620); if (sv._isOutOfBounds()) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 621); sv._snapBack(); } else { /** * Notification event fired at the end of a scroll transition * * @event scrollEnd * @param e {EventFacade} The default event facade. */ _yuitest_coverline("build/scrollview-base/scrollview-base.js", 630); sv.fire(EV_SCROLL_END); } }, /** * gesturemovestart event handler * * @method _onGestureMoveStart * @param e {Event.Facade} The gesturemovestart event facade * @private */ _onGestureMoveStart: function (e) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_onGestureMoveStart", 641); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 643); if (this._cDisabled) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 644); return false; } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 647); var sv = this, bb = sv._bb, currentX = sv.get(SCROLL_X), currentY = sv.get(SCROLL_Y), clientX = e.clientX, clientY = e.clientY; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 654); if (sv._prevent.start) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 655); e.preventDefault(); } // if a flick animation is in progress, cancel it _yuitest_coverline("build/scrollview-base/scrollview-base.js", 659); if (sv._flickAnim) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 660); sv._cancelFlick(); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 661); sv._onTransEnd(); } // Reset lastScrolledAmt _yuitest_coverline("build/scrollview-base/scrollview-base.js", 665); sv.lastScrolledAmt = 0; // Stores data for this gesture cycle. Cleaned up later _yuitest_coverline("build/scrollview-base/scrollview-base.js", 668); sv._gesture = { // Will hold the axis value axis: null, // The current attribute values startX: currentX, startY: currentY, // The X/Y coordinates where the event began startClientX: clientX, startClientY: clientY, // The X/Y coordinates where the event will end endClientX: null, endClientY: null, // The current delta of the event deltaX: null, deltaY: null, // Will be populated for flicks flick: null, // Create some listeners for the rest of the gesture cycle onGestureMove: bb.on(DRAG + '|' + GESTURE_MOVE, Y.bind(sv._onGestureMove, sv)), // @TODO: Don't bind gestureMoveEnd if it's a Flick? onGestureMoveEnd: bb.on(DRAG + '|' + GESTURE_MOVE + END, Y.bind(sv._onGestureMoveEnd, sv)) }; }, /** * gesturemove event handler * * @method _onGestureMove * @param e {Event.Facade} The gesturemove event facade * @private */ _onGestureMove: function (e) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_onGestureMove", 707); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 708); var sv = this, gesture = sv._gesture, svAxis = sv._cAxis, svAxisX = svAxis.x, svAxisY = svAxis.y, startX = gesture.startX, startY = gesture.startY, startClientX = gesture.startClientX, startClientY = gesture.startClientY, clientX = e.clientX, clientY = e.clientY; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 720); if (sv._prevent.move) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 721); e.preventDefault(); } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 724); gesture.deltaX = startClientX - clientX; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 725); gesture.deltaY = startClientY - clientY; // Determine if this is a vertical or horizontal movement // @TODO: This is crude, but it works. Investigate more intelligent ways to detect intent _yuitest_coverline("build/scrollview-base/scrollview-base.js", 729); if (gesture.axis === null) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 730); gesture.axis = (Math.abs(gesture.deltaX) > Math.abs(gesture.deltaY)) ? DIM_X : DIM_Y; } // Move X or Y. @TODO: Move both if dualaxis. _yuitest_coverline("build/scrollview-base/scrollview-base.js", 734); if (gesture.axis === DIM_X && svAxisX) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 735); sv.set(SCROLL_X, startX + gesture.deltaX); } else {_yuitest_coverline("build/scrollview-base/scrollview-base.js", 737); if (gesture.axis === DIM_Y && svAxisY) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 738); sv.set(SCROLL_Y, startY + gesture.deltaY); }} }, /** * gesturemoveend event handler * * @method _onGestureMoveEnd * @param e {Event.Facade} The gesturemoveend event facade * @private */ _onGestureMoveEnd: function (e) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_onGestureMoveEnd", 749); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 750); var sv = this, gesture = sv._gesture, flick = gesture.flick, clientX = e.clientX, clientY = e.clientY, isOOB; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 757); if (sv._prevent.end) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 758); e.preventDefault(); } // Store the end X/Y coordinates _yuitest_coverline("build/scrollview-base/scrollview-base.js", 762); gesture.endClientX = clientX; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 763); gesture.endClientY = clientY; // Cleanup the event handlers _yuitest_coverline("build/scrollview-base/scrollview-base.js", 766); gesture.onGestureMove.detach(); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 767); gesture.onGestureMoveEnd.detach(); // If this wasn't a flick, wrap up the gesture cycle _yuitest_coverline("build/scrollview-base/scrollview-base.js", 770); if (!flick) { // @TODO: Be more intelligent about this. Look at the Flick attribute to see // if it is safe to assume _flick did or didn't fire. // Then, the order _flick and _onGestureMoveEnd fire doesn't matter? // If there was movement (_onGestureMove fired) _yuitest_coverline("build/scrollview-base/scrollview-base.js", 776); if (gesture.deltaX !== null && gesture.deltaY !== null) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 778); isOOB = sv._isOutOfBounds(); // If we're out-out-bounds, then snapback _yuitest_coverline("build/scrollview-base/scrollview-base.js", 781); if (isOOB) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 782); sv._snapBack(); } // Inbounds else { // Fire scrollEnd unless this is a paginated instance and the gesture axis is the same as paginator's // Not totally confident this is ideal to access a plugin's properties from a host, @TODO revisit _yuitest_coverline("build/scrollview-base/scrollview-base.js", 789); if (!sv.pages || (sv.pages && !sv.pages.get(AXIS)[gesture.axis])) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 790); sv._onTransEnd(); } } } } }, /** * Execute a flick at the end of a scroll action * * @method _flick * @param e {Event.Facade} The Flick event facade * @private */ _flick: function (e) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_flick", 804); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 805); if (this._cDisabled) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 806); return false; } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 809); var sv = this, svAxis = sv._cAxis, flick = e.flick, flickAxis = flick.axis, flickVelocity = flick.velocity, axisAttr = flickAxis === DIM_X ? SCROLL_X : SCROLL_Y, startPosition = sv.get(axisAttr); // Sometimes flick is enabled, but drag is disabled _yuitest_coverline("build/scrollview-base/scrollview-base.js", 818); if (sv._gesture) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 819); sv._gesture.flick = flick; } // Prevent unneccesary firing of _flickFrame if we can't scroll on the flick axis _yuitest_coverline("build/scrollview-base/scrollview-base.js", 823); if (svAxis[flickAxis]) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 824); sv._flickFrame(flickVelocity, flickAxis, startPosition); } }, /** * Execute a single frame in the flick animation * * @method _flickFrame * @param velocity {Number} The velocity of this animated frame * @param flickAxis {String} The axis on which to animate * @param startPosition {Number} The starting X/Y point to flick from * @protected */ _flickFrame: function (velocity, flickAxis, startPosition) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_flickFrame", 837); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 839); var sv = this, axisAttr = flickAxis === DIM_X ? SCROLL_X : SCROLL_Y, bounds = sv._getBounds(), // Localize cached values bounce = sv._cBounce, bounceRange = sv._cBounceRange, deceleration = sv._cDeceleration, frameDuration = sv._cFrameDuration, // Calculate newVelocity = velocity * deceleration, newPosition = startPosition - (frameDuration * newVelocity), // Some convinience conditions min = flickAxis === DIM_X ? bounds.minScrollX : bounds.minScrollY, max = flickAxis === DIM_X ? bounds.maxScrollX : bounds.maxScrollY, belowMin = (newPosition < min), belowMax = (newPosition < max), aboveMin = (newPosition > min), aboveMax = (newPosition > max), belowMinRange = (newPosition < (min - bounceRange)), withinMinRange = (belowMin && (newPosition > (min - bounceRange))), withinMaxRange = (aboveMax && (newPosition < (max + bounceRange))), aboveMaxRange = (newPosition > (max + bounceRange)), tooSlow; // If we're within the range but outside min/max, dampen the velocity _yuitest_coverline("build/scrollview-base/scrollview-base.js", 867); if (withinMinRange || withinMaxRange) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 868); newVelocity *= bounce; } // Is the velocity too slow to bother? _yuitest_coverline("build/scrollview-base/scrollview-base.js", 872); tooSlow = (Math.abs(newVelocity).toFixed(4) < 0.015); // If the velocity is too slow or we're outside the range _yuitest_coverline("build/scrollview-base/scrollview-base.js", 875); if (tooSlow || belowMinRange || aboveMaxRange) { // Cancel and delete sv._flickAnim _yuitest_coverline("build/scrollview-base/scrollview-base.js", 877); if (sv._flickAnim) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 878); sv._cancelFlick(); } // If we're inside the scroll area, just end _yuitest_coverline("build/scrollview-base/scrollview-base.js", 882); if (aboveMin && belowMax) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 883); sv._onTransEnd(); } // We're outside the scroll area, so we need to snap back else { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 888); sv._snapBack(); } } // Otherwise, animate to the next frame else { // @TODO: maybe use requestAnimationFrame instead _yuitest_coverline("build/scrollview-base/scrollview-base.js", 895); sv._flickAnim = Y.later(frameDuration, sv, '_flickFrame', [newVelocity, flickAxis, newPosition]); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 896); sv.set(axisAttr, newPosition); } }, _cancelFlick: function () { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_cancelFlick", 900); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 901); var sv = this; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 903); if (sv._flickAnim) { // Cancel the flick (if it exists) _yuitest_coverline("build/scrollview-base/scrollview-base.js", 905); sv._flickAnim.cancel(); // Also delete it, otherwise _onGestureMoveStart will think we're still flicking _yuitest_coverline("build/scrollview-base/scrollview-base.js", 908); delete sv._flickAnim; } }, /** * Handle mousewheel events on the widget * * @method _mousewheel * @param e {Event.Facade} The mousewheel event facade * @private */ _mousewheel: function (e) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_mousewheel", 920); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 921); var sv = this, scrollY = sv.get(SCROLL_Y), bounds = sv._getBounds(), bb = sv._bb, scrollOffset = 10, // 10px isForward = (e.wheelDelta > 0), scrollToY = scrollY - ((isForward ? 1 : -1) * scrollOffset); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 929); scrollToY = _constrain(scrollToY, bounds.minScrollY, bounds.maxScrollY); // Because Mousewheel events fire off 'document', every ScrollView widget will react // to any mousewheel anywhere on the page. This check will ensure that the mouse is currently // over this specific ScrollView. Also, only allow mousewheel scrolling on Y-axis, // becuase otherwise the 'prevent' will block page scrolling. _yuitest_coverline("build/scrollview-base/scrollview-base.js", 935); if (bb.contains(e.target) && sv._cAxis[DIM_Y]) { // Reset lastScrolledAmt _yuitest_coverline("build/scrollview-base/scrollview-base.js", 938); sv.lastScrolledAmt = 0; // Jump to the new offset _yuitest_coverline("build/scrollview-base/scrollview-base.js", 941); sv.set(SCROLL_Y, scrollToY); // if we have scrollbars plugin, update & set the flash timer on the scrollbar // @TODO: This probably shouldn't be in this module _yuitest_coverline("build/scrollview-base/scrollview-base.js", 945); if (sv.scrollbars) { // @TODO: The scrollbars should handle this themselves _yuitest_coverline("build/scrollview-base/scrollview-base.js", 947); sv.scrollbars._update(); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 948); sv.scrollbars.flash(); // or just this // sv.scrollbars._hostDimensionsChange(); } // Fire the 'scrollEnd' event _yuitest_coverline("build/scrollview-base/scrollview-base.js", 954); sv._onTransEnd(); // prevent browser default behavior on mouse scroll _yuitest_coverline("build/scrollview-base/scrollview-base.js", 957); e.preventDefault(); } }, /** * Checks to see the current scrollX/scrollY position beyond the min/max boundary * * @method _isOutOfBounds * @param x {Number} [optional] The X position to check * @param y {Number} [optional] The Y position to check * @return {boolen} Whether the current X/Y position is out of bounds (true) or not (false) * @private */ _isOutOfBounds: function (x, y) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_isOutOfBounds", 970); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 971); var sv = this, svAxis = sv._cAxis, svAxisX = svAxis.x, svAxisY = svAxis.y, currentX = x || sv.get(SCROLL_X), currentY = y || sv.get(SCROLL_Y), bounds = sv._getBounds(), minX = bounds.minScrollX, minY = bounds.minScrollY, maxX = bounds.maxScrollX, maxY = bounds.maxScrollY; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 983); return (svAxisX && (currentX < minX || currentX > maxX)) || (svAxisY && (currentY < minY || currentY > maxY)); }, /** * Bounces back * @TODO: Should be more generalized and support both X and Y detection * * @method _snapBack * @private */ _snapBack: function () { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_snapBack", 993); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 994); var sv = this, currentX = sv.get(SCROLL_X), currentY = sv.get(SCROLL_Y), bounds = sv._getBounds(), minX = bounds.minScrollX, minY = bounds.minScrollY, maxX = bounds.maxScrollX, maxY = bounds.maxScrollY, newY = _constrain(currentY, minY, maxY), newX = _constrain(currentX, minX, maxX), duration = sv.get(SNAP_DURATION), easing = sv.get(SNAP_EASING); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1007); if (newX !== currentX) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1008); sv.set(SCROLL_X, newX, {duration:duration, easing:easing}); } else {_yuitest_coverline("build/scrollview-base/scrollview-base.js", 1010); if (newY !== currentY) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1011); sv.set(SCROLL_Y, newY, {duration:duration, easing:easing}); } else { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1014); sv._onTransEnd(); }} }, /** * After listener for changes to the scrollX or scrollY attribute * * @method _afterScrollChange * @param e {Event.Facade} The event facade * @protected */ _afterScrollChange: function (e) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_afterScrollChange", 1025); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1026); if (e.src === ScrollView.UI_SRC) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1027); return false; } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1030); var sv = this, duration = e.duration, easing = e.easing, val = e.newVal, scrollToArgs = []; // Set the scrolled value _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1037); sv.lastScrolledAmt = sv.lastScrolledAmt + (e.newVal - e.prevVal); // Generate the array of args to pass to scrollTo() _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1040); if (e.attrName === SCROLL_X) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1041); scrollToArgs.push(val); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1042); scrollToArgs.push(sv.get(SCROLL_Y)); } else { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1045); scrollToArgs.push(sv.get(SCROLL_X)); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1046); scrollToArgs.push(val); } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1049); scrollToArgs.push(duration); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1050); scrollToArgs.push(easing); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1052); sv.scrollTo.apply(sv, scrollToArgs); }, /** * After listener for changes to the flick attribute * * @method _afterFlickChange * @param e {Event.Facade} The event facade * @protected */ _afterFlickChange: function (e) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_afterFlickChange", 1062); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1063); this._bindFlick(e.newVal); }, /** * After listener for changes to the disabled attribute * * @method _afterDisabledChange * @param e {Event.Facade} The event facade * @protected */ _afterDisabledChange: function (e) { // Cache for performance - we check during move _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_afterDisabledChange", 1073); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1075); this._cDisabled = e.newVal; }, /** * After listener for the axis attribute * * @method _afterAxisChange * @param e {Event.Facade} The event facade * @protected */ _afterAxisChange: function (e) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_afterAxisChange", 1085); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1086); this._cAxis = e.newVal; }, /** * After listener for changes to the drag attribute * * @method _afterDragChange * @param e {Event.Facade} The event facade * @protected */ _afterDragChange: function (e) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_afterDragChange", 1096); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1097); this._bindDrag(e.newVal); }, /** * After listener for the height or width attribute * * @method _afterDimChange * @param e {Event.Facade} The event facade * @protected */ _afterDimChange: function () { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_afterDimChange", 1107); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1108); this._uiDimensionsChange(); }, /** * After listener for scrollEnd, for cleanup * * @method _afterScrollEnd * @param e {Event.Facade} The event facade * @protected */ _afterScrollEnd: function () { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_afterScrollEnd", 1118); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1119); var sv = this; _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1121); if (sv._flickAnim) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1122); sv._cancelFlick(); } // Ideally this should be removed, but doing so causing some JS errors with fast swiping // because _gesture is being deleted after the previous one has been overwritten // delete sv._gesture; // TODO: Move to sv.prevGesture? }, /** * Setter for 'axis' attribute * * @method _axisSetter * @param val {Mixed} A string ('x', 'y', 'xy') to specify which axis/axes to allow scrolling on * @param name {String} The attribute name * @return {Object} An object to specify scrollability on the x & y axes * * @protected */ _axisSetter: function (val) { // Turn a string into an axis object _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_axisSetter", 1140); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1143); if (Y.Lang.isString(val)) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1144); return { x: val.match(/x/i) ? true : false, y: val.match(/y/i) ? true : false }; } }, /** * The scrollX, scrollY setter implementation * * @method _setScroll * @private * @param {Number} val * @param {String} dim * * @return {Number} The value */ _setScroll : function(val) { // Just ensure the widget is not disabled _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_setScroll", 1161); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1164); if (this._cDisabled) { _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1165); val = Y.Attribute.INVALID_VALUE; } _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1168); return val; }, /** * Setter for the scrollX attribute * * @method _setScrollX * @param val {Number} The new scrollX value * @return {Number} The normalized value * @protected */ _setScrollX: function(val) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_setScrollX", 1179); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1180); return this._setScroll(val, DIM_X); }, /** * Setter for the scrollY ATTR * * @method _setScrollY * @param val {Number} The new scrollY value * @return {Number} The normalized value * @protected */ _setScrollY: function(val) { _yuitest_coverfunc("build/scrollview-base/scrollview-base.js", "_setScrollY", 1191); _yuitest_coverline("build/scrollview-base/scrollview-base.js", 1192); return this._setScroll(val, DIM_Y); } // End prototype properties }, { // Static properties /** * The identity of the widget. * * @property NAME * @type String * @default 'scrollview' * @readOnly * @protected * @static */ NAME: 'scrollview', /** * Static property used to define the default attribute configuration of * the Widget. * * @property ATTRS * @type {Object} * @protected * @static */ ATTRS: { /** * Specifies ability to scroll on x, y, or x and y axis/axes. * * @attribute axis * @type String */ axis: { setter: '_axisSetter', writeOnce: 'initOnly' }, /** * The current scroll position in the x-axis * * @attribute scrollX * @type Number * @default 0 */ scrollX: { value: 0, setter: '_setScrollX' }, /** * The current scroll position in the y-axis * * @attribute scrollY * @type Number * @default 0 */ scrollY: { value: 0, setter: '_setScrollY' }, /** * Drag coefficent for inertial scrolling. The closer to 1 this * value is, the less friction during scrolling. * * @attribute deceleration * @default 0.93 */ deceleration: { value: 0.93 }, /** * Drag coefficient for intertial scrolling at the upper * and lower boundaries of the scrollview. Set to 0 to * disable "rubber-banding". * * @attribute bounce * @type Number * @default 0.1 */ bounce: { value: 0.1 }, /** * The minimum distance and/or velocity which define a flick. Can be set to false, * to disable flick support (note: drag support is enabled/disabled separately) * * @attribute flick * @type Object * @default Object with properties minDistance = 10, minVelocity = 0.3. */ flick: { value: { minDistance: 10, minVelocity: 0.3 } }, /** * Enable/Disable dragging the ScrollView content (note: flick support is enabled/disabled separately) * @attribute drag * @type boolean * @default true */ drag: { value: true }, /** * The default duration to use when animating the bounce snap back. * * @attribute snapDuration * @type Number * @default 400 */ snapDuration: { value: 400 }, /** * The default easing to use when animating the bounce snap back. * * @attribute snapEasing * @type String * @default 'ease-out' */ snapEasing: { value: 'ease-out' }, /** * The default easing used when animating the flick * * @attribute easing * @type String * @default 'cubic-bezier(0, 0.1, 0, 1.0)' */ easing: { value: 'cubic-bezier(0, 0.1, 0, 1.0)' }, /** * The interval (ms) used when animating the flick for JS-timer animations * * @attribute frameDuration * @type Number * @default 15 */ frameDuration: { value: 15 }, /** * The default bounce distance in pixels * * @attribute bounceRange * @type Number * @default 150 */ bounceRange: { value: 150 } }, /** * List of class names used in the scrollview's DOM * * @property CLASS_NAMES * @type Object * @static */ CLASS_NAMES: CLASS_NAMES, /** * Flag used to source property changes initiated from the DOM * * @property UI_SRC * @type String * @static * @default 'ui' */ UI_SRC: UI, /** * Object map of style property names used to set transition properties. * Defaults to the vendor prefix established by the Transition module. * The configured property names are `_TRANSITION.DURATION` (e.g. "WebkitTransitionDuration") and * `_TRANSITION.PROPERTY (e.g. "WebkitTransitionProperty"). * * @property _TRANSITION * @private */ _TRANSITION: { DURATION: (vendorPrefix ? vendorPrefix + 'TransitionDuration' : 'transitionDuration'), PROPERTY: (vendorPrefix ? vendorPrefix + 'TransitionProperty' : 'transitionProperty') }, /** * The default bounce distance in pixels * * @property BOUNCE_RANGE * @type Number * @static * @default false * @deprecated (in 3.7.0) */ BOUNCE_RANGE: false, /** * The interval (ms) used when animating the flick * * @property FRAME_STEP * @type Number * @static * @default false * @deprecated (in 3.7.0) */ FRAME_STEP: false, /** * The default easing used when animating the flick * * @property EASING * @type String * @static * @default false * @deprecated (in 3.7.0) */ EASING: false, /** * The default easing to use when animating the bounce snap back. * * @property SNAP_EASING * @type String * @static * @default false * @deprecated (in 3.7.0) */ SNAP_EASING: false, /** * The default duration to use when animating the bounce snap back. * * @property SNAP_DURATION * @type Number * @static * @default false * @deprecated (in 3.7.0) */ SNAP_DURATION: false // End static properties }); }, '@VERSION@', {"requires": ["widget", "event-gestures", "event-mousewheel", "transition"], "skinnable": true});
src/icons/FilterBAndWIcon.js
kiloe/ui
import React from 'react'; import Icon from '../Icon'; export default class FilterBAndWIcon extends Icon { getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M38 6H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zm0 32L24 22v16H10l14-16V10h14v28z"/></svg>;} };
project/Chat/node_modules/babel-core/lib/transformation/transformers/validation/react.js
xzzw9987/Memos
"use strict"; exports.__esModule = true; // istanbul ignore next 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; } } var _messages = require("../../../messages"); var messages = _interopRequireWildcard(_messages); var _types = require("../../../types"); var t = _interopRequireWildcard(_types); // check if the input Literal `source` is an alternate casing of "react" function check(source, file) { if (t.isLiteral(source)) { var name = source.value; var lower = name.toLowerCase(); if (lower === "react" && name !== lower) { throw file.errorWithNode(source, messages.get("didYouMean", "react")); } } } /** * [Please add a description.] */ var visitor = { /** * [Please add a description.] */ CallExpression: function CallExpression(node, parent, scope, file) { if (this.get("callee").isIdentifier({ name: "require" }) && node.arguments.length === 1) { check(node.arguments[0], file); } }, /** * [Please add a description.] */ ModuleDeclaration: function ModuleDeclaration(node, parent, scope, file) { check(node.source, file); } }; exports.visitor = visitor;
src/components/Row.js
mikkom/hedron
// @flow /* eslint-disable no-unused-vars */ import React from 'react'; import styled from 'styled-components'; import Column from './Column'; import { divvy, passOn } from '../utils'; type Props = { children?: Array<React.Element<>>, className?: string, debug?: boolean, tagName?: string, // grid props divisions?: number, // flex props alignContent?: string, alignItems?: string, alignSelf?: string, justifyContent?: string, order?: string } function RowContainer(props: Props) { const { children, tagName, debug, divisions, alignContent, alignItems, alignSelf, justifyContent, order, ...rest } = props; const newChildren = passOn(children, [Column], (child) => { return { debug: typeof child.props.debug === 'undefined' ? debug : child.props.debug, divisions, }; }); return React.createElement(tagName || 'section', rest, newChildren); } RowContainer.defaultProps = { divisions: 12, }; const Row = styled(RowContainer)` display: flex; flex-direction: row; flex-wrap: wrap; ${props => props.alignContent ? `align-content: ${props.alignContent};` : null } ${props => props.alignItems ? `align-items: ${props.alignItems};` : null } ${props => props.alignSelf ? `align-self: ${props.alignSelf};` : null } ${props => props.justifyContent ? `justify-content: ${props.justifyContent};` : null } ${props => props.order ? `order: ${props.order};` : null } `; export default Row;
docs/articles/extension-icons/Opera extensions icon template - Photoshop tutorial_files/jquery-1.js
1974kpkpkp/operaextensions.js
/*! * jQuery JavaScript Library v1.4.2 * http://jquery.com/ * * Copyright 2010, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2010, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Sat Feb 13 22:33:48 2010 -0500 */ (function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i? e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r= j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g, "&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e= true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& (d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== "find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)|| c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded", L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype, "isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+ a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f], d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]=== a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&& !c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari= true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ", i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ", " ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className= this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i= e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!= null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type= e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this, "events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent= a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y, isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit= {setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}}; if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, "_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&& !a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector, u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.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".split(" "), function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q]; if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length- 1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/, CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}}, relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]= l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[]; h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m= m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== "="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition|| !h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m= h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>"; if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); (function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/, gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length; c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= {},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== "string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== 1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)? a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, ""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&& this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]|| u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length=== 1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", ""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, "border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== "string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? "&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== 1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== "json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay"); this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a], "olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)}, animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing= j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]); this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== "number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length|| c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement? function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b= this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle; k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&& f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>"; a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": "pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
blocks/teleport.js
UXtemple/panels
import normaliseUri from '../utils/normalise-uri/index.js' import PropTypes from 'prop-types' import React from 'react' import toCSS from 'style-to-css' import uniqueId from 'mini-unique-id' export default class Teleport extends React.Component { constructor(props, context) { super(props, context) this.className = `Teleport-${uniqueId()}` } render() { const { className } = this const { context, children, focus, loose, onClick, _ref, style, styleActive, styleActiveHover, styleHover, title, to, ...rest } = this.props const { isActive, navigate, route } = this.context const active = isActive(to, loose) const href = normaliseUri(`${route.context}${to}`) let inlineStyle = '' if (!active && styleHover) { inlineStyle = `.${className}:hover {${toCSS(styleHover)}}` } if (active && styleActiveHover) { inlineStyle = `.${className}:hover {${toCSS(styleActiveHover)}}` } const finalStyle = active ? { ...style, ...styleActive } : style const finalOnClick = event => { event.preventDefault() let preventNavigate = false if (typeof onClick === 'function') { preventNavigate = onClick(event) } if (preventNavigate !== true) { navigate(to, focus, context) } } if (_ref) { rest.ref = _ref } return ( <a {...rest} className={className} href={href} onClick={finalOnClick} style={finalStyle} title={title} > <style>{inlineStyle}</style> {children} </a> ) } } Teleport.contextTypes = { isActive: PropTypes.func.isRequired, navigate: PropTypes.func.isRequired, route: PropTypes.shape({ context: PropTypes.string.isRequired, }).isRequired, }
src/components/settings/SettingsView.js
katima-g33k/blu-react-desktop
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { browserHistory } from 'react-router'; import { Button, ButtonToolbar, Col, Form, Panel, Row, } from 'react-bootstrap'; import I18n from '../../lib/i18n/index'; import { Input } from '../general/formInputs/index'; import ScannerCalibrator from '../../containers/ScannerCalibratorContainer'; const { Body, Heading, } = Panel; const adminFields = ['apiUrl', 'apiKey', 'secretKey']; export default class SettingsView extends Component { static propTypes = { apiKey: PropTypes.string, apiUrl: PropTypes.string, isInitialSetup: PropTypes.bool, onSave: PropTypes.func.isRequired, secretKey: PropTypes.string, userIsAdmin: PropTypes.bool, }; static defaultProps = { apiKey: '', apiUrl: '', isInitialSetup: true, secretKey: '', userIsAdmin: false, } state = { apiKey: this.props.apiKey, apiUrl: this.props.apiUrl, calibrateScanner: false, secretKey: this.props.secretKey, } handleOnChange = (event, value) => this.setState({ [event.target.id]: value }) handleOnCancel = () => browserHistory.goBack() handleOnSave = () => this.props.onSave({ apiKey: this.state.apiKey, apiUrl: this.state.apiUrl, secretKey: this.state.secretKey, }) calibrateScanner = () => this.setState({ calibrateScanner: true }) calibrateScannerDone = () => this.setState({ calibrateScanner: false }) renderField = field => ( <Row key={field}> <Col md={12}> <Input id={field} label={I18n(`SettingsView.fields.${field}`)} onChange={this.handleOnChange} placeholder={I18n(`SettingsView.fields.${field}`)} value={this.state[field]} /> </Col> </Row> ) renderAdminFields = () => { if (!this.props.userIsAdmin && !this.props.isInitialSetup) { return null; } return adminFields.map(this.renderField); } render() { return ( <Row id={this.constructor.name}> <Col md={10}> <Panel> <Heading> {I18n('SettingsView.title')} </Heading> <Body> <Form> {this.renderAdminFields()} <Row id="calibrationButton"> <Col md={12}> <Button onClick={this.calibrateScanner}> {I18n('SettingsView.fields.calibrate')} </Button> </Col> </Row> <Row> <Col md={12}> <ButtonToolbar id="formButtons"> {!this.props.isInitialSetup && ( <Button onClick={this.handleOnCancel}> {I18n('actions.cancel')} </Button> )} <Button bsStyle="primary" onClick={this.handleOnSave} > {I18n('actions.save')} </Button> </ButtonToolbar> </Col> </Row> <ScannerCalibrator onHide={this.calibrateScannerDone} show={this.state.calibrateScanner} /> </Form> </Body> </Panel> </Col> </Row> ); } }
ajax/libs/dexie/2.0.0-beta.1/dexie.js
seogi1004/cdnjs
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.Dexie = factory()); }(this, (function () { 'use strict'; /* * Dexie.js - a minimalistic wrapper for IndexedDB * =============================================== * * By David Fahlander, [email protected] * * Version 2.0.0-beta.1, Tue Oct 11 2016 * www.dexie.com * Apache License Version 2.0, January 2004, http://www.apache.org/licenses/ */ var keys = Object.keys; var isArray = Array.isArray; var _global = typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global; function extend(obj, extension) { if (typeof extension !== 'object') return obj; keys(extension).forEach(function (key) { obj[key] = extension[key]; }); return obj; } var getProto = Object.getPrototypeOf; var _hasOwn = {}.hasOwnProperty; function hasOwn(obj, prop) { return _hasOwn.call(obj, prop); } function props(proto, extension) { if (typeof extension === 'function') extension = extension(getProto(proto)); keys(extension).forEach(function (key) { setProp(proto, key, extension[key]); }); } function setProp(obj, prop, functionOrGetSet, options) { Object.defineProperty(obj, prop, extend(functionOrGetSet && hasOwn(functionOrGetSet, "get") && typeof functionOrGetSet.get === 'function' ? { get: functionOrGetSet.get, set: functionOrGetSet.set, configurable: true } : { value: functionOrGetSet, configurable: true, writable: true }, options)); } function derive(Child) { return { from: function (Parent) { Child.prototype = Object.create(Parent.prototype); setProp(Child.prototype, "constructor", Child); return { extend: props.bind(null, Child.prototype) }; } }; } var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; function getPropertyDescriptor(obj, prop) { var pd = getOwnPropertyDescriptor(obj, prop), proto; return pd || (proto = getProto(obj)) && getPropertyDescriptor(proto, prop); } var _slice = [].slice; function slice(args, start, end) { return _slice.call(args, start, end); } function override(origFunc, overridedFactory) { return overridedFactory(origFunc); } function doFakeAutoComplete(fn) { var to = setTimeout(fn, 1000); clearTimeout(to); } function assert(b) { if (!b) throw new Error("Assertion Failed"); } function asap(fn) { if (_global.setImmediate) setImmediate(fn);else setTimeout(fn, 0); } /** Generate an object (hash map) based on given array. * @param extractor Function taking an array item and its index and returning an array of 2 items ([key, value]) to * instert on the resulting object for each item in the array. If this function returns a falsy value, the * current item wont affect the resulting object. */ function arrayToObject(array, extractor) { return array.reduce(function (result, item, i) { var nameAndValue = extractor(item, i); if (nameAndValue) result[nameAndValue[0]] = nameAndValue[1]; return result; }, {}); } function trycatcher(fn, reject) { return function () { try { fn.apply(this, arguments); } catch (e) { reject(e); } }; } function tryCatch(fn, onerror, args) { try { fn.apply(null, args); } catch (ex) { onerror && onerror(ex); } } function getByKeyPath(obj, keyPath) { // http://www.w3.org/TR/IndexedDB/#steps-for-extracting-a-key-from-a-value-using-a-key-path if (hasOwn(obj, keyPath)) return obj[keyPath]; // This line is moved from last to first for optimization purpose. if (!keyPath) return obj; if (typeof keyPath !== 'string') { var rv = []; for (var i = 0, l = keyPath.length; i < l; ++i) { var val = getByKeyPath(obj, keyPath[i]); rv.push(val); } return rv; } var period = keyPath.indexOf('.'); if (period !== -1) { var innerObj = obj[keyPath.substr(0, period)]; return innerObj === undefined ? undefined : getByKeyPath(innerObj, keyPath.substr(period + 1)); } return undefined; } function setByKeyPath(obj, keyPath, value) { if (!obj || keyPath === undefined) return; if ('isFrozen' in Object && Object.isFrozen(obj)) return; if (typeof keyPath !== 'string' && 'length' in keyPath) { assert(typeof value !== 'string' && 'length' in value); for (var i = 0, l = keyPath.length; i < l; ++i) { setByKeyPath(obj, keyPath[i], value[i]); } } else { var period = keyPath.indexOf('.'); if (period !== -1) { var currentKeyPath = keyPath.substr(0, period); var remainingKeyPath = keyPath.substr(period + 1); if (remainingKeyPath === "") { if (value === undefined) delete obj[currentKeyPath];else obj[currentKeyPath] = value; } else { var innerObj = obj[currentKeyPath]; if (!innerObj) innerObj = obj[currentKeyPath] = {}; setByKeyPath(innerObj, remainingKeyPath, value); } } else { if (value === undefined) delete obj[keyPath];else obj[keyPath] = value; } } } function delByKeyPath(obj, keyPath) { if (typeof keyPath === 'string') setByKeyPath(obj, keyPath, undefined);else if ('length' in keyPath) [].map.call(keyPath, function (kp) { setByKeyPath(obj, kp, undefined); }); } function shallowClone(obj) { var rv = {}; for (var m in obj) { if (hasOwn(obj, m)) rv[m] = obj[m]; } return rv; } function deepClone(any) { if (!any || typeof any !== 'object') return any; var rv; if (isArray(any)) { rv = []; for (var i = 0, l = any.length; i < l; ++i) { rv.push(deepClone(any[i])); } } else if (any instanceof Date) { rv = new Date(); rv.setTime(any.getTime()); } else { rv = any.constructor ? Object.create(any.constructor.prototype) : {}; for (var prop in any) { if (hasOwn(any, prop)) { rv[prop] = deepClone(any[prop]); } } } return rv; } function getObjectDiff(a, b, rv, prfx) { // Compares objects a and b and produces a diff object. rv = rv || {}; prfx = prfx || ''; keys(a).forEach(function (prop) { if (!hasOwn(b, prop)) rv[prfx + prop] = undefined; // Property removed else { var ap = a[prop], bp = b[prop]; if (typeof ap === 'object' && typeof bp === 'object' && ap && bp && ap.constructor === bp.constructor) // Same type of object but its properties may have changed getObjectDiff(ap, bp, rv, prfx + prop + ".");else if (ap !== bp) rv[prfx + prop] = b[prop]; // Primitive value changed } }); keys(b).forEach(function (prop) { if (!hasOwn(a, prop)) { rv[prfx + prop] = b[prop]; // Property added } }); return rv; } // If first argument is iterable or array-like, return it as an array var iteratorSymbol = typeof Symbol !== 'undefined' && Symbol.iterator; var getIteratorOf = iteratorSymbol ? function (x) { var i; return x != null && (i = x[iteratorSymbol]) && i.apply(x); } : function () { return null; }; var NO_CHAR_ARRAY = {}; // Takes one or several arguments and returns an array based on the following criteras: // * If several arguments provided, return arguments converted to an array in a way that // still allows javascript engine to optimize the code. // * If single argument is an array, return a clone of it. // * If this-pointer equals NO_CHAR_ARRAY, don't accept strings as valid iterables as a special // case to the two bullets below. // * If single argument is an iterable, convert it to an array and return the resulting array. // * If single argument is array-like (has length of type number), convert it to an array. function getArrayOf(arrayLike) { var i, a, x, it; if (arguments.length === 1) { if (isArray(arrayLike)) return arrayLike.slice(); if (this === NO_CHAR_ARRAY && typeof arrayLike === 'string') return [arrayLike]; if (it = getIteratorOf(arrayLike)) { a = []; while (x = it.next(), !x.done) { a.push(x.value); }return a; } if (arrayLike == null) return [arrayLike]; i = arrayLike.length; if (typeof i === 'number') { a = new Array(i); while (i--) { a[i] = arrayLike[i]; }return a; } return [arrayLike]; } i = arguments.length; a = new Array(i); while (i--) { a[i] = arguments[i]; }return a; } var concat = [].concat; function flatten(a) { return concat.apply([], a); } function nop() {} function mirror(val) { return val; } function pureFunctionChain(f1, f2) { // Enables chained events that takes ONE argument and returns it to the next function in chain. // This pattern is used in the hook("reading") event. if (f1 == null || f1 === mirror) return f2; return function (val) { return f2(f1(val)); }; } function callBoth(on1, on2) { return function () { on1.apply(this, arguments); on2.apply(this, arguments); }; } function hookCreatingChain(f1, f2) { // Enables chained events that takes several arguments and may modify first argument by making a modification and then returning the same instance. // This pattern is used in the hook("creating") event. if (f1 === nop) return f2; return function () { var res = f1.apply(this, arguments); if (res !== undefined) arguments[0] = res; var onsuccess = this.onsuccess, // In case event listener has set this.onsuccess onerror = this.onerror; // In case event listener has set this.onerror this.onsuccess = null; this.onerror = null; var res2 = f2.apply(this, arguments); if (onsuccess) this.onsuccess = this.onsuccess ? callBoth(onsuccess, this.onsuccess) : onsuccess; if (onerror) this.onerror = this.onerror ? callBoth(onerror, this.onerror) : onerror; return res2 !== undefined ? res2 : res; }; } function hookDeletingChain(f1, f2) { if (f1 === nop) return f2; return function () { f1.apply(this, arguments); var onsuccess = this.onsuccess, // In case event listener has set this.onsuccess onerror = this.onerror; // In case event listener has set this.onerror this.onsuccess = this.onerror = null; f2.apply(this, arguments); if (onsuccess) this.onsuccess = this.onsuccess ? callBoth(onsuccess, this.onsuccess) : onsuccess; if (onerror) this.onerror = this.onerror ? callBoth(onerror, this.onerror) : onerror; }; } function hookUpdatingChain(f1, f2) { if (f1 === nop) return f2; return function (modifications) { var res = f1.apply(this, arguments); extend(modifications, res); // If f1 returns new modifications, extend caller's modifications with the result before calling next in chain. var onsuccess = this.onsuccess, // In case event listener has set this.onsuccess onerror = this.onerror; // In case event listener has set this.onerror this.onsuccess = null; this.onerror = null; var res2 = f2.apply(this, arguments); if (onsuccess) this.onsuccess = this.onsuccess ? callBoth(onsuccess, this.onsuccess) : onsuccess; if (onerror) this.onerror = this.onerror ? callBoth(onerror, this.onerror) : onerror; return res === undefined ? res2 === undefined ? undefined : res2 : extend(res, res2); }; } function reverseStoppableEventChain(f1, f2) { if (f1 === nop) return f2; return function () { if (f2.apply(this, arguments) === false) return false; return f1.apply(this, arguments); }; } function promisableChain(f1, f2) { if (f1 === nop) return f2; return function () { var res = f1.apply(this, arguments); if (res && typeof res.then === 'function') { var thiz = this, i = arguments.length, args = new Array(i); while (i--) { args[i] = arguments[i]; }return res.then(function () { return f2.apply(thiz, args); }); } return f2.apply(this, arguments); }; } // By default, debug will be true only if platform is a web platform and its page is served from localhost. // When debug = true, error's stacks will contain asyncronic long stacks. var debug = typeof location !== 'undefined' && // By default, use debug mode if served from localhost. /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href); function setDebug(value, filter) { debug = value; libraryFilter = filter; } var libraryFilter = function () { return true; }; var NEEDS_THROW_FOR_STACK = !new Error("").stack; function getErrorWithStack() { "use strict"; if (NEEDS_THROW_FOR_STACK) try { // Doing something naughty in strict mode here to trigger a specific error // that can be explicitely ignored in debugger's exception settings. // If we'd just throw new Error() here, IE's debugger's exception settings // will just consider it as "exception thrown by javascript code" which is // something you wouldn't want it to ignore. getErrorWithStack.arguments; throw new Error(); // Fallback if above line don't throw. } catch (e) { return e; } return new Error(); } function prettyStack(exception, numIgnoredFrames) { var stack = exception.stack; if (!stack) return ""; numIgnoredFrames = numIgnoredFrames || 0; if (stack.indexOf(exception.name) === 0) numIgnoredFrames += (exception.name + exception.message).split('\n').length; return stack.split('\n').slice(numIgnoredFrames).filter(libraryFilter).map(function (frame) { return "\n" + frame; }).join(''); } function deprecated(what, fn) { return function () { console.warn(what + " is deprecated. See https://github.com/dfahlander/Dexie.js/wiki/Deprecations. " + prettyStack(getErrorWithStack(), 1)); return fn.apply(this, arguments); }; } var dexieErrorNames = ['Modify', 'Bulk', 'OpenFailed', 'VersionChange', 'Schema', 'Upgrade', 'InvalidTable', 'MissingAPI', 'NoSuchDatabase', 'InvalidArgument', 'SubTransaction', 'Unsupported', 'Internal', 'DatabaseClosed', 'IncompatiblePromise']; var idbDomErrorNames = ['Unknown', 'Constraint', 'Data', 'TransactionInactive', 'ReadOnly', 'Version', 'NotFound', 'InvalidState', 'InvalidAccess', 'Abort', 'Timeout', 'QuotaExceeded', 'Syntax', 'DataClone']; var errorList = dexieErrorNames.concat(idbDomErrorNames); var defaultTexts = { VersionChanged: "Database version changed by other database connection", DatabaseClosed: "Database has been closed", Abort: "Transaction aborted", TransactionInactive: "Transaction has already completed or failed" }; // // DexieError - base class of all out exceptions. // function DexieError(name, msg) { // Reason we don't use ES6 classes is because: // 1. It bloats transpiled code and increases size of minified code. // 2. It doesn't give us much in this case. // 3. It would require sub classes to call super(), which // is not needed when deriving from Error. this._e = getErrorWithStack(); this.name = name; this.message = msg; } derive(DexieError).from(Error).extend({ stack: { get: function () { return this._stack || (this._stack = this.name + ": " + this.message + prettyStack(this._e, 2)); } }, toString: function () { return this.name + ": " + this.message; } }); function getMultiErrorMessage(msg, failures) { return msg + ". Errors: " + failures.map(function (f) { return f.toString(); }).filter(function (v, i, s) { return s.indexOf(v) === i; }) // Only unique error strings .join('\n'); } // // ModifyError - thrown in WriteableCollection.modify() // Specific constructor because it contains members failures and failedKeys. // function ModifyError(msg, failures, successCount, failedKeys) { this._e = getErrorWithStack(); this.failures = failures; this.failedKeys = failedKeys; this.successCount = successCount; } derive(ModifyError).from(DexieError); function BulkError(msg, failures) { this._e = getErrorWithStack(); this.name = "BulkError"; this.failures = failures; this.message = getMultiErrorMessage(msg, failures); } derive(BulkError).from(DexieError); // // // Dynamically generate error names and exception classes based // on the names in errorList. // // // Map of {ErrorName -> ErrorName + "Error"} var errnames = errorList.reduce(function (obj, name) { return obj[name] = name + "Error", obj; }, {}); // Need an alias for DexieError because we're gonna create subclasses with the same name. var BaseException = DexieError; // Map of {ErrorName -> exception constructor} var exceptions = errorList.reduce(function (obj, name) { // Let the name be "DexieError" because this name may // be shown in call stack and when debugging. DexieError is // the most true name because it derives from DexieError, // and we cannot change Function.name programatically without // dynamically create a Function object, which would be considered // 'eval-evil'. var fullName = name + "Error"; function DexieError(msgOrInner, inner) { this._e = getErrorWithStack(); this.name = fullName; if (!msgOrInner) { this.message = defaultTexts[name] || fullName; this.inner = null; } else if (typeof msgOrInner === 'string') { this.message = msgOrInner; this.inner = inner || null; } else if (typeof msgOrInner === 'object') { this.message = msgOrInner.name + ' ' + msgOrInner.message; this.inner = msgOrInner; } } derive(DexieError).from(BaseException); obj[name] = DexieError; return obj; }, {}); // Use ECMASCRIPT standard exceptions where applicable: exceptions.Syntax = SyntaxError; exceptions.Type = TypeError; exceptions.Range = RangeError; var exceptionMap = idbDomErrorNames.reduce(function (obj, name) { obj[name + "Error"] = exceptions[name]; return obj; }, {}); function mapError(domError, message) { if (!domError || domError instanceof DexieError || domError instanceof TypeError || domError instanceof SyntaxError || !domError.name || !exceptionMap[domError.name]) return domError; var rv = new exceptionMap[domError.name](message || domError.message, domError); if ("stack" in domError) { // Derive stack from inner exception if it has a stack setProp(rv, "stack", { get: function () { return this.inner.stack; } }); } return rv; } var fullNameExceptions = errorList.reduce(function (obj, name) { if (["Syntax", "Type", "Range"].indexOf(name) === -1) obj[name + "Error"] = exceptions[name]; return obj; }, {}); fullNameExceptions.ModifyError = ModifyError; fullNameExceptions.DexieError = DexieError; fullNameExceptions.BulkError = BulkError; function Events(ctx) { var evs = {}; var rv = function (eventName, subscriber) { if (subscriber) { // Subscribe. If additional arguments than just the subscriber was provided, forward them as well. var i = arguments.length, args = new Array(i - 1); while (--i) { args[i - 1] = arguments[i]; }evs[eventName].subscribe.apply(null, args); return ctx; } else if (typeof eventName === 'string') { // Return interface allowing to fire or unsubscribe from event return evs[eventName]; } }; rv.addEventType = add; for (var i = 1, l = arguments.length; i < l; ++i) { add(arguments[i]); } return rv; function add(eventName, chainFunction, defaultFunction) { if (typeof eventName === 'object') return addConfiguredEvents(eventName); if (!chainFunction) chainFunction = reverseStoppableEventChain; if (!defaultFunction) defaultFunction = nop; var context = { subscribers: [], fire: defaultFunction, subscribe: function (cb) { if (context.subscribers.indexOf(cb) === -1) { context.subscribers.push(cb); context.fire = chainFunction(context.fire, cb); } }, unsubscribe: function (cb) { context.subscribers = context.subscribers.filter(function (fn) { return fn !== cb; }); context.fire = context.subscribers.reduce(chainFunction, defaultFunction); } }; evs[eventName] = rv[eventName] = context; return context; } function addConfiguredEvents(cfg) { // events(this, {reading: [functionChain, nop]}); keys(cfg).forEach(function (eventName) { var args = cfg[eventName]; if (isArray(args)) { add(eventName, cfg[eventName][0], cfg[eventName][1]); } else if (args === 'asap') { // Rather than approaching event subscription using a functional approach, we here do it in a for-loop where subscriber is executed in its own stack // enabling that any exception that occur wont disturb the initiator and also not nescessary be catched and forgotten. var context = add(eventName, mirror, function fire() { // Optimazation-safe cloning of arguments into args. var i = arguments.length, args = new Array(i); while (i--) { args[i] = arguments[i]; } // All each subscriber: context.subscribers.forEach(function (fn) { asap(function fireEvent() { fn.apply(null, args); }); }); }); } else throw new exceptions.InvalidArgument("Invalid event config"); }); } } // // Promise Class for Dexie library // // I started out writing this Promise class by copying promise-light (https://github.com/taylorhakes/promise-light) by // https://github.com/taylorhakes - an A+ and ECMASCRIPT 6 compliant Promise implementation. // // Modifications needed to be done to support indexedDB because it wont accept setTimeout() // (See discussion: https://github.com/promises-aplus/promises-spec/issues/45) . // This topic was also discussed in the following thread: https://github.com/promises-aplus/promises-spec/issues/45 // // This implementation will not use setTimeout or setImmediate when it's not needed. The behavior is 100% Promise/A+ compliant since // the caller of new Promise() can be certain that the promise wont be triggered the lines after constructing the promise. // // In previous versions this was fixed by not calling setTimeout when knowing that the resolve() or reject() came from another // tick. In Dexie v1.4.0, I've rewritten the Promise class entirely. Just some fragments of promise-light is left. I use // another strategy now that simplifies everything a lot: to always execute callbacks in a new tick, but have an own microTick // engine that is used instead of setImmediate() or setTimeout(). // Promise class has also been optimized a lot with inspiration from bluebird - to avoid closures as much as possible. // Also with inspiration from bluebird, asyncronic stacks in debug mode. // // Specific non-standard features of this Promise class: // * Async static context support (Promise.PSD) // * Promise.follow() method built upon PSD, that allows user to track all promises created from current stack frame // and below + all promises that those promises creates or awaits. // * Detect any unhandled promise in a PSD-scope (PSD.onunhandled). // // David Fahlander, https://github.com/dfahlander // // Just a pointer that only this module knows about. // Used in Promise constructor to emulate a private constructor. var INTERNAL = {}; // Async stacks (long stacks) must not grow infinitely. var LONG_STACKS_CLIP_LIMIT = 100; var MAX_LONG_STACKS = 20; var stack_being_generated = false; /* The default "nextTick" function used only for the very first promise in a promise chain. As soon as then promise is resolved or rejected, all next tasks will be executed in micro ticks emulated in this module. For indexedDB compatibility, this means that every method needs to execute at least one promise before doing an indexedDB operation. Dexie will always call db.ready().then() for every operation to make sure the indexedDB event is started in an emulated micro tick. */ var schedulePhysicalTick = _global.setImmediate ? // setImmediate supported. Those modern platforms also supports Function.bind(). setImmediate.bind(null, physicalTick) : _global.MutationObserver ? // MutationObserver supported function () { var hiddenDiv = document.createElement("div"); new MutationObserver(function () { physicalTick(); hiddenDiv = null; }).observe(hiddenDiv, { attributes: true }); hiddenDiv.setAttribute('i', '1'); } : // No support for setImmediate or MutationObserver. No worry, setTimeout is only called // once time. Every tick that follows will be our emulated micro tick. // Could have uses setTimeout.bind(null, 0, physicalTick) if it wasnt for that FF13 and below has a bug function () { setTimeout(physicalTick, 0); }; // Confifurable through Promise.scheduler. // Don't export because it would be unsafe to let unknown // code call it unless they do try..catch within their callback. // This function can be retrieved through getter of Promise.scheduler though, // but users must not do Promise.scheduler (myFuncThatThrows exception)! var asap$1 = function (callback, args) { microtickQueue.push([callback, args]); if (needsNewPhysicalTick) { schedulePhysicalTick(); needsNewPhysicalTick = false; } }; var isOutsideMicroTick = true; var needsNewPhysicalTick = true; var unhandledErrors = []; var rejectingErrors = []; var currentFulfiller = null; var rejectionMapper = mirror; // Remove in next major when removing error mapping of DOMErrors and DOMExceptions var globalPSD = { global: true, ref: 0, unhandleds: [], onunhandled: globalError, //env: null, // Will be set whenever leaving a scope using wrappers.snapshot() finalize: function () { this.unhandleds.forEach(function (uh) { try { globalError(uh[0], uh[1]); } catch (e) {} }); } }; var PSD = globalPSD; var microtickQueue = []; // Callbacks to call in this or next physical tick. var numScheduledCalls = 0; // Number of listener-calls left to do in this physical tick. var tickFinalizers = []; // Finalizers to call when there are no more async calls scheduled within current physical tick. // Wrappers are not being used yet. Their framework is functioning and can be used // to replace environment during a PSD scope (a.k.a. 'zone'). /* **KEEP** export var wrappers = (() => { var wrappers = []; return { snapshot: () => { var i = wrappers.length, result = new Array(i); while (i--) result[i] = wrappers[i].snapshot(); return result; }, restore: values => { var i = wrappers.length; while (i--) wrappers[i].restore(values[i]); }, wrap: () => wrappers.map(w => w.wrap()), add: wrapper => { wrappers.push(wrapper); } }; })(); */ function Promise(fn) { if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new'); this._listeners = []; this.onuncatched = nop; // Deprecate in next major. Not needed. Better to use global error handler. // A library may set `promise._lib = true;` after promise is created to make resolve() or reject() // execute the microtask engine implicitely within the call to resolve() or reject(). // To remain A+ compliant, a library must only set `_lib=true` if it can guarantee that the stack // only contains library code when calling resolve() or reject(). // RULE OF THUMB: ONLY set _lib = true for promises explicitely resolving/rejecting directly from // global scope (event handler, timer etc)! this._lib = false; // Current async scope var psd = this._PSD = PSD; if (debug) { this._stackHolder = getErrorWithStack(); this._prev = null; this._numPrev = 0; // Number of previous promises (for long stacks) linkToPreviousPromise(this, currentFulfiller); } if (typeof fn !== 'function') { if (fn !== INTERNAL) throw new TypeError('Not a function'); // Private constructor (INTERNAL, state, value). // Used internally by Promise.resolve() and Promise.reject(). this._state = arguments[1]; this._value = arguments[2]; if (this._state === false) handleRejection(this, this._value); // Map error, set stack and addPossiblyUnhandledError(). return; } this._state = null; // null (=pending), false (=rejected) or true (=resolved) this._value = null; // error or result ++psd.ref; // Refcounting current scope executePromiseTask(this, fn); } props(Promise.prototype, { then: function (onFulfilled, onRejected) { var _this = this; var rv = new Promise(function (resolve, reject) { propagateToListener(_this, new Listener(onFulfilled, onRejected, resolve, reject)); }); debug && (!this._prev || this._state === null) && linkToPreviousPromise(rv, this); return rv; }, _then: function (onFulfilled, onRejected) { // A little tinier version of then() that don't have to create a resulting promise. propagateToListener(this, new Listener(null, null, onFulfilled, onRejected)); }, catch: function (onRejected) { if (arguments.length === 1) return this.then(null, onRejected); // First argument is the Error type to catch var type = arguments[0], handler = arguments[1]; return typeof type === 'function' ? this.then(null, function (err) { return ( // Catching errors by its constructor type (similar to java / c++ / c#) // Sample: promise.catch(TypeError, function (e) { ... }); err instanceof type ? handler(err) : PromiseReject(err) ); }) : this.then(null, function (err) { return ( // Catching errors by the error.name property. Makes sense for indexedDB where error type // is always DOMError but where e.name tells the actual error type. // Sample: promise.catch('ConstraintError', function (e) { ... }); err && err.name === type ? handler(err) : PromiseReject(err) ); }); }, finally: function (onFinally) { return this.then(function (value) { onFinally(); return value; }, function (err) { onFinally(); return PromiseReject(err); }); }, // Deprecate in next major. Needed only for db.on.error. uncaught: function (uncaughtHandler) { var _this2 = this; // Be backward compatible and use "onuncatched" as the event name on this. // Handle multiple subscribers through reverseStoppableEventChain(). If a handler returns `false`, bubbling stops. this.onuncatched = reverseStoppableEventChain(this.onuncatched, uncaughtHandler); // In case caller does this on an already rejected promise, assume caller wants to point out the error to this promise and not // a previous promise. Reason: the prevous promise may lack onuncatched handler. if (this._state === false && unhandledErrors.indexOf(this) === -1) { // Replace unhandled error's destinaion promise with this one! unhandledErrors.some(function (p, i, l) { return p._value === _this2._value && (l[i] = _this2); }); // Actually we do this shit because we need to support db.on.error() correctly during db.open(). If we deprecate db.on.error, we could // take away this piece of code as well as the onuncatched and uncaught() method. } return this; }, stack: { get: function () { if (this._stack) return this._stack; try { stack_being_generated = true; var stacks = getStack(this, [], MAX_LONG_STACKS); var stack = stacks.join("\nFrom previous: "); if (this._state !== null) this._stack = stack; // Stack may be updated on reject. return stack; } finally { stack_being_generated = false; } } } }); function Listener(onFulfilled, onRejected, resolve, reject) { this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null; this.onRejected = typeof onRejected === 'function' ? onRejected : null; this.resolve = resolve; this.reject = reject; this.psd = PSD; } // Promise Static Properties props(Promise, { all: function () { var values = getArrayOf.apply(null, arguments); // Supports iterables, implicit arguments and array-like. return new Promise(function (resolve, reject) { if (values.length === 0) resolve([]); var remaining = values.length; values.forEach(function (a, i) { return Promise.resolve(a).then(function (x) { values[i] = x; if (! --remaining) resolve(values); }, reject); }); }); }, resolve: function (value) { if (value instanceof Promise) return value; if (value && typeof value.then === 'function') return new Promise(function (resolve, reject) { value.then(resolve, reject); }); return new Promise(INTERNAL, true, value); }, reject: PromiseReject, race: function () { var values = getArrayOf.apply(null, arguments); return new Promise(function (resolve, reject) { values.map(function (value) { return Promise.resolve(value).then(resolve, reject); }); }); }, PSD: { get: function () { return PSD; }, set: function (value) { return PSD = value; } }, newPSD: newScope, usePSD: usePSD, scheduler: { get: function () { return asap$1; }, set: function (value) { asap$1 = value; } }, rejectionMapper: { get: function () { return rejectionMapper; }, set: function (value) { rejectionMapper = value; } // Map reject failures }, follow: function (fn) { return new Promise(function (resolve, reject) { return newScope(function (resolve, reject) { var psd = PSD; psd.unhandleds = []; // For unhandled standard- or 3rd party Promises. Checked at psd.finalize() psd.onunhandled = reject; // Triggered directly on unhandled promises of this library. psd.finalize = callBoth(function () { var _this3 = this; // Unhandled standard or 3rd part promises are put in PSD.unhandleds and // examined upon scope completion while unhandled rejections in this Promise // will trigger directly through psd.onunhandled run_at_end_of_this_or_next_physical_tick(function () { _this3.unhandleds.length === 0 ? resolve() : reject(_this3.unhandleds[0]); }); }, psd.finalize); fn(); }, resolve, reject); }); }, on: Events(null, { "error": [reverseStoppableEventChain, defaultErrorHandler] // Default to defaultErrorHandler }) }); /** * Take a potentially misbehaving resolver function and make sure * onFulfilled and onRejected are only called once. * * Makes no guarantees about asynchrony. */ function executePromiseTask(promise, fn) { // Promise Resolution Procedure: // https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure try { fn(function (value) { if (promise._state !== null) return; if (value === promise) throw new TypeError('A promise cannot be resolved with itself.'); var shouldExecuteTick = promise._lib && beginMicroTickScope(); if (value && typeof value.then === 'function') { executePromiseTask(promise, function (resolve, reject) { value instanceof Promise ? value._then(resolve, reject) : value.then(resolve, reject); }); } else { promise._state = true; promise._value = value; propagateAllListeners(promise); } if (shouldExecuteTick) endMicroTickScope(); }, handleRejection.bind(null, promise)); // If Function.bind is not supported. Exception is handled in catch below } catch (ex) { handleRejection(promise, ex); } } function handleRejection(promise, reason) { rejectingErrors.push(reason); if (promise._state !== null) return; var shouldExecuteTick = promise._lib && beginMicroTickScope(); reason = rejectionMapper(reason); promise._state = false; promise._value = reason; debug && reason !== null && typeof reason === 'object' && !reason._promise && tryCatch(function () { var origProp = getPropertyDescriptor(reason, "stack"); reason._promise = promise; setProp(reason, "stack", { get: function () { return stack_being_generated ? origProp && (origProp.get ? origProp.get.apply(reason) : origProp.value) : promise.stack; } }); }); // Add the failure to a list of possibly uncaught errors addPossiblyUnhandledError(promise); propagateAllListeners(promise); if (shouldExecuteTick) endMicroTickScope(); } function propagateAllListeners(promise) { //debug && linkToPreviousPromise(promise); var listeners = promise._listeners; promise._listeners = []; for (var i = 0, len = listeners.length; i < len; ++i) { propagateToListener(promise, listeners[i]); } var psd = promise._PSD; --psd.ref || psd.finalize(); // if psd.ref reaches zero, call psd.finalize(); if (numScheduledCalls === 0) { // If numScheduledCalls is 0, it means that our stack is not in a callback of a scheduled call, // and that no deferreds where listening to this rejection or success. // Since there is a risk that our stack can contain application code that may // do stuff after this code is finished that may generate new calls, we cannot // call finalizers here. ++numScheduledCalls; asap$1(function () { if (--numScheduledCalls === 0) finalizePhysicalTick(); // Will detect unhandled errors }, []); } } function propagateToListener(promise, listener) { if (promise._state === null) { promise._listeners.push(listener); return; } var cb = promise._state ? listener.onFulfilled : listener.onRejected; if (cb === null) { // This Listener doesnt have a listener for the event being triggered (onFulfilled or onReject) so lets forward the event to any eventual listeners on the Promise instance returned by then() or catch() return (promise._state ? listener.resolve : listener.reject)(promise._value); } var psd = listener.psd; ++psd.ref; ++numScheduledCalls; asap$1(callListener, [cb, promise, listener]); } function callListener(cb, promise, listener) { var outerScope = PSD; var psd = listener.psd; try { if (psd !== outerScope) { // **KEEP** outerScope.env = wrappers.snapshot(); // Snapshot outerScope's environment. PSD = psd; // **KEEP** wrappers.restore(psd.env); // Restore PSD's environment. } // Set static variable currentFulfiller to the promise that is being fullfilled, // so that we connect the chain of promises (for long stacks support) currentFulfiller = promise; // Call callback and resolve our listener with it's return value. var value = promise._value, ret; if (promise._state) { ret = cb(value); } else { if (rejectingErrors.length) rejectingErrors = []; ret = cb(value); if (rejectingErrors.indexOf(value) === -1) markErrorAsHandled(promise); // Callback didnt do Promise.reject(err) nor reject(err) onto another promise. } listener.resolve(ret); } catch (e) { // Exception thrown in callback. Reject our listener. listener.reject(e); } finally { // Restore PSD, env and currentFulfiller. if (psd !== outerScope) { PSD = outerScope; // **KEEP** wrappers.restore(outerScope.env); // Restore outerScope's environment } currentFulfiller = null; if (--numScheduledCalls === 0) finalizePhysicalTick(); --psd.ref || psd.finalize(); } } function getStack(promise, stacks, limit) { if (stacks.length === limit) return stacks; var stack = ""; if (promise._state === false) { var failure = promise._value, errorName, message; if (failure != null) { errorName = failure.name || "Error"; message = failure.message || failure; stack = prettyStack(failure, 0); } else { errorName = failure; // If error is undefined or null, show that. message = ""; } stacks.push(errorName + (message ? ": " + message : "") + stack); } if (debug) { stack = prettyStack(promise._stackHolder, 2); if (stack && stacks.indexOf(stack) === -1) stacks.push(stack); if (promise._prev) getStack(promise._prev, stacks, limit); } return stacks; } function linkToPreviousPromise(promise, prev) { // Support long stacks by linking to previous completed promise. var numPrev = prev ? prev._numPrev + 1 : 0; if (numPrev < LONG_STACKS_CLIP_LIMIT) { // Prohibit infinite Promise loops to get an infinite long memory consuming "tail". promise._prev = prev; promise._numPrev = numPrev; } } /* The callback to schedule with setImmediate() or setTimeout(). It runs a virtual microtick and executes any callback registered in microtickQueue. */ function physicalTick() { beginMicroTickScope() && endMicroTickScope(); } function beginMicroTickScope() { var wasRootExec = isOutsideMicroTick; isOutsideMicroTick = false; needsNewPhysicalTick = false; return wasRootExec; } /* Executes micro-ticks without doing try..catch. This can be possible because we only use this internally and the registered functions are exception-safe (they do try..catch internally before calling any external method). If registering functions in the microtickQueue that are not exception-safe, this would destroy the framework and make it instable. So we don't export our asap method. */ function endMicroTickScope() { var callbacks, i, l; do { while (microtickQueue.length > 0) { callbacks = microtickQueue; microtickQueue = []; l = callbacks.length; for (i = 0; i < l; ++i) { var item = callbacks[i]; item[0].apply(null, item[1]); } } } while (microtickQueue.length > 0); isOutsideMicroTick = true; needsNewPhysicalTick = true; } function finalizePhysicalTick() { var unhandledErrs = unhandledErrors; unhandledErrors = []; unhandledErrs.forEach(function (p) { p._PSD.onunhandled.call(null, p._value, p); }); var finalizers = tickFinalizers.slice(0); // Clone first because finalizer may remove itself from list. var i = finalizers.length; while (i) { finalizers[--i](); } } function run_at_end_of_this_or_next_physical_tick(fn) { function finalizer() { fn(); tickFinalizers.splice(tickFinalizers.indexOf(finalizer), 1); } tickFinalizers.push(finalizer); ++numScheduledCalls; asap$1(function () { if (--numScheduledCalls === 0) finalizePhysicalTick(); }, []); } function addPossiblyUnhandledError(promise) { // Only add to unhandledErrors if not already there. The first one to add to this list // will be upon the first rejection so that the root cause (first promise in the // rejection chain) is the one listed. if (!unhandledErrors.some(function (p) { return p._value === promise._value; })) unhandledErrors.push(promise); } function markErrorAsHandled(promise) { // Called when a reject handled is actually being called. // Search in unhandledErrors for any promise whos _value is this promise_value (list // contains only rejected promises, and only one item per error) var i = unhandledErrors.length; while (i) { if (unhandledErrors[--i]._value === promise._value) { // Found a promise that failed with this same error object pointer, // Remove that since there is a listener that actually takes care of it. unhandledErrors.splice(i, 1); return; } } } // By default, log uncaught errors to the console function defaultErrorHandler(e) { console.warn('Unhandled rejection: ' + (e.stack || e)); } function PromiseReject(reason) { return new Promise(INTERNAL, false, reason); } function wrap(fn, errorCatcher) { var psd = PSD; return function () { var wasRootExec = beginMicroTickScope(), outerScope = PSD; try { if (outerScope !== psd) { // **KEEP** outerScope.env = wrappers.snapshot(); // Snapshot outerScope's environment PSD = psd; // **KEEP** wrappers.restore(psd.env); // Restore PSD's environment. } return fn.apply(this, arguments); } catch (e) { errorCatcher && errorCatcher(e); } finally { if (outerScope !== psd) { PSD = outerScope; // **KEEP** wrappers.restore(outerScope.env); // Restore outerScope's environment } if (wasRootExec) endMicroTickScope(); } }; } function newScope(fn, a1, a2, a3) { var parent = PSD, psd = Object.create(parent); psd.parent = parent; psd.ref = 0; psd.global = false; // **KEEP** psd.env = wrappers.wrap(psd); // unhandleds and onunhandled should not be specifically set here. // Leave them on parent prototype. // unhandleds.push(err) will push to parent's prototype // onunhandled() will call parents onunhandled (with this scope's this-pointer though!) ++parent.ref; psd.finalize = function () { --this.parent.ref || this.parent.finalize(); }; var rv = usePSD(psd, fn, a1, a2, a3); if (psd.ref === 0) psd.finalize(); return rv; } function usePSD(psd, fn, a1, a2, a3) { var outerScope = PSD; try { if (psd !== outerScope) { // **KEEP** outerScope.env = wrappers.snapshot(); // snapshot outerScope's environment. PSD = psd; // **KEEP** wrappers.restore(psd.env); // Restore PSD's environment. } return fn(a1, a2, a3); } finally { if (psd !== outerScope) { PSD = outerScope; // **KEEP** wrappers.restore(outerScope.env); // Restore outerScope's environment. } } } function globalError(err, promise) { var rv; try { rv = promise.onuncatched(err); } catch (e) {} if (rv !== false) try { Promise.on.error.fire(err, promise); // TODO: Deprecated and use same global handler as bluebird. } catch (e) {} } /* **KEEP** export function wrapPromise(PromiseClass) { var proto = PromiseClass.prototype; var origThen = proto.then; wrappers.add({ snapshot: () => proto.then, restore: value => {proto.then = value;}, wrap: () => patchedThen }); function patchedThen (onFulfilled, onRejected) { var promise = this; var onFulfilledProxy = wrap(function(value){ var rv = value; if (onFulfilled) { rv = onFulfilled(rv); if (rv && typeof rv.then === 'function') rv.then(); // Intercept that promise as well. } --PSD.ref || PSD.finalize(); return rv; }); var onRejectedProxy = wrap(function(err){ promise._$err = err; var unhandleds = PSD.unhandleds; var idx = unhandleds.length, rv; while (idx--) if (unhandleds[idx]._$err === err) break; if (onRejected) { if (idx !== -1) unhandleds.splice(idx, 1); // Mark as handled. rv = onRejected(err); if (rv && typeof rv.then === 'function') rv.then(); // Intercept that promise as well. } else { if (idx === -1) unhandleds.push(promise); rv = PromiseClass.reject(err); rv._$nointercept = true; // Prohibit eternal loop. } --PSD.ref || PSD.finalize(); return rv; }); if (this._$nointercept) return origThen.apply(this, arguments); ++PSD.ref; return origThen.call(this, onFulfilledProxy, onRejectedProxy); } } // Global Promise wrapper if (_global.Promise) wrapPromise(_global.Promise); */ doFakeAutoComplete(function () { // Simplify the job for VS Intellisense. This piece of code is one of the keys to the new marvellous intellisense support in Dexie. asap$1 = function (fn, args) { setTimeout(function () { fn.apply(null, args); }, 0); }; }); function rejection(err, uncaughtHandler) { // Get the call stack and return a rejected promise. var rv = Promise.reject(err); return uncaughtHandler ? rv.uncaught(uncaughtHandler) : rv; } /* * Dexie.js - a minimalistic wrapper for IndexedDB * =============================================== * * By David Fahlander, [email protected] * * Version 2.0.0-beta.1, Tue Oct 11 2016 * * http://dexie.org * * Apache License Version 2.0, January 2004, http://www.apache.org/licenses/ */ var DEXIE_VERSION = '2.0.0-beta.1'; var maxString = String.fromCharCode(65535); var maxKey = function () { try { IDBKeyRange.only([[]]);return [[]]; } catch (e) { return maxString; } }(); var INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>."; var STRING_EXPECTED = "String expected."; var connections = []; var isIEOrEdge = typeof navigator !== 'undefined' && /(MSIE|Trident|Edge)/.test(navigator.userAgent); var hasIEDeleteObjectStoreBug = isIEOrEdge; var hangsOnDeleteLargeKeyRange = isIEOrEdge; var dexieStackFrameFilter = function (frame) { return !/(dexie\.js|dexie\.min\.js)/.test(frame); }; setDebug(debug, dexieStackFrameFilter); function Dexie(dbName, options) { /// <param name="options" type="Object" optional="true">Specify only if you wich to control which addons that should run on this instance</param> var deps = Dexie.dependencies; var opts = extend({ // Default Options addons: Dexie.addons, // Pick statically registered addons by default autoOpen: true, // Don't require db.open() explicitely. indexedDB: deps.indexedDB, // Backend IndexedDB api. Default to IDBShim or browser env. IDBKeyRange: deps.IDBKeyRange // Backend IDBKeyRange api. Default to IDBShim or browser env. }, options); var addons = opts.addons, autoOpen = opts.autoOpen, indexedDB = opts.indexedDB, IDBKeyRange = opts.IDBKeyRange; var globalSchema = this._dbSchema = {}; var versions = []; var dbStoreNames = []; var allTables = {}; ///<var type="IDBDatabase" /> var idbdb = null; // Instance of IDBDatabase var dbOpenError = null; var isBeingOpened = false; var openComplete = false; var READONLY = "readonly", READWRITE = "readwrite"; var db = this; var dbReadyResolve, dbReadyPromise = new Promise(function (resolve) { dbReadyResolve = resolve; }), cancelOpen, openCanceller = new Promise(function (_, reject) { cancelOpen = reject; }); var autoSchema = true; var hasNativeGetDatabaseNames = !!getNativeGetDatabaseNamesFn(indexedDB), hasGetAll; function init() { // Default subscribers to "versionchange" and "blocked". // Can be overridden by custom handlers. If custom handlers return false, these default // behaviours will be prevented. db.on("versionchange", function (ev) { // Default behavior for versionchange event is to close database connection. // Caller can override this behavior by doing db.on("versionchange", function(){ return false; }); // Let's not block the other window from making it's delete() or open() call. // NOTE! This event is never fired in IE,Edge or Safari. if (ev.newVersion > 0) console.warn('Another connection wants to upgrade database \'' + db.name + '\'. Closing db now to resume the upgrade.');else console.warn('Another connection wants to delete database \'' + db.name + '\'. Closing db now to resume the delete request.'); db.close(); // In many web applications, it would be recommended to force window.reload() // when this event occurs. To do that, subscribe to the versionchange event // and call window.location.reload(true) if ev.newVersion > 0 (not a deletion) // The reason for this is that your current web app obviously has old schema code that needs // to be updated. Another window got a newer version of the app and needs to upgrade DB but // your window is blocking it unless we close it here. }); db.on("blocked", function (ev) { if (!ev.newVersion || ev.newVersion < ev.oldVersion) console.warn('Dexie.delete(\'' + db.name + '\') was blocked');else console.warn('Upgrade \'' + db.name + '\' blocked by other connection holding version ' + ev.oldVersion / 10); }); } // // // // ------------------------- Versioning Framework--------------------------- // // // this.version = function (versionNumber) { /// <param name="versionNumber" type="Number"></param> /// <returns type="Version"></returns> if (idbdb || isBeingOpened) throw new exceptions.Schema("Cannot add version when database is open"); this.verno = Math.max(this.verno, versionNumber); var versionInstance = versions.filter(function (v) { return v._cfg.version === versionNumber; })[0]; if (versionInstance) return versionInstance; versionInstance = new Version(versionNumber); versions.push(versionInstance); versions.sort(lowerVersionFirst); return versionInstance; }; function Version(versionNumber) { this._cfg = { version: versionNumber, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null }; this.stores({}); // Derive earlier schemas by default. } extend(Version.prototype, { stores: function (stores) { /// <summary> /// Defines the schema for a particular version /// </summary> /// <param name="stores" type="Object"> /// Example: <br/> /// {users: "id++,first,last,&amp;username,*email", <br/> /// passwords: "id++,&amp;username"}<br/> /// <br/> /// Syntax: {Table: "[primaryKey][++],[&amp;][*]index1,[&amp;][*]index2,..."}<br/><br/> /// Special characters:<br/> /// "&amp;" means unique key, <br/> /// "*" means value is multiEntry, <br/> /// "++" means auto-increment and only applicable for primary key <br/> /// </param> this._cfg.storesSource = this._cfg.storesSource ? extend(this._cfg.storesSource, stores) : stores; // Derive stores from earlier versions if they are not explicitely specified as null or a new syntax. var storesSpec = {}; versions.forEach(function (version) { // 'versions' is always sorted by lowest version first. extend(storesSpec, version._cfg.storesSource); }); var dbschema = this._cfg.dbschema = {}; this._parseStoresSpec(storesSpec, dbschema); // Update the latest schema to this version // Update API globalSchema = db._dbSchema = dbschema; removeTablesApi([allTables, db, Transaction.prototype]); setApiOnPlace([allTables, db, Transaction.prototype, this._cfg.tables], keys(dbschema), READWRITE, dbschema); dbStoreNames = keys(dbschema); return this; }, upgrade: function (upgradeFunction) { /// <param name="upgradeFunction" optional="true">Function that performs upgrading actions.</param> var self = this; fakeAutoComplete(function () { upgradeFunction(db._createTransaction(READWRITE, keys(self._cfg.dbschema), self._cfg.dbschema)); // BUGBUG: No code completion for prev version's tables wont appear. }); this._cfg.contentUpgrade = upgradeFunction; return this; }, _parseStoresSpec: function (stores, outSchema) { keys(stores).forEach(function (tableName) { if (stores[tableName] !== null) { var instanceTemplate = {}; var indexes = parseIndexSyntax(stores[tableName]); var primKey = indexes.shift(); if (primKey.multi) throw new exceptions.Schema("Primary key cannot be multi-valued"); if (primKey.keyPath) setByKeyPath(instanceTemplate, primKey.keyPath, primKey.auto ? 0 : primKey.keyPath); indexes.forEach(function (idx) { if (idx.auto) throw new exceptions.Schema("Only primary key can be marked as autoIncrement (++)"); if (!idx.keyPath) throw new exceptions.Schema("Index must have a name and cannot be an empty string"); setByKeyPath(instanceTemplate, idx.keyPath, idx.compound ? idx.keyPath.map(function () { return ""; }) : ""); }); outSchema[tableName] = new TableSchema(tableName, primKey, indexes, instanceTemplate); } }); } }); function runUpgraders(oldVersion, idbtrans, reject) { var trans = db._createTransaction(READWRITE, dbStoreNames, globalSchema); trans.create(idbtrans); trans._completion.catch(reject); var rejectTransaction = trans._reject.bind(trans); newScope(function () { PSD.trans = trans; if (oldVersion === 0) { // Create tables: keys(globalSchema).forEach(function (tableName) { createTable(idbtrans, tableName, globalSchema[tableName].primKey, globalSchema[tableName].indexes); }); Promise.follow(function () { return db.on.populate.fire(trans); }).catch(rejectTransaction); } else updateTablesAndIndexes(oldVersion, trans, idbtrans).catch(rejectTransaction); }); } function updateTablesAndIndexes(oldVersion, trans, idbtrans) { // Upgrade version to version, step-by-step from oldest to newest version. // Each transaction object will contain the table set that was current in that version (but also not-yet-deleted tables from its previous version) var queue = []; var oldVersionStruct = versions.filter(function (version) { return version._cfg.version === oldVersion; })[0]; if (!oldVersionStruct) throw new exceptions.Upgrade("Dexie specification of currently installed DB version is missing"); globalSchema = db._dbSchema = oldVersionStruct._cfg.dbschema; var anyContentUpgraderHasRun = false; var versToRun = versions.filter(function (v) { return v._cfg.version > oldVersion; }); versToRun.forEach(function (version) { /// <param name="version" type="Version"></param> queue.push(function () { var oldSchema = globalSchema; var newSchema = version._cfg.dbschema; adjustToExistingIndexNames(oldSchema, idbtrans); adjustToExistingIndexNames(newSchema, idbtrans); globalSchema = db._dbSchema = newSchema; var diff = getSchemaDiff(oldSchema, newSchema); // Add tables diff.add.forEach(function (tuple) { createTable(idbtrans, tuple[0], tuple[1].primKey, tuple[1].indexes); }); // Change tables diff.change.forEach(function (change) { if (change.recreate) { throw new exceptions.Upgrade("Not yet support for changing primary key"); } else { var store = idbtrans.objectStore(change.name); // Add indexes change.add.forEach(function (idx) { addIndex(store, idx); }); // Update indexes change.change.forEach(function (idx) { store.deleteIndex(idx.name); addIndex(store, idx); }); // Delete indexes change.del.forEach(function (idxName) { store.deleteIndex(idxName); }); } }); if (version._cfg.contentUpgrade) { anyContentUpgraderHasRun = true; return Promise.follow(function () { version._cfg.contentUpgrade(trans); }); } }); queue.push(function (idbtrans) { if (!anyContentUpgraderHasRun || !hasIEDeleteObjectStoreBug) { // Dont delete old tables if ieBug is present and a content upgrader has run. Let tables be left in DB so far. This needs to be taken care of. var newSchema = version._cfg.dbschema; // Delete old tables deleteRemovedTables(newSchema, idbtrans); } }); }); // Now, create a queue execution engine function runQueue() { return queue.length ? Promise.resolve(queue.shift()(trans.idbtrans)).then(runQueue) : Promise.resolve(); } return runQueue().then(function () { createMissingTables(globalSchema, idbtrans); // At last, make sure to create any missing tables. (Needed by addons that add stores to DB without specifying version) }); } function getSchemaDiff(oldSchema, newSchema) { var diff = { del: [], // Array of table names add: [], // Array of [tableName, newDefinition] change: [] // Array of {name: tableName, recreate: newDefinition, del: delIndexNames, add: newIndexDefs, change: changedIndexDefs} }; for (var table in oldSchema) { if (!newSchema[table]) diff.del.push(table); } for (table in newSchema) { var oldDef = oldSchema[table], newDef = newSchema[table]; if (!oldDef) { diff.add.push([table, newDef]); } else { var change = { name: table, def: newDef, recreate: false, del: [], add: [], change: [] }; if (oldDef.primKey.src !== newDef.primKey.src) { // Primary key has changed. Remove and re-add table. change.recreate = true; diff.change.push(change); } else { // Same primary key. Just find out what differs: var oldIndexes = oldDef.idxByName; var newIndexes = newDef.idxByName; for (var idxName in oldIndexes) { if (!newIndexes[idxName]) change.del.push(idxName); } for (idxName in newIndexes) { var oldIdx = oldIndexes[idxName], newIdx = newIndexes[idxName]; if (!oldIdx) change.add.push(newIdx);else if (oldIdx.src !== newIdx.src) change.change.push(newIdx); } if (change.del.length > 0 || change.add.length > 0 || change.change.length > 0) { diff.change.push(change); } } } } return diff; } function createTable(idbtrans, tableName, primKey, indexes) { /// <param name="idbtrans" type="IDBTransaction"></param> var store = idbtrans.db.createObjectStore(tableName, primKey.keyPath ? { keyPath: primKey.keyPath, autoIncrement: primKey.auto } : { autoIncrement: primKey.auto }); indexes.forEach(function (idx) { addIndex(store, idx); }); return store; } function createMissingTables(newSchema, idbtrans) { keys(newSchema).forEach(function (tableName) { if (!idbtrans.db.objectStoreNames.contains(tableName)) { createTable(idbtrans, tableName, newSchema[tableName].primKey, newSchema[tableName].indexes); } }); } function deleteRemovedTables(newSchema, idbtrans) { for (var i = 0; i < idbtrans.db.objectStoreNames.length; ++i) { var storeName = idbtrans.db.objectStoreNames[i]; if (newSchema[storeName] == null) { idbtrans.db.deleteObjectStore(storeName); } } } function addIndex(store, idx) { store.createIndex(idx.name, idx.keyPath, { unique: idx.unique, multiEntry: idx.multi }); } function dbUncaught(err) { return db.on.error.fire(err); } // // // Dexie Protected API // // this._allTables = allTables; this._tableFactory = function createTable(mode, tableSchema) { /// <param name="tableSchema" type="TableSchema"></param> if (mode === READONLY) return new Table(tableSchema.name, tableSchema, Collection);else return new WriteableTable(tableSchema.name, tableSchema); }; this._createTransaction = function (mode, storeNames, dbschema, parentTransaction) { return new Transaction(mode, storeNames, dbschema, parentTransaction); }; /* Generate a temporary transaction when db operations are done outside a transactino scope. */ function tempTransaction(mode, storeNames, fn) { // Last argument is "writeLocked". But this doesnt apply to oneshot direct db operations, so we ignore it. if (!openComplete && !PSD.letThrough) { if (!isBeingOpened) { if (!autoOpen) return rejection(new exceptions.DatabaseClosed(), dbUncaught); db.open().catch(nop); // Open in background. If if fails, it will be catched by the final promise anyway. } return dbReadyPromise.then(function () { return tempTransaction(mode, storeNames, fn); }); } else { var trans = db._createTransaction(mode, storeNames, globalSchema); return trans._promise(mode, function (resolve, reject) { newScope(function () { // OPTIMIZATION POSSIBLE? newScope() not needed because it's already done in _promise. PSD.trans = trans; fn(resolve, reject, trans); }); }).then(function (result) { // Instead of resolving value directly, wait with resolving it until transaction has completed. // Otherwise the data would not be in the DB if requesting it in the then() operation. // Specifically, to ensure that the following expression will work: // // db.friends.put({name: "Arne"}).then(function () { // db.friends.where("name").equals("Arne").count(function(count) { // assert (count === 1); // }); // }); // return trans._completion.then(function () { return result; }); }); /*.catch(err => { // Don't do this as of now. If would affect bulk- and modify methods in a way that could be more intuitive. But wait! Maybe change in next major. trans._reject(err); return rejection(err); });*/ } } this._whenReady = function (fn) { return new Promise(fake || openComplete || PSD.letThrough ? fn : function (resolve, reject) { if (!isBeingOpened) { if (!autoOpen) { reject(new exceptions.DatabaseClosed()); return; } db.open().catch(nop); // Open in background. If if fails, it will be catched by the final promise anyway. } dbReadyPromise.then(function () { fn(resolve, reject); }); }).uncaught(dbUncaught); }; // // // // // Dexie API // // // this.verno = 0; this.open = function () { if (isBeingOpened || idbdb) return dbReadyPromise.then(function () { return dbOpenError ? rejection(dbOpenError, dbUncaught) : db; }); debug && (openCanceller._stackHolder = getErrorWithStack()); // Let stacks point to when open() was called rather than where new Dexie() was called. isBeingOpened = true; dbOpenError = null; openComplete = false; // Function pointers to call when the core opening process completes. var resolveDbReady = dbReadyResolve, // upgradeTransaction to abort on failure. upgradeTransaction = null; return Promise.race([openCanceller, new Promise(function (resolve, reject) { doFakeAutoComplete(function () { return resolve(); }); // Make sure caller has specified at least one version if (versions.length > 0) autoSchema = false; // Multiply db.verno with 10 will be needed to workaround upgrading bug in IE: // IE fails when deleting objectStore after reading from it. // A future version of Dexie.js will stopover an intermediate version to workaround this. // At that point, we want to be backward compatible. Could have been multiplied with 2, but by using 10, it is easier to map the number to the real version number. // If no API, throw! if (!indexedDB) throw new exceptions.MissingAPI("indexedDB API not found. If using IE10+, make sure to run your code on a server URL " + "(not locally). If using old Safari versions, make sure to include indexedDB polyfill."); var req = autoSchema ? indexedDB.open(dbName) : indexedDB.open(dbName, Math.round(db.verno * 10)); if (!req) throw new exceptions.MissingAPI("IndexedDB API not available"); // May happen in Safari private mode, see https://github.com/dfahlander/Dexie.js/issues/134 req.onerror = wrap(eventRejectHandler(reject)); req.onblocked = wrap(fireOnBlocked); req.onupgradeneeded = wrap(function (e) { upgradeTransaction = req.transaction; if (autoSchema && !db._allowEmptyDB) { // Unless an addon has specified db._allowEmptyDB, lets make the call fail. // Caller did not specify a version or schema. Doing that is only acceptable for opening alread existing databases. // If onupgradeneeded is called it means database did not exist. Reject the open() promise and make sure that we // do not create a new database by accident here. req.onerror = preventDefault; // Prohibit onabort error from firing before we're done! upgradeTransaction.abort(); // Abort transaction (would hope that this would make DB disappear but it doesnt.) // Close database and delete it. req.result.close(); var delreq = indexedDB.deleteDatabase(dbName); // The upgrade transaction is atomic, and javascript is single threaded - meaning that there is no risk that we delete someone elses database here! delreq.onsuccess = delreq.onerror = wrap(function () { reject(new exceptions.NoSuchDatabase('Database ' + dbName + ' doesnt exist')); }); } else { upgradeTransaction.onerror = wrap(eventRejectHandler(reject)); var oldVer = e.oldVersion > Math.pow(2, 62) ? 0 : e.oldVersion; // Safari 8 fix. runUpgraders(oldVer / 10, upgradeTransaction, reject, req); } }, reject); req.onsuccess = wrap(function () { // Core opening procedure complete. Now let's just record some stuff. upgradeTransaction = null; idbdb = req.result; connections.push(db); // Used for emulating versionchange event on IE/Edge/Safari. if (autoSchema) readGlobalSchema();else if (idbdb.objectStoreNames.length > 0) { try { adjustToExistingIndexNames(globalSchema, idbdb.transaction(safariMultiStoreFix(idbdb.objectStoreNames), READONLY)); } catch (e) { // Safari may bail out if > 1 store names. However, this shouldnt be a showstopper. Issue #120. } } idbdb.onversionchange = wrap(function (ev) { db._vcFired = true; // detect implementations that not support versionchange (IE/Edge/Safari) db.on("versionchange").fire(ev); }); if (!hasNativeGetDatabaseNames) { // Update localStorage with list of database names globalDatabaseList(function (databaseNames) { if (databaseNames.indexOf(dbName) === -1) return databaseNames.push(dbName); }); } resolve(); }, reject); })]).then(function () { // Before finally resolving the dbReadyPromise and this promise, // call and await all on('ready') subscribers: // Dexie.vip() makes subscribers able to use the database while being opened. // This is a must since these subscribers take part of the opening procedure. return Dexie.vip(db.on.ready.fire); }).then(function () { // Resolve the db.open() with the db instance. isBeingOpened = false; return db; }).catch(function (err) { try { // Did we fail within onupgradeneeded? Make sure to abort the upgrade transaction so it doesnt commit. upgradeTransaction && upgradeTransaction.abort(); } catch (e) {} isBeingOpened = false; // Set before calling db.close() so that it doesnt reject openCanceller again (leads to unhandled rejection event). db.close(); // Closes and resets idbdb, removes connections, resets dbReadyPromise and openCanceller so that a later db.open() is fresh. // A call to db.close() may have made on-ready subscribers fail. Use dbOpenError if set, since err could be a follow-up error on that. dbOpenError = err; // Record the error. It will be used to reject further promises of db operations. return rejection(dbOpenError, dbUncaught); // dbUncaught will make sure any error that happened in any operation before will now bubble to db.on.error() thanks to the special handling in Promise.uncaught(). }).finally(function () { openComplete = true; resolveDbReady(); // dbReadyPromise is resolved no matter if open() rejects or resolved. It's just to wake up waiters. }); }; this.close = function () { var idx = connections.indexOf(db); if (idx >= 0) connections.splice(idx, 1); if (idbdb) { try { idbdb.close(); } catch (e) {} idbdb = null; } autoOpen = false; dbOpenError = new exceptions.DatabaseClosed(); if (isBeingOpened) cancelOpen(dbOpenError); // Reset dbReadyPromise promise: dbReadyPromise = new Promise(function (resolve) { dbReadyResolve = resolve; }); openCanceller = new Promise(function (_, reject) { cancelOpen = reject; }); }; this.delete = function () { var hasArguments = arguments.length > 0; return new Promise(function (resolve, reject) { if (hasArguments) throw new exceptions.InvalidArgument("Arguments not allowed in db.delete()"); if (isBeingOpened) { dbReadyPromise.then(doDelete); } else { doDelete(); } function doDelete() { db.close(); var req = indexedDB.deleteDatabase(dbName); req.onsuccess = wrap(function () { if (!hasNativeGetDatabaseNames) { globalDatabaseList(function (databaseNames) { var pos = databaseNames.indexOf(dbName); if (pos >= 0) return databaseNames.splice(pos, 1); }); } resolve(); }); req.onerror = wrap(eventRejectHandler(reject)); req.onblocked = fireOnBlocked; } }).uncaught(dbUncaught); }; this.backendDB = function () { return idbdb; }; this.isOpen = function () { return idbdb !== null; }; this.hasFailed = function () { return dbOpenError !== null; }; this.dynamicallyOpened = function () { return autoSchema; }; // // Properties // this.name = dbName; // db.tables - an array of all Table instances. setProp(this, "tables", { get: function () { /// <returns type="Array" elementType="WriteableTable" /> return keys(allTables).map(function (name) { return allTables[name]; }); } }); // // Events // this.on = Events(this, "error", "populate", "blocked", "versionchange", { ready: [promisableChain, nop] }); this.on.ready.subscribe = override(this.on.ready.subscribe, function (subscribe) { return function (subscriber, bSticky) { Dexie.vip(function () { if (openComplete) { // Database already open. Call subscriber asap. Promise.resolve().then(subscriber); // bSticky: Also subscribe to future open sucesses (after close / reopen) if (bSticky) subscribe(subscriber); } else { // Database not yet open. Subscribe to it. subscribe(subscriber); // If bSticky is falsy, make sure to unsubscribe subscriber when fired once. if (!bSticky) subscribe(function unsubscribe() { db.on.ready.unsubscribe(subscriber); db.on.ready.unsubscribe(unsubscribe); }); } }); }; }); fakeAutoComplete(function () { db.on("populate").fire(db._createTransaction(READWRITE, dbStoreNames, globalSchema)); db.on("error").fire(new Error()); }); this.transaction = function (mode, tableInstances, scopeFunc) { /// <summary> /// /// </summary> /// <param name="mode" type="String">"r" for readonly, or "rw" for readwrite</param> /// <param name="tableInstances">Table instance, Array of Table instances, String or String Array of object stores to include in the transaction</param> /// <param name="scopeFunc" type="Function">Function to execute with transaction</param> // Let table arguments be all arguments between mode and last argument. var i = arguments.length; if (i < 2) throw new exceptions.InvalidArgument("Too few arguments"); // Prevent optimzation killer (https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments) // and clone arguments except the first one into local var 'args'. var args = new Array(i - 1); while (--i) { args[i - 1] = arguments[i]; } // Let scopeFunc be the last argument and pop it so that args now only contain the table arguments. scopeFunc = args.pop(); var tables = flatten(args); // Support using array as middle argument, or a mix of arrays and non-arrays. var parentTransaction = PSD.trans; // Check if parent transactions is bound to this db instance, and if caller wants to reuse it if (!parentTransaction || parentTransaction.db !== db || mode.indexOf('!') !== -1) parentTransaction = null; var onlyIfCompatible = mode.indexOf('?') !== -1; mode = mode.replace('!', '').replace('?', ''); // Ok. Will change arguments[0] as well but we wont touch arguments henceforth. try { // // Get storeNames from arguments. Either through given table instances, or through given table names. // var storeNames = tables.map(function (table) { var storeName = table instanceof Table ? table.name : table; if (typeof storeName !== 'string') throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed"); return storeName; }); // // Resolve mode. Allow shortcuts "r" and "rw". // if (mode == "r" || mode == READONLY) mode = READONLY;else if (mode == "rw" || mode == READWRITE) mode = READWRITE;else throw new exceptions.InvalidArgument("Invalid transaction mode: " + mode); if (parentTransaction) { // Basic checks if (parentTransaction.mode === READONLY && mode === READWRITE) { if (onlyIfCompatible) { // Spawn new transaction instead. parentTransaction = null; } else throw new exceptions.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY"); } if (parentTransaction) { storeNames.forEach(function (storeName) { if (parentTransaction && parentTransaction.storeNames.indexOf(storeName) === -1) { if (onlyIfCompatible) { // Spawn new transaction instead. parentTransaction = null; } else throw new exceptions.SubTransaction("Table " + storeName + " not included in parent transaction."); } }); } } } catch (e) { return parentTransaction ? parentTransaction._promise(null, function (_, reject) { reject(e); }) : rejection(e, dbUncaught); } // If this is a sub-transaction, lock the parent and then launch the sub-transaction. return parentTransaction ? parentTransaction._promise(mode, enterTransactionScope, "lock") : db._whenReady(enterTransactionScope); function enterTransactionScope(resolve) { var parentPSD = PSD; resolve(Promise.resolve().then(function () { return newScope(function () { // Keep a pointer to last non-transactional PSD to use if someone calls Dexie.ignoreTransaction(). PSD.transless = PSD.transless || parentPSD; // Our transaction. //return new Promise((resolve, reject) => { var trans = db._createTransaction(mode, storeNames, globalSchema, parentTransaction); // Let the transaction instance be part of a Promise-specific data (PSD) value. PSD.trans = trans; if (parentTransaction) { // Emulate transaction commit awareness for inner transaction (must 'commit' when the inner transaction has no more operations ongoing) trans.idbtrans = parentTransaction.idbtrans; } else { trans.create(); // Create the backend transaction so that complete() or error() will trigger even if no operation is made upon it. } // Provide arguments to the scope function (for backward compatibility) var tableArgs = storeNames.map(function (name) { return allTables[name]; }); tableArgs.push(trans); var returnValue; return Promise.follow(function () { // Finally, call the scope function with our table and transaction arguments. returnValue = scopeFunc.apply(trans, tableArgs); // NOTE: returnValue is used in trans.on.complete() not as a returnValue to this func. if (returnValue) { if (typeof returnValue.next === 'function' && typeof returnValue.throw === 'function') { // scopeFunc returned an iterator with throw-support. Handle yield as await. returnValue = awaitIterator(returnValue); } else if (typeof returnValue.then === 'function' && !hasOwn(returnValue, '_PSD')) { throw new exceptions.IncompatiblePromise("Incompatible Promise returned from transaction scope (read more at http://tinyurl.com/znyqjqc). Transaction scope: " + scopeFunc.toString()); } } }).uncaught(dbUncaught).then(function () { if (parentTransaction) trans._resolve(); // sub transactions don't react to idbtrans.oncomplete. We must trigger a acompletion. return trans._completion; // Even if WE believe everything is fine. Await IDBTransaction's oncomplete or onerror as well. }).then(function () { return returnValue; }).catch(function (e) { //reject(e); trans._reject(e); // Yes, above then-handler were maybe not called because of an unhandled rejection in scopeFunc! return rejection(e); }); //}); }); })); } }; this.table = function (tableName) { /// <returns type="WriteableTable"></returns> if (fake && autoSchema) return new WriteableTable(tableName); if (!hasOwn(allTables, tableName)) { throw new exceptions.InvalidTable('Table ' + tableName + ' does not exist'); } return allTables[tableName]; }; // // // // Table Class // // // function Table(name, tableSchema, collClass) { /// <param name="name" type="String"></param> this.name = name; this.schema = tableSchema; this.hook = allTables[name] ? allTables[name].hook : Events(null, { "creating": [hookCreatingChain, nop], "reading": [pureFunctionChain, mirror], "updating": [hookUpdatingChain, nop], "deleting": [hookDeletingChain, nop] }); this._collClass = collClass || Collection; } props(Table.prototype, { // // Table Protected Methods // _trans: function getTransaction(mode, fn, writeLocked) { var trans = PSD.trans; return trans && trans.db === db ? trans._promise(mode, fn, writeLocked) : tempTransaction(mode, [this.name], fn); }, _idbstore: function getIDBObjectStore(mode, fn, writeLocked) { if (fake) return new Promise(fn); // Simplify the work for Intellisense/Code completion. var trans = PSD.trans, tableName = this.name; function supplyIdbStore(resolve, reject, trans) { fn(resolve, reject, trans.idbtrans.objectStore(tableName), trans); } return trans && trans.db === db ? trans._promise(mode, supplyIdbStore, writeLocked) : tempTransaction(mode, [this.name], supplyIdbStore); }, // // Table Public Methods // get: function (key, cb) { var self = this; return this._idbstore(READONLY, function (resolve, reject, idbstore) { fake && resolve(self.schema.instanceTemplate); var req = idbstore.get(key); req.onerror = eventRejectHandler(reject); req.onsuccess = function () { resolve(self.hook.reading.fire(req.result)); }; }).then(cb); }, where: function (indexName) { return new WhereClause(this, indexName); }, count: function (cb) { return this.toCollection().count(cb); }, offset: function (offset) { return this.toCollection().offset(offset); }, limit: function (numRows) { return this.toCollection().limit(numRows); }, reverse: function () { return this.toCollection().reverse(); }, filter: function (filterFunction) { return this.toCollection().and(filterFunction); }, each: function (fn) { return this.toCollection().each(fn); }, toArray: function (cb) { return this.toCollection().toArray(cb); }, orderBy: function (index) { return new this._collClass(new WhereClause(this, index)); }, toCollection: function () { return new this._collClass(new WhereClause(this)); }, mapToClass: function (constructor, structure) { /// <summary> /// Map table to a javascript constructor function. Objects returned from the database will be instances of this class, making /// it possible to the instanceOf operator as well as extending the class using constructor.prototype.method = function(){...}. /// </summary> /// <param name="constructor">Constructor function representing the class.</param> /// <param name="structure" optional="true">Helps IDE code completion by knowing the members that objects contain and not just the indexes. Also /// know what type each member has. Example: {name: String, emailAddresses: [String], password}</param> this.schema.mappedClass = constructor; var instanceTemplate = Object.create(constructor.prototype); if (structure) { // structure and instanceTemplate is for IDE code competion only while constructor.prototype is for actual inheritance. applyStructure(instanceTemplate, structure); } this.schema.instanceTemplate = instanceTemplate; // Now, subscribe to the when("reading") event to make all objects that come out from this table inherit from given class // no matter which method to use for reading (Table.get() or Table.where(...)... ) var readHook = function (obj) { if (!obj) return obj; // No valid object. (Value is null). Return as is. // Create a new object that derives from constructor: var res = Object.create(constructor.prototype); // Clone members: for (var m in obj) { if (hasOwn(obj, m)) res[m] = obj[m]; }return res; }; if (this.schema.readHook) { this.hook.reading.unsubscribe(this.schema.readHook); } this.schema.readHook = readHook; this.hook("reading", readHook); return constructor; }, defineClass: function (structure) { /// <summary> /// Define all members of the class that represents the table. This will help code completion of when objects are read from the database /// as well as making it possible to extend the prototype of the returned constructor function. /// </summary> /// <param name="structure">Helps IDE code completion by knowing the members that objects contain and not just the indexes. Also /// know what type each member has. Example: {name: String, emailAddresses: [String], properties: {shoeSize: Number}}</param> return this.mapToClass(Dexie.defineClass(structure), structure); } }); // // // // WriteableTable Class (extends Table) // // // function WriteableTable(name, tableSchema, collClass) { Table.call(this, name, tableSchema, collClass || WriteableCollection); } function BulkErrorHandlerCatchAll(errorList, done, supportHooks) { return (supportHooks ? hookedEventRejectHandler : eventRejectHandler)(function (e) { errorList.push(e); done && done(); }); } function bulkDelete(idbstore, trans, keysOrTuples, hasDeleteHook, deletingHook) { // If hasDeleteHook, keysOrTuples must be an array of tuples: [[key1, value2],[key2,value2],...], // else keysOrTuples must be just an array of keys: [key1, key2, ...]. return new Promise(function (resolve, reject) { var len = keysOrTuples.length, lastItem = len - 1; if (len === 0) return resolve(); if (!hasDeleteHook) { for (var i = 0; i < len; ++i) { var req = idbstore.delete(keysOrTuples[i]); req.onerror = wrap(eventRejectHandler(reject)); if (i === lastItem) req.onsuccess = wrap(function () { return resolve(); }); } } else { var hookCtx, errorHandler = hookedEventRejectHandler(reject), successHandler = hookedEventSuccessHandler(null); tryCatch(function () { for (var i = 0; i < len; ++i) { hookCtx = { onsuccess: null, onerror: null }; var tuple = keysOrTuples[i]; deletingHook.call(hookCtx, tuple[0], tuple[1], trans); var req = idbstore.delete(tuple[0]); req._hookCtx = hookCtx; req.onerror = errorHandler; if (i === lastItem) req.onsuccess = hookedEventSuccessHandler(resolve);else req.onsuccess = successHandler; } }, function (err) { hookCtx.onerror && hookCtx.onerror(err); throw err; }); } }).uncaught(dbUncaught); } derive(WriteableTable).from(Table).extend({ bulkDelete: function (keys$$1) { if (this.hook.deleting.fire === nop) { return this._idbstore(READWRITE, function (resolve, reject, idbstore, trans) { resolve(bulkDelete(idbstore, trans, keys$$1, false, nop)); }); } else { return this.where(':id').anyOf(keys$$1).delete().then(function () {}); // Resolve with undefined. } }, bulkPut: function (objects, keys$$1) { var _this = this; return this._idbstore(READWRITE, function (resolve, reject, idbstore) { if (!idbstore.keyPath && !_this.schema.primKey.auto && !keys$$1) throw new exceptions.InvalidArgument("bulkPut() with non-inbound keys requires keys array in second argument"); if (idbstore.keyPath && keys$$1) throw new exceptions.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys"); if (keys$$1 && keys$$1.length !== objects.length) throw new exceptions.InvalidArgument("Arguments objects and keys must have the same length"); if (objects.length === 0) return resolve(); // Caller provided empty list. var done = function (result) { if (errorList.length === 0) resolve(result);else reject(new BulkError(_this.name + '.bulkPut(): ' + errorList.length + ' of ' + numObjs + ' operations failed', errorList)); }; var req, errorList = [], errorHandler, numObjs = objects.length, table = _this; if (_this.hook.creating.fire === nop && _this.hook.updating.fire === nop) { // // Standard Bulk (no 'creating' or 'updating' hooks to care about) // errorHandler = BulkErrorHandlerCatchAll(errorList); for (var i = 0, l = objects.length; i < l; ++i) { req = keys$$1 ? idbstore.put(objects[i], keys$$1[i]) : idbstore.put(objects[i]); req.onerror = errorHandler; } // Only need to catch success or error on the last operation // according to the IDB spec. req.onerror = BulkErrorHandlerCatchAll(errorList, done); req.onsuccess = eventSuccessHandler(done); } else { var effectiveKeys = keys$$1 || idbstore.keyPath && objects.map(function (o) { return getByKeyPath(o, idbstore.keyPath); }); // Generate map of {[key]: object} var objectLookup = effectiveKeys && arrayToObject(effectiveKeys, function (key, i) { return key != null && [key, objects[i]]; }); var promise = !effectiveKeys ? // Auto-incremented key-less objects only without any keys argument. table.bulkAdd(objects) : // Keys provided. Either as inbound in provided objects, or as a keys argument. // Begin with updating those that exists in DB: table.where(':id').anyOf(effectiveKeys.filter(function (key) { return key != null; })).modify(function () { this.value = objectLookup[this.primKey]; objectLookup[this.primKey] = null; // Mark as "don't add this" }).catch(ModifyError, function (e) { errorList = e.failures; // No need to concat here. These are the first errors added. }).then(function () { // Now, let's examine which items didnt exist so we can add them: var objsToAdd = [], keysToAdd = keys$$1 && []; // Iterate backwards. Why? Because if same key was used twice, just add the last one. for (var i = effectiveKeys.length - 1; i >= 0; --i) { var key = effectiveKeys[i]; if (key == null || objectLookup[key]) { objsToAdd.push(objects[i]); keys$$1 && keysToAdd.push(key); if (key != null) objectLookup[key] = null; // Mark as "dont add again" } } // The items are in reverse order so reverse them before adding. // Could be important in order to get auto-incremented keys the way the caller // would expect. Could have used unshift instead of push()/reverse(), // but: http://jsperf.com/unshift-vs-reverse objsToAdd.reverse(); keys$$1 && keysToAdd.reverse(); return table.bulkAdd(objsToAdd, keysToAdd); }).then(function (lastAddedKey) { // Resolve with key of the last object in given arguments to bulkPut(): var lastEffectiveKey = effectiveKeys[effectiveKeys.length - 1]; // Key was provided. return lastEffectiveKey != null ? lastEffectiveKey : lastAddedKey; }); promise.then(done).catch(BulkError, function (e) { // Concat failure from ModifyError and reject using our 'done' method. errorList = errorList.concat(e.failures); done(); }).catch(reject); } }, "locked"); // If called from transaction scope, lock transaction til all steps are done. }, bulkAdd: function (objects, keys$$1) { var self = this, creatingHook = this.hook.creating.fire; return this._idbstore(READWRITE, function (resolve, reject, idbstore, trans) { if (!idbstore.keyPath && !self.schema.primKey.auto && !keys$$1) throw new exceptions.InvalidArgument("bulkAdd() with non-inbound keys requires keys array in second argument"); if (idbstore.keyPath && keys$$1) throw new exceptions.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys"); if (keys$$1 && keys$$1.length !== objects.length) throw new exceptions.InvalidArgument("Arguments objects and keys must have the same length"); if (objects.length === 0) return resolve(); // Caller provided empty list. function done(result) { if (errorList.length === 0) resolve(result);else reject(new BulkError(self.name + '.bulkAdd(): ' + errorList.length + ' of ' + numObjs + ' operations failed', errorList)); } var req, errorList = [], errorHandler, successHandler, numObjs = objects.length; if (creatingHook !== nop) { // // There are subscribers to hook('creating') // Must behave as documented. // var keyPath = idbstore.keyPath, hookCtx; errorHandler = BulkErrorHandlerCatchAll(errorList, null, true); successHandler = hookedEventSuccessHandler(null); tryCatch(function () { for (var i = 0, l = objects.length; i < l; ++i) { hookCtx = { onerror: null, onsuccess: null }; var key = keys$$1 && keys$$1[i]; var obj = objects[i], effectiveKey = keys$$1 ? key : keyPath ? getByKeyPath(obj, keyPath) : undefined, keyToUse = creatingHook.call(hookCtx, effectiveKey, obj, trans); if (effectiveKey == null && keyToUse != null) { if (keyPath) { obj = deepClone(obj); setByKeyPath(obj, keyPath, keyToUse); } else { key = keyToUse; } } req = key != null ? idbstore.add(obj, key) : idbstore.add(obj); req._hookCtx = hookCtx; if (i < l - 1) { req.onerror = errorHandler; if (hookCtx.onsuccess) req.onsuccess = successHandler; } } }, function (err) { hookCtx.onerror && hookCtx.onerror(err); throw err; }); req.onerror = BulkErrorHandlerCatchAll(errorList, done, true); req.onsuccess = hookedEventSuccessHandler(done); } else { // // Standard Bulk (no 'creating' hook to care about) // errorHandler = BulkErrorHandlerCatchAll(errorList); for (var i = 0, l = objects.length; i < l; ++i) { req = keys$$1 ? idbstore.add(objects[i], keys$$1[i]) : idbstore.add(objects[i]); req.onerror = errorHandler; } // Only need to catch success or error on the last operation // according to the IDB spec. req.onerror = BulkErrorHandlerCatchAll(errorList, done); req.onsuccess = eventSuccessHandler(done); } }); }, add: function (obj, key) { /// <summary> /// Add an object to the database. In case an object with same primary key already exists, the object will not be added. /// </summary> /// <param name="obj" type="Object">A javascript object to insert</param> /// <param name="key" optional="true">Primary key</param> var creatingHook = this.hook.creating.fire; return this._idbstore(READWRITE, function (resolve, reject, idbstore, trans) { var hookCtx = { onsuccess: null, onerror: null }; if (creatingHook !== nop) { var effectiveKey = key != null ? key : idbstore.keyPath ? getByKeyPath(obj, idbstore.keyPath) : undefined; var keyToUse = creatingHook.call(hookCtx, effectiveKey, obj, trans); // Allow subscribers to when("creating") to generate the key. if (effectiveKey == null && keyToUse != null) { // Using "==" and "!=" to check for either null or undefined! if (idbstore.keyPath) setByKeyPath(obj, idbstore.keyPath, keyToUse);else key = keyToUse; } } try { var req = key != null ? idbstore.add(obj, key) : idbstore.add(obj); req._hookCtx = hookCtx; req.onerror = hookedEventRejectHandler(reject); req.onsuccess = hookedEventSuccessHandler(function (result) { // TODO: Remove these two lines in next major release (2.0?) // It's no good practice to have side effects on provided parameters var keyPath = idbstore.keyPath; if (keyPath) setByKeyPath(obj, keyPath, result); resolve(result); }); } catch (e) { if (hookCtx.onerror) hookCtx.onerror(e); throw e; } }); }, put: function (obj, key) { /// <summary> /// Add an object to the database but in case an object with same primary key alread exists, the existing one will get updated. /// </summary> /// <param name="obj" type="Object">A javascript object to insert or update</param> /// <param name="key" optional="true">Primary key</param> var self = this, creatingHook = this.hook.creating.fire, updatingHook = this.hook.updating.fire; if (creatingHook !== nop || updatingHook !== nop) { // // People listens to when("creating") or when("updating") events! // We must know whether the put operation results in an CREATE or UPDATE. // return this._trans(READWRITE, function (resolve, reject, trans) { // Since key is optional, make sure we get it from obj if not provided var effectiveKey = key !== undefined ? key : self.schema.primKey.keyPath && getByKeyPath(obj, self.schema.primKey.keyPath); if (effectiveKey == null) { // "== null" means checking for either null or undefined. // No primary key. Must use add(). self.add(obj).then(resolve, reject); } else { // Primary key exist. Lock transaction and try modifying existing. If nothing modified, call add(). trans._lock(); // Needed because operation is splitted into modify() and add(). // clone obj before this async call. If caller modifies obj the line after put(), the IDB spec requires that it should not affect operation. obj = deepClone(obj); self.where(":id").equals(effectiveKey).modify(function () { // Replace extisting value with our object // CRUD event firing handled in WriteableCollection.modify() this.value = obj; }).then(function (count) { if (count === 0) { // Object's key was not found. Add the object instead. // CRUD event firing will be done in add() return self.add(obj, key); // Resolving with another Promise. Returned Promise will then resolve with the new key. } else { return effectiveKey; // Resolve with the provided key. } }).finally(function () { trans._unlock(); }).then(resolve, reject); } }); } else { // Use the standard IDB put() method. return this._idbstore(READWRITE, function (resolve, reject, idbstore) { var req = key !== undefined ? idbstore.put(obj, key) : idbstore.put(obj); req.onerror = eventRejectHandler(reject); req.onsuccess = function (ev) { var keyPath = idbstore.keyPath; if (keyPath) setByKeyPath(obj, keyPath, ev.target.result); resolve(req.result); }; }); } }, 'delete': function (key) { /// <param name="key">Primary key of the object to delete</param> if (this.hook.deleting.subscribers.length) { // People listens to when("deleting") event. Must implement delete using WriteableCollection.delete() that will // call the CRUD event. Only WriteableCollection.delete() will know whether an object was actually deleted. return this.where(":id").equals(key).delete(); } else { // No one listens. Use standard IDB delete() method. return this._idbstore(READWRITE, function (resolve, reject, idbstore) { var req = idbstore.delete(key); req.onerror = eventRejectHandler(reject); req.onsuccess = function () { resolve(req.result); }; }); } }, clear: function () { if (this.hook.deleting.subscribers.length) { // People listens to when("deleting") event. Must implement delete using WriteableCollection.delete() that will // call the CRUD event. Only WriteableCollection.delete() will knows which objects that are actually deleted. return this.toCollection().delete(); } else { return this._idbstore(READWRITE, function (resolve, reject, idbstore) { var req = idbstore.clear(); req.onerror = eventRejectHandler(reject); req.onsuccess = function () { resolve(req.result); }; }); } }, update: function (keyOrObject, modifications) { if (typeof modifications !== 'object' || isArray(modifications)) throw new exceptions.InvalidArgument("Modifications must be an object."); if (typeof keyOrObject === 'object' && !isArray(keyOrObject)) { // object to modify. Also modify given object with the modifications: keys(modifications).forEach(function (keyPath) { setByKeyPath(keyOrObject, keyPath, modifications[keyPath]); }); var key = getByKeyPath(keyOrObject, this.schema.primKey.keyPath); if (key === undefined) return rejection(new exceptions.InvalidArgument("Given object does not contain its primary key"), dbUncaught); return this.where(":id").equals(key).modify(modifications); } else { // key to modify return this.where(":id").equals(keyOrObject).modify(modifications); } } }); // // // // Transaction Class // // // function Transaction(mode, storeNames, dbschema, parent) { var _this2 = this; /// <summary> /// Transaction class. Represents a database transaction. All operations on db goes through a Transaction. /// </summary> /// <param name="mode" type="String">Any of "readwrite" or "readonly"</param> /// <param name="storeNames" type="Array">Array of table names to operate on</param> this.db = db; this.mode = mode; this.storeNames = storeNames; this.idbtrans = null; this.on = Events(this, "complete", "error", "abort"); this.parent = parent || null; this.active = true; this._tables = null; this._reculock = 0; this._blockedFuncs = []; this._psd = null; this._dbschema = dbschema; this._resolve = null; this._reject = null; this._completion = new Promise(function (resolve, reject) { _this2._resolve = resolve; _this2._reject = reject; }).uncaught(dbUncaught); this._completion.then(function () { _this2.on.complete.fire(); }, function (e) { _this2.on.error.fire(e); _this2.parent ? _this2.parent._reject(e) : _this2.active && _this2.idbtrans && _this2.idbtrans.abort(); _this2.active = false; return rejection(e); // Indicate we actually DO NOT catch this error. }); } props(Transaction.prototype, { // // Transaction Protected Methods (not required by API users, but needed internally and eventually by dexie extensions) // _lock: function () { assert(!PSD.global); // Locking and unlocking reuires to be within a PSD scope. // Temporary set all requests into a pending queue if they are called before database is ready. ++this._reculock; // Recursive read/write lock pattern using PSD (Promise Specific Data) instead of TLS (Thread Local Storage) if (this._reculock === 1 && !PSD.global) PSD.lockOwnerFor = this; return this; }, _unlock: function () { assert(!PSD.global); // Locking and unlocking reuires to be within a PSD scope. if (--this._reculock === 0) { if (!PSD.global) PSD.lockOwnerFor = null; while (this._blockedFuncs.length > 0 && !this._locked()) { var fn = this._blockedFuncs.shift(); try { fn(); } catch (e) {} } } return this; }, _locked: function () { // Checks if any write-lock is applied on this transaction. // To simplify the Dexie API for extension implementations, we support recursive locks. // This is accomplished by using "Promise Specific Data" (PSD). // PSD data is bound to a Promise and any child Promise emitted through then() or resolve( new Promise() ). // PSD is local to code executing on top of the call stacks of any of any code executed by Promise(): // * callback given to the Promise() constructor (function (resolve, reject){...}) // * callbacks given to then()/catch()/finally() methods (function (value){...}) // If creating a new independant Promise instance from within a Promise call stack, the new Promise will derive the PSD from the call stack of the parent Promise. // Derivation is done so that the inner PSD __proto__ points to the outer PSD. // PSD.lockOwnerFor will point to current transaction object if the currently executing PSD scope owns the lock. return this._reculock && PSD.lockOwnerFor !== this; }, create: function (idbtrans) { var _this3 = this; assert(!this.idbtrans); if (!idbtrans && !idbdb) { switch (dbOpenError && dbOpenError.name) { case "DatabaseClosedError": // Errors where it is no difference whether it was caused by the user operation or an earlier call to db.open() throw new exceptions.DatabaseClosed(dbOpenError); case "MissingAPIError": // Errors where it is no difference whether it was caused by the user operation or an earlier call to db.open() throw new exceptions.MissingAPI(dbOpenError.message, dbOpenError); default: // Make it clear that the user operation was not what caused the error - the error had occurred earlier on db.open()! throw new exceptions.OpenFailed(dbOpenError); } } if (!this.active) throw new exceptions.TransactionInactive(); assert(this._completion._state === null); idbtrans = this.idbtrans = idbtrans || idbdb.transaction(safariMultiStoreFix(this.storeNames), this.mode); idbtrans.onerror = wrap(function (ev) { preventDefault(ev); // Prohibit default bubbling to window.error _this3._reject(idbtrans.error); }); idbtrans.onabort = wrap(function (ev) { preventDefault(ev); _this3.active && _this3._reject(new exceptions.Abort()); _this3.active = false; _this3.on("abort").fire(ev); }); idbtrans.oncomplete = wrap(function () { _this3.active = false; _this3._resolve(); }); return this; }, _promise: function (mode, fn, bWriteLock) { var self = this; return newScope(function () { var p; // Read lock always if (!self._locked()) { p = self.active ? new Promise(function (resolve, reject) { if (mode === READWRITE && self.mode !== READWRITE) throw new exceptions.ReadOnly("Transaction is readonly"); if (!self.idbtrans && mode) self.create(); if (bWriteLock) self._lock(); // Write lock if write operation is requested fn(resolve, reject, self); }) : rejection(new exceptions.TransactionInactive()); if (self.active && bWriteLock) p.finally(function () { self._unlock(); }); } else { // Transaction is write-locked. Wait for mutex. p = new Promise(function (resolve, reject) { self._blockedFuncs.push(function () { self._promise(mode, fn, bWriteLock).then(resolve, reject); }); }); } p._lib = true; return p.uncaught(dbUncaught); }); }, // // Transaction Public Properties and Methods // abort: function () { this.active && this._reject(new exceptions.Abort()); this.active = false; }, tables: { get: deprecated("Transaction.tables", function () { return arrayToObject(this.storeNames, function (name) { return [name, allTables[name]]; }); }, "Use db.tables()") }, complete: deprecated("Transaction.complete()", function (cb) { return this.on("complete", cb); }), error: deprecated("Transaction.error()", function (cb) { return this.on("error", cb); }), table: deprecated("Transaction.table()", function (name) { if (this.storeNames.indexOf(name) === -1) throw new exceptions.InvalidTable("Table " + name + " not in transaction"); return allTables[name]; }) }); // // // // WhereClause // // // function WhereClause(table, index, orCollection) { /// <param name="table" type="Table"></param> /// <param name="index" type="String" optional="true"></param> /// <param name="orCollection" type="Collection" optional="true"></param> this._ctx = { table: table, index: index === ":id" ? null : index, collClass: table._collClass, or: orCollection }; } props(WhereClause.prototype, function () { // WhereClause private methods function fail(collectionOrWhereClause, err, T) { var collection = collectionOrWhereClause instanceof WhereClause ? new collectionOrWhereClause._ctx.collClass(collectionOrWhereClause) : collectionOrWhereClause; collection._ctx.error = T ? new T(err) : new TypeError(err); return collection; } function emptyCollection(whereClause) { return new whereClause._ctx.collClass(whereClause, function () { return IDBKeyRange.only(""); }).limit(0); } function upperFactory(dir) { return dir === "next" ? function (s) { return s.toUpperCase(); } : function (s) { return s.toLowerCase(); }; } function lowerFactory(dir) { return dir === "next" ? function (s) { return s.toLowerCase(); } : function (s) { return s.toUpperCase(); }; } function nextCasing(key, lowerKey, upperNeedle, lowerNeedle, cmp, dir) { var length = Math.min(key.length, lowerNeedle.length); var llp = -1; for (var i = 0; i < length; ++i) { var lwrKeyChar = lowerKey[i]; if (lwrKeyChar !== lowerNeedle[i]) { if (cmp(key[i], upperNeedle[i]) < 0) return key.substr(0, i) + upperNeedle[i] + upperNeedle.substr(i + 1); if (cmp(key[i], lowerNeedle[i]) < 0) return key.substr(0, i) + lowerNeedle[i] + upperNeedle.substr(i + 1); if (llp >= 0) return key.substr(0, llp) + lowerKey[llp] + upperNeedle.substr(llp + 1); return null; } if (cmp(key[i], lwrKeyChar) < 0) llp = i; } if (length < lowerNeedle.length && dir === "next") return key + upperNeedle.substr(key.length); if (length < key.length && dir === "prev") return key.substr(0, upperNeedle.length); return llp < 0 ? null : key.substr(0, llp) + lowerNeedle[llp] + upperNeedle.substr(llp + 1); } function addIgnoreCaseAlgorithm(whereClause, match, needles, suffix) { /// <param name="needles" type="Array" elementType="String"></param> var upper, lower, compare, upperNeedles, lowerNeedles, direction, nextKeySuffix, needlesLen = needles.length; if (!needles.every(function (s) { return typeof s === 'string'; })) { return fail(whereClause, STRING_EXPECTED); } function initDirection(dir) { upper = upperFactory(dir); lower = lowerFactory(dir); compare = dir === "next" ? simpleCompare : simpleCompareReverse; var needleBounds = needles.map(function (needle) { return { lower: lower(needle), upper: upper(needle) }; }).sort(function (a, b) { return compare(a.lower, b.lower); }); upperNeedles = needleBounds.map(function (nb) { return nb.upper; }); lowerNeedles = needleBounds.map(function (nb) { return nb.lower; }); direction = dir; nextKeySuffix = dir === "next" ? "" : suffix; } initDirection("next"); var c = new whereClause._ctx.collClass(whereClause, function () { return IDBKeyRange.bound(upperNeedles[0], lowerNeedles[needlesLen - 1] + suffix); }); c._ondirectionchange = function (direction) { // This event onlys occur before filter is called the first time. initDirection(direction); }; var firstPossibleNeedle = 0; c._addAlgorithm(function (cursor, advance, resolve) { /// <param name="cursor" type="IDBCursor"></param> /// <param name="advance" type="Function"></param> /// <param name="resolve" type="Function"></param> var key = cursor.key; if (typeof key !== 'string') return false; var lowerKey = lower(key); if (match(lowerKey, lowerNeedles, firstPossibleNeedle)) { return true; } else { var lowestPossibleCasing = null; for (var i = firstPossibleNeedle; i < needlesLen; ++i) { var casing = nextCasing(key, lowerKey, upperNeedles[i], lowerNeedles[i], compare, direction); if (casing === null && lowestPossibleCasing === null) firstPossibleNeedle = i + 1;else if (lowestPossibleCasing === null || compare(lowestPossibleCasing, casing) > 0) { lowestPossibleCasing = casing; } } if (lowestPossibleCasing !== null) { advance(function () { cursor.continue(lowestPossibleCasing + nextKeySuffix); }); } else { advance(resolve); } return false; } }); return c; } // // WhereClause public methods // return { between: function (lower, upper, includeLower, includeUpper) { /// <summary> /// Filter out records whose where-field lays between given lower and upper values. Applies to Strings, Numbers and Dates. /// </summary> /// <param name="lower"></param> /// <param name="upper"></param> /// <param name="includeLower" optional="true">Whether items that equals lower should be included. Default true.</param> /// <param name="includeUpper" optional="true">Whether items that equals upper should be included. Default false.</param> /// <returns type="Collection"></returns> includeLower = includeLower !== false; // Default to true includeUpper = includeUpper === true; // Default to false try { if (cmp(lower, upper) > 0 || cmp(lower, upper) === 0 && (includeLower || includeUpper) && !(includeLower && includeUpper)) return emptyCollection(this); // Workaround for idiotic W3C Specification that DataError must be thrown if lower > upper. The natural result would be to return an empty collection. return new this._ctx.collClass(this, function () { return IDBKeyRange.bound(lower, upper, !includeLower, !includeUpper); }); } catch (e) { return fail(this, INVALID_KEY_ARGUMENT); } }, equals: function (value) { return new this._ctx.collClass(this, function () { return IDBKeyRange.only(value); }); }, above: function (value) { return new this._ctx.collClass(this, function () { return IDBKeyRange.lowerBound(value, true); }); }, aboveOrEqual: function (value) { return new this._ctx.collClass(this, function () { return IDBKeyRange.lowerBound(value); }); }, below: function (value) { return new this._ctx.collClass(this, function () { return IDBKeyRange.upperBound(value, true); }); }, belowOrEqual: function (value) { return new this._ctx.collClass(this, function () { return IDBKeyRange.upperBound(value); }); }, startsWith: function (str) { /// <param name="str" type="String"></param> if (typeof str !== 'string') return fail(this, STRING_EXPECTED); return this.between(str, str + maxString, true, true); }, startsWithIgnoreCase: function (str) { /// <param name="str" type="String"></param> if (str === "") return this.startsWith(str); return addIgnoreCaseAlgorithm(this, function (x, a) { return x.indexOf(a[0]) === 0; }, [str], maxString); }, equalsIgnoreCase: function (str) { /// <param name="str" type="String"></param> return addIgnoreCaseAlgorithm(this, function (x, a) { return x === a[0]; }, [str], ""); }, anyOfIgnoreCase: function () { var set = getArrayOf.apply(NO_CHAR_ARRAY, arguments); if (set.length === 0) return emptyCollection(this); return addIgnoreCaseAlgorithm(this, function (x, a) { return a.indexOf(x) !== -1; }, set, ""); }, startsWithAnyOfIgnoreCase: function () { var set = getArrayOf.apply(NO_CHAR_ARRAY, arguments); if (set.length === 0) return emptyCollection(this); return addIgnoreCaseAlgorithm(this, function (x, a) { return a.some(function (n) { return x.indexOf(n) === 0; }); }, set, maxString); }, anyOf: function () { var set = getArrayOf.apply(NO_CHAR_ARRAY, arguments); var compare = ascending; try { set.sort(compare); } catch (e) { return fail(this, INVALID_KEY_ARGUMENT); } if (set.length === 0) return emptyCollection(this); var c = new this._ctx.collClass(this, function () { return IDBKeyRange.bound(set[0], set[set.length - 1]); }); c._ondirectionchange = function (direction) { compare = direction === "next" ? ascending : descending; set.sort(compare); }; var i = 0; c._addAlgorithm(function (cursor, advance, resolve) { var key = cursor.key; while (compare(key, set[i]) > 0) { // The cursor has passed beyond this key. Check next. ++i; if (i === set.length) { // There is no next. Stop searching. advance(resolve); return false; } } if (compare(key, set[i]) === 0) { // The current cursor value should be included and we should continue a single step in case next item has the same key or possibly our next key in set. return true; } else { // cursor.key not yet at set[i]. Forward cursor to the next key to hunt for. advance(function () { cursor.continue(set[i]); }); return false; } }); return c; }, notEqual: function (value) { return this.inAnyRange([[-Infinity, value], [value, maxKey]], { includeLowers: false, includeUppers: false }); }, noneOf: function () { var set = getArrayOf.apply(NO_CHAR_ARRAY, arguments); if (set.length === 0) return new this._ctx.collClass(this); // Return entire collection. try { set.sort(ascending); } catch (e) { return fail(this, INVALID_KEY_ARGUMENT); } // Transform ["a","b","c"] to a set of ranges for between/above/below: [[-Infinity,"a"], ["a","b"], ["b","c"], ["c",maxKey]] var ranges = set.reduce(function (res, val) { return res ? res.concat([[res[res.length - 1][1], val]]) : [[-Infinity, val]]; }, null); ranges.push([set[set.length - 1], maxKey]); return this.inAnyRange(ranges, { includeLowers: false, includeUppers: false }); }, /** Filter out values withing given set of ranges. * Example, give children and elders a rebate of 50%: * * db.friends.where('age').inAnyRange([[0,18],[65,Infinity]]).modify({Rebate: 1/2}); * * @param {(string|number|Date|Array)[][]} ranges * @param {{includeLowers: boolean, includeUppers: boolean}} options */ inAnyRange: function (ranges, options) { var ctx = this._ctx; if (ranges.length === 0) return emptyCollection(this); if (!ranges.every(function (range) { return range[0] !== undefined && range[1] !== undefined && ascending(range[0], range[1]) <= 0; })) { return fail(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", exceptions.InvalidArgument); } var includeLowers = !options || options.includeLowers !== false; // Default to true var includeUppers = options && options.includeUppers === true; // Default to false function addRange(ranges, newRange) { for (var i = 0, l = ranges.length; i < l; ++i) { var range = ranges[i]; if (cmp(newRange[0], range[1]) < 0 && cmp(newRange[1], range[0]) > 0) { range[0] = min(range[0], newRange[0]); range[1] = max(range[1], newRange[1]); break; } } if (i === l) ranges.push(newRange); return ranges; } var sortDirection = ascending; function rangeSorter(a, b) { return sortDirection(a[0], b[0]); } // Join overlapping ranges var set; try { set = ranges.reduce(addRange, []); set.sort(rangeSorter); } catch (ex) { return fail(this, INVALID_KEY_ARGUMENT); } var i = 0; var keyIsBeyondCurrentEntry = includeUppers ? function (key) { return ascending(key, set[i][1]) > 0; } : function (key) { return ascending(key, set[i][1]) >= 0; }; var keyIsBeforeCurrentEntry = includeLowers ? function (key) { return descending(key, set[i][0]) > 0; } : function (key) { return descending(key, set[i][0]) >= 0; }; function keyWithinCurrentRange(key) { return !keyIsBeyondCurrentEntry(key) && !keyIsBeforeCurrentEntry(key); } var checkKey = keyIsBeyondCurrentEntry; var c = new ctx.collClass(this, function () { return IDBKeyRange.bound(set[0][0], set[set.length - 1][1], !includeLowers, !includeUppers); }); c._ondirectionchange = function (direction) { if (direction === "next") { checkKey = keyIsBeyondCurrentEntry; sortDirection = ascending; } else { checkKey = keyIsBeforeCurrentEntry; sortDirection = descending; } set.sort(rangeSorter); }; c._addAlgorithm(function (cursor, advance, resolve) { var key = cursor.key; while (checkKey(key)) { // The cursor has passed beyond this key. Check next. ++i; if (i === set.length) { // There is no next. Stop searching. advance(resolve); return false; } } if (keyWithinCurrentRange(key)) { // The current cursor value should be included and we should continue a single step in case next item has the same key or possibly our next key in set. return true; } else if (cmp(key, set[i][1]) === 0 || cmp(key, set[i][0]) === 0) { // includeUpper or includeLower is false so keyWithinCurrentRange() returns false even though we are at range border. // Continue to next key but don't include this one. return false; } else { // cursor.key not yet at set[i]. Forward cursor to the next key to hunt for. advance(function () { if (sortDirection === ascending) cursor.continue(set[i][0]);else cursor.continue(set[i][1]); }); return false; } }); return c; }, startsWithAnyOf: function () { var set = getArrayOf.apply(NO_CHAR_ARRAY, arguments); if (!set.every(function (s) { return typeof s === 'string'; })) { return fail(this, "startsWithAnyOf() only works with strings"); } if (set.length === 0) return emptyCollection(this); return this.inAnyRange(set.map(function (str) { return [str, str + maxString]; })); } }; }); // // // // Collection Class // // // function Collection(whereClause, keyRangeGenerator) { /// <summary> /// /// </summary> /// <param name="whereClause" type="WhereClause">Where clause instance</param> /// <param name="keyRangeGenerator" value="function(){ return IDBKeyRange.bound(0,1);}" optional="true"></param> var keyRange = null, error = null; if (keyRangeGenerator) try { keyRange = keyRangeGenerator(); } catch (ex) { error = ex; } var whereCtx = whereClause._ctx, table = whereCtx.table; this._ctx = { table: table, index: whereCtx.index, isPrimKey: !whereCtx.index || table.schema.primKey.keyPath && whereCtx.index === table.schema.primKey.name, range: keyRange, keysOnly: false, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: true, // True if a replayFilter is just a filter that performs a "limit" operation (or none at all) isMatch: null, offset: 0, limit: Infinity, error: error, // If set, any promise must be rejected with this error or: whereCtx.or, valueMapper: table.hook.reading.fire }; } function isPlainKeyRange(ctx, ignoreLimitFilter) { return !(ctx.filter || ctx.algorithm || ctx.or) && (ignoreLimitFilter ? ctx.justLimit : !ctx.replayFilter); } props(Collection.prototype, function () { // // Collection Private Functions // function addFilter(ctx, fn) { ctx.filter = combine(ctx.filter, fn); } function addReplayFilter(ctx, factory, isLimitFilter) { var curr = ctx.replayFilter; ctx.replayFilter = curr ? function () { return combine(curr(), factory()); } : factory; ctx.justLimit = isLimitFilter && !curr; } function addMatchFilter(ctx, fn) { ctx.isMatch = combine(ctx.isMatch, fn); } /** @param ctx { * isPrimKey: boolean, * table: Table, * index: string * } * @param store IDBObjectStore **/ function getIndexOrStore(ctx, store) { if (ctx.isPrimKey) return store; var indexSpec = ctx.table.schema.idxByName[ctx.index]; if (!indexSpec) throw new exceptions.Schema("KeyPath " + ctx.index + " on object store " + store.name + " is not indexed"); return store.index(indexSpec.name); } /** @param ctx { * isPrimKey: boolean, * table: Table, * index: string, * keysOnly: boolean, * range?: IDBKeyRange, * dir: "next" | "prev" * } */ function openCursor(ctx, store) { var idxOrStore = getIndexOrStore(ctx, store); return ctx.keysOnly && 'openKeyCursor' in idxOrStore ? idxOrStore.openKeyCursor(ctx.range || null, ctx.dir + ctx.unique) : idxOrStore.openCursor(ctx.range || null, ctx.dir + ctx.unique); } function iter(ctx, fn, resolve, reject, idbstore) { var filter = ctx.replayFilter ? combine(ctx.filter, ctx.replayFilter()) : ctx.filter; if (!ctx.or) { iterate(openCursor(ctx, idbstore), combine(ctx.algorithm, filter), fn, resolve, reject, !ctx.keysOnly && ctx.valueMapper); } else (function () { var set = {}; var resolved = 0; function resolveboth() { if (++resolved === 2) resolve(); // Seems like we just support or btwn max 2 expressions, but there are no limit because we do recursion. } function union(item, cursor, advance) { if (!filter || filter(cursor, advance, resolveboth, reject)) { var key = cursor.primaryKey.toString(); // Converts any Date to String, String to String, Number to String and Array to comma-separated string if (!hasOwn(set, key)) { set[key] = true; fn(item, cursor, advance); } } } ctx.or._iterate(union, resolveboth, reject, idbstore); iterate(openCursor(ctx, idbstore), ctx.algorithm, union, resolveboth, reject, !ctx.keysOnly && ctx.valueMapper); })(); } function getInstanceTemplate(ctx) { return ctx.table.schema.instanceTemplate; } return { // // Collection Protected Functions // _read: function (fn, cb) { var ctx = this._ctx; if (ctx.error) return ctx.table._trans(null, function rejector(resolve, reject) { reject(ctx.error); });else return ctx.table._idbstore(READONLY, fn).then(cb); }, _write: function (fn) { var ctx = this._ctx; if (ctx.error) return ctx.table._trans(null, function rejector(resolve, reject) { reject(ctx.error); });else return ctx.table._idbstore(READWRITE, fn, "locked"); // When doing write operations on collections, always lock the operation so that upcoming operations gets queued. }, _addAlgorithm: function (fn) { var ctx = this._ctx; ctx.algorithm = combine(ctx.algorithm, fn); }, _iterate: function (fn, resolve, reject, idbstore) { return iter(this._ctx, fn, resolve, reject, idbstore); }, clone: function (props$$1) { var rv = Object.create(this.constructor.prototype), ctx = Object.create(this._ctx); if (props$$1) extend(ctx, props$$1); rv._ctx = ctx; return rv; }, raw: function () { this._ctx.valueMapper = null; return this; }, // // Collection Public methods // each: function (fn) { var ctx = this._ctx; if (fake) { var item = getInstanceTemplate(ctx), primKeyPath = ctx.table.schema.primKey.keyPath, key = getByKeyPath(item, ctx.index ? ctx.table.schema.idxByName[ctx.index].keyPath : primKeyPath), primaryKey = getByKeyPath(item, primKeyPath); fn(item, { key: key, primaryKey: primaryKey }); } return this._read(function (resolve, reject, idbstore) { iter(ctx, fn, resolve, reject, idbstore); }); }, count: function (cb) { if (fake) return Promise.resolve(0).then(cb); var ctx = this._ctx; if (isPlainKeyRange(ctx, true)) { // This is a plain key range. We can use the count() method if the index. return this._read(function (resolve, reject, idbstore) { var idx = getIndexOrStore(ctx, idbstore); var req = ctx.range ? idx.count(ctx.range) : idx.count(); req.onerror = eventRejectHandler(reject); req.onsuccess = function (e) { resolve(Math.min(e.target.result, ctx.limit)); }; }, cb); } else { // Algorithms, filters or expressions are applied. Need to count manually. var count = 0; return this._read(function (resolve, reject, idbstore) { iter(ctx, function () { ++count;return false; }, function () { resolve(count); }, reject, idbstore); }, cb); } }, sortBy: function (keyPath, cb) { /// <param name="keyPath" type="String"></param> var parts = keyPath.split('.').reverse(), lastPart = parts[0], lastIndex = parts.length - 1; function getval(obj, i) { if (i) return getval(obj[parts[i]], i - 1); return obj[lastPart]; } var order = this._ctx.dir === "next" ? 1 : -1; function sorter(a, b) { var aVal = getval(a, lastIndex), bVal = getval(b, lastIndex); return aVal < bVal ? -order : aVal > bVal ? order : 0; } return this.toArray(function (a) { return a.sort(sorter); }).then(cb); }, toArray: function (cb) { var ctx = this._ctx; return this._read(function (resolve, reject, idbstore) { fake && resolve([getInstanceTemplate(ctx)]); if (hasGetAll && ctx.dir === 'next' && isPlainKeyRange(ctx, true) && ctx.limit > 0) { // Special optimation if we could use IDBObjectStore.getAll() or // IDBKeyRange.getAll(): var readingHook = ctx.table.hook.reading.fire; var idxOrStore = getIndexOrStore(ctx, idbstore); var req = ctx.limit < Infinity ? idxOrStore.getAll(ctx.range, ctx.limit) : idxOrStore.getAll(ctx.range); req.onerror = eventRejectHandler(reject); req.onsuccess = readingHook === mirror ? eventSuccessHandler(resolve) : wrap(eventSuccessHandler(function (res) { resolve(res.map(readingHook)); })); } else { // Getting array through a cursor. var a = []; iter(ctx, function (item) { a.push(item); }, function arrayComplete() { resolve(a); }, reject, idbstore); } }, cb); }, offset: function (offset) { var ctx = this._ctx; if (offset <= 0) return this; ctx.offset += offset; // For count() if (isPlainKeyRange(ctx)) { addReplayFilter(ctx, function () { var offsetLeft = offset; return function (cursor, advance) { if (offsetLeft === 0) return true; if (offsetLeft === 1) { --offsetLeft;return false; } advance(function () { cursor.advance(offsetLeft); offsetLeft = 0; }); return false; }; }); } else { addReplayFilter(ctx, function () { var offsetLeft = offset; return function () { return --offsetLeft < 0; }; }); } return this; }, limit: function (numRows) { this._ctx.limit = Math.min(this._ctx.limit, numRows); // For count() addReplayFilter(this._ctx, function () { var rowsLeft = numRows; return function (cursor, advance, resolve) { if (--rowsLeft <= 0) advance(resolve); // Stop after this item has been included return rowsLeft >= 0; // If numRows is already below 0, return false because then 0 was passed to numRows initially. Otherwise we wouldnt come here. }; }, true); return this; }, until: function (filterFunction, bIncludeStopEntry) { var ctx = this._ctx; fake && filterFunction(getInstanceTemplate(ctx)); addFilter(this._ctx, function (cursor, advance, resolve) { if (filterFunction(cursor.value)) { advance(resolve); return bIncludeStopEntry; } else { return true; } }); return this; }, first: function (cb) { return this.limit(1).toArray(function (a) { return a[0]; }).then(cb); }, last: function (cb) { return this.reverse().first(cb); }, filter: function (filterFunction) { /// <param name="jsFunctionFilter" type="Function">function(val){return true/false}</param> fake && filterFunction(getInstanceTemplate(this._ctx)); addFilter(this._ctx, function (cursor) { return filterFunction(cursor.value); }); // match filters not used in Dexie.js but can be used by 3rd part libraries to test a // collection for a match without querying DB. Used by Dexie.Observable. addMatchFilter(this._ctx, filterFunction); return this; }, and: function (filterFunction) { return this.filter(filterFunction); }, or: function (indexName) { return new WhereClause(this._ctx.table, indexName, this); }, reverse: function () { this._ctx.dir = this._ctx.dir === "prev" ? "next" : "prev"; if (this._ondirectionchange) this._ondirectionchange(this._ctx.dir); return this; }, desc: function () { return this.reverse(); }, eachKey: function (cb) { var ctx = this._ctx; ctx.keysOnly = !ctx.isMatch; return this.each(function (val, cursor) { cb(cursor.key, cursor); }); }, eachUniqueKey: function (cb) { this._ctx.unique = "unique"; return this.eachKey(cb); }, eachPrimaryKey: function (cb) { var ctx = this._ctx; ctx.keysOnly = !ctx.isMatch; return this.each(function (val, cursor) { cb(cursor.primaryKey, cursor); }); }, keys: function (cb) { var ctx = this._ctx; ctx.keysOnly = !ctx.isMatch; var a = []; return this.each(function (item, cursor) { a.push(cursor.key); }).then(function () { return a; }).then(cb); }, primaryKeys: function (cb) { var ctx = this._ctx; if (hasGetAll && ctx.dir === 'next' && isPlainKeyRange(ctx, true) && ctx.limit > 0) { // Special optimation if we could use IDBObjectStore.getAllKeys() or // IDBKeyRange.getAllKeys(): return this._read(function (resolve, reject, idbstore) { var idxOrStore = getIndexOrStore(ctx, idbstore); var req = ctx.limit < Infinity ? idxOrStore.getAllKeys(ctx.range, ctx.limit) : idxOrStore.getAllKeys(ctx.range); req.onerror = eventRejectHandler(reject); req.onsuccess = eventSuccessHandler(resolve); }).then(cb); } ctx.keysOnly = !ctx.isMatch; var a = []; return this.each(function (item, cursor) { a.push(cursor.primaryKey); }).then(function () { return a; }).then(cb); }, uniqueKeys: function (cb) { this._ctx.unique = "unique"; return this.keys(cb); }, firstKey: function (cb) { return this.limit(1).keys(function (a) { return a[0]; }).then(cb); }, lastKey: function (cb) { return this.reverse().firstKey(cb); }, distinct: function () { var ctx = this._ctx, idx = ctx.index && ctx.table.schema.idxByName[ctx.index]; if (!idx || !idx.multi) return this; // distinct() only makes differencies on multiEntry indexes. var set = {}; addFilter(this._ctx, function (cursor) { var strKey = cursor.primaryKey.toString(); // Converts any Date to String, String to String, Number to String and Array to comma-separated string var found = hasOwn(set, strKey); set[strKey] = true; return !found; }); return this; } }; }); // // // WriteableCollection Class // // function WriteableCollection() { Collection.apply(this, arguments); } derive(WriteableCollection).from(Collection).extend({ // // WriteableCollection Public Methods // modify: function (changes) { var self = this, ctx = this._ctx, hook = ctx.table.hook, updatingHook = hook.updating.fire, deletingHook = hook.deleting.fire; fake && typeof changes === 'function' && changes.call({ value: ctx.table.schema.instanceTemplate }, ctx.table.schema.instanceTemplate); return this._write(function (resolve, reject, idbstore, trans) { var modifyer; if (typeof changes === 'function') { // Changes is a function that may update, add or delete propterties or even require a deletion the object itself (delete this.item) if (updatingHook === nop && deletingHook === nop) { // Noone cares about what is being changed. Just let the modifier function be the given argument as is. modifyer = changes; } else { // People want to know exactly what is being modified or deleted. // Let modifyer be a proxy function that finds out what changes the caller is actually doing // and call the hooks accordingly! modifyer = function (item) { var origItem = deepClone(item); // Clone the item first so we can compare laters. if (changes.call(this, item, this) === false) return false; // Call the real modifyer function (If it returns false explicitely, it means it dont want to modify anyting on this object) if (!hasOwn(this, "value")) { // The real modifyer function requests a deletion of the object. Inform the deletingHook that a deletion is taking place. deletingHook.call(this, this.primKey, item, trans); } else { // No deletion. Check what was changed var objectDiff = getObjectDiff(origItem, this.value); var additionalChanges = updatingHook.call(this, objectDiff, this.primKey, origItem, trans); if (additionalChanges) { // Hook want to apply additional modifications. Make sure to fullfill the will of the hook. item = this.value; keys(additionalChanges).forEach(function (keyPath) { setByKeyPath(item, keyPath, additionalChanges[keyPath]); // Adding {keyPath: undefined} means that the keyPath should be deleted. Handled by setByKeyPath }); } } }; } } else if (updatingHook === nop) { // changes is a set of {keyPath: value} and no one is listening to the updating hook. var keyPaths = keys(changes); var numKeys = keyPaths.length; modifyer = function (item) { var anythingModified = false; for (var i = 0; i < numKeys; ++i) { var keyPath = keyPaths[i], val = changes[keyPath]; if (getByKeyPath(item, keyPath) !== val) { setByKeyPath(item, keyPath, val); // Adding {keyPath: undefined} means that the keyPath should be deleted. Handled by setByKeyPath anythingModified = true; } } return anythingModified; }; } else { // changes is a set of {keyPath: value} and people are listening to the updating hook so we need to call it and // allow it to add additional modifications to make. var origChanges = changes; changes = shallowClone(origChanges); // Let's work with a clone of the changes keyPath/value set so that we can restore it in case a hook extends it. modifyer = function (item) { var anythingModified = false; var additionalChanges = updatingHook.call(this, changes, this.primKey, deepClone(item), trans); if (additionalChanges) extend(changes, additionalChanges); keys(changes).forEach(function (keyPath) { var val = changes[keyPath]; if (getByKeyPath(item, keyPath) !== val) { setByKeyPath(item, keyPath, val); anythingModified = true; } }); if (additionalChanges) changes = shallowClone(origChanges); // Restore original changes for next iteration return anythingModified; }; } var count = 0; var successCount = 0; var iterationComplete = false; var failures = []; var failKeys = []; var currentKey = null; function modifyItem(item, cursor) { currentKey = cursor.primaryKey; var thisContext = { primKey: cursor.primaryKey, value: item, onsuccess: null, onerror: null }; function onerror(e) { failures.push(e); failKeys.push(thisContext.primKey); checkFinished(); return true; // Catch these errors and let a final rejection decide whether or not to abort entire transaction } if (modifyer.call(thisContext, item, thisContext) !== false) { // If a callback explicitely returns false, do not perform the update! var bDelete = !hasOwn(thisContext, "value"); ++count; tryCatch(function () { var req = bDelete ? cursor.delete() : cursor.update(thisContext.value); req._hookCtx = thisContext; req.onerror = hookedEventRejectHandler(onerror); req.onsuccess = hookedEventSuccessHandler(function () { ++successCount; checkFinished(); }); }, onerror); } else if (thisContext.onsuccess) { // Hook will expect either onerror or onsuccess to always be called! thisContext.onsuccess(thisContext.value); } } function doReject(e) { if (e) { failures.push(e); failKeys.push(currentKey); } return reject(new ModifyError("Error modifying one or more objects", failures, successCount, failKeys)); } function checkFinished() { if (iterationComplete && successCount + failures.length === count) { if (failures.length > 0) doReject();else resolve(successCount); } } self.clone().raw()._iterate(modifyItem, function () { iterationComplete = true; checkFinished(); }, doReject, idbstore); }); }, 'delete': function () { var _this4 = this; var ctx = this._ctx, range = ctx.range, deletingHook = ctx.table.hook.deleting.fire, hasDeleteHook = deletingHook !== nop; if (!hasDeleteHook && isPlainKeyRange(ctx) && (ctx.isPrimKey && !hangsOnDeleteLargeKeyRange || !range)) // if no range, we'll use clear(). { // May use IDBObjectStore.delete(IDBKeyRange) in this case (Issue #208) // For chromium, this is the way most optimized version. // For IE/Edge, this could hang the indexedDB engine and make operating system instable // (https://gist.github.com/dfahlander/5a39328f029de18222cf2125d56c38f7) return this._write(function (resolve, reject, idbstore) { // Our API contract is to return a count of deleted items, so we have to count() before delete(). var onerror = eventRejectHandler(reject), countReq = range ? idbstore.count(range) : idbstore.count(); countReq.onerror = onerror; countReq.onsuccess = function () { var count = countReq.result; tryCatch(function () { var delReq = range ? idbstore.delete(range) : idbstore.clear(); delReq.onerror = onerror; delReq.onsuccess = function () { return resolve(count); }; }, function (err) { return reject(err); }); }; }); } // Default version to use when collection is not a vanilla IDBKeyRange on the primary key. // Divide into chunks to not starve RAM. // If has delete hook, we will have to collect not just keys but also objects, so it will use // more memory and need lower chunk size. var CHUNKSIZE = hasDeleteHook ? 2000 : 10000; return this._write(function (resolve, reject, idbstore, trans) { var totalCount = 0; // Clone collection and change its table and set a limit of CHUNKSIZE on the cloned Collection instance. var collection = _this4.clone({ keysOnly: !ctx.isMatch && !hasDeleteHook }) // load just keys (unless filter() or and() or deleteHook has subscribers) .distinct() // In case multiEntry is used, never delete same key twice because resulting count // would become larger than actual delete count. .limit(CHUNKSIZE).raw(); // Don't filter through reading-hooks (like mapped classes etc) var keysOrTuples = []; // We're gonna do things on as many chunks that are needed. // Use recursion of nextChunk function: var nextChunk = function () { return collection.each(hasDeleteHook ? function (val, cursor) { // Somebody subscribes to hook('deleting'). Collect all primary keys and their values, // so that the hook can be called with its values in bulkDelete(). keysOrTuples.push([cursor.primaryKey, cursor.value]); } : function (val, cursor) { // No one subscribes to hook('deleting'). Collect only primary keys: keysOrTuples.push(cursor.primaryKey); }).then(function () { // Chromium deletes faster when doing it in sort order. hasDeleteHook ? keysOrTuples.sort(function (a, b) { return ascending(a[0], b[0]); }) : keysOrTuples.sort(ascending); return bulkDelete(idbstore, trans, keysOrTuples, hasDeleteHook, deletingHook); }).then(function () { var count = keysOrTuples.length; totalCount += count; keysOrTuples = []; return count < CHUNKSIZE ? totalCount : nextChunk(); }); }; resolve(nextChunk()); }); } }); // // // // ------------------------- Help functions --------------------------- // // // function lowerVersionFirst(a, b) { return a._cfg.version - b._cfg.version; } function setApiOnPlace(objs, tableNames, mode, dbschema) { tableNames.forEach(function (tableName) { var tableInstance = db._tableFactory(mode, dbschema[tableName]); objs.forEach(function (obj) { tableName in obj || (obj[tableName] = tableInstance); }); }); } function removeTablesApi(objs) { objs.forEach(function (obj) { for (var key in obj) { if (obj[key] instanceof Table) delete obj[key]; } }); } function iterate(req, filter, fn, resolve, reject, valueMapper) { // Apply valueMapper (hook('reading') or mappped class) var mappedFn = valueMapper ? function (x, c, a) { return fn(valueMapper(x), c, a); } : fn; // Wrap fn with PSD and microtick stuff from Promise. var wrappedFn = wrap(mappedFn, reject); if (!req.onerror) req.onerror = eventRejectHandler(reject); if (filter) { req.onsuccess = trycatcher(function filter_record() { var cursor = req.result; if (cursor) { var c = function () { cursor.continue(); }; if (filter(cursor, function (advancer) { c = advancer; }, resolve, reject)) wrappedFn(cursor.value, cursor, function (advancer) { c = advancer; }); c(); } else { resolve(); } }, reject); } else { req.onsuccess = trycatcher(function filter_record() { var cursor = req.result; if (cursor) { var c = function () { cursor.continue(); }; wrappedFn(cursor.value, cursor, function (advancer) { c = advancer; }); c(); } else { resolve(); } }, reject); } } function parseIndexSyntax(indexes) { /// <param name="indexes" type="String"></param> /// <returns type="Array" elementType="IndexSpec"></returns> var rv = []; indexes.split(',').forEach(function (index) { index = index.trim(); var name = index.replace(/([&*]|\+\+)/g, ""); // Remove "&", "++" and "*" // Let keyPath of "[a+b]" be ["a","b"]: var keyPath = /^\[/.test(name) ? name.match(/^\[(.*)\]$/)[1].split('+') : name; rv.push(new IndexSpec(name, keyPath || null, /\&/.test(index), /\*/.test(index), /\+\+/.test(index), isArray(keyPath), /\./.test(index))); }); return rv; } function cmp(key1, key2) { return indexedDB.cmp(key1, key2); } function min(a, b) { return cmp(a, b) < 0 ? a : b; } function max(a, b) { return cmp(a, b) > 0 ? a : b; } function ascending(a, b) { return indexedDB.cmp(a, b); } function descending(a, b) { return indexedDB.cmp(b, a); } function simpleCompare(a, b) { return a < b ? -1 : a === b ? 0 : 1; } function simpleCompareReverse(a, b) { return a > b ? -1 : a === b ? 0 : 1; } function combine(filter1, filter2) { return filter1 ? filter2 ? function () { return filter1.apply(this, arguments) && filter2.apply(this, arguments); } : filter1 : filter2; } function readGlobalSchema() { db.verno = idbdb.version / 10; db._dbSchema = globalSchema = {}; dbStoreNames = slice(idbdb.objectStoreNames, 0); if (dbStoreNames.length === 0) return; // Database contains no stores. var trans = idbdb.transaction(safariMultiStoreFix(dbStoreNames), 'readonly'); dbStoreNames.forEach(function (storeName) { var store = trans.objectStore(storeName), keyPath = store.keyPath, dotted = keyPath && typeof keyPath === 'string' && keyPath.indexOf('.') !== -1; var primKey = new IndexSpec(keyPath, keyPath || "", false, false, !!store.autoIncrement, keyPath && typeof keyPath !== 'string', dotted); var indexes = []; for (var j = 0; j < store.indexNames.length; ++j) { var idbindex = store.index(store.indexNames[j]); keyPath = idbindex.keyPath; dotted = keyPath && typeof keyPath === 'string' && keyPath.indexOf('.') !== -1; var index = new IndexSpec(idbindex.name, keyPath, !!idbindex.unique, !!idbindex.multiEntry, false, keyPath && typeof keyPath !== 'string', dotted); indexes.push(index); } globalSchema[storeName] = new TableSchema(storeName, primKey, indexes, {}); }); setApiOnPlace([allTables, Transaction.prototype], keys(globalSchema), READWRITE, globalSchema); } function adjustToExistingIndexNames(schema, idbtrans) { /// <summary> /// Issue #30 Problem with existing db - adjust to existing index names when migrating from non-dexie db /// </summary> /// <param name="schema" type="Object">Map between name and TableSchema</param> /// <param name="idbtrans" type="IDBTransaction"></param> var storeNames = idbtrans.db.objectStoreNames; for (var i = 0; i < storeNames.length; ++i) { var storeName = storeNames[i]; var store = idbtrans.objectStore(storeName); hasGetAll = 'getAll' in store; for (var j = 0; j < store.indexNames.length; ++j) { var indexName = store.indexNames[j]; var keyPath = store.index(indexName).keyPath; var dexieName = typeof keyPath === 'string' ? keyPath : "[" + slice(keyPath).join('+') + "]"; if (schema[storeName]) { var indexSpec = schema[storeName].idxByName[dexieName]; if (indexSpec) indexSpec.name = indexName; } } } } function fireOnBlocked(ev) { db.on("blocked").fire(ev); // Workaround (not fully*) for missing "versionchange" event in IE,Edge and Safari: connections.filter(function (c) { return c.name === db.name && c !== db && !c._vcFired; }).map(function (c) { return c.on("versionchange").fire(ev); }); } extend(this, { Collection: Collection, Table: Table, Transaction: Transaction, Version: Version, WhereClause: WhereClause, WriteableCollection: WriteableCollection, WriteableTable: WriteableTable }); init(); addons.forEach(function (fn) { fn(db); }); } var fakeAutoComplete = function () {}; // Will never be changed. We just fake for the IDE that we change it (see doFakeAutoComplete()) var fake = false; // Will never be changed. We just fake for the IDE that we change it (see doFakeAutoComplete()) function parseType(type) { if (typeof type === 'function') { return new type(); } else if (isArray(type)) { return [parseType(type[0])]; } else if (type && typeof type === 'object') { var rv = {}; applyStructure(rv, type); return rv; } else { return type; } } function applyStructure(obj, structure) { keys(structure).forEach(function (member) { var value = parseType(structure[member]); obj[member] = value; }); return obj; } function eventSuccessHandler(done) { return function (ev) { done(ev.target.result); }; } function hookedEventSuccessHandler(resolve) { // wrap() is needed when calling hooks because the rare scenario of: // * hook does a db operation that fails immediately (IDB throws exception) // For calling db operations on correct transaction, wrap makes sure to set PSD correctly. // wrap() will also execute in a virtual tick. // * If not wrapped in a virtual tick, direct exception will launch a new physical tick. // * If this was the last event in the bulk, the promise will resolve after a physical tick // and the transaction will have committed already. // If no hook, the virtual tick will be executed in the reject()/resolve of the final promise, // because it is always marked with _lib = true when created using Transaction._promise(). return wrap(function (event) { var req = event.target, result = req.result, ctx = req._hookCtx, // Contains the hook error handler. Put here instead of closure to boost performance. hookSuccessHandler = ctx && ctx.onsuccess; hookSuccessHandler && hookSuccessHandler(result); resolve && resolve(result); }, resolve); } function eventRejectHandler(reject) { return function (event) { preventDefault(event); reject(event.target.error); return false; }; } function hookedEventRejectHandler(reject) { return wrap(function (event) { // See comment on hookedEventSuccessHandler() why wrap() is needed only when supporting hooks. var req = event.target, err = req.error, ctx = req._hookCtx, // Contains the hook error handler. Put here instead of closure to boost performance. hookErrorHandler = ctx && ctx.onerror; hookErrorHandler && hookErrorHandler(err); preventDefault(event); reject(err); return false; }); } function preventDefault(event) { if (event.stopPropagation) // IndexedDBShim doesnt support this on Safari 8 and below. event.stopPropagation(); if (event.preventDefault) // IndexedDBShim doesnt support this on Safari 8 and below. event.preventDefault(); } function globalDatabaseList(cb) { var val, localStorage = Dexie.dependencies.localStorage; if (!localStorage) return cb([]); // Envs without localStorage support try { val = JSON.parse(localStorage.getItem('Dexie.DatabaseNames') || "[]"); } catch (e) { val = []; } if (cb(val)) { localStorage.setItem('Dexie.DatabaseNames', JSON.stringify(val)); } } function awaitIterator(iterator) { var callNext = function (result) { return iterator.next(result); }, doThrow = function (error) { return iterator.throw(error); }, onSuccess = step(callNext), onError = step(doThrow); function step(getNext) { return function (val) { var next = getNext(val), value = next.value; return next.done ? value : !value || typeof value.then !== 'function' ? isArray(value) ? Promise.all(value).then(onSuccess, onError) : onSuccess(value) : value.then(onSuccess, onError); }; } return step(callNext)(); } // // IndexSpec struct // function IndexSpec(name, keyPath, unique, multi, auto, compound, dotted) { /// <param name="name" type="String"></param> /// <param name="keyPath" type="String"></param> /// <param name="unique" type="Boolean"></param> /// <param name="multi" type="Boolean"></param> /// <param name="auto" type="Boolean"></param> /// <param name="compound" type="Boolean"></param> /// <param name="dotted" type="Boolean"></param> this.name = name; this.keyPath = keyPath; this.unique = unique; this.multi = multi; this.auto = auto; this.compound = compound; this.dotted = dotted; var keyPathSrc = typeof keyPath === 'string' ? keyPath : keyPath && '[' + [].join.call(keyPath, '+') + ']'; this.src = (unique ? '&' : '') + (multi ? '*' : '') + (auto ? "++" : "") + keyPathSrc; } // // TableSchema struct // function TableSchema(name, primKey, indexes, instanceTemplate) { /// <param name="name" type="String"></param> /// <param name="primKey" type="IndexSpec"></param> /// <param name="indexes" type="Array" elementType="IndexSpec"></param> /// <param name="instanceTemplate" type="Object"></param> this.name = name; this.primKey = primKey || new IndexSpec(); this.indexes = indexes || [new IndexSpec()]; this.instanceTemplate = instanceTemplate; this.mappedClass = null; this.idxByName = arrayToObject(indexes, function (index) { return [index.name, index]; }); } // Used in when defining dependencies later... // (If IndexedDBShim is loaded, prefer it before standard indexedDB) var idbshim = _global.idbModules && _global.idbModules.shimIndexedDB ? _global.idbModules : {}; function safariMultiStoreFix(storeNames) { return storeNames.length === 1 ? storeNames[0] : storeNames; } function getNativeGetDatabaseNamesFn(indexedDB) { var fn = indexedDB && (indexedDB.getDatabaseNames || indexedDB.webkitGetDatabaseNames); return fn && fn.bind(indexedDB); } // Export Error classes props(Dexie, fullNameExceptions); // Dexie.XXXError = class XXXError {...}; // // Static methods and properties // props(Dexie, { // // Static delete() method. // delete: function (databaseName) { var db = new Dexie(databaseName), promise = db.delete(); promise.onblocked = function (fn) { db.on("blocked", fn); return this; }; return promise; }, // // Static exists() method. // exists: function (name) { return new Dexie(name).open().then(function (db) { db.close(); return true; }).catch(Dexie.NoSuchDatabaseError, function () { return false; }); }, // // Static method for retrieving a list of all existing databases at current host. // getDatabaseNames: function (cb) { return new Promise(function (resolve, reject) { var getDatabaseNames = getNativeGetDatabaseNamesFn(indexedDB); if (getDatabaseNames) { // In case getDatabaseNames() becomes standard, let's prepare to support it: var req = getDatabaseNames(); req.onsuccess = function (event) { resolve(slice(event.target.result, 0)); // Converst DOMStringList to Array<String> }; req.onerror = eventRejectHandler(reject); } else { globalDatabaseList(function (val) { resolve(val); return false; }); } }).then(cb); }, defineClass: function (structure) { /// <summary> /// Create a javascript constructor based on given template for which properties to expect in the class. /// Any property that is a constructor function will act as a type. So {name: String} will be equal to {name: new String()}. /// </summary> /// <param name="structure">Helps IDE code completion by knowing the members that objects contain and not just the indexes. Also /// know what type each member has. Example: {name: String, emailAddresses: [String], properties: {shoeSize: Number}}</param> // Default constructor able to copy given properties into this object. function Class(properties) { /// <param name="properties" type="Object" optional="true">Properties to initialize object with. /// </param> properties ? extend(this, properties) : fake && applyStructure(this, structure); } return Class; }, applyStructure: applyStructure, ignoreTransaction: function (scopeFunc) { // In case caller is within a transaction but needs to create a separate transaction. // Example of usage: // // Let's say we have a logger function in our app. Other application-logic should be unaware of the // logger function and not need to include the 'logentries' table in all transaction it performs. // The logging should always be done in a separate transaction and not be dependant on the current // running transaction context. Then you could use Dexie.ignoreTransaction() to run code that starts a new transaction. // // Dexie.ignoreTransaction(function() { // db.logentries.add(newLogEntry); // }); // // Unless using Dexie.ignoreTransaction(), the above example would try to reuse the current transaction // in current Promise-scope. // // An alternative to Dexie.ignoreTransaction() would be setImmediate() or setTimeout(). The reason we still provide an // API for this because // 1) The intention of writing the statement could be unclear if using setImmediate() or setTimeout(). // 2) setTimeout() would wait unnescessary until firing. This is however not the case with setImmediate(). // 3) setImmediate() is not supported in the ES standard. // 4) You might want to keep other PSD state that was set in a parent PSD, such as PSD.letThrough. return PSD.trans ? usePSD(PSD.transless, scopeFunc) : // Use the closest parent that was non-transactional. scopeFunc(); // No need to change scope because there is no ongoing transaction. }, vip: function (fn) { // To be used by subscribers to the on('ready') event. // This will let caller through to access DB even when it is blocked while the db.ready() subscribers are firing. // This would have worked automatically if we were certain that the Provider was using Dexie.Promise for all asyncronic operations. The promise PSD // from the provider.connect() call would then be derived all the way to when provider would call localDatabase.applyChanges(). But since // the provider more likely is using non-promise async APIs or other thenable implementations, we cannot assume that. // Note that this method is only useful for on('ready') subscribers that is returning a Promise from the event. If not using vip() // the database could deadlock since it wont open until the returned Promise is resolved, and any non-VIPed operation started by // the caller will not resolve until database is opened. return newScope(function () { PSD.letThrough = true; // Make sure we are let through if still blocking db due to onready is firing. return fn(); }); }, async: function (generatorFn) { return function () { try { var rv = awaitIterator(generatorFn.apply(this, arguments)); if (!rv || typeof rv.then !== 'function') return Promise.resolve(rv); return rv; } catch (e) { return rejection(e); } }; }, spawn: function (generatorFn, args, thiz) { try { var rv = awaitIterator(generatorFn.apply(thiz, args || [])); if (!rv || typeof rv.then !== 'function') return Promise.resolve(rv); return rv; } catch (e) { return rejection(e); } }, // Dexie.currentTransaction property currentTransaction: { get: function () { return PSD.trans || null; } }, // Export our Promise implementation since it can be handy as a standalone Promise implementation Promise: Promise, // Dexie.debug proptery: // Dexie.debug = false // Dexie.debug = true // Dexie.debug = "dexie" - don't hide dexie's stack frames. debug: { get: function () { return debug; }, set: function (value) { setDebug(value, value === 'dexie' ? function () { return true; } : dexieStackFrameFilter); } }, // Export our derive/extend/override methodology derive: derive, extend: extend, props: props, override: override, // Export our Events() function - can be handy as a toolkit Events: Events, events: { get: deprecated(function () { return Events; }) }, // Backward compatible lowercase version. // Utilities getByKeyPath: getByKeyPath, setByKeyPath: setByKeyPath, delByKeyPath: delByKeyPath, shallowClone: shallowClone, deepClone: deepClone, getObjectDiff: getObjectDiff, asap: asap, maxKey: maxKey, // Addon registry addons: [], // Global DB connection list connections: connections, MultiModifyError: exceptions.Modify, // Backward compatibility 0.9.8. Deprecate. errnames: errnames, // Export other static classes IndexSpec: IndexSpec, TableSchema: TableSchema, // // Dependencies // // These will automatically work in browsers with indexedDB support, or where an indexedDB polyfill has been included. // // In node.js, however, these properties must be set "manually" before instansiating a new Dexie(). // For node.js, you need to require indexeddb-js or similar and then set these deps. // dependencies: { // Required: indexedDB: idbshim.shimIndexedDB || _global.indexedDB || _global.mozIndexedDB || _global.webkitIndexedDB || _global.msIndexedDB, IDBKeyRange: idbshim.IDBKeyRange || _global.IDBKeyRange || _global.webkitIDBKeyRange }, // API Version Number: Type Number, make sure to always set a version number that can be comparable correctly. Example: 0.9, 0.91, 0.92, 1.0, 1.01, 1.1, 1.2, 1.21, etc. semVer: DEXIE_VERSION, version: DEXIE_VERSION.split('.').map(function (n) { return parseInt(n); }).reduce(function (p, c, i) { return p + c / Math.pow(10, i * 2); }), fakeAutoComplete: fakeAutoComplete, // https://github.com/dfahlander/Dexie.js/issues/186 // typescript compiler tsc in mode ts-->es5 & commonJS, will expect require() to return // x.default. Workaround: Set Dexie.default = Dexie. default: Dexie }); tryCatch(function () { // Optional dependencies // localStorage Dexie.dependencies.localStorage = (typeof chrome !== "undefined" && chrome !== null ? chrome.storage : void 0) != null ? null : _global.localStorage; }); // Map DOMErrors and DOMExceptions to corresponding Dexie errors. May change in Dexie v2.0. Promise.rejectionMapper = mapError; // Fool IDE to improve autocomplete. Tested with Visual Studio 2013 and 2015. doFakeAutoComplete(function () { Dexie.fakeAutoComplete = fakeAutoComplete = doFakeAutoComplete; Dexie.fake = fake = true; }); return Dexie; }))); //# sourceMappingURL=dexie.js.map
docs/app/Examples/modules/Accordion/Types/index.js
aabustamante/Semantic-UI-React
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' import { Message } from 'semantic-ui-react' const AccordionTypesExamples = () => ( <ExampleSection title='Types'> <ComponentExample title='Accordion' description='A standard Accordion.' examplePath='modules/Accordion/Types/AccordionExampleStandard' /> <ComponentExample description={<div>An Accordion can be defined using the <code>panels</code> prop.</div>} examplePath='modules/Accordion/Types/AccordionExamplePanelsProp' > <Message info> Panel objects can define an <code>active</code> key to open/close the panel. {' '}They can also define an <code>onClick</code> key to be applied to the <code>Accordion.Title</code>. </Message> </ComponentExample> <ComponentExample title='Styled' description='A styled accordion adds basic formatting.' examplePath='modules/Accordion/Types/AccordionExampleStyled' /> </ExampleSection> ) export default AccordionTypesExamples
src/Gandalf/components/controller.js
mrpotatoes/react-gandalf
/* eslint-disable no-console, react/sort-comp, no-unused-vars */ // @TODO: Add animations: https://github.com/szchenghuang/react-transitions /** * The Gandalf step controller. * * Assumes each step handles it's own state does not make any judgements on that * therefore keeping this Gandalf controller flexible. Uses Redux for it's own * internal state management. */ import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import ReactTransitions from 'react-transitions' // Components. import Error from 'Gandalf/components/error' import Step from 'Gandalf/components/step' import SaveButton from 'Gandalf/components/saveButton' import ExitButton from 'Gandalf/components/cancelButton' // import Buttons from 'Gandalf/components/buttons' // Utils. // @TODO: Compress this (export default in utils.js). import GandalfUtils from 'Gandalf/state/utils' // State. import actions from 'Gandalf/state/actions' import selectors from 'Gandalf/state/selectors' class GandalfController extends React.Component { static propTypes = { initGandalf: PropTypes.func, stepsConfig: PropTypes.object, steps: PropTypes.object, cancelGandalf: PropTypes.func, saveStep: PropTypes.func, currentStepName: PropTypes.string, errorMessage: PropTypes.string, totalSteps: PropTypes.number, } componentWillMount = () => { this.props.initGandalf(GandalfUtils.initalizeConfiguration(this.props.stepsConfig)) } cancelButtonExists = () => ( GandalfUtils.utilsCancelButton(this.currentStepName(), this.props.steps) ) saveButtonExists = () => ( GandalfUtils.utilsSaveButton(this.currentStepName(), this.props.steps) ) // @TODO: Do any of these belong in dispatch? buttons = () => (GandalfUtils.utilsConfigButtons(this)) currentStepName = () => (this.props.currentStepName) hasError = () => (this.props.errorMessage.length > 0) render = () => ( <If condition={this.props.totalSteps > 0}> <div> <Error condition={this.hasError()} message={this.props.errorMessage} /> <Step stepName={this.props.currentStepName} list={this.props.steps} /> {/* @TODO: We want to make this static like below. */} <For each="item" index="idx" of={this.buttons()}> <If condition={item.condition}> <button className="waves-effect waves-light btn" key={idx} type="button" onClick={item.fn}>{item.text}</button> </If> </For> <ExitButton condition={this.cancelButtonExists()} fn={this.props.cancelGandalf} /> <SaveButton condition={this.saveButtonExists()} fn={this.props.saveStep} /> </div> </If> ) } // eslint-disable-next-line const mapStateToProps = (state, ownProps) => ({ totalSteps: selectors.getTotalSteps(state), currentStepName: selectors.getCurrentStepName(state), errorMessage: selectors.getErrorMessage(state), steps: selectors.getSteps(state), stepOrder: selectors.getStepOrder(state), }) // eslint-disable-next-line const mapDispatchToProps = (dispatch) => ({ previousStep: () => (dispatch(actions.previousStep())), cancelGandalf: () => (dispatch(actions.cancelGandalf())), saveStep: () => (dispatch(actions.saveStep())), nextStepFn: (event) => (dispatch(actions.nextStep(event))), initGandalf: (config) => (dispatch(actions.initGandalf(config))), }) export default connect(mapStateToProps, mapDispatchToProps)(GandalfController)
yycomponent/date-picker/DatePicker.js
77ircloud/yycomponent
import React from 'react'; import { DatePicker as _DatePicker, } from 'antd'; import moment from 'moment'; moment.locale('zh-cn');//中文国际化 const getPopupContainer=(target)=>{//弹框挂载点 if(target&&target.closest&&target.closest('.body')){ return target.closest('.body'); } return document.body; }; class DatePicker extends React.Component{ constructor(props){ super(props); } static defaultProps={ getCalendarContainer:getPopupContainer, defaultPickerValue: moment('0:0:0', 'HH:mm:ss')//设置默认时分秒 } render(){ return (<_DatePicker {...this.props}/>); } } export default DatePicker
node_modules/react/lib/ReactMarkupChecksum.js
lutherism/state
/** * 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 ReactMarkupChecksum */ 'use strict'; var adler32 = require("./adler32"); var ReactMarkupChecksum = { CHECKSUM_ATTR_NAME: 'data-react-checksum', /** * @param {string} markup Markup string * @return {string} Markup string with checksum attribute attached */ addChecksumToMarkup: function(markup) { var checksum = adler32(markup); return markup.replace( '>', ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '">' ); }, /** * @param {string} markup to use * @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 ); existingChecksum = existingChecksum && parseInt(existingChecksum, 10); var markupChecksum = adler32(markup); return markupChecksum === existingChecksum; } }; module.exports = ReactMarkupChecksum;
ajax/libs/react-native-web/0.0.0-dfb716c98/exports/TouchableWithoutFeedback/index.min.js
cdnjs/cdnjs
"use strict";function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _defineProperty(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}import*as React from"react";import{useMemo,useRef}from"react";import pick from"../../modules/pick";import setAndForwardRef from"../../modules/setAndForwardRef";import usePressEvents from"../../hooks/usePressEvents";var forwardPropsList={accessibilityLabel:!0,accessibilityLiveRegion:!0,accessibilityRole:!0,accessibilityState:!0,accessibilityValue:!0,accessible:!0,children:!0,disabled:!0,focusable:!0,importantForAccessibility:!0,nativeID:!0,onBlur:!0,onFocus:!0,onLayout:!0,testID:!0},pickProps=function(e){return pick(e,forwardPropsList)};function TouchableWithoutFeedback(e,r){var t=e.accessible,o=e.delayPressIn,s=e.delayPressOut,n=e.delayLongPress,c=e.disabled,i=e.focusable,a=e.onLongPress,l=e.onPress,u=e.onPressIn,b=e.onPressOut,d=e.rejectResponderTermination,f=useRef(null),p=useMemo(function(){return{cancelable:!d,disabled:c,delayLongPress:n,delayPressStart:o,delayPressEnd:s,onLongPress:a,onPress:l,onPressStart:u,onPressEnd:b}},[c,o,s,n,a,l,u,b,d]),y=usePressEvents(f,p),P=React.Children.only(e.children),m=[P.props.children],h=pickProps(e);h.accessible=!1!==t,h.accessibilityState=_objectSpread({disabled:c},e.accessibilityState),h.focusable=!1!==i&&void 0!==l;var O=P.ref;h.ref=useMemo(function(){return setAndForwardRef({getForwardedRef:function(){return r},setLocalRef:function(e){null!=O&&("function"==typeof O?O(e):O.current=e),f.current=e}})},[O,r]);var w=Object.assign(h,y);return React.cloneElement.apply(React,[P,w].concat(m))}var MemoedTouchableWithoutFeedback=React.memo(React.forwardRef(TouchableWithoutFeedback));MemoedTouchableWithoutFeedback.displayName="TouchableWithoutFeedback";export default MemoedTouchableWithoutFeedback;
app/components/CloseButton.js
Byte-Code/lm-digital-store-private-test
import React from 'react'; import PropTypes from 'prop-types'; import BlockIcon from 'material-ui/svg-icons/navigation/close'; const style = (fill, top, right, backgroundColor) => ({ fill, backgroundColor, top, right, width: 80, height: 80, position: 'absolute', cursor: 'pointer' }); const CloseButton = ({ handleClick, top, right, backgroundColor, fill }) => ( <BlockIcon style={style(fill, top, right, backgroundColor)} color="#fff" onTouchTap={e => { if (e) { e.preventDefault(); } handleClick(); }} /> ); CloseButton.propTypes = { handleClick: PropTypes.func.isRequired, top: PropTypes.number, right: PropTypes.number, fill: PropTypes.string, backgroundColor: PropTypes.string }; CloseButton.defaultProps = { top: 0, right: 0, fill: '#858585', backgroundColor: '#333333' }; export default CloseButton;
src/Bounds.js
epotapov/react-fix
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import stylePropType from 'react-style-proptype'; import withOffsets from './OffsetProvider'; class Bounds extends Component { render() { const { children, initRef, subscribe, unsubscribe, className, style, } = this.props; return ( <div ref={(node) => { initRef(node); }} className={className} style={style} > {React.cloneElement(children, { subscribe, unsubscribe, isBounded: true, }) } </div> ); } } Bounds.propTypes = { children: PropTypes.node.isRequired, initRef: PropTypes.func.isRequired, subscribe: PropTypes.func.isRequired, unsubscribe: PropTypes.func.isRequired, className: PropTypes.string, style: stylePropType, }; Bounds.defaultProps = { className: '', style: {} }; export default withOffsets(Bounds);
src/components/Alexandria/components/PlayList.js
dloa/react-alexandria-ux
import React from 'react'; import styles from './css/playlist.module.css' var prettyTime = (t) => { let h = Math.floor(t/3600)%24, m = Math.floor(t/60)%60, s = t%60; return h?h+':':'' + m + ':' + s } var Price = ({price}) => ( <span className={styles.price}>$<span className={styles.price}> {price} </span></span> ) export default class PlayList extends React.Component { static defaultProps = { author:'Imogen Heap', prices: { play: 0.0125, dl: 1 }, tracks: [ { title: 'Tiny Human', runtime: 394 }, { title: 'Another Tiny Human', author: 'another Himogen Heap', runtime: 3339 } ] } render() { console.log (this.props); let {tracks, prices, ...other} = this.props; if (!tracks) return (<p>No Tracks to show</p>) return ( <div className={styles.main}> <table className={styles.table}> <thead> <tr> <th>#</th> <th>Name</th> <th>Artist</th> <th>Time</th> <th>Price/Play</th> <th>Price/Buy</th> </tr> </thead> <tbody className={styles.tracks}> {tracks.map((track, i) => { return ( <tr key={i}> <td>{i + 1}</td> <td>{track.title}</td> <td>{track.author || this.props.author}</td> <td>{prettyTime(track.runtime)}</td> <td><Price price={prices.play} /></td> <td><Price price={prices.dl} /></td> </tr> ) })} </tbody> </table> </div> ) } }
ajax/libs/yui/3.10.2/event-focus/event-focus-coverage.js
ankitjamuar/cdnjs
if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } if (!__coverage__['build/event-focus/event-focus.js']) { __coverage__['build/event-focus/event-focus.js'] = {"path":"build/event-focus/event-focus.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":23},"end":{"line":1,"column":42}}},"2":{"name":"(anonymous_2)","line":17,"loc":{"start":{"line":17,"column":19},"end":{"line":17,"column":30}}},"3":{"name":"define","line":45,"loc":{"start":{"line":45,"column":0},"end":{"line":45,"column":42}}},"4":{"name":"(anonymous_4)","line":52,"loc":{"start":{"line":52,"column":17},"end":{"line":52,"column":51}}},"5":{"name":"(anonymous_5)","line":54,"loc":{"start":{"line":54,"column":44},"end":{"line":54,"column":57}}},"6":{"name":"(anonymous_6)","line":64,"loc":{"start":{"line":64,"column":16},"end":{"line":64,"column":49}}},"7":{"name":"(anonymous_7)","line":113,"loc":{"start":{"line":113,"column":17},"end":{"line":113,"column":41}}},"8":{"name":"(anonymous_8)","line":143,"loc":{"start":{"line":143,"column":31},"end":{"line":143,"column":47}}},"9":{"name":"(anonymous_9)","line":231,"loc":{"start":{"line":231,"column":12},"end":{"line":231,"column":43}}},"10":{"name":"(anonymous_10)","line":235,"loc":{"start":{"line":235,"column":16},"end":{"line":235,"column":37}}},"11":{"name":"(anonymous_11)","line":239,"loc":{"start":{"line":239,"column":18},"end":{"line":239,"column":57}}},"12":{"name":"(anonymous_12)","line":241,"loc":{"start":{"line":241,"column":29},"end":{"line":241,"column":47}}},"13":{"name":"(anonymous_13)","line":250,"loc":{"start":{"line":250,"column":24},"end":{"line":250,"column":45}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":273,"column":51}},"2":{"start":{"line":9,"column":0},"end":{"line":43,"column":9}},"3":{"start":{"line":23,"column":8},"end":{"line":25,"column":14}},"4":{"start":{"line":27,"column":8},"end":{"line":40,"column":9}},"5":{"start":{"line":29,"column":12},"end":{"line":29,"column":39}},"6":{"start":{"line":30,"column":12},"end":{"line":30,"column":52}},"7":{"start":{"line":39,"column":12},"end":{"line":39,"column":59}},"8":{"start":{"line":42,"column":8},"end":{"line":42,"column":25}},"9":{"start":{"line":45,"column":0},"end":{"line":254,"column":1}},"10":{"start":{"line":46,"column":4},"end":{"line":46,"column":47}},"11":{"start":{"line":48,"column":4},"end":{"line":253,"column":13}},"12":{"start":{"line":53,"column":12},"end":{"line":61,"column":13}},"13":{"start":{"line":54,"column":16},"end":{"line":56,"column":24}},"14":{"start":{"line":55,"column":20},"end":{"line":55,"column":37}},"15":{"start":{"line":58,"column":16},"end":{"line":60,"column":39}},"16":{"start":{"line":65,"column":12},"end":{"line":70,"column":26}},"17":{"start":{"line":72,"column":12},"end":{"line":72,"column":73}},"18":{"start":{"line":73,"column":12},"end":{"line":73,"column":71}},"19":{"start":{"line":79,"column":12},"end":{"line":100,"column":13}},"20":{"start":{"line":80,"column":16},"end":{"line":80,"column":31}},"21":{"start":{"line":81,"column":16},"end":{"line":81,"column":55}},"22":{"start":{"line":85,"column":16},"end":{"line":89,"column":17}},"23":{"start":{"line":86,"column":20},"end":{"line":87,"column":71}},"24":{"start":{"line":88,"column":20},"end":{"line":88,"column":42}},"25":{"start":{"line":99,"column":16},"end":{"line":99,"column":29}},"26":{"start":{"line":102,"column":12},"end":{"line":104,"column":13}},"27":{"start":{"line":103,"column":16},"end":{"line":103,"column":37}},"28":{"start":{"line":106,"column":12},"end":{"line":106,"column":43}},"29":{"start":{"line":108,"column":12},"end":{"line":110,"column":13}},"30":{"start":{"line":109,"column":16},"end":{"line":109,"column":32}},"31":{"start":{"line":114,"column":12},"end":{"line":124,"column":80}},"32":{"start":{"line":127,"column":12},"end":{"line":127,"column":49}},"33":{"start":{"line":130,"column":12},"end":{"line":130,"column":42}},"34":{"start":{"line":133,"column":12},"end":{"line":135,"column":13}},"35":{"start":{"line":134,"column":16},"end":{"line":134,"column":39}},"36":{"start":{"line":138,"column":12},"end":{"line":138,"column":39}},"37":{"start":{"line":140,"column":12},"end":{"line":160,"column":13}},"38":{"start":{"line":142,"column":16},"end":{"line":142,"column":28}},"39":{"start":{"line":143,"column":16},"end":{"line":158,"column":19}},"40":{"start":{"line":144,"column":20},"end":{"line":146,"column":31}},"41":{"start":{"line":148,"column":20},"end":{"line":155,"column":21}},"42":{"start":{"line":149,"column":24},"end":{"line":149,"column":32}},"43":{"start":{"line":150,"column":24},"end":{"line":154,"column":25}},"44":{"start":{"line":151,"column":28},"end":{"line":153,"column":29}},"45":{"start":{"line":152,"column":32},"end":{"line":152,"column":61}},"46":{"start":{"line":157,"column":20},"end":{"line":157,"column":34}},"47":{"start":{"line":159,"column":16},"end":{"line":159,"column":28}},"48":{"start":{"line":164,"column":12},"end":{"line":228,"column":13}},"49":{"start":{"line":165,"column":16},"end":{"line":165,"column":39}},"50":{"start":{"line":167,"column":16},"end":{"line":167,"column":47}},"51":{"start":{"line":169,"column":16},"end":{"line":201,"column":17}},"52":{"start":{"line":170,"column":20},"end":{"line":197,"column":21}},"53":{"start":{"line":171,"column":24},"end":{"line":171,"column":48}},"54":{"start":{"line":172,"column":24},"end":{"line":172,"column":55}},"55":{"start":{"line":173,"column":24},"end":{"line":173,"column":40}},"56":{"start":{"line":175,"column":24},"end":{"line":175,"column":49}},"57":{"start":{"line":177,"column":24},"end":{"line":186,"column":25}},"58":{"start":{"line":178,"column":28},"end":{"line":179,"column":68}},"59":{"start":{"line":184,"column":28},"end":{"line":185,"column":68}},"60":{"start":{"line":188,"column":24},"end":{"line":192,"column":25}},"61":{"start":{"line":190,"column":28},"end":{"line":190,"column":61}},"62":{"start":{"line":191,"column":28},"end":{"line":191,"column":51}},"63":{"start":{"line":194,"column":24},"end":{"line":196,"column":25}},"64":{"start":{"line":195,"column":28},"end":{"line":195,"column":34}},"65":{"start":{"line":199,"column":20},"end":{"line":199,"column":43}},"66":{"start":{"line":200,"column":20},"end":{"line":200,"column":28}},"67":{"start":{"line":203,"column":16},"end":{"line":223,"column":17}},"68":{"start":{"line":207,"column":20},"end":{"line":222,"column":21}},"69":{"start":{"line":208,"column":24},"end":{"line":208,"column":48}},"70":{"start":{"line":209,"column":24},"end":{"line":209,"column":50}},"71":{"start":{"line":211,"column":24},"end":{"line":217,"column":25}},"72":{"start":{"line":214,"column":28},"end":{"line":214,"column":61}},"73":{"start":{"line":215,"column":28},"end":{"line":215,"column":53}},"74":{"start":{"line":216,"column":28},"end":{"line":216,"column":51}},"75":{"start":{"line":219,"column":24},"end":{"line":221,"column":25}},"76":{"start":{"line":220,"column":28},"end":{"line":220,"column":34}},"77":{"start":{"line":225,"column":16},"end":{"line":227,"column":17}},"78":{"start":{"line":226,"column":20},"end":{"line":226,"column":26}},"79":{"start":{"line":232,"column":12},"end":{"line":232,"column":60}},"80":{"start":{"line":236,"column":12},"end":{"line":236,"column":32}},"81":{"start":{"line":240,"column":12},"end":{"line":245,"column":13}},"82":{"start":{"line":241,"column":16},"end":{"line":244,"column":18}},"83":{"start":{"line":242,"column":20},"end":{"line":243,"column":61}},"84":{"start":{"line":247,"column":12},"end":{"line":247,"column":66}},"85":{"start":{"line":251,"column":12},"end":{"line":251,"column":32}},"86":{"start":{"line":263,"column":0},"end":{"line":270,"column":1}},"87":{"start":{"line":265,"column":4},"end":{"line":265,"column":51}},"88":{"start":{"line":266,"column":4},"end":{"line":266,"column":52}},"89":{"start":{"line":268,"column":4},"end":{"line":268,"column":38}},"90":{"start":{"line":269,"column":4},"end":{"line":269,"column":37}}},"branchMap":{"1":{"line":27,"type":"if","locations":[{"start":{"line":27,"column":8},"end":{"line":27,"column":8}},{"start":{"line":27,"column":8},"end":{"line":27,"column":8}}]},"2":{"line":53,"type":"if","locations":[{"start":{"line":53,"column":12},"end":{"line":53,"column":12}},{"start":{"line":53,"column":12},"end":{"line":53,"column":12}}]},"3":{"line":69,"type":"binary-expr","locations":[{"start":{"line":69,"column":33},"end":{"line":69,"column":44}},{"start":{"line":69,"column":48},"end":{"line":69,"column":72}}]},"4":{"line":72,"type":"cond-expr","locations":[{"start":{"line":72,"column":50},"end":{"line":72,"column":56}},{"start":{"line":72,"column":59},"end":{"line":72,"column":72}}]},"5":{"line":73,"type":"cond-expr","locations":[{"start":{"line":73,"column":50},"end":{"line":73,"column":63}},{"start":{"line":73,"column":66},"end":{"line":73,"column":70}}]},"6":{"line":79,"type":"if","locations":[{"start":{"line":79,"column":12},"end":{"line":79,"column":12}},{"start":{"line":79,"column":12},"end":{"line":79,"column":12}}]},"7":{"line":85,"type":"if","locations":[{"start":{"line":85,"column":16},"end":{"line":85,"column":16}},{"start":{"line":85,"column":16},"end":{"line":85,"column":16}}]},"8":{"line":102,"type":"if","locations":[{"start":{"line":102,"column":12},"end":{"line":102,"column":12}},{"start":{"line":102,"column":12},"end":{"line":102,"column":12}}]},"9":{"line":108,"type":"if","locations":[{"start":{"line":108,"column":12},"end":{"line":108,"column":12}},{"start":{"line":108,"column":12},"end":{"line":108,"column":12}}]},"10":{"line":121,"type":"cond-expr","locations":[{"start":{"line":122,"column":36},"end":{"line":122,"column":70}},{"start":{"line":123,"column":36},"end":{"line":123,"column":37}}]},"11":{"line":133,"type":"if","locations":[{"start":{"line":133,"column":12},"end":{"line":133,"column":12}},{"start":{"line":133,"column":12},"end":{"line":133,"column":12}}]},"12":{"line":140,"type":"if","locations":[{"start":{"line":140,"column":12},"end":{"line":140,"column":12}},{"start":{"line":140,"column":12},"end":{"line":140,"column":12}}]},"13":{"line":148,"type":"if","locations":[{"start":{"line":148,"column":20},"end":{"line":148,"column":20}},{"start":{"line":148,"column":20},"end":{"line":148,"column":20}}]},"14":{"line":151,"type":"if","locations":[{"start":{"line":151,"column":28},"end":{"line":151,"column":28}},{"start":{"line":151,"column":28},"end":{"line":151,"column":28}}]},"15":{"line":164,"type":"binary-expr","locations":[{"start":{"line":164,"column":19},"end":{"line":164,"column":24}},{"start":{"line":164,"column":29},"end":{"line":164,"column":55}}]},"16":{"line":169,"type":"if","locations":[{"start":{"line":169,"column":16},"end":{"line":169,"column":16}},{"start":{"line":169,"column":16},"end":{"line":169,"column":16}}]},"17":{"line":177,"type":"if","locations":[{"start":{"line":177,"column":24},"end":{"line":177,"column":24}},{"start":{"line":177,"column":24},"end":{"line":177,"column":24}}]},"18":{"line":179,"type":"binary-expr","locations":[{"start":{"line":179,"column":51},"end":{"line":179,"column":59}},{"start":{"line":179,"column":63},"end":{"line":179,"column":65}}]},"19":{"line":188,"type":"if","locations":[{"start":{"line":188,"column":24},"end":{"line":188,"column":24}},{"start":{"line":188,"column":24},"end":{"line":188,"column":24}}]},"20":{"line":194,"type":"if","locations":[{"start":{"line":194,"column":24},"end":{"line":194,"column":24}},{"start":{"line":194,"column":24},"end":{"line":194,"column":24}}]},"21":{"line":194,"type":"binary-expr","locations":[{"start":{"line":194,"column":28},"end":{"line":194,"column":41}},{"start":{"line":194,"column":45},"end":{"line":194,"column":60}}]},"22":{"line":203,"type":"if","locations":[{"start":{"line":203,"column":16},"end":{"line":203,"column":16}},{"start":{"line":203,"column":16},"end":{"line":203,"column":16}}]},"23":{"line":211,"type":"if","locations":[{"start":{"line":211,"column":24},"end":{"line":211,"column":24}},{"start":{"line":211,"column":24},"end":{"line":211,"column":24}}]},"24":{"line":212,"type":"binary-expr","locations":[{"start":{"line":212,"column":47},"end":{"line":212,"column":55}},{"start":{"line":212,"column":59},"end":{"line":212,"column":61}}]},"25":{"line":219,"type":"if","locations":[{"start":{"line":219,"column":24},"end":{"line":219,"column":24}},{"start":{"line":219,"column":24},"end":{"line":219,"column":24}}]},"26":{"line":219,"type":"binary-expr","locations":[{"start":{"line":219,"column":28},"end":{"line":219,"column":41}},{"start":{"line":219,"column":45},"end":{"line":219,"column":60}}]},"27":{"line":225,"type":"if","locations":[{"start":{"line":225,"column":16},"end":{"line":225,"column":16}},{"start":{"line":225,"column":16},"end":{"line":225,"column":16}}]},"28":{"line":240,"type":"if","locations":[{"start":{"line":240,"column":12},"end":{"line":240,"column":12}},{"start":{"line":240,"column":12},"end":{"line":240,"column":12}}]},"29":{"line":243,"type":"cond-expr","locations":[{"start":{"line":243,"column":42},"end":{"line":243,"column":46}},{"start":{"line":243,"column":49},"end":{"line":243,"column":59}}]},"30":{"line":263,"type":"if","locations":[{"start":{"line":263,"column":0},"end":{"line":263,"column":0}},{"start":{"line":263,"column":0},"end":{"line":263,"column":0}}]}},"code":["(function () { YUI.add('event-focus', function (Y, NAME) {","","/**"," * Adds bubbling and delegation support to DOM events focus and blur."," *"," * @module event"," * @submodule event-focus"," */","var Event = Y.Event,",""," YLang = Y.Lang,",""," isString = YLang.isString,",""," arrayIndex = Y.Array.indexOf,",""," useActivate = (function() {",""," // Changing the structure of this test, so that it doesn't use inline JS in HTML,"," // which throws an exception in Win8 packaged apps, due to additional security restrictions:"," // http://msdn.microsoft.com/en-us/library/windows/apps/hh465380.aspx#differences",""," var supported = false,"," doc = Y.config.doc,"," p;",""," if (doc) {",""," p = doc.createElement(\"p\");"," p.setAttribute(\"onbeforeactivate\", \";\");",""," // onbeforeactivate is a function in IE8+."," // onbeforeactivate is a string in IE6,7 (unfortunate, otherwise we could have just checked for function below)."," // onbeforeactivate is a function in IE10, in a Win8 App environment (no exception running the test).",""," // onbeforeactivate is undefined in Webkit/Gecko."," // onbeforeactivate is a function in Webkit/Gecko if it's a supported event (e.g. onclick).",""," supported = (p.onbeforeactivate !== undefined);"," }",""," return supported;"," }());","","function define(type, proxy, directEvent) {"," var nodeDataKey = '_' + type + 'Notifiers';",""," Y.Event.define(type, {",""," _useActivate : useActivate,",""," _attach: function (el, notifier, delegate) {"," if (Y.DOM.isWindow(el)) {"," return Event._attach([type, function (e) {"," notifier.fire(e);"," }, el]);"," } else {"," return Event._attach("," [proxy, this._proxy, el, this, notifier, delegate],"," { capture: true });"," }"," },",""," _proxy: function (e, notifier, delegate) {"," var target = e.target,"," currentTarget = e.currentTarget,"," notifiers = target.getData(nodeDataKey),"," yuid = Y.stamp(currentTarget._node),"," defer = (useActivate || target !== currentTarget),"," directSub;",""," notifier.currentTarget = (delegate) ? target : currentTarget;"," notifier.container = (delegate) ? currentTarget : null;",""," // Maintain a list to handle subscriptions from nested"," // containers div#a>div#b>input #a.on(focus..) #b.on(focus..),"," // use one focus or blur subscription that fires notifiers from"," // #b then #a to emulate bubble sequence."," if (!notifiers) {"," notifiers = {};"," target.setData(nodeDataKey, notifiers);",""," // only subscribe to the element's focus if the target is"," // not the current target ("," if (defer) {"," directSub = Event._attach("," [directEvent, this._notify, target._node]).sub;"," directSub.once = true;"," }"," } else {"," // In old IE, defer is always true. In capture-phase browsers,"," // The delegate subscriptions will be encountered first, which"," // will establish the notifiers data and direct subscription"," // on the node. If there is also a direct subscription to the"," // node's focus/blur, it should not call _notify because the"," // direct subscription from the delegate sub(s) exists, which"," // will call _notify. So this avoids _notify being called"," // twice, unnecessarily."," defer = true;"," }",""," if (!notifiers[yuid]) {"," notifiers[yuid] = [];"," }",""," notifiers[yuid].push(notifier);",""," if (!defer) {"," this._notify(e);"," }"," },",""," _notify: function (e, container) {"," var currentTarget = e.currentTarget,"," notifierData = currentTarget.getData(nodeDataKey),"," axisNodes = currentTarget.ancestors(),"," doc = currentTarget.get('ownerDocument'),"," delegates = [],"," // Used to escape loops when there are no more"," // notifiers to consider"," count = notifierData ?"," Y.Object.keys(notifierData).length :"," 0,"," target, notifiers, notifier, yuid, match, tmp, i, len, sub, ret;",""," // clear the notifications list (mainly for delegation)"," currentTarget.clearData(nodeDataKey);",""," // Order the delegate subs by their placement in the parent axis"," axisNodes.push(currentTarget);"," // document.get('ownerDocument') returns null"," // which we'll use to prevent having duplicate Nodes in the list"," if (doc) {"," axisNodes.unshift(doc);"," }",""," // ancestors() returns the Nodes from top to bottom"," axisNodes._nodes.reverse();",""," if (count) {"," // Store the count for step 2"," tmp = count;"," axisNodes.some(function (node) {"," var yuid = Y.stamp(node),"," notifiers = notifierData[yuid],"," i, len;",""," if (notifiers) {"," count--;"," for (i = 0, len = notifiers.length; i < len; ++i) {"," if (notifiers[i].handle.sub.filter) {"," delegates.push(notifiers[i]);"," }"," }"," }",""," return !count;"," });"," count = tmp;"," }",""," // Walk up the parent axis, notifying direct subscriptions and"," // testing delegate filters."," while (count && (target = axisNodes.shift())) {"," yuid = Y.stamp(target);",""," notifiers = notifierData[yuid];",""," if (notifiers) {"," for (i = 0, len = notifiers.length; i < len; ++i) {"," notifier = notifiers[i];"," sub = notifier.handle.sub;"," match = true;",""," e.currentTarget = target;",""," if (sub.filter) {"," match = sub.filter.apply(target,"," [target, e].concat(sub.args || []));",""," // No longer necessary to test against this"," // delegate subscription for the nodes along"," // the parent axis."," delegates.splice("," arrayIndex(delegates, notifier), 1);"," }",""," if (match) {"," // undefined for direct subs"," e.container = notifier.container;"," ret = notifier.fire(e);"," }",""," if (ret === false || e.stopped === 2) {"," break;"," }"," }",""," delete notifiers[yuid];"," count--;"," }",""," if (e.stopped !== 2) {"," // delegates come after subs targeting this specific node"," // because they would not normally report until they'd"," // bubbled to the container node."," for (i = 0, len = delegates.length; i < len; ++i) {"," notifier = delegates[i];"," sub = notifier.handle.sub;",""," if (sub.filter.apply(target,"," [target, e].concat(sub.args || []))) {",""," e.container = notifier.container;"," e.currentTarget = target;"," ret = notifier.fire(e);"," }",""," if (ret === false || e.stopped === 2) {"," break;"," }"," }"," }",""," if (e.stopped) {"," break;"," }"," }"," },",""," on: function (node, sub, notifier) {"," sub.handle = this._attach(node._node, notifier);"," },",""," detach: function (node, sub) {"," sub.handle.detach();"," },",""," delegate: function (node, sub, notifier, filter) {"," if (isString(filter)) {"," sub.filter = function (target) {"," return Y.Selector.test(target._node, filter,"," node === target ? null : node._node);"," };"," }",""," sub.handle = this._attach(node._node, notifier, true);"," },",""," detachDelegate: function (node, sub) {"," sub.handle.detach();"," }"," }, true);","}","","// For IE, we need to defer to focusin rather than focus because","// `el.focus(); doSomething();` executes el.onbeforeactivate, el.onactivate,","// el.onfocusin, doSomething, then el.onfocus. All others support capture","// phase focus, which executes before doSomething. To guarantee consistent","// behavior for this use case, IE's direct subscriptions are made against","// focusin so subscribers will be notified before js following el.focus() is","// executed.","if (useActivate) {"," // name capture phase direct subscription"," define(\"focus\", \"beforeactivate\", \"focusin\");"," define(\"blur\", \"beforedeactivate\", \"focusout\");","} else {"," define(\"focus\", \"focus\", \"focus\");"," define(\"blur\", \"blur\", \"blur\");","}","","","}, '@VERSION@', {\"requires\": [\"event-synthetic\"]});","","}());"]}; } var __cov_6QPN5D0gRV5cd0sDuZmrgw = __coverage__['build/event-focus/event-focus.js']; __cov_6QPN5D0gRV5cd0sDuZmrgw.s['1']++;YUI.add('event-focus',function(Y,NAME){__cov_6QPN5D0gRV5cd0sDuZmrgw.f['1']++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['2']++;var Event=Y.Event,YLang=Y.Lang,isString=YLang.isString,arrayIndex=Y.Array.indexOf,useActivate=function(){__cov_6QPN5D0gRV5cd0sDuZmrgw.f['2']++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['3']++;var supported=false,doc=Y.config.doc,p;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['4']++;if(doc){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['1'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['5']++;p=doc.createElement('p');__cov_6QPN5D0gRV5cd0sDuZmrgw.s['6']++;p.setAttribute('onbeforeactivate',';');__cov_6QPN5D0gRV5cd0sDuZmrgw.s['7']++;supported=p.onbeforeactivate!==undefined;}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['1'][1]++;}__cov_6QPN5D0gRV5cd0sDuZmrgw.s['8']++;return supported;}();__cov_6QPN5D0gRV5cd0sDuZmrgw.s['9']++;function define(type,proxy,directEvent){__cov_6QPN5D0gRV5cd0sDuZmrgw.f['3']++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['10']++;var nodeDataKey='_'+type+'Notifiers';__cov_6QPN5D0gRV5cd0sDuZmrgw.s['11']++;Y.Event.define(type,{_useActivate:useActivate,_attach:function(el,notifier,delegate){__cov_6QPN5D0gRV5cd0sDuZmrgw.f['4']++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['12']++;if(Y.DOM.isWindow(el)){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['2'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['13']++;return Event._attach([type,function(e){__cov_6QPN5D0gRV5cd0sDuZmrgw.f['5']++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['14']++;notifier.fire(e);},el]);}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['2'][1]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['15']++;return Event._attach([proxy,this._proxy,el,this,notifier,delegate],{capture:true});}},_proxy:function(e,notifier,delegate){__cov_6QPN5D0gRV5cd0sDuZmrgw.f['6']++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['16']++;var target=e.target,currentTarget=e.currentTarget,notifiers=target.getData(nodeDataKey),yuid=Y.stamp(currentTarget._node),defer=(__cov_6QPN5D0gRV5cd0sDuZmrgw.b['3'][0]++,useActivate)||(__cov_6QPN5D0gRV5cd0sDuZmrgw.b['3'][1]++,target!==currentTarget),directSub;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['17']++;notifier.currentTarget=delegate?(__cov_6QPN5D0gRV5cd0sDuZmrgw.b['4'][0]++,target):(__cov_6QPN5D0gRV5cd0sDuZmrgw.b['4'][1]++,currentTarget);__cov_6QPN5D0gRV5cd0sDuZmrgw.s['18']++;notifier.container=delegate?(__cov_6QPN5D0gRV5cd0sDuZmrgw.b['5'][0]++,currentTarget):(__cov_6QPN5D0gRV5cd0sDuZmrgw.b['5'][1]++,null);__cov_6QPN5D0gRV5cd0sDuZmrgw.s['19']++;if(!notifiers){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['6'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['20']++;notifiers={};__cov_6QPN5D0gRV5cd0sDuZmrgw.s['21']++;target.setData(nodeDataKey,notifiers);__cov_6QPN5D0gRV5cd0sDuZmrgw.s['22']++;if(defer){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['7'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['23']++;directSub=Event._attach([directEvent,this._notify,target._node]).sub;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['24']++;directSub.once=true;}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['7'][1]++;}}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['6'][1]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['25']++;defer=true;}__cov_6QPN5D0gRV5cd0sDuZmrgw.s['26']++;if(!notifiers[yuid]){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['8'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['27']++;notifiers[yuid]=[];}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['8'][1]++;}__cov_6QPN5D0gRV5cd0sDuZmrgw.s['28']++;notifiers[yuid].push(notifier);__cov_6QPN5D0gRV5cd0sDuZmrgw.s['29']++;if(!defer){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['9'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['30']++;this._notify(e);}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['9'][1]++;}},_notify:function(e,container){__cov_6QPN5D0gRV5cd0sDuZmrgw.f['7']++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['31']++;var currentTarget=e.currentTarget,notifierData=currentTarget.getData(nodeDataKey),axisNodes=currentTarget.ancestors(),doc=currentTarget.get('ownerDocument'),delegates=[],count=notifierData?(__cov_6QPN5D0gRV5cd0sDuZmrgw.b['10'][0]++,Y.Object.keys(notifierData).length):(__cov_6QPN5D0gRV5cd0sDuZmrgw.b['10'][1]++,0),target,notifiers,notifier,yuid,match,tmp,i,len,sub,ret;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['32']++;currentTarget.clearData(nodeDataKey);__cov_6QPN5D0gRV5cd0sDuZmrgw.s['33']++;axisNodes.push(currentTarget);__cov_6QPN5D0gRV5cd0sDuZmrgw.s['34']++;if(doc){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['11'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['35']++;axisNodes.unshift(doc);}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['11'][1]++;}__cov_6QPN5D0gRV5cd0sDuZmrgw.s['36']++;axisNodes._nodes.reverse();__cov_6QPN5D0gRV5cd0sDuZmrgw.s['37']++;if(count){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['12'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['38']++;tmp=count;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['39']++;axisNodes.some(function(node){__cov_6QPN5D0gRV5cd0sDuZmrgw.f['8']++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['40']++;var yuid=Y.stamp(node),notifiers=notifierData[yuid],i,len;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['41']++;if(notifiers){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['13'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['42']++;count--;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['43']++;for(i=0,len=notifiers.length;i<len;++i){__cov_6QPN5D0gRV5cd0sDuZmrgw.s['44']++;if(notifiers[i].handle.sub.filter){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['14'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['45']++;delegates.push(notifiers[i]);}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['14'][1]++;}}}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['13'][1]++;}__cov_6QPN5D0gRV5cd0sDuZmrgw.s['46']++;return!count;});__cov_6QPN5D0gRV5cd0sDuZmrgw.s['47']++;count=tmp;}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['12'][1]++;}__cov_6QPN5D0gRV5cd0sDuZmrgw.s['48']++;while((__cov_6QPN5D0gRV5cd0sDuZmrgw.b['15'][0]++,count)&&(__cov_6QPN5D0gRV5cd0sDuZmrgw.b['15'][1]++,target=axisNodes.shift())){__cov_6QPN5D0gRV5cd0sDuZmrgw.s['49']++;yuid=Y.stamp(target);__cov_6QPN5D0gRV5cd0sDuZmrgw.s['50']++;notifiers=notifierData[yuid];__cov_6QPN5D0gRV5cd0sDuZmrgw.s['51']++;if(notifiers){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['16'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['52']++;for(i=0,len=notifiers.length;i<len;++i){__cov_6QPN5D0gRV5cd0sDuZmrgw.s['53']++;notifier=notifiers[i];__cov_6QPN5D0gRV5cd0sDuZmrgw.s['54']++;sub=notifier.handle.sub;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['55']++;match=true;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['56']++;e.currentTarget=target;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['57']++;if(sub.filter){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['17'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['58']++;match=sub.filter.apply(target,[target,e].concat((__cov_6QPN5D0gRV5cd0sDuZmrgw.b['18'][0]++,sub.args)||(__cov_6QPN5D0gRV5cd0sDuZmrgw.b['18'][1]++,[])));__cov_6QPN5D0gRV5cd0sDuZmrgw.s['59']++;delegates.splice(arrayIndex(delegates,notifier),1);}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['17'][1]++;}__cov_6QPN5D0gRV5cd0sDuZmrgw.s['60']++;if(match){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['19'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['61']++;e.container=notifier.container;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['62']++;ret=notifier.fire(e);}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['19'][1]++;}__cov_6QPN5D0gRV5cd0sDuZmrgw.s['63']++;if((__cov_6QPN5D0gRV5cd0sDuZmrgw.b['21'][0]++,ret===false)||(__cov_6QPN5D0gRV5cd0sDuZmrgw.b['21'][1]++,e.stopped===2)){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['20'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['64']++;break;}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['20'][1]++;}}__cov_6QPN5D0gRV5cd0sDuZmrgw.s['65']++;delete notifiers[yuid];__cov_6QPN5D0gRV5cd0sDuZmrgw.s['66']++;count--;}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['16'][1]++;}__cov_6QPN5D0gRV5cd0sDuZmrgw.s['67']++;if(e.stopped!==2){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['22'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['68']++;for(i=0,len=delegates.length;i<len;++i){__cov_6QPN5D0gRV5cd0sDuZmrgw.s['69']++;notifier=delegates[i];__cov_6QPN5D0gRV5cd0sDuZmrgw.s['70']++;sub=notifier.handle.sub;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['71']++;if(sub.filter.apply(target,[target,e].concat((__cov_6QPN5D0gRV5cd0sDuZmrgw.b['24'][0]++,sub.args)||(__cov_6QPN5D0gRV5cd0sDuZmrgw.b['24'][1]++,[])))){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['23'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['72']++;e.container=notifier.container;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['73']++;e.currentTarget=target;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['74']++;ret=notifier.fire(e);}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['23'][1]++;}__cov_6QPN5D0gRV5cd0sDuZmrgw.s['75']++;if((__cov_6QPN5D0gRV5cd0sDuZmrgw.b['26'][0]++,ret===false)||(__cov_6QPN5D0gRV5cd0sDuZmrgw.b['26'][1]++,e.stopped===2)){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['25'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['76']++;break;}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['25'][1]++;}}}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['22'][1]++;}__cov_6QPN5D0gRV5cd0sDuZmrgw.s['77']++;if(e.stopped){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['27'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['78']++;break;}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['27'][1]++;}}},on:function(node,sub,notifier){__cov_6QPN5D0gRV5cd0sDuZmrgw.f['9']++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['79']++;sub.handle=this._attach(node._node,notifier);},detach:function(node,sub){__cov_6QPN5D0gRV5cd0sDuZmrgw.f['10']++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['80']++;sub.handle.detach();},delegate:function(node,sub,notifier,filter){__cov_6QPN5D0gRV5cd0sDuZmrgw.f['11']++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['81']++;if(isString(filter)){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['28'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['82']++;sub.filter=function(target){__cov_6QPN5D0gRV5cd0sDuZmrgw.f['12']++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['83']++;return Y.Selector.test(target._node,filter,node===target?(__cov_6QPN5D0gRV5cd0sDuZmrgw.b['29'][0]++,null):(__cov_6QPN5D0gRV5cd0sDuZmrgw.b['29'][1]++,node._node));};}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['28'][1]++;}__cov_6QPN5D0gRV5cd0sDuZmrgw.s['84']++;sub.handle=this._attach(node._node,notifier,true);},detachDelegate:function(node,sub){__cov_6QPN5D0gRV5cd0sDuZmrgw.f['13']++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['85']++;sub.handle.detach();}},true);}__cov_6QPN5D0gRV5cd0sDuZmrgw.s['86']++;if(useActivate){__cov_6QPN5D0gRV5cd0sDuZmrgw.b['30'][0]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['87']++;define('focus','beforeactivate','focusin');__cov_6QPN5D0gRV5cd0sDuZmrgw.s['88']++;define('blur','beforedeactivate','focusout');}else{__cov_6QPN5D0gRV5cd0sDuZmrgw.b['30'][1]++;__cov_6QPN5D0gRV5cd0sDuZmrgw.s['89']++;define('focus','focus','focus');__cov_6QPN5D0gRV5cd0sDuZmrgw.s['90']++;define('blur','blur','blur');}},'@VERSION@',{'requires':['event-synthetic']});
src/svg-icons/notification/no-encryption.js
owencm/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationNoEncryption = (props) => ( <SvgIcon {...props}> <path d="M21 21.78L4.22 5 3 6.22l2.04 2.04C4.42 8.6 4 9.25 4 10v10c0 1.1.9 2 2 2h12c.23 0 .45-.05.66-.12L19.78 23 21 21.78zM8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H9.66L20 18.34V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5-2.56 0-4.64 1.93-4.94 4.4L8.9 7.24V6z"/> </SvgIcon> ); NotificationNoEncryption = pure(NotificationNoEncryption); NotificationNoEncryption.displayName = 'NotificationNoEncryption'; NotificationNoEncryption.muiName = 'SvgIcon'; export default NotificationNoEncryption;
src/scripts/components/Footer.js
LWanjiru/ki-news
import React from 'react'; const Footer = () => { function getYear() { const dateNow = new Date(); const thisYear = dateNow.getFullYear(); return thisYear; } return ( <div className="col text-white"> <p>Made with &#x2764;, React, Webpack & Bootstrap</p> <p>Know It All(KI-ALL) News</p> <p>Powered by <a href="https://newsapi.org/" target="_blank" rel="noopener noreferrer">NewsAPI</a></p> <p>&#169; {getYear()}</p> </div> ); }; export default Footer;
geonode/contrib/monitoring/frontend/src/components/organisms/most-active-ips/index.js
timlinux/geonode
import React from 'react'; import HoverPaper from '../../atoms/hover-paper'; import Map from '../../atoms/map'; import styles from './styles'; class MostActiveIPs extends React.Component { render() { return ( <HoverPaper style={styles.content}> <h3>Most Active IPs</h3> <div style={styles.map}> <Map /> </div> </HoverPaper> ); } } export default MostActiveIPs;
src/frontend/components/forms/GCPasswordField.js
al3x/ground-control
import React from 'react'; import {TextField} from 'material-ui'; import {BernieText} from '../styles/bernie-css'; import GCFormField from './GCFormField'; export default class GCPasswordField extends GCFormField { render() { return <TextField {...this.props} floatingLabelText={this.floatingLabelText()} type='password' errorStyle={BernieText.inputError} hintText={this.props.label} onChange={(event) => {this.props.onChange(event.target.value)}} /> } }
docs/app/Examples/views/Comment/States/index.js
shengnian/shengnian-ui-react
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' const CommentTypes = () => ( <ExampleSection title='States'> <ComponentExample title='Collapsed' description='Comments can be collapsed, or hidden from view.' examplePath='views/Comment/States/CommentExampleCollapsed' /> </ExampleSection> ) export default CommentTypes
dubbo-admin/src/main/webapp/js/jquery-1.4.2.min.js
yiyezhangmu/dubbox
/*! * jQuery JavaScript Library v1.4.2 * http://jquery.com/ * * Copyright 2010, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2010, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Sat Feb 13 22:33:48 2010 -0500 */ (function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i? e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r= j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g, "&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e= true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& (d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== "find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)|| c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded", L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype, "isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+ a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f], d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]=== a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&& !c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari= true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ", i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ", " ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className= this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i= e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!= null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type= e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this, "events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent= a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y, isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit= {setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}}; if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, "_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&& !a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector, u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.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".split(" "), function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q]; if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length- 1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/, CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}}, relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]= l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[]; h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m= m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== "="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition|| !h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m= h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>"; if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); (function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/, gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length; c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= {},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== "string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== 1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)? a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, ""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&& this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]|| u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length=== 1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", ""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, "border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== "string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? "&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== 1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== "json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay"); this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a], "olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)}, animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing= j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]); this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== "number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length|| c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement? function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b= this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle; k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&& f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>"; a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": "pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
src/js/components/icons/base/Gallery.js
odedre/grommet-final
/** * @description Gallery SVG Icon. * @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon. * @property {string} colorIndex - The color identifier to use for the stroke color. * If not specified, this component will default to muiTheme.palette.textColor. * @property {xsmall|small|medium|large|xlarge|huge} size - The icon size. Defaults to small. * @property {boolean} responsive - Allows you to redefine what the coordinates. * @example * <svg width="24" height="24" ><path d="M1,1 L19,1 L19,19 L1,19 L1,1 Z M5,19 L5,23 L23,23 L23,5.97061363 L18.9998921,5.97061363 M6,8 C6.55228475,8 7,7.55228475 7,7 C7,6.44771525 6.55228475,6 6,6 C5.44771525,6 5,6.44771525 5,7 C5,7.55228475 5.44771525,8 6,8 Z M2,18 L7,12 L10,15 L14,10 L19,16"/></svg> */ // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import CSSClassnames from '../../../utils/CSSClassnames'; import Intl from '../../../utils/Intl'; import Props from '../../../utils/Props'; const CLASS_ROOT = CSSClassnames.CONTROL_ICON; const COLOR_INDEX = CSSClassnames.COLOR_INDEX; export default class Icon extends Component { render () { const { className, colorIndex } = this.props; let { a11yTitle, size, responsive } = this.props; let { intl } = this.context; const classes = classnames( CLASS_ROOT, `${CLASS_ROOT}-gallery`, className, { [`${CLASS_ROOT}--${size}`]: size, [`${CLASS_ROOT}--responsive`]: responsive, [`${COLOR_INDEX}-${colorIndex}`]: colorIndex } ); a11yTitle = a11yTitle || Intl.getMessage(intl, 'gallery'); const restProps = Props.omit(this.props, Object.keys(Icon.propTypes)); return <svg {...restProps} version="1.1" viewBox="0 0 24 24" width="24px" height="24px" role="img" className={classes} aria-label={a11yTitle}><path fill="none" stroke="#000" strokeWidth="2" d="M1,1 L19,1 L19,19 L1,19 L1,1 Z M5,19 L5,23 L23,23 L23,5.97061363 L18.9998921,5.97061363 M6,8 C6.55228475,8 7,7.55228475 7,7 C7,6.44771525 6.55228475,6 6,6 C5.44771525,6 5,6.44771525 5,7 C5,7.55228475 5.44771525,8 6,8 Z M2,18 L7,12 L10,15 L14,10 L19,16"/></svg>; } }; Icon.contextTypes = { intl: PropTypes.object }; Icon.defaultProps = { responsive: true }; Icon.displayName = 'Gallery'; Icon.icon = true; Icon.propTypes = { a11yTitle: PropTypes.string, colorIndex: PropTypes.string, size: PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'huge']), responsive: PropTypes.bool };
node_modules/react-icons/md/pause-circle-outline.js
bengimbel/Solstice-React-Contacts-Project
import React from 'react' import Icon from 'react-icon-base' const MdPauseCircleOutline = props => ( <Icon viewBox="0 0 40 40" {...props}> <g><path d="m21.6 26.6v-13.2h3.4v13.2h-3.4z m-1.6 6.8q5.5 0 9.4-4t4-9.4-4-9.4-9.4-4-9.4 4-4 9.4 4 9.4 9.4 4z m0-30q6.9 0 11.8 4.8t4.8 11.8-4.8 11.8-11.8 4.8-11.8-4.8-4.8-11.8 4.8-11.8 11.8-4.8z m-5 23.2v-13.2h3.4v13.2h-3.4z"/></g> </Icon> ) export default MdPauseCircleOutline
examples/js/sort/demo.js
echaouchna/react-bootstrap-tab
/* eslint max-len: 0 */ import React from 'react'; import SortTable from './sort-table'; import MultiSortTable from './multi-sort-table'; import DefaultSortTable from './default-sort-table'; import ExternalSort from './manage-sort-external-table'; import CustomSortTable from './custom-sort-table'; import CustomSortWithExtraDataTable from './custom-sort-with-extra-data-table'; import ReusableCustomSortTable from './reusable-custom-sort-table'; import SortHookTable from './sort-hook-table'; import DisableSortIndicatorTable from './disable-sort-indicator-table'; import CustomCaretSortTable from './custom-caret-sort-table'; import ExternalMultiSort from './manage-multi-sort-external-table'; class Demo extends React.Component { render() { return ( <div> <div className='col-md-offset-1 col-md-8'> <div className='panel panel-default'> <div className='panel-heading'>Table Sort Example</div> <div className='panel-body'> <h5>Source in /examples/js/sort/sort-table.js</h5> <SortTable /> </div> </div> </div> <div className='col-md-offset-1 col-md-8'> <div className='panel panel-default'> <div className='panel-heading'>Table Multi Sort Example</div> <div className='panel-body'> <h5>Source in /examples/js/sort/multi-sort-table.js</h5> <MultiSortTable /> </div> </div> </div> <div className='col-md-offset-1 col-md-8'> <div className='panel panel-default'> <div className='panel-heading'>Default Table Sort Example</div> <div className='panel-body'> <h5>Source in /examples/js/sort/default-sort-table.js</h5> <DefaultSortTable /> </div> </div> </div> <div className='col-md-offset-1 col-md-8'> <div className='panel panel-default'> <div className='panel-heading'>Manage Sorting Externally Example</div> <div className='panel-body'> <h5>Source in /examples/js/sort/manage-sort-external-table.js</h5> <ExternalSort /> </div> </div> </div> <div className='col-md-offset-1 col-md-8'> <div className='panel panel-default'> <div className='panel-heading'>Manage Multi Sorting Externally Example</div> <div className='panel-body'> <h5>Source in /examples/js/sort/manage-multi-sort-external-table.js</h5> <ExternalMultiSort /> </div> </div> </div> <div className='col-md-offset-1 col-md-8'> <div className='panel panel-default'> <div className='panel-heading'>Customize Table Sort Example</div> <div className='panel-body'> <h5>Source in /examples/js/sort/custom-sort-table.js</h5> <CustomSortTable /> </div> </div> </div> <div className='col-md-offset-1 col-md-8'> <div className='panel panel-default'> <div className='panel-heading'>Customize Table Sort With Extra Data Example</div> <div className='panel-body'> <h5>Source in /examples/js/sort/custom-sort-with-extra-data-table.js</h5> <CustomSortWithExtraDataTable /> </div> </div> </div> <div className='col-md-offset-1 col-md-8'> <div className='panel panel-default'> <div className='panel-heading'>Reusable Customize Table Sort Example</div> <div className='panel-body'> <h5>Source in /examples/js/sort/reusable-custom-sort-table.js</h5> <ReusableCustomSortTable /> </div> </div> </div> <div className='col-md-offset-1 col-md-8'> <div className='panel panel-default'> <div className='panel-heading'>Sort Hooks(onSortChange) Example</div> <div className='panel-body'> <h5>Source in /examples/js/sort/sort-hook-table.js</h5> <SortHookTable /> </div> </div> </div> <div className='col-md-offset-1 col-md-8'> <div className='panel panel-default'> <div className='panel-heading'>Disable sort indicator</div> <div className='panel-body'> <h5>Source in /examples/js/sort/disable-sort-indicator-table.js</h5> <DisableSortIndicatorTable /> </div> </div> </div> <div className='col-md-offset-1 col-md-8'> <div className='panel panel-default'> <div className='panel-heading'>Custom render for caret</div> <div className='panel-body'> <h5>Source in /examples/js/sort/custom-caret-sort-table.js</h5> <CustomCaretSortTable /> </div> </div> </div> </div> ); } } export default Demo;
client/modules/User/pages/User.js
lordknight1904/bigvnadmin
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import UserNavBar from '../components/UserNavBar/UserNavBar'; import UserList from '../components/UserList/UserList'; import { getId } from '../../Login/LoginReducer'; import { Modal, Button, Form, FormGroup, FormControl, Col, Row, ControlLabel, Panel, HelpBlock } from 'react-bootstrap'; import { getSearch, getCurrentPage } from '../UserReducer'; class User extends Component { constructor(props) { super(props); this.state = { type: '', idSelected: '', show: false, message: '', register: false, userName: '', password: '', role: 'admin', userNameError: '', passwordError: '', isSigningIn: false, error: '', } } componentWillMount() { if (this.props.id === '') { this.context.router.push('/'); } } showDialog = (type, id) => { this.setState({ show: true, type, idSelected: id }); }; onRegister = () => { this.setState({ register: true }); }; render() { return ( <div> <Row> <UserNavBar onRegister={this.onRegister} /> </Row> <Row style={{ paddingLeft: '20px', paddingRight: '20px' }}> <UserList showDialog={this.showDialog} /> </Row> </div> ); } } // Retrieve data from store as props function mapStateToProps(state) { return { id: getId(state), search: getSearch(state), currentPage: getCurrentPage(state), }; } User.propTypes = { dispatch: PropTypes.func.isRequired, search: PropTypes.string.isRequired, currentPage: PropTypes.number.isRequired, id: PropTypes.string.isRequired, }; User.contextTypes = { router: PropTypes.object, }; export default connect(mapStateToProps)(User);
src/ThirdPage.js
MillerDix/ReactNativeNavigator
import React, { Component } from 'react'; import { StyleSheet, View, Alert, Text } from 'react-native'; import FirstPage from './FirstPage'; class ThirdPage extends Component { constructor(props) { super(props); this.state = { UserName: null, UserAge: null } } componentDidMount() { this.setState({ UserName: this.props.UserName, UserAge: this.props.UserAge }); Alert.alert('UserName: ' + this.props.UserName + '\n' + 'UserAge: ' + this.props.UserAge); } goBackToFirst() { const { navigator } = this.props; if(navigator) { navigator.popToTop(); } } render() { return ( <View style={styles.container} > <Text style={styles.text} onPress={this.goBackToFirst.bind(this)}> Third Page, Click To Go Back </Text> </View> ); } } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#F5FCFF', alignItems: 'center', justifyContent: 'center' }, text: { color: 'green', fontSize: 25, justifyContent: 'center' } }) export default ThirdPage;
example/index.ios.js
brendan-rius/react-native-emoji-keyboard
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; import EmojiKeyboard from 'react-native-emoji-keyboard' export default class example extends React.PureComponent { constructor(props) { super(props) this.state = { emojis: [], } } render() { return ( <View style={styles.container}> <Text style={styles.text}>{this.state.emojis.join('')}</Text> <EmojiKeyboard onEmojiPicked={emoji => this.setState({emojis: this.state.emojis.concat(emoji)})} onEmojiRemoved={() => this.setState({emojis: this.state.emojis.slice(0, -1)})} showDeleteButton={this.state.emojis.length > 0} /> </View> ); } } const styles = StyleSheet.create({ container: { flex : 1, justifyContent: 'space-between', alignItems : 'center', }, text : { marginTop: 200, fontSize : 30, } }); AppRegistry.registerComponent('example', () => example);
test/PopoverSpec.js
asiniy/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Popover from '../src/Popover'; describe('Popover', function () { it('Should output a popover title and content', function () { let instance = ReactTestUtils.renderIntoDocument( <Popover title="Popover title"> <strong>Popover Content</strong> </Popover> ); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'popover-title')); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'popover-content')); assert.ok(ReactTestUtils.findRenderedDOMComponentWithTag(instance, 'strong')); }); });
proyecto3/HTML/js/prettyphoto/js/jquery-1.4.4.min.js
zerophp/zgz2013octM
/*! * jQuery JavaScript Library v1.4.4 * http://jquery.com/ * * Copyright 2010, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2010, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Thu Nov 11 19:04:53 2010 -0500 */ (function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h= h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;k<J.length;k++){h=J[k];h.origType.replace(X,"")===a.type?f.push(h.selector):J.splice(k--,1)}f=c(a.target).closest(f,a.currentTarget);o=0;for(x=f.length;o<x;o++){r=f[o];for(k=0;k<J.length;k++){h=J[k];if(r.selector===h.selector&&(!A||A.test(h.namespace))){l=r.elem;e=null;if(h.preType==="mouseenter"|| h.preType==="mouseleave"){a.type=h.preType;e=c(a.relatedTarget).closest(h.selector)[0]}if(!e||e!==l)C.push({elem:l,handleObj:h,level:r.level})}}}o=0;for(x=C.length;o<x;o++){f=C[o];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La, "`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this, e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a, "margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+ a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/, C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j, s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this, j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length}, toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j=== -1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false; if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K<Q;K++)if((j=arguments[K])!=null)for(s in j){v=G[s];z=j[s];if(G!==z)if(ga&&z&&(b.isPlainObject(z)||(H=b.isArray(z)))){if(H){H=false;v=v&&b.isArray(v)?v:[]}else v=v&&b.isPlainObject(v)?v:{};G[s]=b.extend(ga,v,z)}else if(z!==B)G[s]=z}return G};b.extend({noConflict:function(j){E.$=e;if(j)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(j){j===true&&b.readyWait--; if(!b.readyWait||j!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,1);b.isReady=true;if(!(j!==true&&--b.readyWait>0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload", b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&& !F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&& l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H<G;){if(s.apply(j[H++],v)===false)break}else if(K)for(z in j){if(s.call(j[z], z,j[z])===false)break}else for(v=j[0];H<G&&s.call(v,H,v)!==false;v=j[++H]);return j},trim:O?function(j){return j==null?"":O.call(j)}:function(j){return j==null?"":j.toString().replace(k,"").replace(o,"")},makeArray:function(j,s){var v=s||[];if(j!=null){var z=b.type(j);j.length==null||z==="string"||z==="function"||z==="regexp"||b.isWindow(j)?M.call(v,j):b.merge(v,j)}return v},inArray:function(j,s){if(s.indexOf)return s.indexOf(j);for(var v=0,z=s.length;v<z;v++)if(s[v]===j)return v;return-1},merge:function(j, s){var v=j.length,z=0;if(typeof s.length==="number")for(var H=s.length;z<H;z++)j[v++]=s[z];else for(;s[z]!==B;)j[v++]=s[z++];j.length=v;return j},grep:function(j,s,v){var z=[],H;v=!!v;for(var G=0,K=j.length;G<K;G++){H=!!s(j[G],G);v!==H&&z.push(j[G])}return z},map:function(j,s,v){for(var z=[],H,G=0,K=j.length;G<K;G++){H=s(j[G],G,v);if(H!=null)z[z.length]=H}return z.concat.apply([],z)},guid:1,proxy:function(j,s,v){if(arguments.length===2)if(typeof s==="string"){v=j;j=v[s];s=B}else if(s&&!b.isFunction(s)){v= s;s=B}if(!s&&j)s=function(){return j.apply(v||this,arguments)};if(j)s.guid=j.guid=j.guid||s.guid||b.guid++;return s},access:function(j,s,v,z,H,G){var K=j.length;if(typeof s==="object"){for(var Q in s)b.access(j,Q,s[Q],z,H,v);return j}if(v!==B){z=!G&&z&&b.isFunction(v);for(Q=0;Q<K;Q++)H(j[Q],s,z?v.call(j[Q],Q,H(j[Q],s)):v,G);return j}return K?H(j[0],s):B},now:function(){return(new Date).getTime()},uaMatch:function(j){j=j.toLowerCase();j=L.exec(j)||g.exec(j)||i.exec(j)||j.indexOf("compatible")<0&&n.exec(j)|| [];return{browser:j[1]||"",version:j[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(j,s){R["[object "+s+"]"]=s.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=m.version}if(b.browser.webkit)b.browser.safari=true;if(D)b.inArray=function(j,s){return D.call(s,j)};if(!/\s/.test("\u00a0")){k=/^[\s\xA0]+/;o=/[\s\xA0]+$/}f=b(t);if(t.addEventListener)u=function(){t.removeEventListener("DOMContentLoaded",u, false);b.ready()};else if(t.attachEvent)u=function(){if(t.readyState==="complete"){t.detachEvent("onreadystatechange",u);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=t.documentElement,b=t.createElement("script"),d=t.createElement("div"),e="script"+c.now();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"), k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false, scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent= false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom= 1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display= "none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h= c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando); else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h<l;h++){f=e[h].name;if(f.indexOf("data-")===0){f=f.substr(5);ka(this[0],f,d[f])}}}return d}else if(typeof a==="object")return this.each(function(){c.data(this, a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(b===B){d=this.triggerHandler("getData"+k[1]+"!",[k[0]]);if(d===B&&this.length){d=c.data(this[0],a);d=ka(this[0],a,d)}return d===B&&k[1]?this.data(k[0]):d}else return this.each(function(){var o=c(this),x=[k[0],b];o.triggerHandler("setData"+k[1]+"!",x);c.data(this,a,b);o.triggerHandler("changeData"+k[1]+"!",x)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e= c.data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===B)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this, a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var sa=/[\n\t]/g,ha=/\s+/,Sa=/\r/g,Ta=/^(?:href|src|style)$/,Ua=/^(?:button|input)$/i,Va=/^(?:button|input|object|select|textarea)$/i,Wa=/^a(?:rea)?$/i,ta=/^(?:radio|checkbox)$/i;c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan", colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(x){var r=c(this);r.addClass(a.call(this,x,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType=== 1)if(f.className){for(var h=" "+f.className+" ",l=f.className,k=0,o=b.length;k<o;k++)if(h.indexOf(" "+b[k]+" ")<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var x=c(this);x.removeClass(a.call(this,o,x.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(sa," "), l=0,k=b.length;l<k;l++)h=h.replace(" "+b[l]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,l=c(this),k=b,o=a.split(ha);f=o[h++];){k=e?k:!l.hasClass(f);l[k?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this, "__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one"; if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r= a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true}, attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&& b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0}; c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem, arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid= d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+ c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h<A.length;h++){C=A[h];if(d.guid===C.guid){if(k||x.test(C.namespace)){e==null&&A.splice(h--,1);r.remove&&r.remove.call(a,C)}if(e!=null)break}}if(A.length===0||e!=null&&A.length===1){if(!r.teardown||r.teardown.call(a,o)===false)c.removeEvent(a,f,w.handle);delete I[f]}}else for(h=0;h<A.length;h++){C=A[h];if(k||x.test(C.namespace)){c.event.remove(a,r,C.handler,h);A.splice(h--,1)}}}if(c.isEmptyObject(I)){if(b= w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,J);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType=== 8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k=== "click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+ d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f<l;f++){var k=d[f];if(b||e.test(k.namespace)){a.handler=k.handler;a.data=k.data;a.handleObj=k;k=k.handler.apply(this,h);if(k!==B){a.result=k;if(k===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||t;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=t.documentElement;d=t.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==B)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ka,guid:a.handler.guid}))},remove:function(a){c.event.remove(this, Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=t.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp= c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ca;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ca;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ca;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U}; var va=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},wa=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?wa:va,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?wa:va)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!== "form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=B;return la("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=B;return la("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V, xa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired= B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type=== "file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]=== 0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d, a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d= 1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var ya={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var l,k=0,o,x,r=h||this.selector;h=h?this:c(this.context);if(typeof d=== "object"&&!d.preventDefault){for(l in d)h[b](l,e,d[l],r);return this}if(c.isFunction(e)){f=e;e=B}for(d=(d||"").split(" ");(l=d[k++])!=null;){o=X.exec(l);x="";if(o){x=o[0];l=l.replace(X,"")}if(l==="hover")d.push("mouseenter"+x,"mouseleave"+x);else{o=l;if(l==="focus"||l==="blur"){d.push(ya[l]+x);l+=x}else l=(ya[l]||l)+x;if(b==="live"){x=0;for(var A=h.length;x<A;x++)c.event.add(h[x],"live."+Y(l,r),{data:e,selector:r,handler:f,origType:l,origHandler:f,preType:o})}else h.unbind("live."+Y(l,r),f)}}return this}}); c.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".split(" "),function(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}}); (function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1&&!q){y.sizcache=n;y.sizset=p}if(y.nodeName.toLowerCase()===i){F=y;break}y=y[g]}m[p]=F}}}function b(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1){if(!q){y.sizcache=n;y.sizset=p}if(typeof i!=="string"){if(y===i){F=true;break}}else if(k.filter(i, [y]).length>0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3]; break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr, q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h= l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*")); return{set:m,expr:g}};k.filter=function(g,i,n,m){for(var p,q,u=g,y=[],F=i,M=i&&i[0]&&k.isXML(i[0]);g&&i.length;){for(var N in o.filter)if((p=o.leftMatch[N].exec(g))!=null&&p[2]){var O,D,R=o.filter[N];D=p[1];q=false;p.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(F===y)y=[];if(o.preFilter[N])if(p=o.preFilter[N](p,F,n,y,m,M)){if(p===true)continue}else q=O=true;if(p)for(var j=0;(D=F[j])!=null;j++)if(D){O=R(D,p,j,F);var s=m^!!O;if(n&&O!=null)if(s)q=true;else F[j]=false;else if(s){y.push(D);q=true}}if(O!== B){n||(F=y);g=g.replace(o.match[N],"");if(!q)return[];break}}}if(g===u)if(q==null)k.error(g);else break;u=g}return F};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var o=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/, POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,i){var n=typeof i==="string",m=n&&!/\W/.test(i);n=n&&!m;if(m)i=i.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=n||q&&q.nodeName.toLowerCase()=== i?q||false:q===i}n&&k.filter(i,g,true)},">":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p<q;p++){if(n=g[p]){n=n.parentNode;g[p]=n.nodeName.toLowerCase()===i?n:false}}else{for(;p<q;p++)if(n=g[p])g[p]=m?n.parentNode:n.parentNode===i;m&&k.filter(i,g,true)}},"":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=i=i.toLowerCase();q=a}q("parentNode",i,p,g,m,n)},"~":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m= i=i.toLowerCase();q=a}q("previousSibling",i,p,g,m,n)}},find:{ID:function(g,i,n){if(typeof i.getElementById!=="undefined"&&!n)return(g=i.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,i){if(typeof i.getElementsByName!=="undefined"){for(var n=[],m=i.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&n.push(m[p]);return n.length===0?null:n}},TAG:function(g,i){return i.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,i,n,m,p,q){g=" "+g[1].replace(/\\/g, "")+" ";if(q)return g;q=0;for(var u;(u=i[q])!=null;q++)if(u)if(p^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n, m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled=== true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"=== g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return i<n[3]-0},gt:function(g,i,n){return i>n[3]-0},nth:function(g,i,n){return n[3]- 0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n<m;n++)if(i[n]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,i){var n=i[1],m=g;switch(n){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(n=== "first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":n=i[2];var p=i[3];if(n===1&&p===0)return true;var q=i[0],u=g.parentNode;if(u&&(u.sizcache!==q||!g.nodeIndex)){var y=0;for(m=u.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++y;u.sizcache=q}m=g.nodeIndex-p;return n===0?m===0:m%n===0&&m/n>=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()=== i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]]; if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m, g);else if(typeof g.length==="number")for(var p=g.length;n<p;n++)m.push(g[n]);else for(;g[n];n++)m.push(g[n]);return m}}var w,I;if(t.documentElement.compareDocumentPosition)w=function(g,i){if(g===i){h=true;return 0}if(!g.compareDocumentPosition||!i.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(i)&4?-1:1};else{w=function(g,i){var n,m,p=[],q=[];n=g.parentNode;m=i.parentNode;var u=n;if(g===i){h=true;return 0}else if(n===m)return I(g,i);else if(n){if(!m)return 1}else return-1; for(;u;){p.unshift(u);u=u.parentNode}for(u=m;u;){q.unshift(u);u=u.parentNode}n=p.length;m=q.length;for(u=0;u<n&&u<m;u++)if(p[u]!==q[u])return I(p[u],q[u]);return u===n?I(g,q[u],-1):I(p[u],i,1)};I=function(g,i,n){if(g===i)return n;for(g=g.nextSibling;g;){if(g===i)return-1;g=g.nextSibling}return 1}}k.getText=function(g){for(var i="",n,m=0;g[m];m++){n=g[m];if(n.nodeType===3||n.nodeType===4)i+=n.nodeValue;else if(n.nodeType!==8)i+=k.getText(n.childNodes)}return i};(function(){var g=t.createElement("div"), i="script"+(new Date).getTime(),n=t.documentElement;g.innerHTML="<a name='"+i+"'/>";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g); n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&& function(){var g=k,i=t.createElement("div");i.innerHTML="<p class='TEST'></p>";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F|| p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g= t.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition? function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n<u;n++)k(g,q[n],m);return k.filter(p,m)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=k.getText;c.isXMLDoc=k.isXML; c.contains=k.contains})();var Za=/Until$/,$a=/^(?:parents|prevUntil|prevAll)/,ab=/,/,Na=/^.[^:#\[\.,]*$/,bb=Array.prototype.slice,cb=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var l=0;l<d;l++)if(b[l]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})}, not:function(a){return this.pushStack(ma(this,a,false),"not",a)},filter:function(a){return this.pushStack(ma(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h= h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(l?l.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context): c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a, 2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a, b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&& e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/<tbody/i,eb=/<|&#?\w+;/,Ca=/<(?:script|object|embed|option|style)/i,Da=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/\=([^="'>\s]+\/)>/g,P={option:[1, "<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null; else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d= c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,f,h,l=a[0],k=[];if(!c.support.checkClone&&arguments.length===3&&typeof l==="string"&&Da.test(l))return this.each(function(){c(this).domManip(a, b,d,true)});if(c.isFunction(l))return this.each(function(x){var r=c(this);a[0]=l.call(this,x,b?r.html():B);r.domManip(a,b,d)});if(this[0]){e=l&&l.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);h=e.fragment;if(f=h.childNodes.length===1?h=h.firstChild:h.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var o=this.length;f<o;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")): this[f]:this[f],f>0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append", prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f<h;f++){var l=(f>0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument|| b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1></$2>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]==="<table>"&&!x?r.childNodes:[];for(o=k.length- 1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script")))); d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i, jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true, zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b), h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b); if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f= d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left; e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b=== "object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("<div>").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&& !this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})}, getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html", script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data|| !T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache= false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset; A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type", b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&& c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d|| c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]= encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess", [b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"), e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}}); if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show", 3),a,b,d);else{d=0;for(var e=this.length;d<e;d++){a=this[d];b=a.style.display;if(!c.data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&c.css(a,"display")==="none"&&c.data(a,"olddisplay",qa(a.nodeName))}for(d=0;d<e;d++){a=this[d];b=a.style.display;if(b===""||b==="none")a.style.display=c.data(a,"olddisplay")||""}return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay", d)}for(a=0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b, d,e);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),l,k=this.nodeType===1,o=k&&c(this).is(":hidden"),x=this;for(l in a){var r=c.camelCase(l);if(l!==r){a[r]=a[l];delete a[l];l=r}if(a[l]==="hide"&&o||a[l]==="show"&&!o)return h.complete.call(this);if(k&&(l==="height"||l==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(qa(this.nodeName)=== "inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[l])){(h.specialEasing=h.specialEasing||{})[l]=a[l][1];a[l]=a[l][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(A,C){var J=new c.fx(x,h,A);if(vb.test(C))J[C==="toggle"?o?"show":"hide":C](a);else{var w=wb.exec(C),I=J.cur()||0;if(w){var L=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(x,A,(L||1)+g);I=(L|| 1)/J.cur()*I;c.style(x,A,I+g)}if(w[1])L=(w[1]==="-="?-1:1)*L+I;J.custom(I,L,g)}else J.custom(I,C,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b, d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a* Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)} var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true; this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide|| this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a= c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(ba);ba=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a=== b.elem}).length};var xb=/^t(?:able|d|h)$/i,Ia=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in t.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(l){c.offset.setOffset(this,a,l)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=fa(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&& h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(x){c.offset.setOffset(this,a,x)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d,e=b.offsetParent,f=b.ownerDocument,h=f.documentElement,l=f.body;d=(f=f.defaultView)?f.getComputedStyle(b,null):b.currentStyle; for(var k=b.offsetTop,o=b.offsetLeft;(b=b.parentNode)&&b!==l&&b!==h;){if(c.offset.supportsFixedPosition&&d.position==="fixed")break;d=f?f.getComputedStyle(b,null):b.currentStyle;k-=b.scrollTop;o-=b.scrollLeft;if(b===e){k+=b.offsetTop;o+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&xb.test(b.nodeName))){k+=parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"){k+= parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}d=d}if(d.position==="relative"||d.position==="static"){k+=l.offsetTop;o+=l.offsetLeft}if(c.offset.supportsFixedPosition&&d.position==="fixed"){k+=Math.max(h.scrollTop,l.scrollTop);o+=Math.max(h.scrollLeft,l.scrollLeft)}return{top:k,left:o}};c.offset={initialize:function(){var a=t.body,b=t.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px", height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells= f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a, "marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a, e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&& c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase(); c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+ b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window);
src/useScroll.js
taion/react-router-scroll
import React from 'react'; import ScrollBehavior from 'scroll-behavior'; import ScrollBehaviorContext from './ScrollBehaviorContext'; function defaultCreateScrollBehavior(config) { return new ScrollBehavior(config); } export default function useScroll(shouldUpdateScrollOrConfig) { let shouldUpdateScroll; let createScrollBehavior; if ( !shouldUpdateScrollOrConfig || typeof shouldUpdateScrollOrConfig === 'function' ) { shouldUpdateScroll = shouldUpdateScrollOrConfig; createScrollBehavior = defaultCreateScrollBehavior; } else { ({ shouldUpdateScroll, createScrollBehavior = defaultCreateScrollBehavior, } = shouldUpdateScrollOrConfig); } return { renderRouterContext: (child, props) => ( <ScrollBehaviorContext shouldUpdateScroll={shouldUpdateScroll} createScrollBehavior={createScrollBehavior} routerProps={props} > {child} </ScrollBehaviorContext> ), }; }
src/index.js
raymondji/focus21-sampleapp
/*eslint-disable import/default*/ import React from 'react'; import {render} from 'react-dom'; import { Provider } from 'react-redux'; import { Router, browserHistory } from 'react-router'; import routes from './routes'; import configureStore from './store/configureStore'; import './styles/styles.scss'; //Yep, that's right. You can import SASS/CSS files too! Webpack will run the associated loader and plug this into the page. const store = configureStore(); render( <Provider store={store}> <Router history={browserHistory} routes={routes} /> </Provider>, document.getElementById('app') );
assets/fe207beb/jquery.min.js
NursultanMuss/ad.myblog.tk
/*! jQuery v1.11.3 | (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="1.11.3",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)+1>=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="length"in a&&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"+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);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 aa(){return!0}function ba(){return!1}function ca(){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!==ca()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ca()&&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?aa:ba):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:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=aa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=aa,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=aa,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=ba;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=ba),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 da(a){var b=ea.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var ea="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fa=/ jQuery\d+="(?:null|\d+)"/g,ga=new RegExp("<(?:"+ea+")[\\s/>]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/<tbody/i,la=/<|&#?\w+;/,ma=/<(?:script|style|link)/i,na=/checked\s*(?:[^=]|=\s*.checked.)/i,oa=/^$|\/(?:java|ecma)script/i,pa=/^true\/(.*)/,qa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ra={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>"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(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,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(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 xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(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 Ba(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?(xa(b).text=a.text,ya(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)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(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=da(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(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?"<table>"!==l[1]||ka.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(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.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=wa(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=wa(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(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(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(ua(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(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(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(ua(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&&na.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(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.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(qa,"")));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 Ca,Da={};function Ea(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 Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[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 Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.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&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.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 La(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.removeChild(i)),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 Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(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",Fa(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 Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(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 Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(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]=Ua(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=Qa.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]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[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?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(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 Na.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(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[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}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),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=Ia(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 Va(this,!0)},hide:function(){return Va(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 Za(a,b,c,d,e){ return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,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=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.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):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.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}}},Za.propHooks.scrollTop=Za.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=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.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 fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(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 hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(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")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(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],ab.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?Fa(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=hb(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 jb(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 kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),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:$a||fb(),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(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,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(kb,{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],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.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=kb(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&&cb.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(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("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($a=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$a=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(){_a||(_a=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_a),_a=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 lb=/\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(lb,""):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 mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=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)?nb:mb)),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)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?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}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&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=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={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}},ob.id=ob.name=ob.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:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.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 sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?: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):sb.test(a.nodeName)||tb.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 ub=/[\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(ub," "):" ")){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(ub," "):"")){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(ub," ").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 vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\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(xb,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 yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(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 Mb(a,b,c,d){var e={},f=a===Ib;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 Nb(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 Ob(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 Pb(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:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,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?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),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=Cb.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||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),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]?", "+Jb+"; 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=Mb(Ib,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=Ob(k,v,c)),u=Pb(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._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 Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(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)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},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")&&Ub.test(this.nodeName)&&!Tb.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(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;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 Xb[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=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){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 _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.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(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.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,_b.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 bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.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.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(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=dc(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||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),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=dc(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]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.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 ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m}); //# sourceMappingURL=jquery.min.map
src/parser/druid/feral/CHANGELOG.js
ronaldpereira/WoWAnalyzer
import React from 'react'; import { Anatta336, Abelito75 } from 'CONTRIBUTORS'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import { change, date } from 'common/changelog'; export default [ change(date(2020, 3,27), <>Improved thresholds of wasted energy to be precentage based.</>, [Abelito75]), change(date(2019, 8, 10), <>Improved tracking of <SpellLink id={SPELLS.FEROCIOUS_BITE.id} /> energy use to account for <SpellLink id={SPELLS.BERSERK.id} />. Also highlights low energy bites on the timeline.</>, [Anatta336]), change(date(2019, 8, 9), <>Fixed tracking pre-pull use of <SpellLink id={SPELLS.BERSERK.id} /> and <SpellLink id={SPELLS.TIGERS_FURY.id} /> so they're properly counted when calculating cast efficiency.</>, [Anatta336]), change(date(2019, 6, 19), <>Improved how finisher combo point use is assessed, low-combo use of <SpellLink id={SPELLS.RIP.id} /> is recognised as correct in certain circumstances.</>, [Anatta336]), change(date(2019, 6, 16), <>Changed which buffs are displayed on the timeline view, making rotation-relevant information clearer.</>, [Anatta336]), change(date(2019, 3, 6), <>Added tracking of <SpellLink id={SPELLS.GUSHING_LACERATIONS_TRAIT.id} />.</>, [Anatta336]), change(date(2019, 2, 26), <>Added tracking of <SpellLink id={SPELLS.IRON_JAWS_TRAIT.id} />.</>, [Anatta336]), change(date(2019, 2, 25), <>Updated explanatory text to reflect changes from patch 8.1.</>, [Anatta336]), change(date(2019, 2, 23), <>Added tracking of <SpellLink id={SPELLS.JUNGLE_FURY_TRAIT.id} />.</>, [Anatta336]), change(date(2019, 2, 8), <>Added tracking of <SpellLink id={SPELLS.UNTAMED_FEROCITY.id} /> and updated <SpellLink id={SPELLS.WILD_FLESHRENDING.id} />.</>, [Anatta336]), change(date(2018, 12, 20), <>Updated tracking of <SpellLink id={SPELLS.RIP.id} /> snapshots, and interaction with <SpellLink id={SPELLS.SABERTOOTH_TALENT.id} /> for patch 8.1.</>, [Anatta336]), change(date(2018, 10, 10), <>Added tracking to Feral for the <SpellLink id={SPELLS.WILD_FLESHRENDING.id} /> Azerite trait.</>, [Anatta336]), change(date(2018, 10, 5), <>Added tracking for using <SpellLink id={SPELLS.SHADOWMELD.id} /> to buff <SpellLink id={SPELLS.RAKE.id} /> damage.</>, [Anatta336]), change(date(2018, 8, 11), <>Added tracking for wasted energy from <SpellLink id={SPELLS.TIGERS_FURY.id} /> and a breakdown of how energy is spent.</>, [Anatta336]), change(date(2018, 8, 5), <>Added a checklist for Feral.</>, [Anatta336]), change(date(2018, 7, 22), <>Corrected <SpellLink id={SPELLS.SAVAGE_ROAR_TALENT.id} /> to only claim credit for damage from abilities it affects in 8.0.1</>, [Anatta336]), change(date(2018, 7, 15), <>Fixed bugs with combo generation from AoE attacks and detecting when <SpellLink id={SPELLS.PRIMAL_FURY.id} /> waste is unavoidable.</>, [Anatta336]), change(date(2018, 7, 15), <>Added tracking for how <SpellLink id={SPELLS.BLOODTALONS_TALENT.id} /> charges are used.</>, [Anatta336]), change(date(2018, 7, 15), 'Added tracking of time spent at maximum energy.', [Anatta336]), change(date(2018, 7, 15), <>Added tracking for number of targets hit by <SpellLink id={SPELLS.SWIPE_CAT.id} />, <SpellLink id={SPELLS.THRASH_FERAL.id} />, and <SpellLink id={SPELLS.BRUTAL_SLASH_TALENT.id} />.</>, [Anatta336]), ];
src/Message/transition.js
yurizhang/ishow
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import requestAnimationFrame from 'raf'; import '../Common/css/Base.css'; export default class Transition extends Component { constructor(props) { super(props); const { children } = props; this.state = { children: children && this.enhanceChildren(children) } this.didEnter = this.didEnter.bind(this); this.didLeave = this.didLeave.bind(this); } componentWillReceiveProps(nextProps) { const children = React.isValidElement(this.props.children) && React.Children.only(this.props.children); const nextChildren = React.isValidElement(nextProps.children) && React.Children.only(nextProps.children); if (!nextProps.name) { this.setState({ children: nextChildren }); return; } if (this.isViewComponent(nextChildren)) { this.setState({ children: this.enhanceChildren(nextChildren, { show: children ? children.props.show : true }) }) } else { if (nextChildren) { this.setState({ children: this.enhanceChildren(nextChildren) }) } } } componentDidUpdate(preProps) { if (!this.props.name) return; const children = React.isValidElement(this.props.children) && React.Children.only(this.props.children); const preChildren = React.isValidElement(preProps.children) && React.Children.only(preProps.children); if (this.isViewComponent(children)) { if ((!preChildren || !preChildren.props.show) && children.props.show) { this.toggleVisible(); } else if (preChildren && preChildren.props.show && !children.props.show) { this.toggleHidden(); } } else { if (!preChildren && children) { this.toggleVisible(); } else if (preChildren && !children) { this.toggleHidden(); } } } enhanceChildren(children, props) { return React.cloneElement(children, Object.assign({ ref: (el) => { this.el = el } }, props)) } get transitionClass() { const { name } = this.props; return { enter: `${name}-enter`, enterActive: `${name}-enter-active`, enterTo: `${name}-enter-to`, leave: `${name}-leave`, leaveActive: `${name}-leave-active`, leaveTo: `${name}-leave-to`, } } isViewComponent(element) { return element && element.type._typeName === 'View'; } /* css animation fix when animation applyied to .{action} instanceof .{action}-active */ animateElement(element, action, active, fn) { element.classList.add(active); const styles = getComputedStyle(element); const duration = parseFloat(styles['animationDuration']) || parseFloat(styles['transitionDuration']); element.classList.add(action); if (duration === 0) { const styles = getComputedStyle(element); const duration = parseFloat(styles['animationDuration']) || parseFloat(styles['transitionDuration']); clearTimeout(this.timeout); this.timeout = setTimeout(() => { fn(); }, duration * 1000) } element.classList.remove(action, active); } didEnter(e) { const childDOM = ReactDOM.findDOMNode(this.el); if (!e || e.target !== childDOM) return; const { onAfterEnter } = this.props; const { enterActive, enterTo } = this.transitionClass; childDOM.classList.remove(enterActive, enterTo); childDOM.removeEventListener('transitionend', this.didEnter); childDOM.removeEventListener('animationend', this.didEnter); onAfterEnter && onAfterEnter(); } didLeave(e) { const childDOM = ReactDOM.findDOMNode(this.el); if (!e || e.target !== childDOM) return; const { onAfterLeave, children } = this.props; const { leaveActive, leaveTo } = this.transitionClass; new Promise((resolve) => { if (this.isViewComponent(children)) { childDOM.removeEventListener('transitionend', this.didLeave); childDOM.removeEventListener('animationend', this.didLeave); requestAnimationFrame(() => { childDOM.style.display = 'none'; childDOM.classList.remove(leaveActive, leaveTo); requestAnimationFrame(resolve); }) } else { this.setState({ children: null }, resolve); } }).then(() => { onAfterLeave && onAfterLeave() }) } toggleVisible() { const { onEnter } = this.props; const { enter, enterActive, enterTo, leaveActive, leaveTo } = this.transitionClass; const childDOM = ReactDOM.findDOMNode(this.el); childDOM.addEventListener('transitionend', this.didEnter); childDOM.addEventListener('animationend', this.didEnter); // this.animateElement(childDOM, enter, enterActive, this.didEnter); requestAnimationFrame(() => { // when hidden transition not end if (childDOM.classList.contains(leaveActive)) { childDOM.classList.remove(leaveActive, leaveTo); childDOM.removeEventListener('transitionend', this.didLeave); childDOM.removeEventListener('animationend', this.didLeave); } childDOM.style.display = ''; childDOM.classList.add(enter, enterActive); onEnter && onEnter(); requestAnimationFrame(() => { childDOM.classList.remove(enter); childDOM.classList.add(enterTo); }) }) } toggleHidden() { const { onLeave } = this.props; const { leave, leaveActive, leaveTo, enterActive, enterTo } = this.transitionClass; const childDOM = ReactDOM.findDOMNode(this.el); childDOM.addEventListener('transitionend', this.didLeave); childDOM.addEventListener('animationend', this.didLeave); // this.animateElement(childDOM, leave, leaveActive, this.didLeave); requestAnimationFrame(() => { // when enter transition not end if (childDOM.classList.contains(enterActive)) { childDOM.classList.remove(enterActive, enterTo); childDOM.removeEventListener('transitionend', this.didEnter); childDOM.removeEventListener('animationend', this.didEnter); } childDOM.classList.add(leave, leaveActive); onLeave && onLeave(); requestAnimationFrame(() => { childDOM.classList.remove(leave); childDOM.classList.add(leaveTo); }) }) } render() { return this.state.children || null; } } Transition.propTypes = { name: PropTypes.string, onEnter: PropTypes.func, // triggered when enter transition start onAfterEnter: PropTypes.func, // triggered when enter transition end onLeave: PropTypes.func, // triggered when leave transition start onAfterLeave: PropTypes.func // tiggered when leave transition end };
admin-assets/dataTables/jquery.js
CamDevlopers/aeu
/*! 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});
public_html/liferay_files/jquery.js
dacopan/portal-uce
/*! jQuery v1.11.0 | (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="".trim,l={},m="1.11.0",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!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));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||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return 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"!==n.type(a)||a.nodeType||n.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(l.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&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},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:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}: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){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=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&&(f=a[b],b=a,a=f),n.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||n.guid++,e):void 0},now:function(){return+new Date},support:l}),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=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="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=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{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(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 mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(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=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?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!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.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},z=b?function(a,b){if(a===b)return j=!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===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.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=db.selectors={cacheLength:50,createPseudo:fb,match:V,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(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===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]||db.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]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(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(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.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(),t=!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&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&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]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)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&&(t&&((l[s]||(l[s]={}))[a]=[u,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()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(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:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?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===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.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 X.test(a.nodeName)},input:function(a){return W.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:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(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]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[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?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;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=[u,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[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(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 sb(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 tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(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?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(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 n.inArray(a,b)>=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=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},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=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.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]:A.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:z,!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}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,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))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(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}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))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?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):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 E(a,b){do a=a[b];while(a&&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 E(a,"nextSibling")},prev:function(a){return E(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 n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document: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&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.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){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&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.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},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 I;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){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(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){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.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()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f }}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),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=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(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 n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,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=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=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},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.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=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=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(".")},i),(m=g[o])||(m=g[o]=[],m.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?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.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=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.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]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.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||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.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)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(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,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=((n.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?n(c,this).index(i)>=0:n.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[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.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=f.srcElement||z),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||z,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!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(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=z.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]===L&&(a[d]=null),a.detachEvent(d,c))},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||a.getPreventDefault&&a.getPreventDefault())?bb:cb):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:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},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}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._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 n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.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=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(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(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=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.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=cb),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}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={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:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(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 yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._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++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.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)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.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),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).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=xb(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=xb(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(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(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(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.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 n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(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(vb(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,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.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(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}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=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.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+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.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 Mb(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=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),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 Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(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}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(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+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},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;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.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=Rb.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"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.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=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[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+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(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 Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,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=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.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):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.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}}},$b.propHooks.scrollTop=$b.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=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.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 gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(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++,m.always(function(){m.always(function(){h.unqueued--,n.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=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.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],bc.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]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(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 lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),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:_b||gc(),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(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,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(lc,{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],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.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(V).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=lc(this,n.extend({},a),f);(e||n._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=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.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=n._data(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(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("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=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=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(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=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,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\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(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b: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||(l.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--)if(d=e[g],n.inArray(n.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}}}}),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}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(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===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),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(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={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}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),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){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){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,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){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(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._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(vc," ").indexOf(b)>=0)return!0;return!1}}),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 wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.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||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.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 Nc(a,b,c,d){var e={},f=a===Jc;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 Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(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 Qc(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:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,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?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),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(!j){j={};while(b=Dc.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||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.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]?", "+Kc+"; 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=Nc(Jc,k,b,v)){v.readyState=1,h&&m.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=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.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&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(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.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),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){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var 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.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return 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||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(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)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},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")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.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(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;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 Yc[g],b=void 0,f.onreadystatechange=n.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=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}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",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.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 ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.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(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.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,ad.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||z;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 cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}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)&&n.inArray("auto",[f,i])>-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={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(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"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.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 W(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 fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n});
ajax/libs/vis/1.1.0/vis.js
emmansun/cdnjs
/** * vis.js * https://github.com/almende/vis * * A dynamic, browser-based visualization library. * * @version 1.1.0 * @date 2014-06-06 * * @license * Copyright (C) 2011-2014 Almende B.V, http://almende.com * * 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. */ !function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.vis=e()}}(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.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){ /** * vis.js module imports */ // Try to load dependencies from the global window object. // If not available there, load via require. var moment = (typeof window !== 'undefined') && window['moment'] || require('moment'); var Emitter = require('emitter-component'); var Hammer; if (typeof window !== 'undefined') { // load hammer.js only when running in a browser (where window is available) Hammer = window['Hammer'] || require('hammerjs'); } else { Hammer = function () { throw Error('hammer.js is only available in a browser, not in node.js.'); } } var mousetrap; if (typeof window !== 'undefined') { // load mousetrap.js only when running in a browser (where window is available) mousetrap = window['mousetrap'] || require('mousetrap'); } else { mousetrap = function () { throw Error('mouseTrap is only available in a browser, not in node.js.'); } } // Internet Explorer 8 and older does not support Array.indexOf, so we define // it here in that case. // http://soledadpenades.com/2007/05/17/arrayindexof-in-internet-explorer/ if(!Array.prototype.indexOf) { Array.prototype.indexOf = function(obj){ for(var i = 0; i < this.length; i++){ if(this[i] == obj){ return i; } } return -1; }; try { console.log("Warning: Ancient browser detected. Please update your browser"); } catch (err) { } } // Internet Explorer 8 and older does not support Array.forEach, so we define // it here in that case. // https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/forEach if (!Array.prototype.forEach) { Array.prototype.forEach = function(fn, scope) { for(var i = 0, len = this.length; i < len; ++i) { fn.call(scope || this, this[i], i, this); } } } // Internet Explorer 8 and older does not support Array.map, so we define it // here in that case. // https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/map // Production steps of ECMA-262, Edition 5, 15.4.4.19 // Reference: http://es5.github.com/#x15.4.4.19 if (!Array.prototype.map) { Array.prototype.map = function(callback, thisArg) { var T, A, k; if (this == null) { throw new TypeError(" this is null or not defined"); } // 1. Let O be the result of calling ToObject passing the |this| value as the argument. var O = Object(this); // 2. Let lenValue be the result of calling the Get internal method of O with the argument "length". // 3. Let len be ToUint32(lenValue). var len = O.length >>> 0; // 4. If IsCallable(callback) is false, throw a TypeError exception. // See: http://es5.github.com/#x9.11 if (typeof callback !== "function") { throw new TypeError(callback + " is not a function"); } // 5. If thisArg was supplied, let T be thisArg; else let T be undefined. if (thisArg) { T = thisArg; } // 6. Let A be a new array created as if by the expression new Array(len) where Array is // the standard built-in constructor with that name and len is the value of len. A = new Array(len); // 7. Let k be 0 k = 0; // 8. Repeat, while k < len while(k < len) { var kValue, mappedValue; // a. Let Pk be ToString(k). // This is implicit for LHS operands of the in operator // b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk. // This step can be combined with c // c. If kPresent is true, then if (k in O) { // i. Let kValue be the result of calling the Get internal method of O with argument Pk. kValue = O[ k ]; // ii. Let mappedValue be the result of calling the Call internal method of callback // with T as the this value and argument list containing kValue, k, and O. mappedValue = callback.call(T, kValue, k, O); // iii. Call the DefineOwnProperty internal method of A with arguments // Pk, Property Descriptor {Value: mappedValue, : true, Enumerable: true, Configurable: true}, // and false. // In browsers that support Object.defineProperty, use the following: // Object.defineProperty(A, Pk, { value: mappedValue, writable: true, enumerable: true, configurable: true }); // For best browser support, use the following: A[ k ] = mappedValue; } // d. Increase k by 1. k++; } // 9. return A return A; }; } // Internet Explorer 8 and older does not support Array.filter, so we define it // here in that case. // https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/filter if (!Array.prototype.filter) { Array.prototype.filter = function(fun /*, thisp */) { "use strict"; if (this == null) { throw new TypeError(); } var t = Object(this); var len = t.length >>> 0; if (typeof fun != "function") { throw new TypeError(); } var res = []; var thisp = arguments[1]; for (var i = 0; i < len; i++) { if (i in t) { var val = t[i]; // in case fun mutates this if (fun.call(thisp, val, i, t)) res.push(val); } } return res; }; } // Internet Explorer 8 and older does not support Object.keys, so we define it // here in that case. // https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/keys if (!Object.keys) { Object.keys = (function () { var hasOwnProperty = Object.prototype.hasOwnProperty, hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'), dontEnums = [ 'toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor' ], dontEnumsLength = dontEnums.length; return function (obj) { if (typeof obj !== 'object' && typeof obj !== 'function' || obj === null) { throw new TypeError('Object.keys called on non-object'); } var result = []; for (var prop in obj) { if (hasOwnProperty.call(obj, prop)) result.push(prop); } if (hasDontEnumBug) { for (var i=0; i < dontEnumsLength; i++) { if (hasOwnProperty.call(obj, dontEnums[i])) result.push(dontEnums[i]); } } return result; } })() } // Internet Explorer 8 and older does not support Array.isArray, // so we define it here in that case. // https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/isArray if(!Array.isArray) { Array.isArray = function (vArg) { return Object.prototype.toString.call(vArg) === "[object Array]"; }; } // Internet Explorer 8 and older does not support Function.bind, // so we define it here in that case. // https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/bind if (!Function.prototype.bind) { Function.prototype.bind = function (oThis) { if (typeof this !== "function") { // closest thing possible to the ECMAScript 5 internal IsCallable function throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); } var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function () {}, fBound = function () { return fToBind.apply(this instanceof fNOP && oThis ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); }; fNOP.prototype = this.prototype; fBound.prototype = new fNOP(); return fBound; }; } // https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/create if (!Object.create) { Object.create = function (o) { if (arguments.length > 1) { throw new Error('Object.create implementation only accepts the first parameter.'); } function F() {} F.prototype = o; return new F(); }; } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind if (!Function.prototype.bind) { Function.prototype.bind = function (oThis) { if (typeof this !== "function") { // closest thing possible to the ECMAScript 5 internal IsCallable function throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); } var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function () {}, fBound = function () { return fToBind.apply(this instanceof fNOP && oThis ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); }; fNOP.prototype = this.prototype; fBound.prototype = new fNOP(); return fBound; }; } /** * utility functions */ var util = {}; /** * Test whether given object is a number * @param {*} object * @return {Boolean} isNumber */ util.isNumber = function isNumber(object) { return (object instanceof Number || typeof object == 'number'); }; /** * Test whether given object is a string * @param {*} object * @return {Boolean} isString */ util.isString = function isString(object) { return (object instanceof String || typeof object == 'string'); }; /** * Test whether given object is a Date, or a String containing a Date * @param {Date | String} object * @return {Boolean} isDate */ util.isDate = function isDate(object) { if (object instanceof Date) { return true; } else if (util.isString(object)) { // test whether this string contains a date var match = ASPDateRegex.exec(object); if (match) { return true; } else if (!isNaN(Date.parse(object))) { return true; } } return false; }; /** * Test whether given object is an instance of google.visualization.DataTable * @param {*} object * @return {Boolean} isDataTable */ util.isDataTable = function isDataTable(object) { return (typeof (google) !== 'undefined') && (google.visualization) && (google.visualization.DataTable) && (object instanceof google.visualization.DataTable); }; /** * Create a semi UUID * source: http://stackoverflow.com/a/105074/1262753 * @return {String} uuid */ util.randomUUID = function randomUUID () { var S4 = function () { return Math.floor( Math.random() * 0x10000 /* 65536 */ ).toString(16); }; return ( S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4() ); }; /** * Extend object a with the properties of object b or a series of objects * Only properties with defined values are copied * @param {Object} a * @param {... Object} b * @return {Object} a */ util.extend = function (a, b) { for (var i = 1, len = arguments.length; i < len; i++) { var other = arguments[i]; for (var prop in other) { if (other.hasOwnProperty(prop) && other[prop] !== undefined) { a[prop] = other[prop]; } } } return a; }; /** * Deep extend an object a with the properties of object b * @param {Object} a * @param {Object} b * @returns {Object} */ util.deepExtend = function deepExtend (a, b) { // TODO: add support for Arrays to deepExtend if (Array.isArray(b)) { throw new TypeError('Arrays are not supported by deepExtend'); } for (var prop in b) { if (b.hasOwnProperty(prop)) { if (b[prop] && b[prop].constructor === Object) { if (a[prop] === undefined) { a[prop] = {}; } if (a[prop].constructor === Object) { deepExtend(a[prop], b[prop]); } else { a[prop] = b[prop]; } } else if (Array.isArray(b[prop])) { throw new TypeError('Arrays are not supported by deepExtend'); } else { a[prop] = b[prop]; } } } return a; }; /** * Test whether all elements in two arrays are equal. * @param {Array} a * @param {Array} b * @return {boolean} Returns true if both arrays have the same length and same * elements. */ util.equalArray = function (a, b) { if (a.length != b.length) return false; for (var i = 0, len = a.length; i < len; i++) { if (a[i] != b[i]) return false; } return true; }; /** * Convert an object to another type * @param {Boolean | Number | String | Date | Moment | Null | undefined} object * @param {String | undefined} type Name of the type. Available types: * 'Boolean', 'Number', 'String', * 'Date', 'Moment', ISODate', 'ASPDate'. * @return {*} object * @throws Error */ util.convert = function convert(object, type) { var match; if (object === undefined) { return undefined; } if (object === null) { return null; } if (!type) { return object; } if (!(typeof type === 'string') && !(type instanceof String)) { throw new Error('Type must be a string'); } //noinspection FallthroughInSwitchStatementJS switch (type) { case 'boolean': case 'Boolean': return Boolean(object); case 'number': case 'Number': return Number(object.valueOf()); case 'string': case 'String': return String(object); case 'Date': if (util.isNumber(object)) { return new Date(object); } if (object instanceof Date) { return new Date(object.valueOf()); } else if (moment.isMoment(object)) { return new Date(object.valueOf()); } if (util.isString(object)) { match = ASPDateRegex.exec(object); if (match) { // object is an ASP date return new Date(Number(match[1])); // parse number } else { return moment(object).toDate(); // parse string } } else { throw new Error( 'Cannot convert object of type ' + util.getType(object) + ' to type Date'); } case 'Moment': if (util.isNumber(object)) { return moment(object); } if (object instanceof Date) { return moment(object.valueOf()); } else if (moment.isMoment(object)) { return moment(object); } if (util.isString(object)) { match = ASPDateRegex.exec(object); if (match) { // object is an ASP date return moment(Number(match[1])); // parse number } else { return moment(object); // parse string } } else { throw new Error( 'Cannot convert object of type ' + util.getType(object) + ' to type Date'); } case 'ISODate': if (util.isNumber(object)) { return new Date(object); } else if (object instanceof Date) { return object.toISOString(); } else if (moment.isMoment(object)) { return object.toDate().toISOString(); } else if (util.isString(object)) { match = ASPDateRegex.exec(object); if (match) { // object is an ASP date return new Date(Number(match[1])).toISOString(); // parse number } else { return new Date(object).toISOString(); // parse string } } else { throw new Error( 'Cannot convert object of type ' + util.getType(object) + ' to type ISODate'); } case 'ASPDate': if (util.isNumber(object)) { return '/Date(' + object + ')/'; } else if (object instanceof Date) { return '/Date(' + object.valueOf() + ')/'; } else if (util.isString(object)) { match = ASPDateRegex.exec(object); var value; if (match) { // object is an ASP date value = new Date(Number(match[1])).valueOf(); // parse number } else { value = new Date(object).valueOf(); // parse string } return '/Date(' + value + ')/'; } else { throw new Error( 'Cannot convert object of type ' + util.getType(object) + ' to type ASPDate'); } default: throw new Error('Cannot convert object of type ' + util.getType(object) + ' to type "' + type + '"'); } }; // parse ASP.Net Date pattern, // for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/' // code from http://momentjs.com/ var ASPDateRegex = /^\/?Date\((\-?\d+)/i; /** * Get the type of an object, for example util.getType([]) returns 'Array' * @param {*} object * @return {String} type */ util.getType = function getType(object) { var type = typeof object; if (type == 'object') { if (object == null) { return 'null'; } if (object instanceof Boolean) { return 'Boolean'; } if (object instanceof Number) { return 'Number'; } if (object instanceof String) { return 'String'; } if (object instanceof Array) { return 'Array'; } if (object instanceof Date) { return 'Date'; } return 'Object'; } else if (type == 'number') { return 'Number'; } else if (type == 'boolean') { return 'Boolean'; } else if (type == 'string') { return 'String'; } return type; }; /** * Retrieve the absolute left value of a DOM element * @param {Element} elem A dom element, for example a div * @return {number} left The absolute left position of this element * in the browser page. */ util.getAbsoluteLeft = function getAbsoluteLeft (elem) { var doc = document.documentElement; var body = document.body; var left = elem.offsetLeft; var e = elem.offsetParent; while (e != null && e != body && e != doc) { left += e.offsetLeft; left -= e.scrollLeft; e = e.offsetParent; } return left; }; /** * Retrieve the absolute top value of a DOM element * @param {Element} elem A dom element, for example a div * @return {number} top The absolute top position of this element * in the browser page. */ util.getAbsoluteTop = function getAbsoluteTop (elem) { var doc = document.documentElement; var body = document.body; var top = elem.offsetTop; var e = elem.offsetParent; while (e != null && e != body && e != doc) { top += e.offsetTop; top -= e.scrollTop; e = e.offsetParent; } return top; }; /** * Get the absolute, vertical mouse position from an event. * @param {Event} event * @return {Number} pageY */ util.getPageY = function getPageY (event) { if ('pageY' in event) { return event.pageY; } else { var clientY; if (('targetTouches' in event) && event.targetTouches.length) { clientY = event.targetTouches[0].clientY; } else { clientY = event.clientY; } var doc = document.documentElement; var body = document.body; return clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); } }; /** * Get the absolute, horizontal mouse position from an event. * @param {Event} event * @return {Number} pageX */ util.getPageX = function getPageX (event) { if ('pageY' in event) { return event.pageX; } else { var clientX; if (('targetTouches' in event) && event.targetTouches.length) { clientX = event.targetTouches[0].clientX; } else { clientX = event.clientX; } var doc = document.documentElement; var body = document.body; return clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); } }; /** * add a className to the given elements style * @param {Element} elem * @param {String} className */ util.addClassName = function addClassName(elem, className) { var classes = elem.className.split(' '); if (classes.indexOf(className) == -1) { classes.push(className); // add the class to the array elem.className = classes.join(' '); } }; /** * add a className to the given elements style * @param {Element} elem * @param {String} className */ util.removeClassName = function removeClassname(elem, className) { var classes = elem.className.split(' '); var index = classes.indexOf(className); if (index != -1) { classes.splice(index, 1); // remove the class from the array elem.className = classes.join(' '); } }; /** * For each method for both arrays and objects. * In case of an array, the built-in Array.forEach() is applied. * In case of an Object, the method loops over all properties of the object. * @param {Object | Array} object An Object or Array * @param {function} callback Callback method, called for each item in * the object or array with three parameters: * callback(value, index, object) */ util.forEach = function forEach (object, callback) { var i, len; if (object instanceof Array) { // array for (i = 0, len = object.length; i < len; i++) { callback(object[i], i, object); } } else { // object for (i in object) { if (object.hasOwnProperty(i)) { callback(object[i], i, object); } } } }; /** * Convert an object into an array: all objects properties are put into the * array. The resulting array is unordered. * @param {Object} object * @param {Array} array */ util.toArray = function toArray(object) { var array = []; for (var prop in object) { if (object.hasOwnProperty(prop)) array.push(object[prop]); } return array; } /** * Update a property in an object * @param {Object} object * @param {String} key * @param {*} value * @return {Boolean} changed */ util.updateProperty = function updateProperty (object, key, value) { if (object[key] !== value) { object[key] = value; return true; } else { return false; } }; /** * Add and event listener. Works for all browsers * @param {Element} element An html element * @param {string} action The action, for example "click", * without the prefix "on" * @param {function} listener The callback function to be executed * @param {boolean} [useCapture] */ util.addEventListener = function addEventListener(element, action, listener, useCapture) { if (element.addEventListener) { if (useCapture === undefined) useCapture = false; if (action === "mousewheel" && navigator.userAgent.indexOf("Firefox") >= 0) { action = "DOMMouseScroll"; // For Firefox } element.addEventListener(action, listener, useCapture); } else { element.attachEvent("on" + action, listener); // IE browsers } }; /** * Remove an event listener from an element * @param {Element} element An html dom element * @param {string} action The name of the event, for example "mousedown" * @param {function} listener The listener function * @param {boolean} [useCapture] */ util.removeEventListener = function removeEventListener(element, action, listener, useCapture) { if (element.removeEventListener) { // non-IE browsers if (useCapture === undefined) useCapture = false; if (action === "mousewheel" && navigator.userAgent.indexOf("Firefox") >= 0) { action = "DOMMouseScroll"; // For Firefox } element.removeEventListener(action, listener, useCapture); } else { // IE browsers element.detachEvent("on" + action, listener); } }; /** * Get HTML element which is the target of the event * @param {Event} event * @return {Element} target element */ util.getTarget = function getTarget(event) { // code from http://www.quirksmode.org/js/events_properties.html if (!event) { event = window.event; } var target; if (event.target) { target = event.target; } else if (event.srcElement) { target = event.srcElement; } if (target.nodeType != undefined && target.nodeType == 3) { // defeat Safari bug target = target.parentNode; } return target; }; /** * Fake a hammer.js gesture. Event can be a ScrollEvent or MouseMoveEvent * @param {Element} element * @param {Event} event */ util.fakeGesture = function fakeGesture (element, event) { var eventType = null; // for hammer.js 1.0.5 var gesture = Hammer.event.collectEventData(this, eventType, event); // for hammer.js 1.0.6 //var touches = Hammer.event.getTouchList(event, eventType); // var gesture = Hammer.event.collectEventData(this, eventType, touches, event); // on IE in standards mode, no touches are recognized by hammer.js, // resulting in NaN values for center.pageX and center.pageY if (isNaN(gesture.center.pageX)) { gesture.center.pageX = event.pageX; } if (isNaN(gesture.center.pageY)) { gesture.center.pageY = event.pageY; } return gesture; }; util.option = {}; /** * Convert a value into a boolean * @param {Boolean | function | undefined} value * @param {Boolean} [defaultValue] * @returns {Boolean} bool */ util.option.asBoolean = function (value, defaultValue) { if (typeof value == 'function') { value = value(); } if (value != null) { return (value != false); } return defaultValue || null; }; /** * Convert a value into a number * @param {Boolean | function | undefined} value * @param {Number} [defaultValue] * @returns {Number} number */ util.option.asNumber = function (value, defaultValue) { if (typeof value == 'function') { value = value(); } if (value != null) { return Number(value) || defaultValue || null; } return defaultValue || null; }; /** * Convert a value into a string * @param {String | function | undefined} value * @param {String} [defaultValue] * @returns {String} str */ util.option.asString = function (value, defaultValue) { if (typeof value == 'function') { value = value(); } if (value != null) { return String(value); } return defaultValue || null; }; /** * Convert a size or location into a string with pixels or a percentage * @param {String | Number | function | undefined} value * @param {String} [defaultValue] * @returns {String} size */ util.option.asSize = function (value, defaultValue) { if (typeof value == 'function') { value = value(); } if (util.isString(value)) { return value; } else if (util.isNumber(value)) { return value + 'px'; } else { return defaultValue || null; } }; /** * Convert a value into a DOM element * @param {HTMLElement | function | undefined} value * @param {HTMLElement} [defaultValue] * @returns {HTMLElement | null} dom */ util.option.asElement = function (value, defaultValue) { if (typeof value == 'function') { value = value(); } return value || defaultValue || null; }; util.GiveDec = function GiveDec(Hex) { var Value; if (Hex == "A") Value = 10; else if (Hex == "B") Value = 11; else if (Hex == "C") Value = 12; else if (Hex == "D") Value = 13; else if (Hex == "E") Value = 14; else if (Hex == "F") Value = 15; else Value = eval(Hex); return Value; }; util.GiveHex = function GiveHex(Dec) { var Value; if(Dec == 10) Value = "A"; else if (Dec == 11) Value = "B"; else if (Dec == 12) Value = "C"; else if (Dec == 13) Value = "D"; else if (Dec == 14) Value = "E"; else if (Dec == 15) Value = "F"; else Value = "" + Dec; return Value; }; /** * Parse a color property into an object with border, background, and * highlight colors * @param {Object | String} color * @return {Object} colorObject */ util.parseColor = function(color) { var c; if (util.isString(color)) { if (util.isValidHex(color)) { var hsv = util.hexToHSV(color); var lighterColorHSV = {h:hsv.h,s:hsv.s * 0.45,v:Math.min(1,hsv.v * 1.05)}; var darkerColorHSV = {h:hsv.h,s:Math.min(1,hsv.v * 1.25),v:hsv.v*0.6}; var darkerColorHex = util.HSVToHex(darkerColorHSV.h ,darkerColorHSV.h ,darkerColorHSV.v); var lighterColorHex = util.HSVToHex(lighterColorHSV.h,lighterColorHSV.s,lighterColorHSV.v); c = { background: color, border:darkerColorHex, highlight: { background:lighterColorHex, border:darkerColorHex }, hover: { background:lighterColorHex, border:darkerColorHex } }; } else { c = { background:color, border:color, highlight: { background:color, border:color }, hover: { background:color, border:color } }; } } else { c = {}; c.background = color.background || 'white'; c.border = color.border || c.background; if (util.isString(color.highlight)) { c.highlight = { border: color.highlight, background: color.highlight } } else { c.highlight = {}; c.highlight.background = color.highlight && color.highlight.background || c.background; c.highlight.border = color.highlight && color.highlight.border || c.border; } if (util.isString(color.hover)) { c.hover = { border: color.hover, background: color.hover } } else { c.hover = {}; c.hover.background = color.hover && color.hover.background || c.background; c.hover.border = color.hover && color.hover.border || c.border; } } return c; }; /** * http://www.yellowpipe.com/yis/tools/hex-to-rgb/color-converter.php * * @param {String} hex * @returns {{r: *, g: *, b: *}} */ util.hexToRGB = function hexToRGB(hex) { hex = hex.replace("#","").toUpperCase(); var a = util.GiveDec(hex.substring(0, 1)); var b = util.GiveDec(hex.substring(1, 2)); var c = util.GiveDec(hex.substring(2, 3)); var d = util.GiveDec(hex.substring(3, 4)); var e = util.GiveDec(hex.substring(4, 5)); var f = util.GiveDec(hex.substring(5, 6)); var r = (a * 16) + b; var g = (c * 16) + d; var b = (e * 16) + f; return {r:r,g:g,b:b}; }; util.RGBToHex = function RGBToHex(red,green,blue) { var a = util.GiveHex(Math.floor(red / 16)); var b = util.GiveHex(red % 16); var c = util.GiveHex(Math.floor(green / 16)); var d = util.GiveHex(green % 16); var e = util.GiveHex(Math.floor(blue / 16)); var f = util.GiveHex(blue % 16); var hex = a + b + c + d + e + f; return "#" + hex; }; /** * http://www.javascripter.net/faq/rgb2hsv.htm * * @param red * @param green * @param blue * @returns {*} * @constructor */ util.RGBToHSV = function RGBToHSV (red,green,blue) { red=red/255; green=green/255; blue=blue/255; var minRGB = Math.min(red,Math.min(green,blue)); var maxRGB = Math.max(red,Math.max(green,blue)); // Black-gray-white if (minRGB == maxRGB) { return {h:0,s:0,v:minRGB}; } // Colors other than black-gray-white: var d = (red==minRGB) ? green-blue : ((blue==minRGB) ? red-green : blue-red); var h = (red==minRGB) ? 3 : ((blue==minRGB) ? 1 : 5); var hue = 60*(h - d/(maxRGB - minRGB))/360; var saturation = (maxRGB - minRGB)/maxRGB; var value = maxRGB; return {h:hue,s:saturation,v:value}; }; /** * https://gist.github.com/mjijackson/5311256 * @param hue * @param saturation * @param value * @returns {{r: number, g: number, b: number}} * @constructor */ util.HSVToRGB = function HSVToRGB(h, s, v) { var r, g, b; var i = Math.floor(h * 6); var f = h * 6 - i; var p = v * (1 - s); var q = v * (1 - f * s); var t = v * (1 - (1 - f) * s); switch (i % 6) { case 0: r = v, g = t, b = p; break; case 1: r = q, g = v, b = p; break; case 2: r = p, g = v, b = t; break; case 3: r = p, g = q, b = v; break; case 4: r = t, g = p, b = v; break; case 5: r = v, g = p, b = q; break; } return {r:Math.floor(r * 255), g:Math.floor(g * 255), b:Math.floor(b * 255) }; }; util.HSVToHex = function HSVToHex(h, s, v) { var rgb = util.HSVToRGB(h, s, v); return util.RGBToHex(rgb.r, rgb.g, rgb.b); }; util.hexToHSV = function hexToHSV(hex) { var rgb = util.hexToRGB(hex); return util.RGBToHSV(rgb.r, rgb.g, rgb.b); }; util.isValidHex = function isValidHex(hex) { var isOk = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hex); return isOk; }; util.copyObject = function copyObject(objectFrom, objectTo) { for (var i in objectFrom) { if (objectFrom.hasOwnProperty(i)) { if (typeof objectFrom[i] == "object") { objectTo[i] = {}; util.copyObject(objectFrom[i], objectTo[i]); } else { objectTo[i] = objectFrom[i]; } } } }; /** * DataSet * * Usage: * var dataSet = new DataSet({ * fieldId: '_id', * convert: { * // ... * } * }); * * dataSet.add(item); * dataSet.add(data); * dataSet.update(item); * dataSet.update(data); * dataSet.remove(id); * dataSet.remove(ids); * var data = dataSet.get(); * var data = dataSet.get(id); * var data = dataSet.get(ids); * var data = dataSet.get(ids, options, data); * dataSet.clear(); * * A data set can: * - add/remove/update data * - gives triggers upon changes in the data * - can import/export data in various data formats * * @param {Array | DataTable} [data] Optional array with initial data * @param {Object} [options] Available options: * {String} fieldId Field name of the id in the * items, 'id' by default. * {Object.<String, String} convert * A map with field names as key, * and the field type as value. * @constructor DataSet */ // TODO: add a DataSet constructor DataSet(data, options) function DataSet (data, options) { this.id = util.randomUUID(); // correctly read optional arguments if (data && !Array.isArray(data) && !util.isDataTable(data)) { options = data; data = null; } this.options = options || {}; this.data = {}; // map with data indexed by id this.fieldId = this.options.fieldId || 'id'; // name of the field containing id this.convert = {}; // field types by field name this.showInternalIds = this.options.showInternalIds || false; // show internal ids with the get function if (this.options.convert) { for (var field in this.options.convert) { if (this.options.convert.hasOwnProperty(field)) { var value = this.options.convert[field]; if (value == 'Date' || value == 'ISODate' || value == 'ASPDate') { this.convert[field] = 'Date'; } else { this.convert[field] = value; } } } } this.subscribers = {}; // event subscribers this.internalIds = {}; // internally generated id's // add initial data when provided if (data) { this.add(data); } } /** * Subscribe to an event, add an event listener * @param {String} event Event name. Available events: 'put', 'update', * 'remove' * @param {function} callback Callback method. Called with three parameters: * {String} event * {Object | null} params * {String | Number} senderId */ DataSet.prototype.on = function on (event, callback) { var subscribers = this.subscribers[event]; if (!subscribers) { subscribers = []; this.subscribers[event] = subscribers; } subscribers.push({ callback: callback }); }; // TODO: make this function deprecated (replaced with `on` since version 0.5) DataSet.prototype.subscribe = DataSet.prototype.on; /** * Unsubscribe from an event, remove an event listener * @param {String} event * @param {function} callback */ DataSet.prototype.off = function off(event, callback) { var subscribers = this.subscribers[event]; if (subscribers) { this.subscribers[event] = subscribers.filter(function (listener) { return (listener.callback != callback); }); } }; // TODO: make this function deprecated (replaced with `on` since version 0.5) DataSet.prototype.unsubscribe = DataSet.prototype.off; /** * Trigger an event * @param {String} event * @param {Object | null} params * @param {String} [senderId] Optional id of the sender. * @private */ DataSet.prototype._trigger = function (event, params, senderId) { if (event == '*') { throw new Error('Cannot trigger event *'); } var subscribers = []; if (event in this.subscribers) { subscribers = subscribers.concat(this.subscribers[event]); } if ('*' in this.subscribers) { subscribers = subscribers.concat(this.subscribers['*']); } for (var i = 0; i < subscribers.length; i++) { var subscriber = subscribers[i]; if (subscriber.callback) { subscriber.callback(event, params, senderId || null); } } }; /** * Add data. * Adding an item will fail when there already is an item with the same id. * @param {Object | Array | DataTable} data * @param {String} [senderId] Optional sender id * @return {Array} addedIds Array with the ids of the added items */ DataSet.prototype.add = function (data, senderId) { var addedIds = [], id, me = this; if (data instanceof Array) { // Array for (var i = 0, len = data.length; i < len; i++) { id = me._addItem(data[i]); addedIds.push(id); } } else if (util.isDataTable(data)) { // Google DataTable var columns = this._getColumnNames(data); for (var row = 0, rows = data.getNumberOfRows(); row < rows; row++) { var item = {}; for (var col = 0, cols = columns.length; col < cols; col++) { var field = columns[col]; item[field] = data.getValue(row, col); } id = me._addItem(item); addedIds.push(id); } } else if (data instanceof Object) { // Single item id = me._addItem(data); addedIds.push(id); } else { throw new Error('Unknown dataType'); } if (addedIds.length) { this._trigger('add', {items: addedIds}, senderId); } return addedIds; }; /** * Update existing items. When an item does not exist, it will be created * @param {Object | Array | DataTable} data * @param {String} [senderId] Optional sender id * @return {Array} updatedIds The ids of the added or updated items */ DataSet.prototype.update = function (data, senderId) { var addedIds = [], updatedIds = [], me = this, fieldId = me.fieldId; var addOrUpdate = function (item) { var id = item[fieldId]; if (me.data[id]) { // update item id = me._updateItem(item); updatedIds.push(id); } else { // add new item id = me._addItem(item); addedIds.push(id); } }; if (data instanceof Array) { // Array for (var i = 0, len = data.length; i < len; i++) { addOrUpdate(data[i]); } } else if (util.isDataTable(data)) { // Google DataTable var columns = this._getColumnNames(data); for (var row = 0, rows = data.getNumberOfRows(); row < rows; row++) { var item = {}; for (var col = 0, cols = columns.length; col < cols; col++) { var field = columns[col]; item[field] = data.getValue(row, col); } addOrUpdate(item); } } else if (data instanceof Object) { // Single item addOrUpdate(data); } else { throw new Error('Unknown dataType'); } if (addedIds.length) { this._trigger('add', {items: addedIds}, senderId); } if (updatedIds.length) { this._trigger('update', {items: updatedIds}, senderId); } return addedIds.concat(updatedIds); }; /** * Get a data item or multiple items. * * Usage: * * get() * get(options: Object) * get(options: Object, data: Array | DataTable) * * get(id: Number | String) * get(id: Number | String, options: Object) * get(id: Number | String, options: Object, data: Array | DataTable) * * get(ids: Number[] | String[]) * get(ids: Number[] | String[], options: Object) * get(ids: Number[] | String[], options: Object, data: Array | DataTable) * * Where: * * {Number | String} id The id of an item * {Number[] | String{}} ids An array with ids of items * {Object} options An Object with options. Available options: * {String} [type] Type of data to be returned. Can * be 'DataTable' or 'Array' (default) * {Object.<String, String>} [convert] * {String[]} [fields] field names to be returned * {function} [filter] filter items * {String | function} [order] Order the items by * a field name or custom sort function. * {Array | DataTable} [data] If provided, items will be appended to this * array or table. Required in case of Google * DataTable. * * @throws Error */ DataSet.prototype.get = function (args) { var me = this; var globalShowInternalIds = this.showInternalIds; // parse the arguments var id, ids, options, data; var firstType = util.getType(arguments[0]); if (firstType == 'String' || firstType == 'Number') { // get(id [, options] [, data]) id = arguments[0]; options = arguments[1]; data = arguments[2]; } else if (firstType == 'Array') { // get(ids [, options] [, data]) ids = arguments[0]; options = arguments[1]; data = arguments[2]; } else { // get([, options] [, data]) options = arguments[0]; data = arguments[1]; } // determine the return type var type; if (options && options.type) { type = (options.type == 'DataTable') ? 'DataTable' : 'Array'; if (data && (type != util.getType(data))) { throw new Error('Type of parameter "data" (' + util.getType(data) + ') ' + 'does not correspond with specified options.type (' + options.type + ')'); } if (type == 'DataTable' && !util.isDataTable(data)) { throw new Error('Parameter "data" must be a DataTable ' + 'when options.type is "DataTable"'); } } else if (data) { type = (util.getType(data) == 'DataTable') ? 'DataTable' : 'Array'; } else { type = 'Array'; } // we allow the setting of this value for a single get request. if (options != undefined) { if (options.showInternalIds != undefined) { this.showInternalIds = options.showInternalIds; } } // build options var convert = options && options.convert || this.options.convert; var filter = options && options.filter; var items = [], item, itemId, i, len; // convert items if (id != undefined) { // return a single item item = me._getItem(id, convert); if (filter && !filter(item)) { item = null; } } else if (ids != undefined) { // return a subset of items for (i = 0, len = ids.length; i < len; i++) { item = me._getItem(ids[i], convert); if (!filter || filter(item)) { items.push(item); } } } else { // return all items for (itemId in this.data) { if (this.data.hasOwnProperty(itemId)) { item = me._getItem(itemId, convert); if (!filter || filter(item)) { items.push(item); } } } } // restore the global value of showInternalIds this.showInternalIds = globalShowInternalIds; // order the results if (options && options.order && id == undefined) { this._sort(items, options.order); } // filter fields of the items if (options && options.fields) { var fields = options.fields; if (id != undefined) { item = this._filterFields(item, fields); } else { for (i = 0, len = items.length; i < len; i++) { items[i] = this._filterFields(items[i], fields); } } } // return the results if (type == 'DataTable') { var columns = this._getColumnNames(data); if (id != undefined) { // append a single item to the data table me._appendRow(data, columns, item); } else { // copy the items to the provided data table for (i = 0, len = items.length; i < len; i++) { me._appendRow(data, columns, items[i]); } } return data; } else { // return an array if (id != undefined) { // a single item return item; } else { // multiple items if (data) { // copy the items to the provided array for (i = 0, len = items.length; i < len; i++) { data.push(items[i]); } return data; } else { // just return our array return items; } } } }; /** * Get ids of all items or from a filtered set of items. * @param {Object} [options] An Object with options. Available options: * {function} [filter] filter items * {String | function} [order] Order the items by * a field name or custom sort function. * @return {Array} ids */ DataSet.prototype.getIds = function (options) { var data = this.data, filter = options && options.filter, order = options && options.order, convert = options && options.convert || this.options.convert, i, len, id, item, items, ids = []; if (filter) { // get filtered items if (order) { // create ordered list items = []; for (id in data) { if (data.hasOwnProperty(id)) { item = this._getItem(id, convert); if (filter(item)) { items.push(item); } } } this._sort(items, order); for (i = 0, len = items.length; i < len; i++) { ids[i] = items[i][this.fieldId]; } } else { // create unordered list for (id in data) { if (data.hasOwnProperty(id)) { item = this._getItem(id, convert); if (filter(item)) { ids.push(item[this.fieldId]); } } } } } else { // get all items if (order) { // create an ordered list items = []; for (id in data) { if (data.hasOwnProperty(id)) { items.push(data[id]); } } this._sort(items, order); for (i = 0, len = items.length; i < len; i++) { ids[i] = items[i][this.fieldId]; } } else { // create unordered list for (id in data) { if (data.hasOwnProperty(id)) { item = data[id]; ids.push(item[this.fieldId]); } } } } return ids; }; /** * Execute a callback function for every item in the dataset. * @param {function} callback * @param {Object} [options] Available options: * {Object.<String, String>} [convert] * {String[]} [fields] filter fields * {function} [filter] filter items * {String | function} [order] Order the items by * a field name or custom sort function. */ DataSet.prototype.forEach = function (callback, options) { var filter = options && options.filter, convert = options && options.convert || this.options.convert, data = this.data, item, id; if (options && options.order) { // execute forEach on ordered list var items = this.get(options); for (var i = 0, len = items.length; i < len; i++) { item = items[i]; id = item[this.fieldId]; callback(item, id); } } else { // unordered for (id in data) { if (data.hasOwnProperty(id)) { item = this._getItem(id, convert); if (!filter || filter(item)) { callback(item, id); } } } } }; /** * Map every item in the dataset. * @param {function} callback * @param {Object} [options] Available options: * {Object.<String, String>} [convert] * {String[]} [fields] filter fields * {function} [filter] filter items * {String | function} [order] Order the items by * a field name or custom sort function. * @return {Object[]} mappedItems */ DataSet.prototype.map = function (callback, options) { var filter = options && options.filter, convert = options && options.convert || this.options.convert, mappedItems = [], data = this.data, item; // convert and filter items for (var id in data) { if (data.hasOwnProperty(id)) { item = this._getItem(id, convert); if (!filter || filter(item)) { mappedItems.push(callback(item, id)); } } } // order items if (options && options.order) { this._sort(mappedItems, options.order); } return mappedItems; }; /** * Filter the fields of an item * @param {Object} item * @param {String[]} fields Field names * @return {Object} filteredItem * @private */ DataSet.prototype._filterFields = function (item, fields) { var filteredItem = {}; for (var field in item) { if (item.hasOwnProperty(field) && (fields.indexOf(field) != -1)) { filteredItem[field] = item[field]; } } return filteredItem; }; /** * Sort the provided array with items * @param {Object[]} items * @param {String | function} order A field name or custom sort function. * @private */ DataSet.prototype._sort = function (items, order) { if (util.isString(order)) { // order by provided field name var name = order; // field name items.sort(function (a, b) { var av = a[name]; var bv = b[name]; return (av > bv) ? 1 : ((av < bv) ? -1 : 0); }); } else if (typeof order === 'function') { // order by sort function items.sort(order); } // TODO: extend order by an Object {field:String, direction:String} // where direction can be 'asc' or 'desc' else { throw new TypeError('Order must be a function or a string'); } }; /** * Remove an object by pointer or by id * @param {String | Number | Object | Array} id Object or id, or an array with * objects or ids to be removed * @param {String} [senderId] Optional sender id * @return {Array} removedIds */ DataSet.prototype.remove = function (id, senderId) { var removedIds = [], i, len, removedId; if (id instanceof Array) { for (i = 0, len = id.length; i < len; i++) { removedId = this._remove(id[i]); if (removedId != null) { removedIds.push(removedId); } } } else { removedId = this._remove(id); if (removedId != null) { removedIds.push(removedId); } } if (removedIds.length) { this._trigger('remove', {items: removedIds}, senderId); } return removedIds; }; /** * Remove an item by its id * @param {Number | String | Object} id id or item * @returns {Number | String | null} id * @private */ DataSet.prototype._remove = function (id) { if (util.isNumber(id) || util.isString(id)) { if (this.data[id]) { delete this.data[id]; delete this.internalIds[id]; return id; } } else if (id instanceof Object) { var itemId = id[this.fieldId]; if (itemId && this.data[itemId]) { delete this.data[itemId]; delete this.internalIds[itemId]; return itemId; } } return null; }; /** * Clear the data * @param {String} [senderId] Optional sender id * @return {Array} removedIds The ids of all removed items */ DataSet.prototype.clear = function (senderId) { var ids = Object.keys(this.data); this.data = {}; this.internalIds = {}; this._trigger('remove', {items: ids}, senderId); return ids; }; /** * Find the item with maximum value of a specified field * @param {String} field * @return {Object | null} item Item containing max value, or null if no items */ DataSet.prototype.max = function (field) { var data = this.data, max = null, maxField = null; for (var id in data) { if (data.hasOwnProperty(id)) { var item = data[id]; var itemField = item[field]; if (itemField != null && (!max || itemField > maxField)) { max = item; maxField = itemField; } } } return max; }; /** * Find the item with minimum value of a specified field * @param {String} field * @return {Object | null} item Item containing max value, or null if no items */ DataSet.prototype.min = function (field) { var data = this.data, min = null, minField = null; for (var id in data) { if (data.hasOwnProperty(id)) { var item = data[id]; var itemField = item[field]; if (itemField != null && (!min || itemField < minField)) { min = item; minField = itemField; } } } return min; }; /** * Find all distinct values of a specified field * @param {String} field * @return {Array} values Array containing all distinct values. If data items * do not contain the specified field are ignored. * The returned array is unordered. */ DataSet.prototype.distinct = function (field) { var data = this.data, values = [], fieldType = this.options.convert[field], count = 0; for (var prop in data) { if (data.hasOwnProperty(prop)) { var item = data[prop]; var value = util.convert(item[field], fieldType); var exists = false; for (var i = 0; i < count; i++) { if (values[i] == value) { exists = true; break; } } if (!exists && (value !== undefined)) { values[count] = value; count++; } } } return values; }; /** * Add a single item. Will fail when an item with the same id already exists. * @param {Object} item * @return {String} id * @private */ DataSet.prototype._addItem = function (item) { var id = item[this.fieldId]; if (id != undefined) { // check whether this id is already taken if (this.data[id]) { // item already exists throw new Error('Cannot add item: item with id ' + id + ' already exists'); } } else { // generate an id id = util.randomUUID(); item[this.fieldId] = id; this.internalIds[id] = item; } var d = {}; for (var field in item) { if (item.hasOwnProperty(field)) { var fieldType = this.convert[field]; // type may be undefined d[field] = util.convert(item[field], fieldType); } } this.data[id] = d; return id; }; /** * Get an item. Fields can be converted to a specific type * @param {String} id * @param {Object.<String, String>} [convert] field types to convert * @return {Object | null} item * @private */ DataSet.prototype._getItem = function (id, convert) { var field, value; // get the item from the dataset var raw = this.data[id]; if (!raw) { return null; } // convert the items field types var converted = {}, fieldId = this.fieldId, internalIds = this.internalIds; if (convert) { for (field in raw) { if (raw.hasOwnProperty(field)) { value = raw[field]; // output all fields, except internal ids if ((field != fieldId) || (!(value in internalIds) || this.showInternalIds)) { converted[field] = util.convert(value, convert[field]); } } } } else { // no field types specified, no converting needed for (field in raw) { if (raw.hasOwnProperty(field)) { value = raw[field]; // output all fields, except internal ids if ((field != fieldId) || (!(value in internalIds) || this.showInternalIds)) { converted[field] = value; } } } } return converted; }; /** * Update a single item: merge with existing item. * Will fail when the item has no id, or when there does not exist an item * with the same id. * @param {Object} item * @return {String} id * @private */ DataSet.prototype._updateItem = function (item) { var id = item[this.fieldId]; if (id == undefined) { throw new Error('Cannot update item: item has no id (item: ' + JSON.stringify(item) + ')'); } var d = this.data[id]; if (!d) { // item doesn't exist throw new Error('Cannot update item: no item with id ' + id + ' found'); } // merge with current item for (var field in item) { if (item.hasOwnProperty(field)) { var fieldType = this.convert[field]; // type may be undefined d[field] = util.convert(item[field], fieldType); } } return id; }; /** * check if an id is an internal or external id * @param id * @returns {boolean} * @private */ DataSet.prototype.isInternalId = function(id) { return (id in this.internalIds); }; /** * Get an array with the column names of a Google DataTable * @param {DataTable} dataTable * @return {String[]} columnNames * @private */ DataSet.prototype._getColumnNames = function (dataTable) { var columns = []; for (var col = 0, cols = dataTable.getNumberOfColumns(); col < cols; col++) { columns[col] = dataTable.getColumnId(col) || dataTable.getColumnLabel(col); } return columns; }; /** * Append an item as a row to the dataTable * @param dataTable * @param columns * @param item * @private */ DataSet.prototype._appendRow = function (dataTable, columns, item) { var row = dataTable.addRow(); for (var col = 0, cols = columns.length; col < cols; col++) { var field = columns[col]; dataTable.setValue(row, col, item[field]); } }; /** * DataView * * a dataview offers a filtered view on a dataset or an other dataview. * * @param {DataSet | DataView} data * @param {Object} [options] Available options: see method get * * @constructor DataView */ function DataView (data, options) { this.id = util.randomUUID(); this.data = null; this.ids = {}; // ids of the items currently in memory (just contains a boolean true) this.options = options || {}; this.fieldId = 'id'; // name of the field containing id this.subscribers = {}; // event subscribers var me = this; this.listener = function () { me._onEvent.apply(me, arguments); }; this.setData(data); } // TODO: implement a function .config() to dynamically update things like configured filter // and trigger changes accordingly /** * Set a data source for the view * @param {DataSet | DataView} data */ DataView.prototype.setData = function (data) { var ids, dataItems, i, len; if (this.data) { // unsubscribe from current dataset if (this.data.unsubscribe) { this.data.unsubscribe('*', this.listener); } // trigger a remove of all items in memory ids = []; for (var id in this.ids) { if (this.ids.hasOwnProperty(id)) { ids.push(id); } } this.ids = {}; this._trigger('remove', {items: ids}); } this.data = data; if (this.data) { // update fieldId this.fieldId = this.options.fieldId || (this.data && this.data.options && this.data.options.fieldId) || 'id'; // trigger an add of all added items ids = this.data.getIds({filter: this.options && this.options.filter}); for (i = 0, len = ids.length; i < len; i++) { id = ids[i]; this.ids[id] = true; } this._trigger('add', {items: ids}); // subscribe to new dataset if (this.data.on) { this.data.on('*', this.listener); } } }; /** * Get data from the data view * * Usage: * * get() * get(options: Object) * get(options: Object, data: Array | DataTable) * * get(id: Number) * get(id: Number, options: Object) * get(id: Number, options: Object, data: Array | DataTable) * * get(ids: Number[]) * get(ids: Number[], options: Object) * get(ids: Number[], options: Object, data: Array | DataTable) * * Where: * * {Number | String} id The id of an item * {Number[] | String{}} ids An array with ids of items * {Object} options An Object with options. Available options: * {String} [type] Type of data to be returned. Can * be 'DataTable' or 'Array' (default) * {Object.<String, String>} [convert] * {String[]} [fields] field names to be returned * {function} [filter] filter items * {String | function} [order] Order the items by * a field name or custom sort function. * {Array | DataTable} [data] If provided, items will be appended to this * array or table. Required in case of Google * DataTable. * @param args */ DataView.prototype.get = function (args) { var me = this; // parse the arguments var ids, options, data; var firstType = util.getType(arguments[0]); if (firstType == 'String' || firstType == 'Number' || firstType == 'Array') { // get(id(s) [, options] [, data]) ids = arguments[0]; // can be a single id or an array with ids options = arguments[1]; data = arguments[2]; } else { // get([, options] [, data]) options = arguments[0]; data = arguments[1]; } // extend the options with the default options and provided options var viewOptions = util.extend({}, this.options, options); // create a combined filter method when needed if (this.options.filter && options && options.filter) { viewOptions.filter = function (item) { return me.options.filter(item) && options.filter(item); } } // build up the call to the linked data set var getArguments = []; if (ids != undefined) { getArguments.push(ids); } getArguments.push(viewOptions); getArguments.push(data); return this.data && this.data.get.apply(this.data, getArguments); }; /** * Get ids of all items or from a filtered set of items. * @param {Object} [options] An Object with options. Available options: * {function} [filter] filter items * {String | function} [order] Order the items by * a field name or custom sort function. * @return {Array} ids */ DataView.prototype.getIds = function (options) { var ids; if (this.data) { var defaultFilter = this.options.filter; var filter; if (options && options.filter) { if (defaultFilter) { filter = function (item) { return defaultFilter(item) && options.filter(item); } } else { filter = options.filter; } } else { filter = defaultFilter; } ids = this.data.getIds({ filter: filter, order: options && options.order }); } else { ids = []; } return ids; }; /** * Event listener. Will propagate all events from the connected data set to * the subscribers of the DataView, but will filter the items and only trigger * when there are changes in the filtered data set. * @param {String} event * @param {Object | null} params * @param {String} senderId * @private */ DataView.prototype._onEvent = function (event, params, senderId) { var i, len, id, item, ids = params && params.items, data = this.data, added = [], updated = [], removed = []; if (ids && data) { switch (event) { case 'add': // filter the ids of the added items for (i = 0, len = ids.length; i < len; i++) { id = ids[i]; item = this.get(id); if (item) { this.ids[id] = true; added.push(id); } } break; case 'update': // determine the event from the views viewpoint: an updated // item can be added, updated, or removed from this view. for (i = 0, len = ids.length; i < len; i++) { id = ids[i]; item = this.get(id); if (item) { if (this.ids[id]) { updated.push(id); } else { this.ids[id] = true; added.push(id); } } else { if (this.ids[id]) { delete this.ids[id]; removed.push(id); } else { // nothing interesting for me :-( } } } break; case 'remove': // filter the ids of the removed items for (i = 0, len = ids.length; i < len; i++) { id = ids[i]; if (this.ids[id]) { delete this.ids[id]; removed.push(id); } } break; } if (added.length) { this._trigger('add', {items: added}, senderId); } if (updated.length) { this._trigger('update', {items: updated}, senderId); } if (removed.length) { this._trigger('remove', {items: removed}, senderId); } } }; // copy subscription functionality from DataSet DataView.prototype.on = DataSet.prototype.on; DataView.prototype.off = DataSet.prototype.off; DataView.prototype._trigger = DataSet.prototype._trigger; // TODO: make these functions deprecated (replaced with `on` and `off` since version 0.5) DataView.prototype.subscribe = DataView.prototype.on; DataView.prototype.unsubscribe = DataView.prototype.off; /** * Utility functions for ordering and stacking of items */ var stack = {}; /** * Order items by their start data * @param {Item[]} items */ stack.orderByStart = function orderByStart(items) { items.sort(function (a, b) { return a.data.start - b.data.start; }); }; /** * Order items by their end date. If they have no end date, their start date * is used. * @param {Item[]} items */ stack.orderByEnd = function orderByEnd(items) { items.sort(function (a, b) { var aTime = ('end' in a.data) ? a.data.end : a.data.start, bTime = ('end' in b.data) ? b.data.end : b.data.start; return aTime - bTime; }); }; /** * Adjust vertical positions of the items such that they don't overlap each * other. * @param {Item[]} items * All visible items * @param {{item: number, axis: number}} margin * Margins between items and between items and the axis. * @param {boolean} [force=false] * If true, all items will be repositioned. If false (default), only * items having a top===null will be re-stacked */ stack.stack = function _stack (items, margin, force) { var i, iMax; if (force) { // reset top position of all items for (i = 0, iMax = items.length; i < iMax; i++) { items[i].top = null; } } // calculate new, non-overlapping positions for (i = 0, iMax = items.length; i < iMax; i++) { var item = items[i]; if (item.top === null) { // initialize top position item.top = margin.axis; do { // TODO: optimize checking for overlap. when there is a gap without items, // you only need to check for items from the next item on, not from zero var collidingItem = null; for (var j = 0, jj = items.length; j < jj; j++) { var other = items[j]; if (other.top !== null && other !== item && stack.collision(item, other, margin.item)) { collidingItem = other; break; } } if (collidingItem != null) { // There is a collision. Reposition the items above the colliding element item.top = collidingItem.top + collidingItem.height + margin.item; } } while (collidingItem); } } }; /** * Adjust vertical positions of the items without stacking them * @param {Item[]} items * All visible items * @param {{item: number, axis: number}} margin * Margins between items and between items and the axis. */ stack.nostack = function nostack (items, margin) { var i, iMax; // reset top position of all items for (i = 0, iMax = items.length; i < iMax; i++) { items[i].top = margin.axis; } }; /** * Test if the two provided items collide * The items must have parameters left, width, top, and height. * @param {Item} a The first item * @param {Item} b The second item * @param {Number} margin A minimum required margin. * If margin is provided, the two items will be * marked colliding when they overlap or * when the margin between the two is smaller than * the requested margin. * @return {boolean} true if a and b collide, else false */ stack.collision = function collision (a, b, margin) { return ((a.left - margin) < (b.left + b.width) && (a.left + a.width + margin) > b.left && (a.top - margin) < (b.top + b.height) && (a.top + a.height + margin) > b.top); }; /** * @constructor TimeStep * The class TimeStep is an iterator for dates. You provide a start date and an * end date. The class itself determines the best scale (step size) based on the * provided start Date, end Date, and minimumStep. * * If minimumStep is provided, the step size is chosen as close as possible * to the minimumStep but larger than minimumStep. If minimumStep is not * provided, the scale is set to 1 DAY. * The minimumStep should correspond with the onscreen size of about 6 characters * * Alternatively, you can set a scale by hand. * After creation, you can initialize the class by executing first(). Then you * can iterate from the start date to the end date via next(). You can check if * the end date is reached with the function hasNext(). After each step, you can * retrieve the current date via getCurrent(). * The TimeStep has scales ranging from milliseconds, seconds, minutes, hours, * days, to years. * * Version: 1.2 * * @param {Date} [start] The start date, for example new Date(2010, 9, 21) * or new Date(2010, 9, 21, 23, 45, 00) * @param {Date} [end] The end date * @param {Number} [minimumStep] Optional. Minimum step size in milliseconds */ function TimeStep(start, end, minimumStep) { // variables this.current = new Date(); this._start = new Date(); this._end = new Date(); this.autoScale = true; this.scale = TimeStep.SCALE.DAY; this.step = 1; // initialize the range this.setRange(start, end, minimumStep); } /// enum scale TimeStep.SCALE = { MILLISECOND: 1, SECOND: 2, MINUTE: 3, HOUR: 4, DAY: 5, WEEKDAY: 6, MONTH: 7, YEAR: 8 }; /** * Set a new range * If minimumStep is provided, the step size is chosen as close as possible * to the minimumStep but larger than minimumStep. If minimumStep is not * provided, the scale is set to 1 DAY. * The minimumStep should correspond with the onscreen size of about 6 characters * @param {Date} [start] The start date and time. * @param {Date} [end] The end date and time. * @param {int} [minimumStep] Optional. Minimum step size in milliseconds */ TimeStep.prototype.setRange = function(start, end, minimumStep) { if (!(start instanceof Date) || !(end instanceof Date)) { throw "No legal start or end date in method setRange"; } this._start = (start != undefined) ? new Date(start.valueOf()) : new Date(); this._end = (end != undefined) ? new Date(end.valueOf()) : new Date(); if (this.autoScale) { this.setMinimumStep(minimumStep); } }; /** * Set the range iterator to the start date. */ TimeStep.prototype.first = function() { this.current = new Date(this._start.valueOf()); this.roundToMinor(); }; /** * Round the current date to the first minor date value * This must be executed once when the current date is set to start Date */ TimeStep.prototype.roundToMinor = function() { // round to floor // IMPORTANT: we have no breaks in this switch! (this is no bug) //noinspection FallthroughInSwitchStatementJS switch (this.scale) { case TimeStep.SCALE.YEAR: this.current.setFullYear(this.step * Math.floor(this.current.getFullYear() / this.step)); this.current.setMonth(0); case TimeStep.SCALE.MONTH: this.current.setDate(1); case TimeStep.SCALE.DAY: // intentional fall through case TimeStep.SCALE.WEEKDAY: this.current.setHours(0); case TimeStep.SCALE.HOUR: this.current.setMinutes(0); case TimeStep.SCALE.MINUTE: this.current.setSeconds(0); case TimeStep.SCALE.SECOND: this.current.setMilliseconds(0); //case TimeStep.SCALE.MILLISECOND: // nothing to do for milliseconds } if (this.step != 1) { // round down to the first minor value that is a multiple of the current step size switch (this.scale) { case TimeStep.SCALE.MILLISECOND: this.current.setMilliseconds(this.current.getMilliseconds() - this.current.getMilliseconds() % this.step); break; case TimeStep.SCALE.SECOND: this.current.setSeconds(this.current.getSeconds() - this.current.getSeconds() % this.step); break; case TimeStep.SCALE.MINUTE: this.current.setMinutes(this.current.getMinutes() - this.current.getMinutes() % this.step); break; case TimeStep.SCALE.HOUR: this.current.setHours(this.current.getHours() - this.current.getHours() % this.step); break; case TimeStep.SCALE.WEEKDAY: // intentional fall through case TimeStep.SCALE.DAY: this.current.setDate((this.current.getDate()-1) - (this.current.getDate()-1) % this.step + 1); break; case TimeStep.SCALE.MONTH: this.current.setMonth(this.current.getMonth() - this.current.getMonth() % this.step); break; case TimeStep.SCALE.YEAR: this.current.setFullYear(this.current.getFullYear() - this.current.getFullYear() % this.step); break; default: break; } } }; /** * Check if the there is a next step * @return {boolean} true if the current date has not passed the end date */ TimeStep.prototype.hasNext = function () { return (this.current.valueOf() <= this._end.valueOf()); }; /** * Do the next step */ TimeStep.prototype.next = function() { var prev = this.current.valueOf(); // Two cases, needed to prevent issues with switching daylight savings // (end of March and end of October) if (this.current.getMonth() < 6) { switch (this.scale) { case TimeStep.SCALE.MILLISECOND: this.current = new Date(this.current.valueOf() + this.step); break; case TimeStep.SCALE.SECOND: this.current = new Date(this.current.valueOf() + this.step * 1000); break; case TimeStep.SCALE.MINUTE: this.current = new Date(this.current.valueOf() + this.step * 1000 * 60); break; case TimeStep.SCALE.HOUR: this.current = new Date(this.current.valueOf() + this.step * 1000 * 60 * 60); // in case of skipping an hour for daylight savings, adjust the hour again (else you get: 0h 5h 9h ... instead of 0h 4h 8h ...) var h = this.current.getHours(); this.current.setHours(h - (h % this.step)); break; case TimeStep.SCALE.WEEKDAY: // intentional fall through case TimeStep.SCALE.DAY: this.current.setDate(this.current.getDate() + this.step); break; case TimeStep.SCALE.MONTH: this.current.setMonth(this.current.getMonth() + this.step); break; case TimeStep.SCALE.YEAR: this.current.setFullYear(this.current.getFullYear() + this.step); break; default: break; } } else { switch (this.scale) { case TimeStep.SCALE.MILLISECOND: this.current = new Date(this.current.valueOf() + this.step); break; case TimeStep.SCALE.SECOND: this.current.setSeconds(this.current.getSeconds() + this.step); break; case TimeStep.SCALE.MINUTE: this.current.setMinutes(this.current.getMinutes() + this.step); break; case TimeStep.SCALE.HOUR: this.current.setHours(this.current.getHours() + this.step); break; case TimeStep.SCALE.WEEKDAY: // intentional fall through case TimeStep.SCALE.DAY: this.current.setDate(this.current.getDate() + this.step); break; case TimeStep.SCALE.MONTH: this.current.setMonth(this.current.getMonth() + this.step); break; case TimeStep.SCALE.YEAR: this.current.setFullYear(this.current.getFullYear() + this.step); break; default: break; } } if (this.step != 1) { // round down to the correct major value switch (this.scale) { case TimeStep.SCALE.MILLISECOND: if(this.current.getMilliseconds() < this.step) this.current.setMilliseconds(0); break; case TimeStep.SCALE.SECOND: if(this.current.getSeconds() < this.step) this.current.setSeconds(0); break; case TimeStep.SCALE.MINUTE: if(this.current.getMinutes() < this.step) this.current.setMinutes(0); break; case TimeStep.SCALE.HOUR: if(this.current.getHours() < this.step) this.current.setHours(0); break; case TimeStep.SCALE.WEEKDAY: // intentional fall through case TimeStep.SCALE.DAY: if(this.current.getDate() < this.step+1) this.current.setDate(1); break; case TimeStep.SCALE.MONTH: if(this.current.getMonth() < this.step) this.current.setMonth(0); break; case TimeStep.SCALE.YEAR: break; // nothing to do for year default: break; } } // safety mechanism: if current time is still unchanged, move to the end if (this.current.valueOf() == prev) { this.current = new Date(this._end.valueOf()); } }; /** * Get the current datetime * @return {Date} current The current date */ TimeStep.prototype.getCurrent = function() { return this.current; }; /** * Set a custom scale. Autoscaling will be disabled. * For example setScale(SCALE.MINUTES, 5) will result * in minor steps of 5 minutes, and major steps of an hour. * * @param {TimeStep.SCALE} newScale * A scale. Choose from SCALE.MILLISECOND, * SCALE.SECOND, SCALE.MINUTE, SCALE.HOUR, * SCALE.WEEKDAY, SCALE.DAY, SCALE.MONTH, * SCALE.YEAR. * @param {Number} newStep A step size, by default 1. Choose for * example 1, 2, 5, or 10. */ TimeStep.prototype.setScale = function(newScale, newStep) { this.scale = newScale; if (newStep > 0) { this.step = newStep; } this.autoScale = false; }; /** * Enable or disable autoscaling * @param {boolean} enable If true, autoascaling is set true */ TimeStep.prototype.setAutoScale = function (enable) { this.autoScale = enable; }; /** * Automatically determine the scale that bests fits the provided minimum step * @param {Number} [minimumStep] The minimum step size in milliseconds */ TimeStep.prototype.setMinimumStep = function(minimumStep) { if (minimumStep == undefined) { return; } var stepYear = (1000 * 60 * 60 * 24 * 30 * 12); var stepMonth = (1000 * 60 * 60 * 24 * 30); var stepDay = (1000 * 60 * 60 * 24); var stepHour = (1000 * 60 * 60); var stepMinute = (1000 * 60); var stepSecond = (1000); var stepMillisecond= (1); // find the smallest step that is larger than the provided minimumStep if (stepYear*1000 > minimumStep) {this.scale = TimeStep.SCALE.YEAR; this.step = 1000;} if (stepYear*500 > minimumStep) {this.scale = TimeStep.SCALE.YEAR; this.step = 500;} if (stepYear*100 > minimumStep) {this.scale = TimeStep.SCALE.YEAR; this.step = 100;} if (stepYear*50 > minimumStep) {this.scale = TimeStep.SCALE.YEAR; this.step = 50;} if (stepYear*10 > minimumStep) {this.scale = TimeStep.SCALE.YEAR; this.step = 10;} if (stepYear*5 > minimumStep) {this.scale = TimeStep.SCALE.YEAR; this.step = 5;} if (stepYear > minimumStep) {this.scale = TimeStep.SCALE.YEAR; this.step = 1;} if (stepMonth*3 > minimumStep) {this.scale = TimeStep.SCALE.MONTH; this.step = 3;} if (stepMonth > minimumStep) {this.scale = TimeStep.SCALE.MONTH; this.step = 1;} if (stepDay*5 > minimumStep) {this.scale = TimeStep.SCALE.DAY; this.step = 5;} if (stepDay*2 > minimumStep) {this.scale = TimeStep.SCALE.DAY; this.step = 2;} if (stepDay > minimumStep) {this.scale = TimeStep.SCALE.DAY; this.step = 1;} if (stepDay/2 > minimumStep) {this.scale = TimeStep.SCALE.WEEKDAY; this.step = 1;} if (stepHour*4 > minimumStep) {this.scale = TimeStep.SCALE.HOUR; this.step = 4;} if (stepHour > minimumStep) {this.scale = TimeStep.SCALE.HOUR; this.step = 1;} if (stepMinute*15 > minimumStep) {this.scale = TimeStep.SCALE.MINUTE; this.step = 15;} if (stepMinute*10 > minimumStep) {this.scale = TimeStep.SCALE.MINUTE; this.step = 10;} if (stepMinute*5 > minimumStep) {this.scale = TimeStep.SCALE.MINUTE; this.step = 5;} if (stepMinute > minimumStep) {this.scale = TimeStep.SCALE.MINUTE; this.step = 1;} if (stepSecond*15 > minimumStep) {this.scale = TimeStep.SCALE.SECOND; this.step = 15;} if (stepSecond*10 > minimumStep) {this.scale = TimeStep.SCALE.SECOND; this.step = 10;} if (stepSecond*5 > minimumStep) {this.scale = TimeStep.SCALE.SECOND; this.step = 5;} if (stepSecond > minimumStep) {this.scale = TimeStep.SCALE.SECOND; this.step = 1;} if (stepMillisecond*200 > minimumStep) {this.scale = TimeStep.SCALE.MILLISECOND; this.step = 200;} if (stepMillisecond*100 > minimumStep) {this.scale = TimeStep.SCALE.MILLISECOND; this.step = 100;} if (stepMillisecond*50 > minimumStep) {this.scale = TimeStep.SCALE.MILLISECOND; this.step = 50;} if (stepMillisecond*10 > minimumStep) {this.scale = TimeStep.SCALE.MILLISECOND; this.step = 10;} if (stepMillisecond*5 > minimumStep) {this.scale = TimeStep.SCALE.MILLISECOND; this.step = 5;} if (stepMillisecond > minimumStep) {this.scale = TimeStep.SCALE.MILLISECOND; this.step = 1;} }; /** * Snap a date to a rounded value. * The snap intervals are dependent on the current scale and step. * @param {Date} date the date to be snapped. * @return {Date} snappedDate */ TimeStep.prototype.snap = function(date) { var clone = new Date(date.valueOf()); if (this.scale == TimeStep.SCALE.YEAR) { var year = clone.getFullYear() + Math.round(clone.getMonth() / 12); clone.setFullYear(Math.round(year / this.step) * this.step); clone.setMonth(0); clone.setDate(0); clone.setHours(0); clone.setMinutes(0); clone.setSeconds(0); clone.setMilliseconds(0); } else if (this.scale == TimeStep.SCALE.MONTH) { if (clone.getDate() > 15) { clone.setDate(1); clone.setMonth(clone.getMonth() + 1); // important: first set Date to 1, after that change the month. } else { clone.setDate(1); } clone.setHours(0); clone.setMinutes(0); clone.setSeconds(0); clone.setMilliseconds(0); } else if (this.scale == TimeStep.SCALE.DAY) { //noinspection FallthroughInSwitchStatementJS switch (this.step) { case 5: case 2: clone.setHours(Math.round(clone.getHours() / 24) * 24); break; default: clone.setHours(Math.round(clone.getHours() / 12) * 12); break; } clone.setMinutes(0); clone.setSeconds(0); clone.setMilliseconds(0); } else if (this.scale == TimeStep.SCALE.WEEKDAY) { //noinspection FallthroughInSwitchStatementJS switch (this.step) { case 5: case 2: clone.setHours(Math.round(clone.getHours() / 12) * 12); break; default: clone.setHours(Math.round(clone.getHours() / 6) * 6); break; } clone.setMinutes(0); clone.setSeconds(0); clone.setMilliseconds(0); } else if (this.scale == TimeStep.SCALE.HOUR) { switch (this.step) { case 4: clone.setMinutes(Math.round(clone.getMinutes() / 60) * 60); break; default: clone.setMinutes(Math.round(clone.getMinutes() / 30) * 30); break; } clone.setSeconds(0); clone.setMilliseconds(0); } else if (this.scale == TimeStep.SCALE.MINUTE) { //noinspection FallthroughInSwitchStatementJS switch (this.step) { case 15: case 10: clone.setMinutes(Math.round(clone.getMinutes() / 5) * 5); clone.setSeconds(0); break; case 5: clone.setSeconds(Math.round(clone.getSeconds() / 60) * 60); break; default: clone.setSeconds(Math.round(clone.getSeconds() / 30) * 30); break; } clone.setMilliseconds(0); } else if (this.scale == TimeStep.SCALE.SECOND) { //noinspection FallthroughInSwitchStatementJS switch (this.step) { case 15: case 10: clone.setSeconds(Math.round(clone.getSeconds() / 5) * 5); clone.setMilliseconds(0); break; case 5: clone.setMilliseconds(Math.round(clone.getMilliseconds() / 1000) * 1000); break; default: clone.setMilliseconds(Math.round(clone.getMilliseconds() / 500) * 500); break; } } else if (this.scale == TimeStep.SCALE.MILLISECOND) { var step = this.step > 5 ? this.step / 2 : 1; clone.setMilliseconds(Math.round(clone.getMilliseconds() / step) * step); } return clone; }; /** * Check if the current value is a major value (for example when the step * is DAY, a major value is each first day of the MONTH) * @return {boolean} true if current date is major, else false. */ TimeStep.prototype.isMajor = function() { switch (this.scale) { case TimeStep.SCALE.MILLISECOND: return (this.current.getMilliseconds() == 0); case TimeStep.SCALE.SECOND: return (this.current.getSeconds() == 0); case TimeStep.SCALE.MINUTE: return (this.current.getHours() == 0) && (this.current.getMinutes() == 0); // Note: this is no bug. Major label is equal for both minute and hour scale case TimeStep.SCALE.HOUR: return (this.current.getHours() == 0); case TimeStep.SCALE.WEEKDAY: // intentional fall through case TimeStep.SCALE.DAY: return (this.current.getDate() == 1); case TimeStep.SCALE.MONTH: return (this.current.getMonth() == 0); case TimeStep.SCALE.YEAR: return false; default: return false; } }; /** * Returns formatted text for the minor axislabel, depending on the current * date and the scale. For example when scale is MINUTE, the current time is * formatted as "hh:mm". * @param {Date} [date] custom date. if not provided, current date is taken */ TimeStep.prototype.getLabelMinor = function(date) { if (date == undefined) { date = this.current; } switch (this.scale) { case TimeStep.SCALE.MILLISECOND: return moment(date).format('SSS'); case TimeStep.SCALE.SECOND: return moment(date).format('s'); case TimeStep.SCALE.MINUTE: return moment(date).format('HH:mm'); case TimeStep.SCALE.HOUR: return moment(date).format('HH:mm'); case TimeStep.SCALE.WEEKDAY: return moment(date).format('ddd D'); case TimeStep.SCALE.DAY: return moment(date).format('D'); case TimeStep.SCALE.MONTH: return moment(date).format('MMM'); case TimeStep.SCALE.YEAR: return moment(date).format('YYYY'); default: return ''; } }; /** * Returns formatted text for the major axis label, depending on the current * date and the scale. For example when scale is MINUTE, the major scale is * hours, and the hour will be formatted as "hh". * @param {Date} [date] custom date. if not provided, current date is taken */ TimeStep.prototype.getLabelMajor = function(date) { if (date == undefined) { date = this.current; } //noinspection FallthroughInSwitchStatementJS switch (this.scale) { case TimeStep.SCALE.MILLISECOND:return moment(date).format('HH:mm:ss'); case TimeStep.SCALE.SECOND: return moment(date).format('D MMMM HH:mm'); case TimeStep.SCALE.MINUTE: case TimeStep.SCALE.HOUR: return moment(date).format('ddd D MMMM'); case TimeStep.SCALE.WEEKDAY: case TimeStep.SCALE.DAY: return moment(date).format('MMMM YYYY'); case TimeStep.SCALE.MONTH: return moment(date).format('YYYY'); case TimeStep.SCALE.YEAR: return ''; default: return ''; } }; /** * @constructor Range * A Range controls a numeric range with a start and end value. * The Range adjusts the range based on mouse events or programmatic changes, * and triggers events when the range is changing or has been changed. * @param {RootPanel} root Root panel, used to subscribe to events * @param {Panel} parent Parent panel, used to attach to the DOM * @param {Object} [options] See description at Range.setOptions */ function Range(root, parent, options) { this.id = util.randomUUID(); this.start = null; // Number this.end = null; // Number this.root = root; this.parent = parent; this.options = options || {}; // drag listeners for dragging this.root.on('dragstart', this._onDragStart.bind(this)); this.root.on('drag', this._onDrag.bind(this)); this.root.on('dragend', this._onDragEnd.bind(this)); // ignore dragging when holding this.root.on('hold', this._onHold.bind(this)); // mouse wheel for zooming this.root.on('mousewheel', this._onMouseWheel.bind(this)); this.root.on('DOMMouseScroll', this._onMouseWheel.bind(this)); // For FF // pinch to zoom this.root.on('touch', this._onTouch.bind(this)); this.root.on('pinch', this._onPinch.bind(this)); this.setOptions(options); } // turn Range into an event emitter Emitter(Range.prototype); /** * Set options for the range controller * @param {Object} options Available options: * {Number} min Minimum value for start * {Number} max Maximum value for end * {Number} zoomMin Set a minimum value for * (end - start). * {Number} zoomMax Set a maximum value for * (end - start). */ Range.prototype.setOptions = function (options) { util.extend(this.options, options); // re-apply range with new limitations if (this.start !== null && this.end !== null) { this.setRange(this.start, this.end); } }; /** * Test whether direction has a valid value * @param {String} direction 'horizontal' or 'vertical' */ function validateDirection (direction) { if (direction != 'horizontal' && direction != 'vertical') { throw new TypeError('Unknown direction "' + direction + '". ' + 'Choose "horizontal" or "vertical".'); } } /** * Set a new start and end range * @param {Number} [start] * @param {Number} [end] */ Range.prototype.setRange = function(start, end) { var changed = this._applyRange(start, end); if (changed) { var params = { start: new Date(this.start), end: new Date(this.end) }; this.emit('rangechange', params); this.emit('rangechanged', params); } }; /** * Set a new start and end range. This method is the same as setRange, but * does not trigger a range change and range changed event, and it returns * true when the range is changed * @param {Number} [start] * @param {Number} [end] * @return {Boolean} changed * @private */ Range.prototype._applyRange = function(start, end) { var newStart = (start != null) ? util.convert(start, 'Date').valueOf() : this.start, newEnd = (end != null) ? util.convert(end, 'Date').valueOf() : this.end, max = (this.options.max != null) ? util.convert(this.options.max, 'Date').valueOf() : null, min = (this.options.min != null) ? util.convert(this.options.min, 'Date').valueOf() : null, diff; // check for valid number if (isNaN(newStart) || newStart === null) { throw new Error('Invalid start "' + start + '"'); } if (isNaN(newEnd) || newEnd === null) { throw new Error('Invalid end "' + end + '"'); } // prevent start < end if (newEnd < newStart) { newEnd = newStart; } // prevent start < min if (min !== null) { if (newStart < min) { diff = (min - newStart); newStart += diff; newEnd += diff; // prevent end > max if (max != null) { if (newEnd > max) { newEnd = max; } } } } // prevent end > max if (max !== null) { if (newEnd > max) { diff = (newEnd - max); newStart -= diff; newEnd -= diff; // prevent start < min if (min != null) { if (newStart < min) { newStart = min; } } } } // prevent (end-start) < zoomMin if (this.options.zoomMin !== null) { var zoomMin = parseFloat(this.options.zoomMin); if (zoomMin < 0) { zoomMin = 0; } if ((newEnd - newStart) < zoomMin) { if ((this.end - this.start) === zoomMin) { // ignore this action, we are already zoomed to the minimum newStart = this.start; newEnd = this.end; } else { // zoom to the minimum diff = (zoomMin - (newEnd - newStart)); newStart -= diff / 2; newEnd += diff / 2; } } } // prevent (end-start) > zoomMax if (this.options.zoomMax !== null) { var zoomMax = parseFloat(this.options.zoomMax); if (zoomMax < 0) { zoomMax = 0; } if ((newEnd - newStart) > zoomMax) { if ((this.end - this.start) === zoomMax) { // ignore this action, we are already zoomed to the maximum newStart = this.start; newEnd = this.end; } else { // zoom to the maximum diff = ((newEnd - newStart) - zoomMax); newStart += diff / 2; newEnd -= diff / 2; } } } var changed = (this.start != newStart || this.end != newEnd); this.start = newStart; this.end = newEnd; return changed; }; /** * Retrieve the current range. * @return {Object} An object with start and end properties */ Range.prototype.getRange = function() { return { start: this.start, end: this.end }; }; /** * Calculate the conversion offset and scale for current range, based on * the provided width * @param {Number} width * @returns {{offset: number, scale: number}} conversion */ Range.prototype.conversion = function (width) { return Range.conversion(this.start, this.end, width); }; /** * Static method to calculate the conversion offset and scale for a range, * based on the provided start, end, and width * @param {Number} start * @param {Number} end * @param {Number} width * @returns {{offset: number, scale: number}} conversion */ Range.conversion = function (start, end, width) { if (width != 0 && (end - start != 0)) { return { offset: start, scale: width / (end - start) } } else { return { offset: 0, scale: 1 }; } }; // global (private) object to store drag params var touchParams = {}; /** * Start dragging horizontally or vertically * @param {Event} event * @private */ Range.prototype._onDragStart = function(event) { // refuse to drag when we where pinching to prevent the timeline make a jump // when releasing the fingers in opposite order from the touch screen if (touchParams.ignore) return; // TODO: reckon with option movable touchParams.start = this.start; touchParams.end = this.end; var frame = this.parent.frame; if (frame) { frame.style.cursor = 'move'; } }; /** * Perform dragging operating. * @param {Event} event * @private */ Range.prototype._onDrag = function (event) { var direction = this.options.direction; validateDirection(direction); // TODO: reckon with option movable // refuse to drag when we where pinching to prevent the timeline make a jump // when releasing the fingers in opposite order from the touch screen if (touchParams.ignore) return; var delta = (direction == 'horizontal') ? event.gesture.deltaX : event.gesture.deltaY, interval = (touchParams.end - touchParams.start), width = (direction == 'horizontal') ? this.parent.width : this.parent.height, diffRange = -delta / width * interval; this._applyRange(touchParams.start + diffRange, touchParams.end + diffRange); this.emit('rangechange', { start: new Date(this.start), end: new Date(this.end) }); }; /** * Stop dragging operating. * @param {event} event * @private */ Range.prototype._onDragEnd = function (event) { // refuse to drag when we where pinching to prevent the timeline make a jump // when releasing the fingers in opposite order from the touch screen if (touchParams.ignore) return; // TODO: reckon with option movable if (this.parent.frame) { this.parent.frame.style.cursor = 'auto'; } // fire a rangechanged event this.emit('rangechanged', { start: new Date(this.start), end: new Date(this.end) }); }; /** * Event handler for mouse wheel event, used to zoom * Code from http://adomas.org/javascript-mouse-wheel/ * @param {Event} event * @private */ Range.prototype._onMouseWheel = function(event) { // TODO: reckon with option zoomable // retrieve delta var delta = 0; if (event.wheelDelta) { /* IE/Opera. */ delta = event.wheelDelta / 120; } else if (event.detail) { /* Mozilla case. */ // In Mozilla, sign of delta is different than in IE. // Also, delta is multiple of 3. delta = -event.detail / 3; } // If delta is nonzero, handle it. // Basically, delta is now positive if wheel was scrolled up, // and negative, if wheel was scrolled down. if (delta) { // perform the zoom action. Delta is normally 1 or -1 // adjust a negative delta such that zooming in with delta 0.1 // equals zooming out with a delta -0.1 var scale; if (delta < 0) { scale = 1 - (delta / 5); } else { scale = 1 / (1 + (delta / 5)) ; } // calculate center, the date to zoom around var gesture = util.fakeGesture(this, event), pointer = getPointer(gesture.center, this.parent.frame), pointerDate = this._pointerToDate(pointer); this.zoom(scale, pointerDate); } // Prevent default actions caused by mouse wheel // (else the page and timeline both zoom and scroll) event.preventDefault(); }; /** * Start of a touch gesture * @private */ Range.prototype._onTouch = function (event) { touchParams.start = this.start; touchParams.end = this.end; touchParams.ignore = false; touchParams.center = null; // don't move the range when dragging a selected event // TODO: it's not so neat to have to know about the state of the ItemSet var item = ItemSet.itemFromTarget(event); if (item && item.selected && this.options.editable) { touchParams.ignore = true; } }; /** * On start of a hold gesture * @private */ Range.prototype._onHold = function () { touchParams.ignore = true; }; /** * Handle pinch event * @param {Event} event * @private */ Range.prototype._onPinch = function (event) { var direction = this.options.direction; touchParams.ignore = true; // TODO: reckon with option zoomable if (event.gesture.touches.length > 1) { if (!touchParams.center) { touchParams.center = getPointer(event.gesture.center, this.parent.frame); } var scale = 1 / event.gesture.scale, initDate = this._pointerToDate(touchParams.center), center = getPointer(event.gesture.center, this.parent.frame), date = this._pointerToDate(this.parent, center), delta = date - initDate; // TODO: utilize delta // calculate new start and end var newStart = parseInt(initDate + (touchParams.start - initDate) * scale); var newEnd = parseInt(initDate + (touchParams.end - initDate) * scale); // apply new range this.setRange(newStart, newEnd); } }; /** * Helper function to calculate the center date for zooming * @param {{x: Number, y: Number}} pointer * @return {number} date * @private */ Range.prototype._pointerToDate = function (pointer) { var conversion; var direction = this.options.direction; validateDirection(direction); if (direction == 'horizontal') { var width = this.parent.width; conversion = this.conversion(width); return pointer.x / conversion.scale + conversion.offset; } else { var height = this.parent.height; conversion = this.conversion(height); return pointer.y / conversion.scale + conversion.offset; } }; /** * Get the pointer location relative to the location of the dom element * @param {{pageX: Number, pageY: Number}} touch * @param {Element} element HTML DOM element * @return {{x: Number, y: Number}} pointer * @private */ function getPointer (touch, element) { return { x: touch.pageX - vis.util.getAbsoluteLeft(element), y: touch.pageY - vis.util.getAbsoluteTop(element) }; } /** * Zoom the range the given scale in or out. Start and end date will * be adjusted, and the timeline will be redrawn. You can optionally give a * date around which to zoom. * For example, try scale = 0.9 or 1.1 * @param {Number} scale Scaling factor. Values above 1 will zoom out, * values below 1 will zoom in. * @param {Number} [center] Value representing a date around which will * be zoomed. */ Range.prototype.zoom = function(scale, center) { // if centerDate is not provided, take it half between start Date and end Date if (center == null) { center = (this.start + this.end) / 2; } // calculate new start and end var newStart = center + (this.start - center) * scale; var newEnd = center + (this.end - center) * scale; this.setRange(newStart, newEnd); }; /** * Move the range with a given delta to the left or right. Start and end * value will be adjusted. For example, try delta = 0.1 or -0.1 * @param {Number} delta Moving amount. Positive value will move right, * negative value will move left */ Range.prototype.move = function(delta) { // zoom start Date and end Date relative to the centerDate var diff = (this.end - this.start); // apply new values var newStart = this.start + diff * delta; var newEnd = this.end + diff * delta; // TODO: reckon with min and max range this.start = newStart; this.end = newEnd; }; /** * Move the range to a new center point * @param {Number} moveTo New center point of the range */ Range.prototype.moveTo = function(moveTo) { var center = (this.start + this.end) / 2; var diff = center - moveTo; // calculate new start and end var newStart = this.start - diff; var newEnd = this.end - diff; this.setRange(newStart, newEnd); }; /** * Prototype for visual components */ function Component () { this.id = null; this.parent = null; this.childs = null; this.options = null; this.top = 0; this.left = 0; this.width = 0; this.height = 0; } // Turn the Component into an event emitter Emitter(Component.prototype); /** * Set parameters for the frame. Parameters will be merged in current parameter * set. * @param {Object} options Available parameters: * {String | function} [className] * {String | Number | function} [left] * {String | Number | function} [top] * {String | Number | function} [width] * {String | Number | function} [height] */ Component.prototype.setOptions = function setOptions(options) { if (options) { util.extend(this.options, options); this.repaint(); } }; /** * Get an option value by name * The function will first check this.options object, and else will check * this.defaultOptions. * @param {String} name * @return {*} value */ Component.prototype.getOption = function getOption(name) { var value; if (this.options) { value = this.options[name]; } if (value === undefined && this.defaultOptions) { value = this.defaultOptions[name]; } return value; }; /** * Get the frame element of the component, the outer HTML DOM element. * @returns {HTMLElement | null} frame */ Component.prototype.getFrame = function getFrame() { // should be implemented by the component return null; }; /** * Repaint the component * @return {boolean} Returns true if the component is resized */ Component.prototype.repaint = function repaint() { // should be implemented by the component return false; }; /** * Test whether the component is resized since the last time _isResized() was * called. * @return {Boolean} Returns true if the component is resized * @protected */ Component.prototype._isResized = function _isResized() { var resized = (this._previousWidth !== this.width || this._previousHeight !== this.height); this._previousWidth = this.width; this._previousHeight = this.height; return resized; }; /** * A panel can contain components * @param {Object} [options] Available parameters: * {String | Number | function} [left] * {String | Number | function} [top] * {String | Number | function} [width] * {String | Number | function} [height] * {String | function} [className] * @constructor Panel * @extends Component */ function Panel(options) { this.id = util.randomUUID(); this.parent = null; this.childs = []; this.options = options || {}; // create frame this.frame = (typeof document !== 'undefined') ? document.createElement('div') : null; } Panel.prototype = new Component(); /** * Set options. Will extend the current options. * @param {Object} [options] Available parameters: * {String | function} [className] * {String | Number | function} [left] * {String | Number | function} [top] * {String | Number | function} [width] * {String | Number | function} [height] */ Panel.prototype.setOptions = Component.prototype.setOptions; /** * Get the outer frame of the panel * @returns {HTMLElement} frame */ Panel.prototype.getFrame = function () { return this.frame; }; /** * Append a child to the panel * @param {Component} child */ Panel.prototype.appendChild = function (child) { this.childs.push(child); child.parent = this; // attach to the DOM var frame = child.getFrame(); if (frame) { if (frame.parentNode) { frame.parentNode.removeChild(frame); } this.frame.appendChild(frame); } }; /** * Insert a child to the panel * @param {Component} child * @param {Component} beforeChild */ Panel.prototype.insertBefore = function (child, beforeChild) { var index = this.childs.indexOf(beforeChild); if (index != -1) { this.childs.splice(index, 0, child); child.parent = this; // attach to the DOM var frame = child.getFrame(); if (frame) { if (frame.parentNode) { frame.parentNode.removeChild(frame); } var beforeFrame = beforeChild.getFrame(); if (beforeFrame) { this.frame.insertBefore(frame, beforeFrame); } else { this.frame.appendChild(frame); } } } }; /** * Remove a child from the panel * @param {Component} child */ Panel.prototype.removeChild = function (child) { var index = this.childs.indexOf(child); if (index != -1) { this.childs.splice(index, 1); child.parent = null; // remove from the DOM var frame = child.getFrame(); if (frame && frame.parentNode) { this.frame.removeChild(frame); } } }; /** * Test whether the panel contains given child * @param {Component} child */ Panel.prototype.hasChild = function (child) { var index = this.childs.indexOf(child); return (index != -1); }; /** * Repaint the component * @return {boolean} Returns true if the component was resized since previous repaint */ Panel.prototype.repaint = function () { var asString = util.option.asString, options = this.options, frame = this.getFrame(); // update className frame.className = 'vpanel' + (options.className ? (' ' + asString(options.className)) : ''); // repaint the child components var childsResized = this._repaintChilds(); // update frame size this._updateSize(); return this._isResized() || childsResized; }; /** * Repaint all childs of the panel * @return {boolean} Returns true if the component is resized * @private */ Panel.prototype._repaintChilds = function () { var resized = false; for (var i = 0, ii = this.childs.length; i < ii; i++) { resized = this.childs[i].repaint() || resized; } return resized; }; /** * Apply the size from options to the panel, and recalculate it's actual size. * @private */ Panel.prototype._updateSize = function () { // apply size this.frame.style.top = util.option.asSize(this.options.top); this.frame.style.bottom = util.option.asSize(this.options.bottom); this.frame.style.left = util.option.asSize(this.options.left); this.frame.style.right = util.option.asSize(this.options.right); this.frame.style.width = util.option.asSize(this.options.width, '100%'); this.frame.style.height = util.option.asSize(this.options.height, ''); // get actual size this.top = this.frame.offsetTop; this.left = this.frame.offsetLeft; this.width = this.frame.offsetWidth; this.height = this.frame.offsetHeight; }; /** * A root panel can hold components. The root panel must be initialized with * a DOM element as container. * @param {HTMLElement} container * @param {Object} [options] Available parameters: see RootPanel.setOptions. * @constructor RootPanel * @extends Panel */ function RootPanel(container, options) { this.id = util.randomUUID(); this.container = container; this.options = options || {}; this.defaultOptions = { autoResize: true }; // create the HTML DOM this._create(); // attach the root panel to the provided container if (!this.container) throw new Error('Cannot repaint root panel: no container attached'); this.container.appendChild(this.getFrame()); this._initWatch(); } RootPanel.prototype = new Panel(); /** * Create the HTML DOM for the root panel */ RootPanel.prototype._create = function _create() { // create frame this.frame = document.createElement('div'); // create event listeners for all interesting events, these events will be // emitted via emitter this.hammer = Hammer(this.frame, { prevent_default: true }); this.listeners = {}; var me = this; var events = [ 'touch', 'pinch', 'tap', 'doubletap', 'hold', 'dragstart', 'drag', 'dragend', 'mousewheel', 'DOMMouseScroll' // DOMMouseScroll is for Firefox ]; events.forEach(function (event) { var listener = function () { var args = [event].concat(Array.prototype.slice.call(arguments, 0)); me.emit.apply(me, args); }; me.hammer.on(event, listener); me.listeners[event] = listener; }); }; /** * Set options. Will extend the current options. * @param {Object} [options] Available parameters: * {String | function} [className] * {String | Number | function} [left] * {String | Number | function} [top] * {String | Number | function} [width] * {String | Number | function} [height] * {Boolean | function} [autoResize] */ RootPanel.prototype.setOptions = function setOptions(options) { if (options) { util.extend(this.options, options); this.repaint(); this._initWatch(); } }; /** * Get the frame of the root panel */ RootPanel.prototype.getFrame = function getFrame() { return this.frame; }; /** * Repaint the root panel */ RootPanel.prototype.repaint = function repaint() { // update class name var options = this.options; var editable = options.editable.updateTime || options.editable.updateGroup; var className = 'vis timeline rootpanel ' + options.orientation + (editable ? ' editable' : ''); if (options.className) className += ' ' + util.option.asString(className); this.frame.className = className; // repaint the child components var childsResized = this._repaintChilds(); // update frame size this.frame.style.maxHeight = util.option.asSize(this.options.maxHeight, ''); this.frame.style.minHeight = util.option.asSize(this.options.minHeight, ''); this._updateSize(); // if the root panel or any of its childs is resized, repaint again, // as other components may need to be resized accordingly var resized = this._isResized() || childsResized; if (resized) { setTimeout(this.repaint.bind(this), 0); } }; /** * Initialize watching when option autoResize is true * @private */ RootPanel.prototype._initWatch = function _initWatch() { var autoResize = this.getOption('autoResize'); if (autoResize) { this._watch(); } else { this._unwatch(); } }; /** * Watch for changes in the size of the frame. On resize, the Panel will * automatically redraw itself. * @private */ RootPanel.prototype._watch = function _watch() { var me = this; this._unwatch(); var checkSize = function checkSize() { var autoResize = me.getOption('autoResize'); if (!autoResize) { // stop watching when the option autoResize is changed to false me._unwatch(); return; } if (me.frame) { // check whether the frame is resized if ((me.frame.clientWidth != me.lastWidth) || (me.frame.clientHeight != me.lastHeight)) { me.lastWidth = me.frame.clientWidth; me.lastHeight = me.frame.clientHeight; me.repaint(); // TODO: emit a resize event instead? } } }; // TODO: automatically cleanup the event listener when the frame is deleted util.addEventListener(window, 'resize', checkSize); this.watchTimer = setInterval(checkSize, 1000); }; /** * Stop watching for a resize of the frame. * @private */ RootPanel.prototype._unwatch = function _unwatch() { if (this.watchTimer) { clearInterval(this.watchTimer); this.watchTimer = undefined; } // TODO: remove event listener on window.resize }; /** * A horizontal time axis * @param {Object} [options] See TimeAxis.setOptions for the available * options. * @constructor TimeAxis * @extends Component */ function TimeAxis (options) { this.id = util.randomUUID(); this.dom = { majorLines: [], majorTexts: [], minorLines: [], minorTexts: [], redundant: { majorLines: [], majorTexts: [], minorLines: [], minorTexts: [] } }; this.props = { range: { start: 0, end: 0, minimumStep: 0 }, lineTop: 0 }; this.options = options || {}; this.defaultOptions = { orientation: 'bottom', // supported: 'top', 'bottom' // TODO: implement timeaxis orientations 'left' and 'right' showMinorLabels: true, showMajorLabels: true }; this.range = null; // create the HTML DOM this._create(); } TimeAxis.prototype = new Component(); // TODO: comment options TimeAxis.prototype.setOptions = Component.prototype.setOptions; /** * Create the HTML DOM for the TimeAxis */ TimeAxis.prototype._create = function _create() { this.frame = document.createElement('div'); }; /** * Set a range (start and end) * @param {Range | Object} range A Range or an object containing start and end. */ TimeAxis.prototype.setRange = function (range) { if (!(range instanceof Range) && (!range || !range.start || !range.end)) { throw new TypeError('Range must be an instance of Range, ' + 'or an object containing start and end.'); } this.range = range; }; /** * Get the outer frame of the time axis * @return {HTMLElement} frame */ TimeAxis.prototype.getFrame = function getFrame() { return this.frame; }; /** * Repaint the component * @return {boolean} Returns true if the component is resized */ TimeAxis.prototype.repaint = function () { var asSize = util.option.asSize, options = this.options, props = this.props, frame = this.frame; // update classname frame.className = 'timeaxis'; // TODO: add className from options if defined var parent = frame.parentNode; if (parent) { // calculate character width and height this._calculateCharSize(); // TODO: recalculate sizes only needed when parent is resized or options is changed var orientation = this.getOption('orientation'), showMinorLabels = this.getOption('showMinorLabels'), showMajorLabels = this.getOption('showMajorLabels'); // determine the width and height of the elemens for the axis var parentHeight = this.parent.height; props.minorLabelHeight = showMinorLabels ? props.minorCharHeight : 0; props.majorLabelHeight = showMajorLabels ? props.majorCharHeight : 0; this.height = props.minorLabelHeight + props.majorLabelHeight; this.width = frame.offsetWidth; // TODO: only update the width when the frame is resized? props.minorLineHeight = parentHeight + props.minorLabelHeight; props.minorLineWidth = 1; // TODO: really calculate width props.majorLineHeight = parentHeight + this.height; props.majorLineWidth = 1; // TODO: really calculate width // take frame offline while updating (is almost twice as fast) var beforeChild = frame.nextSibling; parent.removeChild(frame); // TODO: top/bottom positioning should be determined by options set in the Timeline, not here if (orientation == 'top') { frame.style.top = '0'; frame.style.left = '0'; frame.style.bottom = ''; frame.style.width = asSize(options.width, '100%'); frame.style.height = this.height + 'px'; } else { // bottom frame.style.top = ''; frame.style.bottom = '0'; frame.style.left = '0'; frame.style.width = asSize(options.width, '100%'); frame.style.height = this.height + 'px'; } this._repaintLabels(); this._repaintLine(); // put frame online again if (beforeChild) { parent.insertBefore(frame, beforeChild); } else { parent.appendChild(frame) } } return this._isResized(); }; /** * Repaint major and minor text labels and vertical grid lines * @private */ TimeAxis.prototype._repaintLabels = function () { var orientation = this.getOption('orientation'); // calculate range and step (step such that we have space for 7 characters per label) var start = util.convert(this.range.start, 'Number'), end = util.convert(this.range.end, 'Number'), minimumStep = this.options.toTime((this.props.minorCharWidth || 10) * 7).valueOf() -this.options.toTime(0).valueOf(); var step = new TimeStep(new Date(start), new Date(end), minimumStep); this.step = step; // Move all DOM elements to a "redundant" list, where they // can be picked for re-use, and clear the lists with lines and texts. // At the end of the function _repaintLabels, left over elements will be cleaned up var dom = this.dom; dom.redundant.majorLines = dom.majorLines; dom.redundant.majorTexts = dom.majorTexts; dom.redundant.minorLines = dom.minorLines; dom.redundant.minorTexts = dom.minorTexts; dom.majorLines = []; dom.majorTexts = []; dom.minorLines = []; dom.minorTexts = []; step.first(); var xFirstMajorLabel = undefined; var max = 0; while (step.hasNext() && max < 1000) { max++; var cur = step.getCurrent(), x = this.options.toScreen(cur), isMajor = step.isMajor(); // TODO: lines must have a width, such that we can create css backgrounds if (this.getOption('showMinorLabels')) { this._repaintMinorText(x, step.getLabelMinor(), orientation); } if (isMajor && this.getOption('showMajorLabels')) { if (x > 0) { if (xFirstMajorLabel == undefined) { xFirstMajorLabel = x; } this._repaintMajorText(x, step.getLabelMajor(), orientation); } this._repaintMajorLine(x, orientation); } else { this._repaintMinorLine(x, orientation); } step.next(); } // create a major label on the left when needed if (this.getOption('showMajorLabels')) { var leftTime = this.options.toTime(0), leftText = step.getLabelMajor(leftTime), widthText = leftText.length * (this.props.majorCharWidth || 10) + 10; // upper bound estimation if (xFirstMajorLabel == undefined || widthText < xFirstMajorLabel) { this._repaintMajorText(0, leftText, orientation); } } // Cleanup leftover DOM elements from the redundant list util.forEach(this.dom.redundant, function (arr) { while (arr.length) { var elem = arr.pop(); if (elem && elem.parentNode) { elem.parentNode.removeChild(elem); } } }); }; /** * Create a minor label for the axis at position x * @param {Number} x * @param {String} text * @param {String} orientation "top" or "bottom" (default) * @private */ TimeAxis.prototype._repaintMinorText = function (x, text, orientation) { // reuse redundant label var label = this.dom.redundant.minorTexts.shift(); if (!label) { // create new label var content = document.createTextNode(''); label = document.createElement('div'); label.appendChild(content); label.className = 'text minor'; this.frame.appendChild(label); } this.dom.minorTexts.push(label); label.childNodes[0].nodeValue = text; if (orientation == 'top') { label.style.top = this.props.majorLabelHeight + 'px'; label.style.bottom = ''; } else { label.style.top = ''; label.style.bottom = this.props.majorLabelHeight + 'px'; } label.style.left = x + 'px'; //label.title = title; // TODO: this is a heavy operation }; /** * Create a Major label for the axis at position x * @param {Number} x * @param {String} text * @param {String} orientation "top" or "bottom" (default) * @private */ TimeAxis.prototype._repaintMajorText = function (x, text, orientation) { // reuse redundant label var label = this.dom.redundant.majorTexts.shift(); if (!label) { // create label var content = document.createTextNode(text); label = document.createElement('div'); label.className = 'text major'; label.appendChild(content); this.frame.appendChild(label); } this.dom.majorTexts.push(label); label.childNodes[0].nodeValue = text; //label.title = title; // TODO: this is a heavy operation if (orientation == 'top') { label.style.top = '0px'; label.style.bottom = ''; } else { label.style.top = ''; label.style.bottom = '0px'; } label.style.left = x + 'px'; }; /** * Create a minor line for the axis at position x * @param {Number} x * @param {String} orientation "top" or "bottom" (default) * @private */ TimeAxis.prototype._repaintMinorLine = function (x, orientation) { // reuse redundant line var line = this.dom.redundant.minorLines.shift(); if (!line) { // create vertical line line = document.createElement('div'); line.className = 'grid vertical minor'; this.frame.appendChild(line); } this.dom.minorLines.push(line); var props = this.props; if (orientation == 'top') { line.style.top = this.props.majorLabelHeight + 'px'; line.style.bottom = ''; } else { line.style.top = ''; line.style.bottom = this.props.majorLabelHeight + 'px'; } line.style.height = props.minorLineHeight + 'px'; line.style.left = (x - props.minorLineWidth / 2) + 'px'; }; /** * Create a Major line for the axis at position x * @param {Number} x * @param {String} orientation "top" or "bottom" (default) * @private */ TimeAxis.prototype._repaintMajorLine = function (x, orientation) { // reuse redundant line var line = this.dom.redundant.majorLines.shift(); if (!line) { // create vertical line line = document.createElement('DIV'); line.className = 'grid vertical major'; this.frame.appendChild(line); } this.dom.majorLines.push(line); var props = this.props; if (orientation == 'top') { line.style.top = '0px'; line.style.bottom = ''; } else { line.style.top = ''; line.style.bottom = '0px'; } line.style.left = (x - props.majorLineWidth / 2) + 'px'; line.style.height = props.majorLineHeight + 'px'; }; /** * Repaint the horizontal line for the axis * @private */ TimeAxis.prototype._repaintLine = function() { var line = this.dom.line, frame = this.frame, orientation = this.getOption('orientation'); // line before all axis elements if (this.getOption('showMinorLabels') || this.getOption('showMajorLabels')) { if (line) { // put this line at the end of all childs frame.removeChild(line); frame.appendChild(line); } else { // create the axis line line = document.createElement('div'); line.className = 'grid horizontal major'; frame.appendChild(line); this.dom.line = line; } if (orientation == 'top') { line.style.top = this.height + 'px'; line.style.bottom = ''; } else { line.style.top = ''; line.style.bottom = this.height + 'px'; } } else { if (line && line.parentNode) { line.parentNode.removeChild(line); delete this.dom.line; } } }; /** * Determine the size of text on the axis (both major and minor axis). * The size is calculated only once and then cached in this.props. * @private */ TimeAxis.prototype._calculateCharSize = function () { // Note: We calculate char size with every repaint. Size may change, for // example when any of the timelines parents had display:none for example. // determine the char width and height on the minor axis if (!this.dom.measureCharMinor) { this.dom.measureCharMinor = document.createElement('DIV'); this.dom.measureCharMinor.className = 'text minor measure'; this.dom.measureCharMinor.style.position = 'absolute'; this.dom.measureCharMinor.appendChild(document.createTextNode('0')); this.frame.appendChild(this.dom.measureCharMinor); } this.props.minorCharHeight = this.dom.measureCharMinor.clientHeight; this.props.minorCharWidth = this.dom.measureCharMinor.clientWidth; // determine the char width and height on the major axis if (!this.dom.measureCharMajor) { this.dom.measureCharMajor = document.createElement('DIV'); this.dom.measureCharMajor.className = 'text minor measure'; this.dom.measureCharMajor.style.position = 'absolute'; this.dom.measureCharMajor.appendChild(document.createTextNode('0')); this.frame.appendChild(this.dom.measureCharMajor); } this.props.majorCharHeight = this.dom.measureCharMajor.clientHeight; this.props.majorCharWidth = this.dom.measureCharMajor.clientWidth; }; /** * Snap a date to a rounded value. * The snap intervals are dependent on the current scale and step. * @param {Date} date the date to be snapped. * @return {Date} snappedDate */ TimeAxis.prototype.snap = function snap (date) { return this.step.snap(date); }; /** * A current time bar * @param {Range} range * @param {Object} [options] Available parameters: * {Boolean} [showCurrentTime] * @constructor CurrentTime * @extends Component */ function CurrentTime (range, options) { this.id = util.randomUUID(); this.range = range; this.options = options || {}; this.defaultOptions = { showCurrentTime: false }; this._create(); } CurrentTime.prototype = new Component(); CurrentTime.prototype.setOptions = Component.prototype.setOptions; /** * Create the HTML DOM for the current time bar * @private */ CurrentTime.prototype._create = function _create () { var bar = document.createElement('div'); bar.className = 'currenttime'; bar.style.position = 'absolute'; bar.style.top = '0px'; bar.style.height = '100%'; this.bar = bar; }; /** * Get the frame element of the current time bar * @returns {HTMLElement} frame */ CurrentTime.prototype.getFrame = function getFrame() { return this.bar; }; /** * Repaint the component * @return {boolean} Returns true if the component is resized */ CurrentTime.prototype.repaint = function repaint() { var parent = this.parent; var now = new Date(); var x = this.options.toScreen(now); this.bar.style.left = x + 'px'; this.bar.title = 'Current time: ' + now; return false; }; /** * Start auto refreshing the current time bar */ CurrentTime.prototype.start = function start() { var me = this; function update () { me.stop(); // determine interval to refresh var scale = me.range.conversion(me.parent.width).scale; var interval = 1 / scale / 10; if (interval < 30) interval = 30; if (interval > 1000) interval = 1000; me.repaint(); // start a timer to adjust for the new time me.currentTimeTimer = setTimeout(update, interval); } update(); }; /** * Stop auto refreshing the current time bar */ CurrentTime.prototype.stop = function stop() { if (this.currentTimeTimer !== undefined) { clearTimeout(this.currentTimeTimer); delete this.currentTimeTimer; } }; /** * A custom time bar * @param {Object} [options] Available parameters: * {Boolean} [showCustomTime] * @constructor CustomTime * @extends Component */ function CustomTime (options) { this.id = util.randomUUID(); this.options = options || {}; this.defaultOptions = { showCustomTime: false }; this.customTime = new Date(); this.eventParams = {}; // stores state parameters while dragging the bar // create the DOM this._create(); } CustomTime.prototype = new Component(); CustomTime.prototype.setOptions = Component.prototype.setOptions; /** * Create the DOM for the custom time * @private */ CustomTime.prototype._create = function _create () { var bar = document.createElement('div'); bar.className = 'customtime'; bar.style.position = 'absolute'; bar.style.top = '0px'; bar.style.height = '100%'; this.bar = bar; var drag = document.createElement('div'); drag.style.position = 'relative'; drag.style.top = '0px'; drag.style.left = '-10px'; drag.style.height = '100%'; drag.style.width = '20px'; bar.appendChild(drag); // attach event listeners this.hammer = Hammer(bar, { prevent_default: true }); this.hammer.on('dragstart', this._onDragStart.bind(this)); this.hammer.on('drag', this._onDrag.bind(this)); this.hammer.on('dragend', this._onDragEnd.bind(this)); }; /** * Get the frame element of the custom time bar * @returns {HTMLElement} frame */ CustomTime.prototype.getFrame = function getFrame() { return this.bar; }; /** * Repaint the component * @return {boolean} Returns true if the component is resized */ CustomTime.prototype.repaint = function () { var x = this.options.toScreen(this.customTime); this.bar.style.left = x + 'px'; this.bar.title = 'Time: ' + this.customTime; return false; }; /** * Set custom time. * @param {Date} time */ CustomTime.prototype.setCustomTime = function(time) { this.customTime = new Date(time.valueOf()); this.repaint(); }; /** * Retrieve the current custom time. * @return {Date} customTime */ CustomTime.prototype.getCustomTime = function() { return new Date(this.customTime.valueOf()); }; /** * Start moving horizontally * @param {Event} event * @private */ CustomTime.prototype._onDragStart = function(event) { this.eventParams.dragging = true; this.eventParams.customTime = this.customTime; event.stopPropagation(); event.preventDefault(); }; /** * Perform moving operating. * @param {Event} event * @private */ CustomTime.prototype._onDrag = function (event) { if (!this.eventParams.dragging) return; var deltaX = event.gesture.deltaX, x = this.options.toScreen(this.eventParams.customTime) + deltaX, time = this.options.toTime(x); this.setCustomTime(time); // fire a timechange event this.emit('timechange', { time: new Date(this.customTime.valueOf()) }); event.stopPropagation(); event.preventDefault(); }; /** * Stop moving operating. * @param {event} event * @private */ CustomTime.prototype._onDragEnd = function (event) { if (!this.eventParams.dragging) return; // fire a timechanged event this.emit('timechanged', { time: new Date(this.customTime.valueOf()) }); event.stopPropagation(); event.preventDefault(); }; var UNGROUPED = '__ungrouped__'; // reserved group id for ungrouped items /** * An ItemSet holds a set of items and ranges which can be displayed in a * range. The width is determined by the parent of the ItemSet, and the height * is determined by the size of the items. * @param {Panel} backgroundPanel Panel which can be used to display the * vertical lines of box items. * @param {Panel} axisPanel Panel on the axis where the dots of box-items * can be displayed. * @param {Panel} sidePanel Left side panel holding labels * @param {Object} [options] See ItemSet.setOptions for the available options. * @constructor ItemSet * @extends Panel */ function ItemSet(backgroundPanel, axisPanel, sidePanel, options) { this.id = util.randomUUID(); // one options object is shared by this itemset and all its items this.options = options || {}; this.backgroundPanel = backgroundPanel; this.axisPanel = axisPanel; this.sidePanel = sidePanel; this.itemOptions = Object.create(this.options); this.dom = {}; this.hammer = null; var me = this; this.itemsData = null; // DataSet this.groupsData = null; // DataSet this.range = null; // Range or Object {start: number, end: number} // listeners for the DataSet of the items this.itemListeners = { 'add': function (event, params, senderId) { if (senderId != me.id) me._onAdd(params.items); }, 'update': function (event, params, senderId) { if (senderId != me.id) me._onUpdate(params.items); }, 'remove': function (event, params, senderId) { if (senderId != me.id) me._onRemove(params.items); } }; // listeners for the DataSet of the groups this.groupListeners = { 'add': function (event, params, senderId) { if (senderId != me.id) me._onAddGroups(params.items); }, 'update': function (event, params, senderId) { if (senderId != me.id) me._onUpdateGroups(params.items); }, 'remove': function (event, params, senderId) { if (senderId != me.id) me._onRemoveGroups(params.items); } }; this.items = {}; // object with an Item for every data item this.groups = {}; // Group object for every group this.groupIds = []; this.selection = []; // list with the ids of all selected nodes this.stackDirty = true; // if true, all items will be restacked on next repaint this.touchParams = {}; // stores properties while dragging // create the HTML DOM this._create(); } ItemSet.prototype = new Panel(); // available item types will be registered here ItemSet.types = { box: ItemBox, range: ItemRange, rangeoverflow: ItemRangeOverflow, point: ItemPoint }; /** * Create the HTML DOM for the ItemSet */ ItemSet.prototype._create = function _create(){ var frame = document.createElement('div'); frame['timeline-itemset'] = this; this.frame = frame; // create background panel var background = document.createElement('div'); background.className = 'background'; this.backgroundPanel.frame.appendChild(background); this.dom.background = background; // create foreground panel var foreground = document.createElement('div'); foreground.className = 'foreground'; frame.appendChild(foreground); this.dom.foreground = foreground; // create axis panel var axis = document.createElement('div'); axis.className = 'axis'; this.dom.axis = axis; this.axisPanel.frame.appendChild(axis); // create labelset var labelSet = document.createElement('div'); labelSet.className = 'labelset'; this.dom.labelSet = labelSet; this.sidePanel.frame.appendChild(labelSet); // create ungrouped Group this._updateUngrouped(); // attach event listeners // TODO: use event listeners from the rootpanel to improve performance? this.hammer = Hammer(frame, { prevent_default: true }); this.hammer.on('dragstart', this._onDragStart.bind(this)); this.hammer.on('drag', this._onDrag.bind(this)); this.hammer.on('dragend', this._onDragEnd.bind(this)); }; /** * Set options for the ItemSet. Existing options will be extended/overwritten. * @param {Object} [options] The following options are available: * {String | function} [className] * class name for the itemset * {String} [type] * Default type for the items. Choose from 'box' * (default), 'point', or 'range'. The default * Style can be overwritten by individual items. * {String} align * Alignment for the items, only applicable for * ItemBox. Choose 'center' (default), 'left', or * 'right'. * {String} orientation * Orientation of the item set. Choose 'top' or * 'bottom' (default). * {Number} margin.axis * Margin between the axis and the items in pixels. * Default is 20. * {Number} margin.item * Margin between items in pixels. Default is 10. * {Number} padding * Padding of the contents of an item in pixels. * Must correspond with the items css. Default is 5. * {Function} snap * Function to let items snap to nice dates when * dragging items. */ ItemSet.prototype.setOptions = function setOptions(options) { Component.prototype.setOptions.call(this, options); }; /** * Mark the ItemSet dirty so it will refresh everything with next repaint */ ItemSet.prototype.markDirty = function markDirty() { this.groupIds = []; this.stackDirty = true; }; /** * Hide the component from the DOM */ ItemSet.prototype.hide = function hide() { // remove the axis with dots if (this.dom.axis.parentNode) { this.dom.axis.parentNode.removeChild(this.dom.axis); } // remove the background with vertical lines if (this.dom.background.parentNode) { this.dom.background.parentNode.removeChild(this.dom.background); } // remove the labelset containing all group labels if (this.dom.labelSet.parentNode) { this.dom.labelSet.parentNode.removeChild(this.dom.labelSet); } }; /** * Show the component in the DOM (when not already visible). * @return {Boolean} changed */ ItemSet.prototype.show = function show() { // show axis with dots if (!this.dom.axis.parentNode) { this.axisPanel.frame.appendChild(this.dom.axis); } // show background with vertical lines if (!this.dom.background.parentNode) { this.backgroundPanel.frame.appendChild(this.dom.background); } // show labelset containing labels if (!this.dom.labelSet.parentNode) { this.sidePanel.frame.appendChild(this.dom.labelSet); } }; /** * Set range (start and end). * @param {Range | Object} range A Range or an object containing start and end. */ ItemSet.prototype.setRange = function setRange(range) { if (!(range instanceof Range) && (!range || !range.start || !range.end)) { throw new TypeError('Range must be an instance of Range, ' + 'or an object containing start and end.'); } this.range = range; }; /** * Set selected items by their id. Replaces the current selection * Unknown id's are silently ignored. * @param {Array} [ids] An array with zero or more id's of the items to be * selected. If ids is an empty array, all items will be * unselected. */ ItemSet.prototype.setSelection = function setSelection(ids) { var i, ii, id, item; if (ids) { if (!Array.isArray(ids)) { throw new TypeError('Array expected'); } // unselect currently selected items for (i = 0, ii = this.selection.length; i < ii; i++) { id = this.selection[i]; item = this.items[id]; if (item) item.unselect(); } // select items this.selection = []; for (i = 0, ii = ids.length; i < ii; i++) { id = ids[i]; item = this.items[id]; if (item) { this.selection.push(id); item.select(); } } } }; /** * Get the selected items by their id * @return {Array} ids The ids of the selected items */ ItemSet.prototype.getSelection = function getSelection() { return this.selection.concat([]); }; /** * Deselect a selected item * @param {String | Number} id * @private */ ItemSet.prototype._deselect = function _deselect(id) { var selection = this.selection; for (var i = 0, ii = selection.length; i < ii; i++) { if (selection[i] == id) { // non-strict comparison! selection.splice(i, 1); break; } } }; /** * Return the item sets frame * @returns {HTMLElement} frame */ ItemSet.prototype.getFrame = function getFrame() { return this.frame; }; /** * Repaint the component * @return {boolean} Returns true if the component is resized */ ItemSet.prototype.repaint = function repaint() { var margin = this.options.margin, range = this.range, asSize = util.option.asSize, asString = util.option.asString, options = this.options, orientation = this.getOption('orientation'), resized = false, frame = this.frame; // TODO: document this feature to specify one margin for both item and axis distance if (typeof margin === 'number') { margin = { item: margin, axis: margin }; } // update className frame.className = 'itemset' + (options.className ? (' ' + asString(options.className)) : ''); // reorder the groups (if needed) resized = this._orderGroups() || resized; // check whether zoomed (in that case we need to re-stack everything) // TODO: would be nicer to get this as a trigger from Range var visibleInterval = this.range.end - this.range.start; var zoomed = (visibleInterval != this.lastVisibleInterval) || (this.width != this.lastWidth); if (zoomed) this.stackDirty = true; this.lastVisibleInterval = visibleInterval; this.lastWidth = this.width; // repaint all groups var restack = this.stackDirty, firstGroup = this._firstGroup(), firstMargin = { item: margin.item, axis: margin.axis }, nonFirstMargin = { item: margin.item, axis: margin.item / 2 }, height = 0, minHeight = margin.axis + margin.item; util.forEach(this.groups, function (group) { var groupMargin = (group == firstGroup) ? firstMargin : nonFirstMargin; resized = group.repaint(range, groupMargin, restack) || resized; height += group.height; }); height = Math.max(height, minHeight); this.stackDirty = false; // reposition frame frame.style.left = asSize(options.left, ''); frame.style.right = asSize(options.right, ''); frame.style.top = asSize((orientation == 'top') ? '0' : ''); frame.style.bottom = asSize((orientation == 'top') ? '' : '0'); frame.style.width = asSize(options.width, '100%'); frame.style.height = asSize(height); //frame.style.height = asSize('height' in options ? options.height : height); // TODO: reckon with height // calculate actual size and position this.top = frame.offsetTop; this.left = frame.offsetLeft; this.width = frame.offsetWidth; this.height = height; // reposition axis this.dom.axis.style.left = asSize(options.left, '0'); this.dom.axis.style.right = asSize(options.right, ''); this.dom.axis.style.width = asSize(options.width, '100%'); this.dom.axis.style.height = asSize(0); this.dom.axis.style.top = asSize((orientation == 'top') ? '0' : ''); this.dom.axis.style.bottom = asSize((orientation == 'top') ? '' : '0'); // check if this component is resized resized = this._isResized() || resized; return resized; }; /** * Get the first group, aligned with the axis * @return {Group | null} firstGroup * @private */ ItemSet.prototype._firstGroup = function _firstGroup() { var firstGroupIndex = (this.options.orientation == 'top') ? 0 : (this.groupIds.length - 1); var firstGroupId = this.groupIds[firstGroupIndex]; var firstGroup = this.groups[firstGroupId] || this.groups[UNGROUPED]; return firstGroup || null; }; /** * Create or delete the group holding all ungrouped items. This group is used when * there are no groups specified. * @protected */ ItemSet.prototype._updateUngrouped = function _updateUngrouped() { var ungrouped = this.groups[UNGROUPED]; if (this.groupsData) { // remove the group holding all ungrouped items if (ungrouped) { ungrouped.hide(); delete this.groups[UNGROUPED]; } } else { // create a group holding all (unfiltered) items if (!ungrouped) { var id = null; var data = null; ungrouped = new Group(id, data, this); this.groups[UNGROUPED] = ungrouped; for (var itemId in this.items) { if (this.items.hasOwnProperty(itemId)) { ungrouped.add(this.items[itemId]); } } ungrouped.show(); } } }; /** * Get the foreground container element * @return {HTMLElement} foreground */ ItemSet.prototype.getForeground = function getForeground() { return this.dom.foreground; }; /** * Get the background container element * @return {HTMLElement} background */ ItemSet.prototype.getBackground = function getBackground() { return this.dom.background; }; /** * Get the axis container element * @return {HTMLElement} axis */ ItemSet.prototype.getAxis = function getAxis() { return this.dom.axis; }; /** * Get the element for the labelset * @return {HTMLElement} labelSet */ ItemSet.prototype.getLabelSet = function getLabelSet() { return this.dom.labelSet; }; /** * Set items * @param {vis.DataSet | null} items */ ItemSet.prototype.setItems = function setItems(items) { var me = this, ids, oldItemsData = this.itemsData; // replace the dataset if (!items) { this.itemsData = null; } else if (items instanceof DataSet || items instanceof DataView) { this.itemsData = items; } else { throw new TypeError('Data must be an instance of DataSet or DataView'); } if (oldItemsData) { // unsubscribe from old dataset util.forEach(this.itemListeners, function (callback, event) { oldItemsData.unsubscribe(event, callback); }); // remove all drawn items ids = oldItemsData.getIds(); this._onRemove(ids); } if (this.itemsData) { // subscribe to new dataset var id = this.id; util.forEach(this.itemListeners, function (callback, event) { me.itemsData.on(event, callback, id); }); // add all new items ids = this.itemsData.getIds(); this._onAdd(ids); // update the group holding all ungrouped items this._updateUngrouped(); } }; /** * Get the current items * @returns {vis.DataSet | null} */ ItemSet.prototype.getItems = function getItems() { return this.itemsData; }; /** * Set groups * @param {vis.DataSet} groups */ ItemSet.prototype.setGroups = function setGroups(groups) { var me = this, ids; // unsubscribe from current dataset if (this.groupsData) { util.forEach(this.groupListeners, function (callback, event) { me.groupsData.unsubscribe(event, callback); }); // remove all drawn groups ids = this.groupsData.getIds(); this.groupsData = null; this._onRemoveGroups(ids); // note: this will cause a repaint } // replace the dataset if (!groups) { this.groupsData = null; } else if (groups instanceof DataSet || groups instanceof DataView) { this.groupsData = groups; } else { throw new TypeError('Data must be an instance of DataSet or DataView'); } if (this.groupsData) { // subscribe to new dataset var id = this.id; util.forEach(this.groupListeners, function (callback, event) { me.groupsData.on(event, callback, id); }); // draw all ms ids = this.groupsData.getIds(); this._onAddGroups(ids); } // update the group holding all ungrouped items this._updateUngrouped(); // update the order of all items in each group this._order(); this.emit('change'); }; /** * Get the current groups * @returns {vis.DataSet | null} groups */ ItemSet.prototype.getGroups = function getGroups() { return this.groupsData; }; /** * Remove an item by its id * @param {String | Number} id */ ItemSet.prototype.removeItem = function removeItem (id) { var item = this.itemsData.get(id), dataset = this._myDataSet(); if (item) { // confirm deletion this.options.onRemove(item, function (item) { if (item) { // remove by id here, it is possible that an item has no id defined // itself, so better not delete by the item itself dataset.remove(id); } }); } }; /** * Handle updated items * @param {Number[]} ids * @protected */ ItemSet.prototype._onUpdate = function _onUpdate(ids) { var me = this, items = this.items, itemOptions = this.itemOptions; ids.forEach(function (id) { var itemData = me.itemsData.get(id), item = items[id], type = itemData.type || (itemData.start && itemData.end && 'range') || me.options.type || 'box'; var constructor = ItemSet.types[type]; if (item) { // update item if (!constructor || !(item instanceof constructor)) { // item type has changed, delete the item and recreate it me._removeItem(item); item = null; } else { me._updateItem(item, itemData); } } if (!item) { // create item if (constructor) { item = new constructor(itemData, me.options, itemOptions); item.id = id; // TODO: not so nice setting id afterwards me._addItem(item); } else { throw new TypeError('Unknown item type "' + type + '"'); } } }); this._order(); this.stackDirty = true; // force re-stacking of all items next repaint this.emit('change'); }; /** * Handle added items * @param {Number[]} ids * @protected */ ItemSet.prototype._onAdd = ItemSet.prototype._onUpdate; /** * Handle removed items * @param {Number[]} ids * @protected */ ItemSet.prototype._onRemove = function _onRemove(ids) { var count = 0; var me = this; ids.forEach(function (id) { var item = me.items[id]; if (item) { count++; me._removeItem(item); } }); if (count) { // update order this._order(); this.stackDirty = true; // force re-stacking of all items next repaint this.emit('change'); } }; /** * Update the order of item in all groups * @private */ ItemSet.prototype._order = function _order() { // reorder the items in all groups // TODO: optimization: only reorder groups affected by the changed items util.forEach(this.groups, function (group) { group.order(); }); }; /** * Handle updated groups * @param {Number[]} ids * @private */ ItemSet.prototype._onUpdateGroups = function _onUpdateGroups(ids) { this._onAddGroups(ids); }; /** * Handle changed groups * @param {Number[]} ids * @private */ ItemSet.prototype._onAddGroups = function _onAddGroups(ids) { var me = this; ids.forEach(function (id) { var groupData = me.groupsData.get(id); var group = me.groups[id]; if (!group) { // check for reserved ids if (id == UNGROUPED) { throw new Error('Illegal group id. ' + id + ' is a reserved id.'); } var groupOptions = Object.create(me.options); util.extend(groupOptions, { height: null }); group = new Group(id, groupData, me); me.groups[id] = group; // add items with this groupId to the new group for (var itemId in me.items) { if (me.items.hasOwnProperty(itemId)) { var item = me.items[itemId]; if (item.data.group == id) { group.add(item); } } } group.order(); group.show(); } else { // update group group.setData(groupData); } }); this.emit('change'); }; /** * Handle removed groups * @param {Number[]} ids * @private */ ItemSet.prototype._onRemoveGroups = function _onRemoveGroups(ids) { var groups = this.groups; ids.forEach(function (id) { var group = groups[id]; if (group) { group.hide(); delete groups[id]; } }); this.markDirty(); this.emit('change'); }; /** * Reorder the groups if needed * @return {boolean} changed * @private */ ItemSet.prototype._orderGroups = function () { if (this.groupsData) { // reorder the groups var groupIds = this.groupsData.getIds({ order: this.options.groupOrder }); var changed = !util.equalArray(groupIds, this.groupIds); if (changed) { // hide all groups, removes them from the DOM var groups = this.groups; groupIds.forEach(function (groupId) { groups[groupId].hide(); }); // show the groups again, attach them to the DOM in correct order groupIds.forEach(function (groupId) { groups[groupId].show(); }); this.groupIds = groupIds; } return changed; } else { return false; } }; /** * Add a new item * @param {Item} item * @private */ ItemSet.prototype._addItem = function _addItem(item) { this.items[item.id] = item; // add to group var groupId = this.groupsData ? item.data.group : UNGROUPED; var group = this.groups[groupId]; if (group) group.add(item); }; /** * Update an existing item * @param {Item} item * @param {Object} itemData * @private */ ItemSet.prototype._updateItem = function _updateItem(item, itemData) { var oldGroupId = item.data.group; item.data = itemData; if (item.displayed) { item.repaint(); } // update group if (oldGroupId != item.data.group) { var oldGroup = this.groups[oldGroupId]; if (oldGroup) oldGroup.remove(item); var groupId = this.groupsData ? item.data.group : UNGROUPED; var group = this.groups[groupId]; if (group) group.add(item); } }; /** * Delete an item from the ItemSet: remove it from the DOM, from the map * with items, and from the map with visible items, and from the selection * @param {Item} item * @private */ ItemSet.prototype._removeItem = function _removeItem(item) { // remove from DOM item.hide(); // remove from items delete this.items[item.id]; // remove from selection var index = this.selection.indexOf(item.id); if (index != -1) this.selection.splice(index, 1); // remove from group var groupId = this.groupsData ? item.data.group : UNGROUPED; var group = this.groups[groupId]; if (group) group.remove(item); }; /** * Create an array containing all items being a range (having an end date) * @param array * @returns {Array} * @private */ ItemSet.prototype._constructByEndArray = function _constructByEndArray(array) { var endArray = []; for (var i = 0; i < array.length; i++) { if (array[i] instanceof ItemRange) { endArray.push(array[i]); } } return endArray; }; /** * Get the width of the group labels * @return {Number} width */ ItemSet.prototype.getLabelsWidth = function getLabelsWidth() { var width = 0; util.forEach(this.groups, function (group) { width = Math.max(width, group.getLabelWidth()); }); return width; }; /** * Get the height of the itemsets background * @return {Number} height */ ItemSet.prototype.getBackgroundHeight = function getBackgroundHeight() { return this.height; }; /** * Start dragging the selected events * @param {Event} event * @private */ ItemSet.prototype._onDragStart = function (event) { if (!this.options.editable.updateTime && !this.options.editable.updateGroup) { return; } var item = ItemSet.itemFromTarget(event), me = this, props; if (item && item.selected) { var dragLeftItem = event.target.dragLeftItem; var dragRightItem = event.target.dragRightItem; if (dragLeftItem) { props = { item: dragLeftItem }; if (me.options.editable.updateTime) { props.start = item.data.start.valueOf(); } if (me.options.editable.updateGroup) { if ('group' in item.data) props.group = item.data.group; } this.touchParams.itemProps = [props]; } else if (dragRightItem) { props = { item: dragRightItem }; if (me.options.editable.updateTime) { props.end = item.data.end.valueOf(); } if (me.options.editable.updateGroup) { if ('group' in item.data) props.group = item.data.group; } this.touchParams.itemProps = [props]; } else { this.touchParams.itemProps = this.getSelection().map(function (id) { var item = me.items[id]; var props = { item: item }; if (me.options.editable.updateTime) { if ('start' in item.data) props.start = item.data.start.valueOf(); if ('end' in item.data) props.end = item.data.end.valueOf(); } if (me.options.editable.updateGroup) { if ('group' in item.data) props.group = item.data.group; } return props; }); } event.stopPropagation(); } }; /** * Drag selected items * @param {Event} event * @private */ ItemSet.prototype._onDrag = function (event) { if (this.touchParams.itemProps) { var snap = this.options.snap || null, deltaX = event.gesture.deltaX, scale = (this.width / (this.range.end - this.range.start)), offset = deltaX / scale; // move this.touchParams.itemProps.forEach(function (props) { if ('start' in props) { var start = new Date(props.start + offset); props.item.data.start = snap ? snap(start) : start; } if ('end' in props) { var end = new Date(props.end + offset); props.item.data.end = snap ? snap(end) : end; } if ('group' in props) { // drag from one group to another var group = ItemSet.groupFromTarget(event); if (group && group.groupId != props.item.data.group) { var oldGroup = props.item.parent; oldGroup.remove(props.item); oldGroup.order(); group.add(props.item); group.order(); props.item.data.group = group.groupId; } } }); // TODO: implement onMoving handler this.stackDirty = true; // force re-stacking of all items next repaint this.emit('change'); event.stopPropagation(); } }; /** * End of dragging selected items * @param {Event} event * @private */ ItemSet.prototype._onDragEnd = function (event) { if (this.touchParams.itemProps) { // prepare a change set for the changed items var changes = [], me = this, dataset = this._myDataSet(); this.touchParams.itemProps.forEach(function (props) { var id = props.item.id, itemData = me.itemsData.get(id); var changed = false; if ('start' in props.item.data) { changed = (props.start != props.item.data.start.valueOf()); itemData.start = util.convert(props.item.data.start, dataset.convert['start']); } if ('end' in props.item.data) { changed = changed || (props.end != props.item.data.end.valueOf()); itemData.end = util.convert(props.item.data.end, dataset.convert['end']); } if ('group' in props.item.data) { changed = changed || (props.group != props.item.data.group); itemData.group = props.item.data.group; } // only apply changes when start or end is actually changed if (changed) { me.options.onMove(itemData, function (itemData) { if (itemData) { // apply changes itemData[dataset.fieldId] = id; // ensure the item contains its id (can be undefined) changes.push(itemData); } else { // restore original values if ('start' in props) props.item.data.start = props.start; if ('end' in props) props.item.data.end = props.end; me.stackDirty = true; // force re-stacking of all items next repaint me.emit('change'); } }); } }); this.touchParams.itemProps = null; // apply the changes to the data (if there are changes) if (changes.length) { dataset.update(changes); } event.stopPropagation(); } }; /** * Find an item from an event target: * searches for the attribute 'timeline-item' in the event target's element tree * @param {Event} event * @return {Item | null} item */ ItemSet.itemFromTarget = function itemFromTarget (event) { var target = event.target; while (target) { if (target.hasOwnProperty('timeline-item')) { return target['timeline-item']; } target = target.parentNode; } return null; }; /** * Find the Group from an event target: * searches for the attribute 'timeline-group' in the event target's element tree * @param {Event} event * @return {Group | null} group */ ItemSet.groupFromTarget = function groupFromTarget (event) { var target = event.target; while (target) { if (target.hasOwnProperty('timeline-group')) { return target['timeline-group']; } target = target.parentNode; } return null; }; /** * Find the ItemSet from an event target: * searches for the attribute 'timeline-itemset' in the event target's element tree * @param {Event} event * @return {ItemSet | null} item */ ItemSet.itemSetFromTarget = function itemSetFromTarget (event) { var target = event.target; while (target) { if (target.hasOwnProperty('timeline-itemset')) { return target['timeline-itemset']; } target = target.parentNode; } return null; }; /** * Find the DataSet to which this ItemSet is connected * @returns {null | DataSet} dataset * @private */ ItemSet.prototype._myDataSet = function _myDataSet() { // find the root DataSet var dataset = this.itemsData; while (dataset instanceof DataView) { dataset = dataset.data; } return dataset; }; /** * @constructor Item * @param {Object} data Object containing (optional) parameters type, * start, end, content, group, className. * @param {Object} [options] Options to set initial property values * @param {Object} [defaultOptions] default options * // TODO: describe available options */ function Item (data, options, defaultOptions) { this.id = null; this.parent = null; this.data = data; this.dom = null; this.options = options || {}; this.defaultOptions = defaultOptions || {}; this.selected = false; this.displayed = false; this.dirty = true; this.top = null; this.left = null; this.width = null; this.height = null; } /** * Select current item */ Item.prototype.select = function select() { this.selected = true; if (this.displayed) this.repaint(); }; /** * Unselect current item */ Item.prototype.unselect = function unselect() { this.selected = false; if (this.displayed) this.repaint(); }; /** * Set a parent for the item * @param {ItemSet | Group} parent */ Item.prototype.setParent = function setParent(parent) { if (this.displayed) { this.hide(); this.parent = parent; if (this.parent) { this.show(); } } else { this.parent = parent; } }; /** * Check whether this item is visible inside given range * @returns {{start: Number, end: Number}} range with a timestamp for start and end * @returns {boolean} True if visible */ Item.prototype.isVisible = function isVisible (range) { // Should be implemented by Item implementations return false; }; /** * Show the Item in the DOM (when not already visible) * @return {Boolean} changed */ Item.prototype.show = function show() { return false; }; /** * Hide the Item from the DOM (when visible) * @return {Boolean} changed */ Item.prototype.hide = function hide() { return false; }; /** * Repaint the item */ Item.prototype.repaint = function repaint() { // should be implemented by the item }; /** * Reposition the Item horizontally */ Item.prototype.repositionX = function repositionX() { // should be implemented by the item }; /** * Reposition the Item vertically */ Item.prototype.repositionY = function repositionY() { // should be implemented by the item }; /** * Repaint a delete button on the top right of the item when the item is selected * @param {HTMLElement} anchor * @protected */ Item.prototype._repaintDeleteButton = function (anchor) { if (this.selected && this.options.editable.remove && !this.dom.deleteButton) { // create and show button var me = this; var deleteButton = document.createElement('div'); deleteButton.className = 'delete'; deleteButton.title = 'Delete this item'; Hammer(deleteButton, { preventDefault: true }).on('tap', function (event) { me.parent.removeFromDataSet(me); event.stopPropagation(); }); anchor.appendChild(deleteButton); this.dom.deleteButton = deleteButton; } else if (!this.selected && this.dom.deleteButton) { // remove button if (this.dom.deleteButton.parentNode) { this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton); } this.dom.deleteButton = null; } }; /** * @constructor ItemBox * @extends Item * @param {Object} data Object containing parameters start * content, className. * @param {Object} [options] Options to set initial property values * @param {Object} [defaultOptions] default options * // TODO: describe available options */ function ItemBox (data, options, defaultOptions) { this.props = { dot: { width: 0, height: 0 }, line: { width: 0, height: 0 } }; // validate data if (data) { if (data.start == undefined) { throw new Error('Property "start" missing in item ' + data); } } Item.call(this, data, options, defaultOptions); } ItemBox.prototype = new Item (null); /** * Check whether this item is visible inside given range * @returns {{start: Number, end: Number}} range with a timestamp for start and end * @returns {boolean} True if visible */ ItemBox.prototype.isVisible = function isVisible (range) { // determine visibility // TODO: account for the real width of the item. Right now we just add 1/4 to the window var interval = (range.end - range.start) / 4; return (this.data.start > range.start - interval) && (this.data.start < range.end + interval); }; /** * Repaint the item */ ItemBox.prototype.repaint = function repaint() { var dom = this.dom; if (!dom) { // create DOM this.dom = {}; dom = this.dom; // create main box dom.box = document.createElement('DIV'); // contents box (inside the background box). used for making margins dom.content = document.createElement('DIV'); dom.content.className = 'content'; dom.box.appendChild(dom.content); // line to axis dom.line = document.createElement('DIV'); dom.line.className = 'line'; // dot on axis dom.dot = document.createElement('DIV'); dom.dot.className = 'dot'; // attach this item as attribute dom.box['timeline-item'] = this; } // append DOM to parent DOM if (!this.parent) { throw new Error('Cannot repaint item: no parent attached'); } if (!dom.box.parentNode) { var foreground = this.parent.getForeground(); if (!foreground) throw new Error('Cannot repaint time axis: parent has no foreground container element'); foreground.appendChild(dom.box); } if (!dom.line.parentNode) { var background = this.parent.getBackground(); if (!background) throw new Error('Cannot repaint time axis: parent has no background container element'); background.appendChild(dom.line); } if (!dom.dot.parentNode) { var axis = this.parent.getAxis(); if (!background) throw new Error('Cannot repaint time axis: parent has no axis container element'); axis.appendChild(dom.dot); } this.displayed = true; // update contents if (this.data.content != this.content) { this.content = this.data.content; if (this.content instanceof Element) { dom.content.innerHTML = ''; dom.content.appendChild(this.content); } else if (this.data.content != undefined) { dom.content.innerHTML = this.content; } else { throw new Error('Property "content" missing in item ' + this.data.id); } this.dirty = true; } // update class var className = (this.data.className? ' ' + this.data.className : '') + (this.selected ? ' selected' : ''); if (this.className != className) { this.className = className; dom.box.className = 'item box' + className; dom.line.className = 'item line' + className; dom.dot.className = 'item dot' + className; this.dirty = true; } // recalculate size if (this.dirty) { this.props.dot.height = dom.dot.offsetHeight; this.props.dot.width = dom.dot.offsetWidth; this.props.line.width = dom.line.offsetWidth; this.width = dom.box.offsetWidth; this.height = dom.box.offsetHeight; this.dirty = false; } this._repaintDeleteButton(dom.box); }; /** * Show the item in the DOM (when not already displayed). The items DOM will * be created when needed. */ ItemBox.prototype.show = function show() { if (!this.displayed) { this.repaint(); } }; /** * Hide the item from the DOM (when visible) */ ItemBox.prototype.hide = function hide() { if (this.displayed) { var dom = this.dom; if (dom.box.parentNode) dom.box.parentNode.removeChild(dom.box); if (dom.line.parentNode) dom.line.parentNode.removeChild(dom.line); if (dom.dot.parentNode) dom.dot.parentNode.removeChild(dom.dot); this.top = null; this.left = null; this.displayed = false; } }; /** * Reposition the item horizontally * @Override */ ItemBox.prototype.repositionX = function repositionX() { var start = this.defaultOptions.toScreen(this.data.start), align = this.options.align || this.defaultOptions.align, left, box = this.dom.box, line = this.dom.line, dot = this.dom.dot; // calculate left position of the box if (align == 'right') { this.left = start - this.width; } else if (align == 'left') { this.left = start; } else { // default or 'center' this.left = start - this.width / 2; } // reposition box box.style.left = this.left + 'px'; // reposition line line.style.left = (start - this.props.line.width / 2) + 'px'; // reposition dot dot.style.left = (start - this.props.dot.width / 2) + 'px'; }; /** * Reposition the item vertically * @Override */ ItemBox.prototype.repositionY = function repositionY () { var orientation = this.options.orientation || this.defaultOptions.orientation, box = this.dom.box, line = this.dom.line, dot = this.dom.dot; if (orientation == 'top') { box.style.top = (this.top || 0) + 'px'; box.style.bottom = ''; line.style.top = '0'; line.style.bottom = ''; line.style.height = (this.parent.top + this.top + 1) + 'px'; } else { // orientation 'bottom' box.style.top = ''; box.style.bottom = (this.top || 0) + 'px'; line.style.top = (this.parent.top + this.parent.height - this.top - 1) + 'px'; line.style.bottom = '0'; line.style.height = ''; } dot.style.top = (-this.props.dot.height / 2) + 'px'; }; /** * @constructor ItemPoint * @extends Item * @param {Object} data Object containing parameters start * content, className. * @param {Object} [options] Options to set initial property values * @param {Object} [defaultOptions] default options * // TODO: describe available options */ function ItemPoint (data, options, defaultOptions) { this.props = { dot: { top: 0, width: 0, height: 0 }, content: { height: 0, marginLeft: 0 } }; // validate data if (data) { if (data.start == undefined) { throw new Error('Property "start" missing in item ' + data); } } Item.call(this, data, options, defaultOptions); } ItemPoint.prototype = new Item (null); /** * Check whether this item is visible inside given range * @returns {{start: Number, end: Number}} range with a timestamp for start and end * @returns {boolean} True if visible */ ItemPoint.prototype.isVisible = function isVisible (range) { // determine visibility // TODO: account for the real width of the item. Right now we just add 1/4 to the window var interval = (range.end - range.start) / 4; return (this.data.start > range.start - interval) && (this.data.start < range.end + interval); }; /** * Repaint the item */ ItemPoint.prototype.repaint = function repaint() { var dom = this.dom; if (!dom) { // create DOM this.dom = {}; dom = this.dom; // background box dom.point = document.createElement('div'); // className is updated in repaint() // contents box, right from the dot dom.content = document.createElement('div'); dom.content.className = 'content'; dom.point.appendChild(dom.content); // dot at start dom.dot = document.createElement('div'); dom.point.appendChild(dom.dot); // attach this item as attribute dom.point['timeline-item'] = this; } // append DOM to parent DOM if (!this.parent) { throw new Error('Cannot repaint item: no parent attached'); } if (!dom.point.parentNode) { var foreground = this.parent.getForeground(); if (!foreground) { throw new Error('Cannot repaint time axis: parent has no foreground container element'); } foreground.appendChild(dom.point); } this.displayed = true; // update contents if (this.data.content != this.content) { this.content = this.data.content; if (this.content instanceof Element) { dom.content.innerHTML = ''; dom.content.appendChild(this.content); } else if (this.data.content != undefined) { dom.content.innerHTML = this.content; } else { throw new Error('Property "content" missing in item ' + this.data.id); } this.dirty = true; } // update class var className = (this.data.className? ' ' + this.data.className : '') + (this.selected ? ' selected' : ''); if (this.className != className) { this.className = className; dom.point.className = 'item point' + className; dom.dot.className = 'item dot' + className; this.dirty = true; } // recalculate size if (this.dirty) { this.width = dom.point.offsetWidth; this.height = dom.point.offsetHeight; this.props.dot.width = dom.dot.offsetWidth; this.props.dot.height = dom.dot.offsetHeight; this.props.content.height = dom.content.offsetHeight; // resize contents dom.content.style.marginLeft = 2 * this.props.dot.width + 'px'; //dom.content.style.marginRight = ... + 'px'; // TODO: margin right dom.dot.style.top = ((this.height - this.props.dot.height) / 2) + 'px'; dom.dot.style.left = (this.props.dot.width / 2) + 'px'; this.dirty = false; } this._repaintDeleteButton(dom.point); }; /** * Show the item in the DOM (when not already visible). The items DOM will * be created when needed. */ ItemPoint.prototype.show = function show() { if (!this.displayed) { this.repaint(); } }; /** * Hide the item from the DOM (when visible) */ ItemPoint.prototype.hide = function hide() { if (this.displayed) { if (this.dom.point.parentNode) { this.dom.point.parentNode.removeChild(this.dom.point); } this.top = null; this.left = null; this.displayed = false; } }; /** * Reposition the item horizontally * @Override */ ItemPoint.prototype.repositionX = function repositionX() { var start = this.defaultOptions.toScreen(this.data.start); this.left = start - this.props.dot.width; // reposition point this.dom.point.style.left = this.left + 'px'; }; /** * Reposition the item vertically * @Override */ ItemPoint.prototype.repositionY = function repositionY () { var orientation = this.options.orientation || this.defaultOptions.orientation, point = this.dom.point; if (orientation == 'top') { point.style.top = this.top + 'px'; point.style.bottom = ''; } else { point.style.top = ''; point.style.bottom = this.top + 'px'; } }; /** * @constructor ItemRange * @extends Item * @param {Object} data Object containing parameters start, end * content, className. * @param {Object} [options] Options to set initial property values * @param {Object} [defaultOptions] default options * // TODO: describe available options */ function ItemRange (data, options, defaultOptions) { this.props = { content: { width: 0 } }; // validate data if (data) { if (data.start == undefined) { throw new Error('Property "start" missing in item ' + data.id); } if (data.end == undefined) { throw new Error('Property "end" missing in item ' + data.id); } } Item.call(this, data, options, defaultOptions); } ItemRange.prototype = new Item (null); ItemRange.prototype.baseClassName = 'item range'; /** * Check whether this item is visible inside given range * @returns {{start: Number, end: Number}} range with a timestamp for start and end * @returns {boolean} True if visible */ ItemRange.prototype.isVisible = function isVisible (range) { // determine visibility return (this.data.start < range.end) && (this.data.end > range.start); }; /** * Repaint the item */ ItemRange.prototype.repaint = function repaint() { var dom = this.dom; if (!dom) { // create DOM this.dom = {}; dom = this.dom; // background box dom.box = document.createElement('div'); // className is updated in repaint() // contents box dom.content = document.createElement('div'); dom.content.className = 'content'; dom.box.appendChild(dom.content); // attach this item as attribute dom.box['timeline-item'] = this; } // append DOM to parent DOM if (!this.parent) { throw new Error('Cannot repaint item: no parent attached'); } if (!dom.box.parentNode) { var foreground = this.parent.getForeground(); if (!foreground) { throw new Error('Cannot repaint time axis: parent has no foreground container element'); } foreground.appendChild(dom.box); } this.displayed = true; // update contents if (this.data.content != this.content) { this.content = this.data.content; if (this.content instanceof Element) { dom.content.innerHTML = ''; dom.content.appendChild(this.content); } else if (this.data.content != undefined) { dom.content.innerHTML = this.content; } else { throw new Error('Property "content" missing in item ' + this.data.id); } this.dirty = true; } // update class var className = (this.data.className ? (' ' + this.data.className) : '') + (this.selected ? ' selected' : ''); if (this.className != className) { this.className = className; dom.box.className = this.baseClassName + className; this.dirty = true; } // recalculate size if (this.dirty) { this.props.content.width = this.dom.content.offsetWidth; this.height = this.dom.box.offsetHeight; this.dirty = false; } this._repaintDeleteButton(dom.box); this._repaintDragLeft(); this._repaintDragRight(); }; /** * Show the item in the DOM (when not already visible). The items DOM will * be created when needed. */ ItemRange.prototype.show = function show() { if (!this.displayed) { this.repaint(); } }; /** * Hide the item from the DOM (when visible) * @return {Boolean} changed */ ItemRange.prototype.hide = function hide() { if (this.displayed) { var box = this.dom.box; if (box.parentNode) { box.parentNode.removeChild(box); } this.top = null; this.left = null; this.displayed = false; } }; /** * Reposition the item horizontally * @Override */ ItemRange.prototype.repositionX = function repositionX() { var props = this.props, parentWidth = this.parent.width, start = this.defaultOptions.toScreen(this.data.start), end = this.defaultOptions.toScreen(this.data.end), padding = 'padding' in this.options ? this.options.padding : this.defaultOptions.padding, contentLeft; // limit the width of the this, as browsers cannot draw very wide divs if (start < -parentWidth) { start = -parentWidth; } if (end > 2 * parentWidth) { end = 2 * parentWidth; } // when range exceeds left of the window, position the contents at the left of the visible area if (start < 0) { contentLeft = Math.min(-start, (end - start - props.content.width - 2 * padding)); // TODO: remove the need for options.padding. it's terrible. } else { contentLeft = 0; } this.left = start; this.width = Math.max(end - start, 1); this.dom.box.style.left = this.left + 'px'; this.dom.box.style.width = this.width + 'px'; this.dom.content.style.left = contentLeft + 'px'; }; /** * Reposition the item vertically * @Override */ ItemRange.prototype.repositionY = function repositionY() { var orientation = this.options.orientation || this.defaultOptions.orientation, box = this.dom.box; if (orientation == 'top') { box.style.top = this.top + 'px'; box.style.bottom = ''; } else { box.style.top = ''; box.style.bottom = this.top + 'px'; } }; /** * Repaint a drag area on the left side of the range when the range is selected * @protected */ ItemRange.prototype._repaintDragLeft = function () { if (this.selected && this.options.editable.updateTime && !this.dom.dragLeft) { // create and show drag area var dragLeft = document.createElement('div'); dragLeft.className = 'drag-left'; dragLeft.dragLeftItem = this; // TODO: this should be redundant? Hammer(dragLeft, { preventDefault: true }).on('drag', function () { //console.log('drag left') }); this.dom.box.appendChild(dragLeft); this.dom.dragLeft = dragLeft; } else if (!this.selected && this.dom.dragLeft) { // delete drag area if (this.dom.dragLeft.parentNode) { this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft); } this.dom.dragLeft = null; } }; /** * Repaint a drag area on the right side of the range when the range is selected * @protected */ ItemRange.prototype._repaintDragRight = function () { if (this.selected && this.options.editable.updateTime && !this.dom.dragRight) { // create and show drag area var dragRight = document.createElement('div'); dragRight.className = 'drag-right'; dragRight.dragRightItem = this; // TODO: this should be redundant? Hammer(dragRight, { preventDefault: true }).on('drag', function () { //console.log('drag right') }); this.dom.box.appendChild(dragRight); this.dom.dragRight = dragRight; } else if (!this.selected && this.dom.dragRight) { // delete drag area if (this.dom.dragRight.parentNode) { this.dom.dragRight.parentNode.removeChild(this.dom.dragRight); } this.dom.dragRight = null; } }; /** * @constructor ItemRangeOverflow * @extends ItemRange * @param {Object} data Object containing parameters start, end * content, className. * @param {Object} [options] Options to set initial property values * @param {Object} [defaultOptions] default options * // TODO: describe available options */ function ItemRangeOverflow (data, options, defaultOptions) { this.props = { content: { left: 0, width: 0 } }; ItemRange.call(this, data, options, defaultOptions); } ItemRangeOverflow.prototype = new ItemRange (null); ItemRangeOverflow.prototype.baseClassName = 'item rangeoverflow'; /** * Reposition the item horizontally * @Override */ ItemRangeOverflow.prototype.repositionX = function repositionX() { var parentWidth = this.parent.width, start = this.defaultOptions.toScreen(this.data.start), end = this.defaultOptions.toScreen(this.data.end), padding = 'padding' in this.options ? this.options.padding : this.defaultOptions.padding, contentLeft; // limit the width of the this, as browsers cannot draw very wide divs if (start < -parentWidth) { start = -parentWidth; } if (end > 2 * parentWidth) { end = 2 * parentWidth; } // when range exceeds left of the window, position the contents at the left of the visible area contentLeft = Math.max(-start, 0); this.left = start; var boxWidth = Math.max(end - start, 1); this.width = boxWidth + this.props.content.width; // Note: The calculation of width is an optimistic calculation, giving // a width which will not change when moving the Timeline // So no restacking needed, which is nicer for the eye this.dom.box.style.left = this.left + 'px'; this.dom.box.style.width = boxWidth + 'px'; this.dom.content.style.left = contentLeft + 'px'; }; /** * @constructor Group * @param {Number | String} groupId * @param {Object} data * @param {ItemSet} itemSet */ function Group (groupId, data, itemSet) { this.groupId = groupId; this.itemSet = itemSet; this.dom = {}; this.props = { label: { width: 0, height: 0 } }; this.items = {}; // items filtered by groupId of this group this.visibleItems = []; // items currently visible in window this.orderedItems = { // items sorted by start and by end byStart: [], byEnd: [] }; this._create(); this.setData(data); } /** * Create DOM elements for the group * @private */ Group.prototype._create = function() { var label = document.createElement('div'); label.className = 'vlabel'; this.dom.label = label; var inner = document.createElement('div'); inner.className = 'inner'; label.appendChild(inner); this.dom.inner = inner; var foreground = document.createElement('div'); foreground.className = 'group'; foreground['timeline-group'] = this; this.dom.foreground = foreground; this.dom.background = document.createElement('div'); this.dom.axis = document.createElement('div'); // create a hidden marker to detect when the Timelines container is attached // to the DOM, or the style of a parent of the Timeline is changed from // display:none is changed to visible. this.dom.marker = document.createElement('div'); this.dom.marker.style.visibility = 'hidden'; this.dom.marker.innerHTML = '?'; this.dom.background.appendChild(this.dom.marker); }; /** * Set the group data for this group * @param {Object} data Group data, can contain properties content and className */ Group.prototype.setData = function setData(data) { // update contents var content = data && data.content; if (content instanceof Element) { this.dom.inner.appendChild(content); } else if (content != undefined) { this.dom.inner.innerHTML = content; } else { this.dom.inner.innerHTML = this.groupId; } // update className var className = data && data.className; if (className) { util.addClassName(this.dom.label, className); } }; /** * Get the foreground container element * @return {HTMLElement} foreground */ Group.prototype.getForeground = function getForeground() { return this.dom.foreground; }; /** * Get the background container element * @return {HTMLElement} background */ Group.prototype.getBackground = function getBackground() { return this.dom.background; }; /** * Get the axis container element * @return {HTMLElement} axis */ Group.prototype.getAxis = function getAxis() { return this.dom.axis; }; /** * Get the width of the group label * @return {number} width */ Group.prototype.getLabelWidth = function getLabelWidth() { return this.props.label.width; }; /** * Repaint this group * @param {{start: number, end: number}} range * @param {{item: number, axis: number}} margin * @param {boolean} [restack=false] Force restacking of all items * @return {boolean} Returns true if the group is resized */ Group.prototype.repaint = function repaint(range, margin, restack) { var resized = false; this.visibleItems = this._updateVisibleItems(this.orderedItems, this.visibleItems, range); // force recalculation of the height of the items when the marker height changed // (due to the Timeline being attached to the DOM or changed from display:none to visible) var markerHeight = this.dom.marker.clientHeight; if (markerHeight != this.lastMarkerHeight) { this.lastMarkerHeight = markerHeight; util.forEach(this.items, function (item) { item.dirty = true; if (item.displayed) item.repaint(); }); restack = true; } // reposition visible items vertically if (this.itemSet.options.stack) { // TODO: ugly way to access options... stack.stack(this.visibleItems, margin, restack); } else { // no stacking stack.nostack(this.visibleItems, margin); } for (var i = 0, ii = this.visibleItems.length; i < ii; i++) { var item = this.visibleItems[i]; item.repositionY(); } // recalculate the height of the group var height; var visibleItems = this.visibleItems; if (visibleItems.length) { var min = visibleItems[0].top; var max = visibleItems[0].top + visibleItems[0].height; util.forEach(visibleItems, function (item) { min = Math.min(min, item.top); max = Math.max(max, (item.top + item.height)); }); height = (max - min) + margin.axis + margin.item; } else { height = margin.axis + margin.item; } height = Math.max(height, this.props.label.height); // calculate actual size and position var foreground = this.dom.foreground; this.top = foreground.offsetTop; this.left = foreground.offsetLeft; this.width = foreground.offsetWidth; resized = util.updateProperty(this, 'height', height) || resized; // recalculate size of label resized = util.updateProperty(this.props.label, 'width', this.dom.inner.clientWidth) || resized; resized = util.updateProperty(this.props.label, 'height', this.dom.inner.clientHeight) || resized; // apply new height foreground.style.height = height + 'px'; this.dom.label.style.height = height + 'px'; return resized; }; /** * Show this group: attach to the DOM */ Group.prototype.show = function show() { if (!this.dom.label.parentNode) { this.itemSet.getLabelSet().appendChild(this.dom.label); } if (!this.dom.foreground.parentNode) { this.itemSet.getForeground().appendChild(this.dom.foreground); } if (!this.dom.background.parentNode) { this.itemSet.getBackground().appendChild(this.dom.background); } if (!this.dom.axis.parentNode) { this.itemSet.getAxis().appendChild(this.dom.axis); } }; /** * Hide this group: remove from the DOM */ Group.prototype.hide = function hide() { var label = this.dom.label; if (label.parentNode) { label.parentNode.removeChild(label); } var foreground = this.dom.foreground; if (foreground.parentNode) { foreground.parentNode.removeChild(foreground); } var background = this.dom.background; if (background.parentNode) { background.parentNode.removeChild(background); } var axis = this.dom.axis; if (axis.parentNode) { axis.parentNode.removeChild(axis); } }; /** * Add an item to the group * @param {Item} item */ Group.prototype.add = function add(item) { this.items[item.id] = item; item.setParent(this); if (item instanceof ItemRange && this.visibleItems.indexOf(item) == -1) { var range = this.itemSet.range; // TODO: not nice accessing the range like this this._checkIfVisible(item, this.visibleItems, range); } }; /** * Remove an item from the group * @param {Item} item */ Group.prototype.remove = function remove(item) { delete this.items[item.id]; item.setParent(this.itemSet); // remove from visible items var index = this.visibleItems.indexOf(item); if (index != -1) this.visibleItems.splice(index, 1); // TODO: also remove from ordered items? }; /** * Remove an item from the corresponding DataSet * @param {Item} item */ Group.prototype.removeFromDataSet = function removeFromDataSet(item) { this.itemSet.removeItem(item.id); }; /** * Reorder the items */ Group.prototype.order = function order() { var array = util.toArray(this.items); this.orderedItems.byStart = array; this.orderedItems.byEnd = this._constructByEndArray(array); stack.orderByStart(this.orderedItems.byStart); stack.orderByEnd(this.orderedItems.byEnd); }; /** * Create an array containing all items being a range (having an end date) * @param {Item[]} array * @returns {ItemRange[]} * @private */ Group.prototype._constructByEndArray = function _constructByEndArray(array) { var endArray = []; for (var i = 0; i < array.length; i++) { if (array[i] instanceof ItemRange) { endArray.push(array[i]); } } return endArray; }; /** * Update the visible items * @param {{byStart: Item[], byEnd: Item[]}} orderedItems All items ordered by start date and by end date * @param {Item[]} visibleItems The previously visible items. * @param {{start: number, end: number}} range Visible range * @return {Item[]} visibleItems The new visible items. * @private */ Group.prototype._updateVisibleItems = function _updateVisibleItems(orderedItems, visibleItems, range) { var initialPosByStart, newVisibleItems = [], i; // first check if the items that were in view previously are still in view. // this handles the case for the ItemRange that is both before and after the current one. if (visibleItems.length > 0) { for (i = 0; i < visibleItems.length; i++) { this._checkIfVisible(visibleItems[i], newVisibleItems, range); } } // If there were no visible items previously, use binarySearch to find a visible ItemPoint or ItemRange (based on startTime) if (newVisibleItems.length == 0) { initialPosByStart = this._binarySearch(orderedItems, range, false); } else { initialPosByStart = orderedItems.byStart.indexOf(newVisibleItems[0]); } // use visible search to find a visible ItemRange (only based on endTime) var initialPosByEnd = this._binarySearch(orderedItems, range, true); // if we found a initial ID to use, trace it up and down until we meet an invisible item. if (initialPosByStart != -1) { for (i = initialPosByStart; i >= 0; i--) { if (this._checkIfInvisible(orderedItems.byStart[i], newVisibleItems, range)) {break;} } for (i = initialPosByStart + 1; i < orderedItems.byStart.length; i++) { if (this._checkIfInvisible(orderedItems.byStart[i], newVisibleItems, range)) {break;} } } // if we found a initial ID to use, trace it up and down until we meet an invisible item. if (initialPosByEnd != -1) { for (i = initialPosByEnd; i >= 0; i--) { if (this._checkIfInvisible(orderedItems.byEnd[i], newVisibleItems, range)) {break;} } for (i = initialPosByEnd + 1; i < orderedItems.byEnd.length; i++) { if (this._checkIfInvisible(orderedItems.byEnd[i], newVisibleItems, range)) {break;} } } return newVisibleItems; }; /** * This function does a binary search for a visible item. The user can select either the this.orderedItems.byStart or .byEnd * arrays. This is done by giving a boolean value true if you want to use the byEnd. * This is done to be able to select the correct if statement (we do not want to check if an item is visible, we want to check * if the time we selected (start or end) is within the current range). * * The trick is that every interval has to either enter the screen at the initial load or by dragging. The case of the ItemRange that is * before and after the current range is handled by simply checking if it was in view before and if it is again. For all the rest, * either the start OR end time has to be in the range. * * @param {{byStart: Item[], byEnd: Item[]}} orderedItems * @param {{start: number, end: number}} range * @param {Boolean} byEnd * @returns {number} * @private */ Group.prototype._binarySearch = function _binarySearch(orderedItems, range, byEnd) { var array = []; var byTime = byEnd ? 'end' : 'start'; if (byEnd == true) {array = orderedItems.byEnd; } else {array = orderedItems.byStart;} var interval = range.end - range.start; var found = false; var low = 0; var high = array.length; var guess = Math.floor(0.5*(high+low)); var newGuess; if (high == 0) {guess = -1;} else if (high == 1) { if ((array[guess].data[byTime] > range.start - interval) && (array[guess].data[byTime] < range.end)) { guess = 0; } else { guess = -1; } } else { high -= 1; while (found == false) { if ((array[guess].data[byTime] > range.start - interval) && (array[guess].data[byTime] < range.end)) { found = true; } else { if (array[guess].data[byTime] < range.start - interval) { // it is too small --> increase low low = Math.floor(0.5*(high+low)); } else { // it is too big --> decrease high high = Math.floor(0.5*(high+low)); } newGuess = Math.floor(0.5*(high+low)); // not in list; if (guess == newGuess) { guess = -1; found = true; } else { guess = newGuess; } } } } return guess; }; /** * this function checks if an item is invisible. If it is NOT we make it visible * and add it to the global visible items. If it is, return true. * * @param {Item} item * @param {Item[]} visibleItems * @param {{start:number, end:number}} range * @returns {boolean} * @private */ Group.prototype._checkIfInvisible = function _checkIfInvisible(item, visibleItems, range) { if (item.isVisible(range)) { if (!item.displayed) item.show(); item.repositionX(); if (visibleItems.indexOf(item) == -1) { visibleItems.push(item); } return false; } else { return true; } }; /** * this function is very similar to the _checkIfInvisible() but it does not * return booleans, hides the item if it should not be seen and always adds to * the visibleItems. * this one is for brute forcing and hiding. * * @param {Item} item * @param {Array} visibleItems * @param {{start:number, end:number}} range * @private */ Group.prototype._checkIfVisible = function _checkIfVisible(item, visibleItems, range) { if (item.isVisible(range)) { if (!item.displayed) item.show(); // reposition item horizontally item.repositionX(); visibleItems.push(item); } else { if (item.displayed) item.hide(); } }; /** * Create a timeline visualization * @param {HTMLElement} container * @param {vis.DataSet | Array | google.visualization.DataTable} [items] * @param {Object} [options] See Timeline.setOptions for the available options. * @constructor */ function Timeline (container, items, options) { // validate arguments if (!container) throw new Error('No container element provided'); var me = this; var now = moment().hours(0).minutes(0).seconds(0).milliseconds(0); this.defaultOptions = { orientation: 'bottom', direction: 'horizontal', // 'horizontal' or 'vertical' autoResize: true, stack: true, editable: { updateTime: false, updateGroup: false, add: false, remove: false }, selectable: true, start: null, end: null, min: null, max: null, zoomMin: 10, // milliseconds zoomMax: 1000 * 60 * 60 * 24 * 365 * 10000, // milliseconds // moveable: true, // TODO: option moveable // zoomable: true, // TODO: option zoomable showMinorLabels: true, showMajorLabels: true, showCurrentTime: false, showCustomTime: false, groupOrder: null, width: null, height: null, maxHeight: null, minHeight: null, type: 'box', align: 'center', margin: { axis: 20, item: 10 }, padding: 5, onAdd: function (item, callback) { callback(item); }, onUpdate: function (item, callback) { callback(item); }, onMove: function (item, callback) { callback(item); }, onRemove: function (item, callback) { callback(item); } }; this.options = {}; util.deepExtend(this.options, this.defaultOptions); util.deepExtend(this.options, { snap: null, // will be specified after timeaxis is created toScreen: me._toScreen.bind(me), toTime: me._toTime.bind(me) }); // root panel var rootOptions = util.extend(Object.create(this.options), { height: function () { if (me.options.height) { // fixed height return me.options.height; } else { // auto height // TODO: implement a css based solution to automatically have the right hight return (me.timeAxis.height + me.contentPanel.height) + 'px'; } } }); this.rootPanel = new RootPanel(container, rootOptions); // single select (or unselect) when tapping an item this.rootPanel.on('tap', this._onSelectItem.bind(this)); // multi select when holding mouse/touch, or on ctrl+click this.rootPanel.on('hold', this._onMultiSelectItem.bind(this)); // add item on doubletap this.rootPanel.on('doubletap', this._onAddItem.bind(this)); // side panel var sideOptions = util.extend(Object.create(this.options), { top: function () { return (sideOptions.orientation == 'top') ? '0' : ''; }, bottom: function () { return (sideOptions.orientation == 'top') ? '' : '0'; }, left: '0', right: null, height: '100%', width: function () { if (me.itemSet) { return me.itemSet.getLabelsWidth(); } else { return 0; } }, className: function () { return 'side' + (me.groupsData ? '' : ' hidden'); } }); this.sidePanel = new Panel(sideOptions); this.rootPanel.appendChild(this.sidePanel); // main panel (contains time axis and itemsets) var mainOptions = util.extend(Object.create(this.options), { left: function () { // we align left to enable a smooth resizing of the window return me.sidePanel.width; }, right: null, height: '100%', width: function () { return me.rootPanel.width - me.sidePanel.width; }, className: 'main' }); this.mainPanel = new Panel(mainOptions); this.rootPanel.appendChild(this.mainPanel); // range // TODO: move range inside rootPanel? var rangeOptions = Object.create(this.options); this.range = new Range(this.rootPanel, this.mainPanel, rangeOptions); this.range.setRange( now.clone().add('days', -3).valueOf(), now.clone().add('days', 4).valueOf() ); this.range.on('rangechange', function (properties) { me.rootPanel.repaint(); me.emit('rangechange', properties); }); this.range.on('rangechanged', function (properties) { me.rootPanel.repaint(); me.emit('rangechanged', properties); }); // panel with time axis var timeAxisOptions = util.extend(Object.create(rootOptions), { range: this.range, left: null, top: null, width: null, height: null }); this.timeAxis = new TimeAxis(timeAxisOptions); this.timeAxis.setRange(this.range); this.options.snap = this.timeAxis.snap.bind(this.timeAxis); this.mainPanel.appendChild(this.timeAxis); // content panel (contains itemset(s)) var contentOptions = util.extend(Object.create(this.options), { top: function () { return (me.options.orientation == 'top') ? (me.timeAxis.height + 'px') : ''; }, bottom: function () { return (me.options.orientation == 'top') ? '' : (me.timeAxis.height + 'px'); }, left: null, right: null, height: null, width: null, className: 'content' }); this.contentPanel = new Panel(contentOptions); this.mainPanel.appendChild(this.contentPanel); // content panel (contains the vertical lines of box items) var backgroundOptions = util.extend(Object.create(this.options), { top: function () { return (me.options.orientation == 'top') ? (me.timeAxis.height + 'px') : ''; }, bottom: function () { return (me.options.orientation == 'top') ? '' : (me.timeAxis.height + 'px'); }, left: null, right: null, height: function () { return me.contentPanel.height; }, width: null, className: 'background' }); this.backgroundPanel = new Panel(backgroundOptions); this.mainPanel.insertBefore(this.backgroundPanel, this.contentPanel); // panel with axis holding the dots of item boxes var axisPanelOptions = util.extend(Object.create(rootOptions), { left: 0, top: function () { return (me.options.orientation == 'top') ? (me.timeAxis.height + 'px') : ''; }, bottom: function () { return (me.options.orientation == 'top') ? '' : (me.timeAxis.height + 'px'); }, width: '100%', height: 0, className: 'axis' }); this.axisPanel = new Panel(axisPanelOptions); this.mainPanel.appendChild(this.axisPanel); // content panel (contains itemset(s)) var sideContentOptions = util.extend(Object.create(this.options), { top: function () { return (me.options.orientation == 'top') ? (me.timeAxis.height + 'px') : ''; }, bottom: function () { return (me.options.orientation == 'top') ? '' : (me.timeAxis.height + 'px'); }, left: null, right: null, height: null, width: null, className: 'side-content' }); this.sideContentPanel = new Panel(sideContentOptions); this.sidePanel.appendChild(this.sideContentPanel); // current time bar // Note: time bar will be attached in this.setOptions when selected this.currentTime = new CurrentTime(this.range, rootOptions); // custom time bar // Note: time bar will be attached in this.setOptions when selected this.customTime = new CustomTime(rootOptions); this.customTime.on('timechange', function (time) { me.emit('timechange', time); }); this.customTime.on('timechanged', function (time) { me.emit('timechanged', time); }); // itemset containing items and groups var itemOptions = util.extend(Object.create(this.options), { left: null, right: null, top: null, bottom: null, width: null, height: null }); this.itemSet = new ItemSet(this.backgroundPanel, this.axisPanel, this.sideContentPanel, itemOptions); this.itemSet.setRange(this.range); this.itemSet.on('change', me.rootPanel.repaint.bind(me.rootPanel)); this.contentPanel.appendChild(this.itemSet); this.itemsData = null; // DataSet this.groupsData = null; // DataSet // apply options if (options) { this.setOptions(options); } // create itemset if (items) { this.setItems(items); } } // turn Timeline into an event emitter Emitter(Timeline.prototype); /** * Set options * @param {Object} options TODO: describe the available options */ Timeline.prototype.setOptions = function (options) { util.deepExtend(this.options, options); if ('editable' in options) { var isBoolean = typeof options.editable === 'boolean'; this.options.editable = { updateTime: isBoolean ? options.editable : (options.editable.updateTime || false), updateGroup: isBoolean ? options.editable : (options.editable.updateGroup || false), add: isBoolean ? options.editable : (options.editable.add || false), remove: isBoolean ? options.editable : (options.editable.remove || false) }; } // force update of range (apply new min/max etc.) // both start and end are optional this.range.setRange(options.start, options.end); if ('editable' in options || 'selectable' in options) { if (this.options.selectable) { // force update of selection this.setSelection(this.getSelection()); } else { // remove selection this.setSelection([]); } } // force the itemSet to refresh: options like orientation and margins may be changed this.itemSet.markDirty(); // validate the callback functions var validateCallback = (function (fn) { if (!(this.options[fn] instanceof Function) || this.options[fn].length != 2) { throw new Error('option ' + fn + ' must be a function ' + fn + '(item, callback)'); } }).bind(this); ['onAdd', 'onUpdate', 'onRemove', 'onMove'].forEach(validateCallback); // add/remove the current time bar if (this.options.showCurrentTime) { if (!this.mainPanel.hasChild(this.currentTime)) { this.mainPanel.appendChild(this.currentTime); this.currentTime.start(); } } else { if (this.mainPanel.hasChild(this.currentTime)) { this.currentTime.stop(); this.mainPanel.removeChild(this.currentTime); } } // add/remove the custom time bar if (this.options.showCustomTime) { if (!this.mainPanel.hasChild(this.customTime)) { this.mainPanel.appendChild(this.customTime); } } else { if (this.mainPanel.hasChild(this.customTime)) { this.mainPanel.removeChild(this.customTime); } } // TODO: remove deprecation error one day (deprecated since version 0.8.0) if (options && options.order) { throw new Error('Option order is deprecated. There is no replacement for this feature.'); } // repaint everything this.rootPanel.repaint(); }; /** * Set a custom time bar * @param {Date} time */ Timeline.prototype.setCustomTime = function (time) { if (!this.customTime) { throw new Error('Cannot get custom time: Custom time bar is not enabled'); } this.customTime.setCustomTime(time); }; /** * Retrieve the current custom time. * @return {Date} customTime */ Timeline.prototype.getCustomTime = function() { if (!this.customTime) { throw new Error('Cannot get custom time: Custom time bar is not enabled'); } return this.customTime.getCustomTime(); }; /** * Set items * @param {vis.DataSet | Array | google.visualization.DataTable | null} items */ Timeline.prototype.setItems = function(items) { var initialLoad = (this.itemsData == null); // convert to type DataSet when needed var newDataSet; if (!items) { newDataSet = null; } else if (items instanceof DataSet || items instanceof DataView) { newDataSet = items; } else { // turn an array into a dataset newDataSet = new DataSet(items, { convert: { start: 'Date', end: 'Date' } }); } // set items this.itemsData = newDataSet; this.itemSet.setItems(newDataSet); if (initialLoad && (this.options.start == undefined || this.options.end == undefined)) { this.fit(); var start = (this.options.start != undefined) ? util.convert(this.options.start, 'Date') : null; var end = (this.options.end != undefined) ? util.convert(this.options.end, 'Date') : null; this.setWindow(start, end); } }; /** * Set groups * @param {vis.DataSet | Array | google.visualization.DataTable} groups */ Timeline.prototype.setGroups = function setGroups(groups) { // convert to type DataSet when needed var newDataSet; if (!groups) { newDataSet = null; } else if (groups instanceof DataSet || groups instanceof DataView) { newDataSet = groups; } else { // turn an array into a dataset newDataSet = new DataSet(groups); } this.groupsData = newDataSet; this.itemSet.setGroups(newDataSet); }; /** * Clear the Timeline. By Default, items, groups and options are cleared. * Example usage: * * timeline.clear(); // clear items, groups, and options * timeline.clear({options: true}); // clear options only * * @param {Object} [what] Optionally specify what to clear. By default: * {items: true, groups: true, options: true} */ Timeline.prototype.clear = function clear(what) { // clear items if (!what || what.items) { this.setItems(null); } // clear groups if (!what || what.groups) { this.setGroups(null); } // clear options if (!what || what.options) { this.setOptions(this.defaultOptions); } }; /** * Set Timeline window such that it fits all items */ Timeline.prototype.fit = function fit() { // apply the data range as range var dataRange = this.getItemRange(); // add 5% space on both sides var start = dataRange.min; var end = dataRange.max; if (start != null && end != null) { var interval = (end.valueOf() - start.valueOf()); if (interval <= 0) { // prevent an empty interval interval = 24 * 60 * 60 * 1000; // 1 day } start = new Date(start.valueOf() - interval * 0.05); end = new Date(end.valueOf() + interval * 0.05); } // skip range set if there is no start and end date if (start === null && end === null) { return; } this.range.setRange(start, end); }; /** * Get the data range of the item set. * @returns {{min: Date, max: Date}} range A range with a start and end Date. * When no minimum is found, min==null * When no maximum is found, max==null */ Timeline.prototype.getItemRange = function getItemRange() { // calculate min from start filed var itemsData = this.itemsData, min = null, max = null; if (itemsData) { // calculate the minimum value of the field 'start' var minItem = itemsData.min('start'); min = minItem ? minItem.start.valueOf() : null; // calculate maximum value of fields 'start' and 'end' var maxStartItem = itemsData.max('start'); if (maxStartItem) { max = maxStartItem.start.valueOf(); } var maxEndItem = itemsData.max('end'); if (maxEndItem) { if (max == null) { max = maxEndItem.end.valueOf(); } else { max = Math.max(max, maxEndItem.end.valueOf()); } } } return { min: (min != null) ? new Date(min) : null, max: (max != null) ? new Date(max) : null }; }; /** * Set selected items by their id. Replaces the current selection * Unknown id's are silently ignored. * @param {Array} [ids] An array with zero or more id's of the items to be * selected. If ids is an empty array, all items will be * unselected. */ Timeline.prototype.setSelection = function setSelection (ids) { this.itemSet.setSelection(ids); }; /** * Get the selected items by their id * @return {Array} ids The ids of the selected items */ Timeline.prototype.getSelection = function getSelection() { return this.itemSet.getSelection(); }; /** * Set the visible window. Both parameters are optional, you can change only * start or only end. Syntax: * * TimeLine.setWindow(start, end) * TimeLine.setWindow(range) * * Where start and end can be a Date, number, or string, and range is an * object with properties start and end. * * @param {Date | Number | String | Object} [start] Start date of visible window * @param {Date | Number | String} [end] End date of visible window */ Timeline.prototype.setWindow = function setWindow(start, end) { if (arguments.length == 1) { var range = arguments[0]; this.range.setRange(range.start, range.end); } else { this.range.setRange(start, end); } }; /** * Get the visible window * @return {{start: Date, end: Date}} Visible range */ Timeline.prototype.getWindow = function setWindow() { var range = this.range.getRange(); return { start: new Date(range.start), end: new Date(range.end) }; }; /** * Force a redraw of the Timeline. Can be useful to manually redraw when * option autoResize=false */ Timeline.prototype.redraw = function redraw() { this.rootPanel.repaint(); }; // TODO: deprecated since version 1.1.0, remove some day Timeline.prototype.repaint = function repaint() { throw new Error('Function repaint is deprecated. Use redraw instead.'); }; /** * Handle selecting/deselecting an item when tapping it * @param {Event} event * @private */ // TODO: move this function to ItemSet Timeline.prototype._onSelectItem = function (event) { if (!this.options.selectable) return; var ctrlKey = event.gesture.srcEvent && event.gesture.srcEvent.ctrlKey; var shiftKey = event.gesture.srcEvent && event.gesture.srcEvent.shiftKey; if (ctrlKey || shiftKey) { this._onMultiSelectItem(event); return; } var oldSelection = this.getSelection(); var item = ItemSet.itemFromTarget(event); var selection = item ? [item.id] : []; this.setSelection(selection); var newSelection = this.getSelection(); // emit a select event, // except when old selection is empty and new selection is still empty if (newSelection.length > 0 || oldSelection.length > 0) { this.emit('select', { items: this.getSelection() }); } event.stopPropagation(); }; /** * Handle creation and updates of an item on double tap * @param event * @private */ Timeline.prototype._onAddItem = function (event) { if (!this.options.selectable) return; if (!this.options.editable.add) return; var me = this, item = ItemSet.itemFromTarget(event); if (item) { // update item // execute async handler to update the item (or cancel it) var itemData = me.itemsData.get(item.id); // get a clone of the data from the dataset this.options.onUpdate(itemData, function (itemData) { if (itemData) { me.itemsData.update(itemData); } }); } else { // add item var xAbs = vis.util.getAbsoluteLeft(this.contentPanel.frame); var x = event.gesture.center.pageX - xAbs; var newItem = { start: this.timeAxis.snap(this._toTime(x)), content: 'new item' }; // when default type is a range, add a default end date to the new item if (this.options.type === 'range' || this.options.type == 'rangeoverflow') { newItem.end = this.timeAxis.snap(this._toTime(x + this.rootPanel.width / 5)); } var id = util.randomUUID(); newItem[this.itemsData.fieldId] = id; var group = ItemSet.groupFromTarget(event); if (group) { newItem.group = group.groupId; } // execute async handler to customize (or cancel) adding an item this.options.onAdd(newItem, function (item) { if (item) { me.itemsData.add(newItem); // TODO: need to trigger a redraw? } }); } }; /** * Handle selecting/deselecting multiple items when holding an item * @param {Event} event * @private */ // TODO: move this function to ItemSet Timeline.prototype._onMultiSelectItem = function (event) { if (!this.options.selectable) return; var selection, item = ItemSet.itemFromTarget(event); if (item) { // multi select items selection = this.getSelection(); // current selection var index = selection.indexOf(item.id); if (index == -1) { // item is not yet selected -> select it selection.push(item.id); } else { // item is already selected -> deselect it selection.splice(index, 1); } this.setSelection(selection); this.emit('select', { items: this.getSelection() }); event.stopPropagation(); } }; /** * Convert a position on screen (pixels) to a datetime * @param {int} x Position on the screen in pixels * @return {Date} time The datetime the corresponds with given position x * @private */ Timeline.prototype._toTime = function _toTime(x) { var conversion = this.range.conversion(this.mainPanel.width); return new Date(x / conversion.scale + conversion.offset); }; /** * Convert a datetime (Date object) into a position on the screen * @param {Date} time A date * @return {int} x The position on the screen in pixels which corresponds * with the given date. * @private */ Timeline.prototype._toScreen = function _toScreen(time) { var conversion = this.range.conversion(this.mainPanel.width); return (time.valueOf() - conversion.offset) * conversion.scale; }; (function(exports) { /** * Parse a text source containing data in DOT language into a JSON object. * The object contains two lists: one with nodes and one with edges. * * DOT language reference: http://www.graphviz.org/doc/info/lang.html * * @param {String} data Text containing a graph in DOT-notation * @return {Object} graph An object containing two parameters: * {Object[]} nodes * {Object[]} edges */ function parseDOT (data) { dot = data; return parseGraph(); } // token types enumeration var TOKENTYPE = { NULL : 0, DELIMITER : 1, IDENTIFIER: 2, UNKNOWN : 3 }; // map with all delimiters var DELIMITERS = { '{': true, '}': true, '[': true, ']': true, ';': true, '=': true, ',': true, '->': true, '--': true }; var dot = ''; // current dot file var index = 0; // current index in dot file var c = ''; // current token character in expr var token = ''; // current token var tokenType = TOKENTYPE.NULL; // type of the token /** * Get the first character from the dot file. * The character is stored into the char c. If the end of the dot file is * reached, the function puts an empty string in c. */ function first() { index = 0; c = dot.charAt(0); } /** * Get the next character from the dot file. * The character is stored into the char c. If the end of the dot file is * reached, the function puts an empty string in c. */ function next() { index++; c = dot.charAt(index); } /** * Preview the next character from the dot file. * @return {String} cNext */ function nextPreview() { return dot.charAt(index + 1); } /** * Test whether given character is alphabetic or numeric * @param {String} c * @return {Boolean} isAlphaNumeric */ var regexAlphaNumeric = /[a-zA-Z_0-9.:#]/; function isAlphaNumeric(c) { return regexAlphaNumeric.test(c); } /** * Merge all properties of object b into object b * @param {Object} a * @param {Object} b * @return {Object} a */ function merge (a, b) { if (!a) { a = {}; } if (b) { for (var name in b) { if (b.hasOwnProperty(name)) { a[name] = b[name]; } } } return a; } /** * Set a value in an object, where the provided parameter name can be a * path with nested parameters. For example: * * var obj = {a: 2}; * setValue(obj, 'b.c', 3); // obj = {a: 2, b: {c: 3}} * * @param {Object} obj * @param {String} path A parameter name or dot-separated parameter path, * like "color.highlight.border". * @param {*} value */ function setValue(obj, path, value) { var keys = path.split('.'); var o = obj; while (keys.length) { var key = keys.shift(); if (keys.length) { // this isn't the end point if (!o[key]) { o[key] = {}; } o = o[key]; } else { // this is the end point o[key] = value; } } } /** * Add a node to a graph object. If there is already a node with * the same id, their attributes will be merged. * @param {Object} graph * @param {Object} node */ function addNode(graph, node) { var i, len; var current = null; // find root graph (in case of subgraph) var graphs = [graph]; // list with all graphs from current graph to root graph var root = graph; while (root.parent) { graphs.push(root.parent); root = root.parent; } // find existing node (at root level) by its id if (root.nodes) { for (i = 0, len = root.nodes.length; i < len; i++) { if (node.id === root.nodes[i].id) { current = root.nodes[i]; break; } } } if (!current) { // this is a new node current = { id: node.id }; if (graph.node) { // clone default attributes current.attr = merge(current.attr, graph.node); } } // add node to this (sub)graph and all its parent graphs for (i = graphs.length - 1; i >= 0; i--) { var g = graphs[i]; if (!g.nodes) { g.nodes = []; } if (g.nodes.indexOf(current) == -1) { g.nodes.push(current); } } // merge attributes if (node.attr) { current.attr = merge(current.attr, node.attr); } } /** * Add an edge to a graph object * @param {Object} graph * @param {Object} edge */ function addEdge(graph, edge) { if (!graph.edges) { graph.edges = []; } graph.edges.push(edge); if (graph.edge) { var attr = merge({}, graph.edge); // clone default attributes edge.attr = merge(attr, edge.attr); // merge attributes } } /** * Create an edge to a graph object * @param {Object} graph * @param {String | Number | Object} from * @param {String | Number | Object} to * @param {String} type * @param {Object | null} attr * @return {Object} edge */ function createEdge(graph, from, to, type, attr) { var edge = { from: from, to: to, type: type }; if (graph.edge) { edge.attr = merge({}, graph.edge); // clone default attributes } edge.attr = merge(edge.attr || {}, attr); // merge attributes return edge; } /** * Get next token in the current dot file. * The token and token type are available as token and tokenType */ function getToken() { tokenType = TOKENTYPE.NULL; token = ''; // skip over whitespaces while (c == ' ' || c == '\t' || c == '\n' || c == '\r') { // space, tab, enter next(); } do { var isComment = false; // skip comment if (c == '#') { // find the previous non-space character var i = index - 1; while (dot.charAt(i) == ' ' || dot.charAt(i) == '\t') { i--; } if (dot.charAt(i) == '\n' || dot.charAt(i) == '') { // the # is at the start of a line, this is indeed a line comment while (c != '' && c != '\n') { next(); } isComment = true; } } if (c == '/' && nextPreview() == '/') { // skip line comment while (c != '' && c != '\n') { next(); } isComment = true; } if (c == '/' && nextPreview() == '*') { // skip block comment while (c != '') { if (c == '*' && nextPreview() == '/') { // end of block comment found. skip these last two characters next(); next(); break; } else { next(); } } isComment = true; } // skip over whitespaces while (c == ' ' || c == '\t' || c == '\n' || c == '\r') { // space, tab, enter next(); } } while (isComment); // check for end of dot file if (c == '') { // token is still empty tokenType = TOKENTYPE.DELIMITER; return; } // check for delimiters consisting of 2 characters var c2 = c + nextPreview(); if (DELIMITERS[c2]) { tokenType = TOKENTYPE.DELIMITER; token = c2; next(); next(); return; } // check for delimiters consisting of 1 character if (DELIMITERS[c]) { tokenType = TOKENTYPE.DELIMITER; token = c; next(); return; } // check for an identifier (number or string) // TODO: more precise parsing of numbers/strings (and the port separator ':') if (isAlphaNumeric(c) || c == '-') { token += c; next(); while (isAlphaNumeric(c)) { token += c; next(); } if (token == 'false') { token = false; // convert to boolean } else if (token == 'true') { token = true; // convert to boolean } else if (!isNaN(Number(token))) { token = Number(token); // convert to number } tokenType = TOKENTYPE.IDENTIFIER; return; } // check for a string enclosed by double quotes if (c == '"') { next(); while (c != '' && (c != '"' || (c == '"' && nextPreview() == '"'))) { token += c; if (c == '"') { // skip the escape character next(); } next(); } if (c != '"') { throw newSyntaxError('End of string " expected'); } next(); tokenType = TOKENTYPE.IDENTIFIER; return; } // something unknown is found, wrong characters, a syntax error tokenType = TOKENTYPE.UNKNOWN; while (c != '') { token += c; next(); } throw new SyntaxError('Syntax error in part "' + chop(token, 30) + '"'); } /** * Parse a graph. * @returns {Object} graph */ function parseGraph() { var graph = {}; first(); getToken(); // optional strict keyword if (token == 'strict') { graph.strict = true; getToken(); } // graph or digraph keyword if (token == 'graph' || token == 'digraph') { graph.type = token; getToken(); } // optional graph id if (tokenType == TOKENTYPE.IDENTIFIER) { graph.id = token; getToken(); } // open angle bracket if (token != '{') { throw newSyntaxError('Angle bracket { expected'); } getToken(); // statements parseStatements(graph); // close angle bracket if (token != '}') { throw newSyntaxError('Angle bracket } expected'); } getToken(); // end of file if (token !== '') { throw newSyntaxError('End of file expected'); } getToken(); // remove temporary default properties delete graph.node; delete graph.edge; delete graph.graph; return graph; } /** * Parse a list with statements. * @param {Object} graph */ function parseStatements (graph) { while (token !== '' && token != '}') { parseStatement(graph); if (token == ';') { getToken(); } } } /** * Parse a single statement. Can be a an attribute statement, node * statement, a series of node statements and edge statements, or a * parameter. * @param {Object} graph */ function parseStatement(graph) { // parse subgraph var subgraph = parseSubgraph(graph); if (subgraph) { // edge statements parseEdge(graph, subgraph); return; } // parse an attribute statement var attr = parseAttributeStatement(graph); if (attr) { return; } // parse node if (tokenType != TOKENTYPE.IDENTIFIER) { throw newSyntaxError('Identifier expected'); } var id = token; // id can be a string or a number getToken(); if (token == '=') { // id statement getToken(); if (tokenType != TOKENTYPE.IDENTIFIER) { throw newSyntaxError('Identifier expected'); } graph[id] = token; getToken(); // TODO: implement comma separated list with "a_list: ID=ID [','] [a_list] " } else { parseNodeStatement(graph, id); } } /** * Parse a subgraph * @param {Object} graph parent graph object * @return {Object | null} subgraph */ function parseSubgraph (graph) { var subgraph = null; // optional subgraph keyword if (token == 'subgraph') { subgraph = {}; subgraph.type = 'subgraph'; getToken(); // optional graph id if (tokenType == TOKENTYPE.IDENTIFIER) { subgraph.id = token; getToken(); } } // open angle bracket if (token == '{') { getToken(); if (!subgraph) { subgraph = {}; } subgraph.parent = graph; subgraph.node = graph.node; subgraph.edge = graph.edge; subgraph.graph = graph.graph; // statements parseStatements(subgraph); // close angle bracket if (token != '}') { throw newSyntaxError('Angle bracket } expected'); } getToken(); // remove temporary default properties delete subgraph.node; delete subgraph.edge; delete subgraph.graph; delete subgraph.parent; // register at the parent graph if (!graph.subgraphs) { graph.subgraphs = []; } graph.subgraphs.push(subgraph); } return subgraph; } /** * parse an attribute statement like "node [shape=circle fontSize=16]". * Available keywords are 'node', 'edge', 'graph'. * The previous list with default attributes will be replaced * @param {Object} graph * @returns {String | null} keyword Returns the name of the parsed attribute * (node, edge, graph), or null if nothing * is parsed. */ function parseAttributeStatement (graph) { // attribute statements if (token == 'node') { getToken(); // node attributes graph.node = parseAttributeList(); return 'node'; } else if (token == 'edge') { getToken(); // edge attributes graph.edge = parseAttributeList(); return 'edge'; } else if (token == 'graph') { getToken(); // graph attributes graph.graph = parseAttributeList(); return 'graph'; } return null; } /** * parse a node statement * @param {Object} graph * @param {String | Number} id */ function parseNodeStatement(graph, id) { // node statement var node = { id: id }; var attr = parseAttributeList(); if (attr) { node.attr = attr; } addNode(graph, node); // edge statements parseEdge(graph, id); } /** * Parse an edge or a series of edges * @param {Object} graph * @param {String | Number} from Id of the from node */ function parseEdge(graph, from) { while (token == '->' || token == '--') { var to; var type = token; getToken(); var subgraph = parseSubgraph(graph); if (subgraph) { to = subgraph; } else { if (tokenType != TOKENTYPE.IDENTIFIER) { throw newSyntaxError('Identifier or subgraph expected'); } to = token; addNode(graph, { id: to }); getToken(); } // parse edge attributes var attr = parseAttributeList(); // create edge var edge = createEdge(graph, from, to, type, attr); addEdge(graph, edge); from = to; } } /** * Parse a set with attributes, * for example [label="1.000", shape=solid] * @return {Object | null} attr */ function parseAttributeList() { var attr = null; while (token == '[') { getToken(); attr = {}; while (token !== '' && token != ']') { if (tokenType != TOKENTYPE.IDENTIFIER) { throw newSyntaxError('Attribute name expected'); } var name = token; getToken(); if (token != '=') { throw newSyntaxError('Equal sign = expected'); } getToken(); if (tokenType != TOKENTYPE.IDENTIFIER) { throw newSyntaxError('Attribute value expected'); } var value = token; setValue(attr, name, value); // name can be a path getToken(); if (token ==',') { getToken(); } } if (token != ']') { throw newSyntaxError('Bracket ] expected'); } getToken(); } return attr; } /** * Create a syntax error with extra information on current token and index. * @param {String} message * @returns {SyntaxError} err */ function newSyntaxError(message) { return new SyntaxError(message + ', got "' + chop(token, 30) + '" (char ' + index + ')'); } /** * Chop off text after a maximum length * @param {String} text * @param {Number} maxLength * @returns {String} */ function chop (text, maxLength) { return (text.length <= maxLength) ? text : (text.substr(0, 27) + '...'); } /** * Execute a function fn for each pair of elements in two arrays * @param {Array | *} array1 * @param {Array | *} array2 * @param {function} fn */ function forEach2(array1, array2, fn) { if (array1 instanceof Array) { array1.forEach(function (elem1) { if (array2 instanceof Array) { array2.forEach(function (elem2) { fn(elem1, elem2); }); } else { fn(elem1, array2); } }); } else { if (array2 instanceof Array) { array2.forEach(function (elem2) { fn(array1, elem2); }); } else { fn(array1, array2); } } } /** * Convert a string containing a graph in DOT language into a map containing * with nodes and edges in the format of graph. * @param {String} data Text containing a graph in DOT-notation * @return {Object} graphData */ function DOTToGraph (data) { // parse the DOT file var dotData = parseDOT(data); var graphData = { nodes: [], edges: [], options: {} }; // copy the nodes if (dotData.nodes) { dotData.nodes.forEach(function (dotNode) { var graphNode = { id: dotNode.id, label: String(dotNode.label || dotNode.id) }; merge(graphNode, dotNode.attr); if (graphNode.image) { graphNode.shape = 'image'; } graphData.nodes.push(graphNode); }); } // copy the edges if (dotData.edges) { /** * Convert an edge in DOT format to an edge with VisGraph format * @param {Object} dotEdge * @returns {Object} graphEdge */ function convertEdge(dotEdge) { var graphEdge = { from: dotEdge.from, to: dotEdge.to }; merge(graphEdge, dotEdge.attr); graphEdge.style = (dotEdge.type == '->') ? 'arrow' : 'line'; return graphEdge; } dotData.edges.forEach(function (dotEdge) { var from, to; if (dotEdge.from instanceof Object) { from = dotEdge.from.nodes; } else { from = { id: dotEdge.from } } if (dotEdge.to instanceof Object) { to = dotEdge.to.nodes; } else { to = { id: dotEdge.to } } if (dotEdge.from instanceof Object && dotEdge.from.edges) { dotEdge.from.edges.forEach(function (subEdge) { var graphEdge = convertEdge(subEdge); graphData.edges.push(graphEdge); }); } forEach2(from, to, function (from, to) { var subEdge = createEdge(graphData, from.id, to.id, dotEdge.type, dotEdge.attr); var graphEdge = convertEdge(subEdge); graphData.edges.push(graphEdge); }); if (dotEdge.to instanceof Object && dotEdge.to.edges) { dotEdge.to.edges.forEach(function (subEdge) { var graphEdge = convertEdge(subEdge); graphData.edges.push(graphEdge); }); } }); } // copy the options if (dotData.attr) { graphData.options = dotData.attr; } return graphData; } // exports exports.parseDOT = parseDOT; exports.DOTToGraph = DOTToGraph; })(typeof util !== 'undefined' ? util : exports); /** * Canvas shapes used by the Graph */ if (typeof CanvasRenderingContext2D !== 'undefined') { /** * Draw a circle shape */ CanvasRenderingContext2D.prototype.circle = function(x, y, r) { this.beginPath(); this.arc(x, y, r, 0, 2*Math.PI, false); }; /** * Draw a square shape * @param {Number} x horizontal center * @param {Number} y vertical center * @param {Number} r size, width and height of the square */ CanvasRenderingContext2D.prototype.square = function(x, y, r) { this.beginPath(); this.rect(x - r, y - r, r * 2, r * 2); }; /** * Draw a triangle shape * @param {Number} x horizontal center * @param {Number} y vertical center * @param {Number} r radius, half the length of the sides of the triangle */ CanvasRenderingContext2D.prototype.triangle = function(x, y, r) { // http://en.wikipedia.org/wiki/Equilateral_triangle this.beginPath(); var s = r * 2; var s2 = s / 2; var ir = Math.sqrt(3) / 6 * s; // radius of inner circle var h = Math.sqrt(s * s - s2 * s2); // height this.moveTo(x, y - (h - ir)); this.lineTo(x + s2, y + ir); this.lineTo(x - s2, y + ir); this.lineTo(x, y - (h - ir)); this.closePath(); }; /** * Draw a triangle shape in downward orientation * @param {Number} x horizontal center * @param {Number} y vertical center * @param {Number} r radius */ CanvasRenderingContext2D.prototype.triangleDown = function(x, y, r) { // http://en.wikipedia.org/wiki/Equilateral_triangle this.beginPath(); var s = r * 2; var s2 = s / 2; var ir = Math.sqrt(3) / 6 * s; // radius of inner circle var h = Math.sqrt(s * s - s2 * s2); // height this.moveTo(x, y + (h - ir)); this.lineTo(x + s2, y - ir); this.lineTo(x - s2, y - ir); this.lineTo(x, y + (h - ir)); this.closePath(); }; /** * Draw a star shape, a star with 5 points * @param {Number} x horizontal center * @param {Number} y vertical center * @param {Number} r radius, half the length of the sides of the triangle */ CanvasRenderingContext2D.prototype.star = function(x, y, r) { // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/ this.beginPath(); for (var n = 0; n < 10; n++) { var radius = (n % 2 === 0) ? r * 1.3 : r * 0.5; this.lineTo( x + radius * Math.sin(n * 2 * Math.PI / 10), y - radius * Math.cos(n * 2 * Math.PI / 10) ); } this.closePath(); }; /** * http://stackoverflow.com/questions/1255512/how-to-draw-a-rounded-rectangle-on-html-canvas */ CanvasRenderingContext2D.prototype.roundRect = function(x, y, w, h, r) { var r2d = Math.PI/180; if( w - ( 2 * r ) < 0 ) { r = ( w / 2 ); } //ensure that the radius isn't too large for x if( h - ( 2 * r ) < 0 ) { r = ( h / 2 ); } //ensure that the radius isn't too large for y this.beginPath(); this.moveTo(x+r,y); this.lineTo(x+w-r,y); this.arc(x+w-r,y+r,r,r2d*270,r2d*360,false); this.lineTo(x+w,y+h-r); this.arc(x+w-r,y+h-r,r,0,r2d*90,false); this.lineTo(x+r,y+h); this.arc(x+r,y+h-r,r,r2d*90,r2d*180,false); this.lineTo(x,y+r); this.arc(x+r,y+r,r,r2d*180,r2d*270,false); }; /** * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas */ CanvasRenderingContext2D.prototype.ellipse = function(x, y, w, h) { var kappa = .5522848, ox = (w / 2) * kappa, // control point offset horizontal oy = (h / 2) * kappa, // control point offset vertical xe = x + w, // x-end ye = y + h, // y-end xm = x + w / 2, // x-middle ym = y + h / 2; // y-middle this.beginPath(); this.moveTo(x, ym); this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y); this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym); this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye); this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym); }; /** * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas */ CanvasRenderingContext2D.prototype.database = function(x, y, w, h) { var f = 1/3; var wEllipse = w; var hEllipse = h * f; var kappa = .5522848, ox = (wEllipse / 2) * kappa, // control point offset horizontal oy = (hEllipse / 2) * kappa, // control point offset vertical xe = x + wEllipse, // x-end ye = y + hEllipse, // y-end xm = x + wEllipse / 2, // x-middle ym = y + hEllipse / 2, // y-middle ymb = y + (h - hEllipse/2), // y-midlle, bottom ellipse yeb = y + h; // y-end, bottom ellipse this.beginPath(); this.moveTo(xe, ym); this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye); this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym); this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y); this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym); this.lineTo(xe, ymb); this.bezierCurveTo(xe, ymb + oy, xm + ox, yeb, xm, yeb); this.bezierCurveTo(xm - ox, yeb, x, ymb + oy, x, ymb); this.lineTo(x, ym); }; /** * Draw an arrow point (no line) */ CanvasRenderingContext2D.prototype.arrow = function(x, y, angle, length) { // tail var xt = x - length * Math.cos(angle); var yt = y - length * Math.sin(angle); // inner tail // TODO: allow to customize different shapes var xi = x - length * 0.9 * Math.cos(angle); var yi = y - length * 0.9 * Math.sin(angle); // left var xl = xt + length / 3 * Math.cos(angle + 0.5 * Math.PI); var yl = yt + length / 3 * Math.sin(angle + 0.5 * Math.PI); // right var xr = xt + length / 3 * Math.cos(angle - 0.5 * Math.PI); var yr = yt + length / 3 * Math.sin(angle - 0.5 * Math.PI); this.beginPath(); this.moveTo(x, y); this.lineTo(xl, yl); this.lineTo(xi, yi); this.lineTo(xr, yr); this.closePath(); }; /** * Sets up the dashedLine functionality for drawing * Original code came from http://stackoverflow.com/questions/4576724/dotted-stroke-in-canvas * @author David Jordan * @date 2012-08-08 */ CanvasRenderingContext2D.prototype.dashedLine = function(x,y,x2,y2,dashArray){ if (!dashArray) dashArray=[10,5]; if (dashLength==0) dashLength = 0.001; // Hack for Safari var dashCount = dashArray.length; this.moveTo(x, y); var dx = (x2-x), dy = (y2-y); var slope = dy/dx; var distRemaining = Math.sqrt( dx*dx + dy*dy ); var dashIndex=0, draw=true; while (distRemaining>=0.1){ var dashLength = dashArray[dashIndex++%dashCount]; if (dashLength > distRemaining) dashLength = distRemaining; var xStep = Math.sqrt( dashLength*dashLength / (1 + slope*slope) ); if (dx<0) xStep = -xStep; x += xStep; y += slope*xStep; this[draw ? 'lineTo' : 'moveTo'](x,y); distRemaining -= dashLength; draw = !draw; } }; // TODO: add diamond shape } /** * @class Node * A node. A node can be connected to other nodes via one or multiple edges. * @param {object} properties An object containing properties for the node. All * properties are optional, except for the id. * {number} id Id of the node. Required * {string} label Text label for the node * {number} x Horizontal position of the node * {number} y Vertical position of the node * {string} shape Node shape, available: * "database", "circle", "ellipse", * "box", "image", "text", "dot", * "star", "triangle", "triangleDown", * "square" * {string} image An image url * {string} title An title text, can be HTML * {anytype} group A group name or number * @param {Graph.Images} imagelist A list with images. Only needed * when the node has an image * @param {Graph.Groups} grouplist A list with groups. Needed for * retrieving group properties * @param {Object} constants An object with default values for * example for the color * */ function Node(properties, imagelist, grouplist, constants) { this.selected = false; this.hover = false; this.edges = []; // all edges connected to this node this.dynamicEdges = []; this.reroutedEdges = {}; this.group = constants.nodes.group; this.fontSize = constants.nodes.fontSize; this.fontFace = constants.nodes.fontFace; this.fontColor = constants.nodes.fontColor; this.fontDrawThreshold = 3; this.color = constants.nodes.color; // set defaults for the properties this.id = undefined; this.shape = constants.nodes.shape; this.image = constants.nodes.image; this.x = null; this.y = null; this.xFixed = false; this.yFixed = false; this.horizontalAlignLeft = true; // these are for the navigation controls this.verticalAlignTop = true; // these are for the navigation controls this.radius = constants.nodes.radius; this.baseRadiusValue = constants.nodes.radius; this.radiusFixed = false; this.radiusMin = constants.nodes.radiusMin; this.radiusMax = constants.nodes.radiusMax; this.level = -1; this.preassignedLevel = false; this.imagelist = imagelist; this.grouplist = grouplist; // physics properties this.fx = 0.0; // external force x this.fy = 0.0; // external force y this.vx = 0.0; // velocity x this.vy = 0.0; // velocity y this.minForce = constants.minForce; this.damping = constants.physics.damping; this.mass = 1; // kg this.fixedData = {x:null,y:null}; this.setProperties(properties, constants); // creating the variables for clustering this.resetCluster(); this.dynamicEdgesLength = 0; this.clusterSession = 0; this.clusterSizeWidthFactor = constants.clustering.nodeScaling.width; this.clusterSizeHeightFactor = constants.clustering.nodeScaling.height; this.clusterSizeRadiusFactor = constants.clustering.nodeScaling.radius; this.maxNodeSizeIncrements = constants.clustering.maxNodeSizeIncrements; this.growthIndicator = 0; // variables to tell the node about the graph. this.graphScaleInv = 1; this.graphScale = 1; this.canvasTopLeft = {"x": -300, "y": -300}; this.canvasBottomRight = {"x": 300, "y": 300}; this.parentEdgeId = null; } /** * (re)setting the clustering variables and objects */ Node.prototype.resetCluster = function() { // clustering variables this.formationScale = undefined; // this is used to determine when to open the cluster this.clusterSize = 1; // this signifies the total amount of nodes in this cluster this.containedNodes = {}; this.containedEdges = {}; this.clusterSessions = []; }; /** * Attach a edge to the node * @param {Edge} edge */ Node.prototype.attachEdge = function(edge) { if (this.edges.indexOf(edge) == -1) { this.edges.push(edge); } if (this.dynamicEdges.indexOf(edge) == -1) { this.dynamicEdges.push(edge); } this.dynamicEdgesLength = this.dynamicEdges.length; }; /** * Detach a edge from the node * @param {Edge} edge */ Node.prototype.detachEdge = function(edge) { var index = this.edges.indexOf(edge); if (index != -1) { this.edges.splice(index, 1); this.dynamicEdges.splice(index, 1); } this.dynamicEdgesLength = this.dynamicEdges.length; }; /** * Set or overwrite properties for the node * @param {Object} properties an object with properties * @param {Object} constants and object with default, global properties */ Node.prototype.setProperties = function(properties, constants) { if (!properties) { return; } this.originalLabel = undefined; // basic properties if (properties.id !== undefined) {this.id = properties.id;} if (properties.label !== undefined) {this.label = properties.label; this.originalLabel = properties.label;} if (properties.title !== undefined) {this.title = properties.title;} if (properties.group !== undefined) {this.group = properties.group;} if (properties.x !== undefined) {this.x = properties.x;} if (properties.y !== undefined) {this.y = properties.y;} if (properties.value !== undefined) {this.value = properties.value;} if (properties.level !== undefined) {this.level = properties.level; this.preassignedLevel = true;} // physics if (properties.mass !== undefined) {this.mass = properties.mass;} // navigation controls properties if (properties.horizontalAlignLeft !== undefined) {this.horizontalAlignLeft = properties.horizontalAlignLeft;} if (properties.verticalAlignTop !== undefined) {this.verticalAlignTop = properties.verticalAlignTop;} if (properties.triggerFunction !== undefined) {this.triggerFunction = properties.triggerFunction;} if (this.id === undefined) { throw "Node must have an id"; } // copy group properties if (this.group) { var groupObj = this.grouplist.get(this.group); for (var prop in groupObj) { if (groupObj.hasOwnProperty(prop)) { this[prop] = groupObj[prop]; } } } // individual shape properties if (properties.shape !== undefined) {this.shape = properties.shape;} if (properties.image !== undefined) {this.image = properties.image;} if (properties.radius !== undefined) {this.radius = properties.radius;} if (properties.color !== undefined) {this.color = util.parseColor(properties.color);} if (properties.fontColor !== undefined) {this.fontColor = properties.fontColor;} if (properties.fontSize !== undefined) {this.fontSize = properties.fontSize;} if (properties.fontFace !== undefined) {this.fontFace = properties.fontFace;} if (this.image !== undefined && this.image != "") { if (this.imagelist) { this.imageObj = this.imagelist.load(this.image); } else { throw "No imagelist provided"; } } this.xFixed = this.xFixed || (properties.x !== undefined && !properties.allowedToMoveX); this.yFixed = this.yFixed || (properties.y !== undefined && !properties.allowedToMoveY); this.radiusFixed = this.radiusFixed || (properties.radius !== undefined); if (this.shape == 'image') { this.radiusMin = constants.nodes.widthMin; this.radiusMax = constants.nodes.widthMax; } // choose draw method depending on the shape switch (this.shape) { case 'database': this.draw = this._drawDatabase; this.resize = this._resizeDatabase; break; case 'box': this.draw = this._drawBox; this.resize = this._resizeBox; break; case 'circle': this.draw = this._drawCircle; this.resize = this._resizeCircle; break; case 'ellipse': this.draw = this._drawEllipse; this.resize = this._resizeEllipse; break; // TODO: add diamond shape case 'image': this.draw = this._drawImage; this.resize = this._resizeImage; break; case 'text': this.draw = this._drawText; this.resize = this._resizeText; break; case 'dot': this.draw = this._drawDot; this.resize = this._resizeShape; break; case 'square': this.draw = this._drawSquare; this.resize = this._resizeShape; break; case 'triangle': this.draw = this._drawTriangle; this.resize = this._resizeShape; break; case 'triangleDown': this.draw = this._drawTriangleDown; this.resize = this._resizeShape; break; case 'star': this.draw = this._drawStar; this.resize = this._resizeShape; break; default: this.draw = this._drawEllipse; this.resize = this._resizeEllipse; break; } // reset the size of the node, this can be changed this._reset(); }; /** * select this node */ Node.prototype.select = function() { this.selected = true; this._reset(); }; /** * unselect this node */ Node.prototype.unselect = function() { this.selected = false; this._reset(); }; /** * Reset the calculated size of the node, forces it to recalculate its size */ Node.prototype.clearSizeCache = function() { this._reset(); }; /** * Reset the calculated size of the node, forces it to recalculate its size * @private */ Node.prototype._reset = function() { this.width = undefined; this.height = undefined; }; /** * get the title of this node. * @return {string} title The title of the node, or undefined when no title * has been set. */ Node.prototype.getTitle = function() { return typeof this.title === "function" ? this.title() : this.title; }; /** * Calculate the distance to the border of the Node * @param {CanvasRenderingContext2D} ctx * @param {Number} angle Angle in radians * @returns {number} distance Distance to the border in pixels */ Node.prototype.distanceToBorder = function (ctx, angle) { var borderWidth = 1; if (!this.width) { this.resize(ctx); } switch (this.shape) { case 'circle': case 'dot': return this.radius + borderWidth; case 'ellipse': var a = this.width / 2; var b = this.height / 2; var w = (Math.sin(angle) * a); var h = (Math.cos(angle) * b); return a * b / Math.sqrt(w * w + h * h); // TODO: implement distanceToBorder for database // TODO: implement distanceToBorder for triangle // TODO: implement distanceToBorder for triangleDown case 'box': case 'image': case 'text': default: if (this.width) { return Math.min( Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth; // TODO: reckon with border radius too in case of box } else { return 0; } } // TODO: implement calculation of distance to border for all shapes }; /** * Set forces acting on the node * @param {number} fx Force in horizontal direction * @param {number} fy Force in vertical direction */ Node.prototype._setForce = function(fx, fy) { this.fx = fx; this.fy = fy; }; /** * Add forces acting on the node * @param {number} fx Force in horizontal direction * @param {number} fy Force in vertical direction * @private */ Node.prototype._addForce = function(fx, fy) { this.fx += fx; this.fy += fy; }; /** * Perform one discrete step for the node * @param {number} interval Time interval in seconds */ Node.prototype.discreteStep = function(interval) { if (!this.xFixed) { var dx = this.damping * this.vx; // damping force var ax = (this.fx - dx) / this.mass; // acceleration this.vx += ax * interval; // velocity this.x += this.vx * interval; // position } if (!this.yFixed) { var dy = this.damping * this.vy; // damping force var ay = (this.fy - dy) / this.mass; // acceleration this.vy += ay * interval; // velocity this.y += this.vy * interval; // position } }; /** * Perform one discrete step for the node * @param {number} interval Time interval in seconds * @param {number} maxVelocity The speed limit imposed on the velocity */ Node.prototype.discreteStepLimited = function(interval, maxVelocity) { if (!this.xFixed) { var dx = this.damping * this.vx; // damping force var ax = (this.fx - dx) / this.mass; // acceleration this.vx += ax * interval; // velocity this.vx = (Math.abs(this.vx) > maxVelocity) ? ((this.vx > 0) ? maxVelocity : -maxVelocity) : this.vx; this.x += this.vx * interval; // position } else { this.fx = 0; } if (!this.yFixed) { var dy = this.damping * this.vy; // damping force var ay = (this.fy - dy) / this.mass; // acceleration this.vy += ay * interval; // velocity this.vy = (Math.abs(this.vy) > maxVelocity) ? ((this.vy > 0) ? maxVelocity : -maxVelocity) : this.vy; this.y += this.vy * interval; // position } else { this.fy = 0; } }; /** * Check if this node has a fixed x and y position * @return {boolean} true if fixed, false if not */ Node.prototype.isFixed = function() { return (this.xFixed && this.yFixed); }; /** * Check if this node is moving * @param {number} vmin the minimum velocity considered as "moving" * @return {boolean} true if moving, false if it has no velocity */ // TODO: replace this method with calculating the kinetic energy Node.prototype.isMoving = function(vmin) { return (Math.abs(this.vx) > vmin || Math.abs(this.vy) > vmin); }; /** * check if this node is selecte * @return {boolean} selected True if node is selected, else false */ Node.prototype.isSelected = function() { return this.selected; }; /** * Retrieve the value of the node. Can be undefined * @return {Number} value */ Node.prototype.getValue = function() { return this.value; }; /** * Calculate the distance from the nodes location to the given location (x,y) * @param {Number} x * @param {Number} y * @return {Number} value */ Node.prototype.getDistance = function(x, y) { var dx = this.x - x, dy = this.y - y; return Math.sqrt(dx * dx + dy * dy); }; /** * Adjust the value range of the node. The node will adjust it's radius * based on its value. * @param {Number} min * @param {Number} max */ Node.prototype.setValueRange = function(min, max) { if (!this.radiusFixed && this.value !== undefined) { if (max == min) { this.radius = (this.radiusMin + this.radiusMax) / 2; } else { var scale = (this.radiusMax - this.radiusMin) / (max - min); this.radius = (this.value - min) * scale + this.radiusMin; } } this.baseRadiusValue = this.radius; }; /** * Draw this node in the given canvas * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); * @param {CanvasRenderingContext2D} ctx */ Node.prototype.draw = function(ctx) { throw "Draw method not initialized for node"; }; /** * Recalculate the size of this node in the given canvas * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); * @param {CanvasRenderingContext2D} ctx */ Node.prototype.resize = function(ctx) { throw "Resize method not initialized for node"; }; /** * Check if this object is overlapping with the provided object * @param {Object} obj an object with parameters left, top, right, bottom * @return {boolean} True if location is located on node */ Node.prototype.isOverlappingWith = function(obj) { return (this.left < obj.right && this.left + this.width > obj.left && this.top < obj.bottom && this.top + this.height > obj.top); }; Node.prototype._resizeImage = function (ctx) { // TODO: pre calculate the image size if (!this.width || !this.height) { // undefined or 0 var width, height; if (this.value) { this.radius = this.baseRadiusValue; var scale = this.imageObj.height / this.imageObj.width; if (scale !== undefined) { width = this.radius || this.imageObj.width; height = this.radius * scale || this.imageObj.height; } else { width = 0; height = 0; } } else { width = this.imageObj.width; height = this.imageObj.height; } this.width = width; this.height = height; this.growthIndicator = 0; if (this.width > 0 && this.height > 0) { this.width += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeWidthFactor; this.height += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeHeightFactor; this.radius += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeRadiusFactor; this.growthIndicator = this.width - width; } } }; Node.prototype._drawImage = function (ctx) { this._resizeImage(ctx); this.left = this.x - this.width / 2; this.top = this.y - this.height / 2; var yLabel; if (this.imageObj.width != 0 ) { // draw the shade if (this.clusterSize > 1) { var lineWidth = ((this.clusterSize > 1) ? 10 : 0.0); lineWidth *= this.graphScaleInv; lineWidth = Math.min(0.2 * this.width,lineWidth); ctx.globalAlpha = 0.5; ctx.drawImage(this.imageObj, this.left - lineWidth, this.top - lineWidth, this.width + 2*lineWidth, this.height + 2*lineWidth); } // draw the image ctx.globalAlpha = 1.0; ctx.drawImage(this.imageObj, this.left, this.top, this.width, this.height); yLabel = this.y + this.height / 2; } else { // image still loading... just draw the label for now yLabel = this.y; } this._label(ctx, this.label, this.x, yLabel, undefined, "top"); }; Node.prototype._resizeBox = function (ctx) { if (!this.width) { var margin = 5; var textSize = this.getTextSize(ctx); this.width = textSize.width + 2 * margin; this.height = textSize.height + 2 * margin; this.width += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * 0.5 * this.clusterSizeWidthFactor; this.height += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * 0.5 * this.clusterSizeHeightFactor; this.growthIndicator = this.width - (textSize.width + 2 * margin); // this.radius += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * 0.5 * this.clusterSizeRadiusFactor; } }; Node.prototype._drawBox = function (ctx) { this._resizeBox(ctx); this.left = this.x - this.width / 2; this.top = this.y - this.height / 2; var clusterLineWidth = 2.5; var selectionLineWidth = 2; ctx.strokeStyle = this.selected ? this.color.highlight.border : this.hover ? this.color.hover.border : this.color.border; // draw the outer border if (this.clusterSize > 1) { ctx.lineWidth = (this.selected ? selectionLineWidth : 1.0) + ((this.clusterSize > 1) ? clusterLineWidth : 0.0); ctx.lineWidth *= this.graphScaleInv; ctx.lineWidth = Math.min(0.1 * this.width,ctx.lineWidth); ctx.roundRect(this.left-2*ctx.lineWidth, this.top-2*ctx.lineWidth, this.width+4*ctx.lineWidth, this.height+4*ctx.lineWidth, this.radius); ctx.stroke(); } ctx.lineWidth = (this.selected ? selectionLineWidth : 1.0) + ((this.clusterSize > 1) ? clusterLineWidth : 0.0); ctx.lineWidth *= this.graphScaleInv; ctx.lineWidth = Math.min(0.1 * this.width,ctx.lineWidth); ctx.fillStyle = this.selected ? this.color.highlight.background : this.color.background; ctx.roundRect(this.left, this.top, this.width, this.height, this.radius); ctx.fill(); ctx.stroke(); this._label(ctx, this.label, this.x, this.y); }; Node.prototype._resizeDatabase = function (ctx) { if (!this.width) { var margin = 5; var textSize = this.getTextSize(ctx); var size = textSize.width + 2 * margin; this.width = size; this.height = size; // scaling used for clustering this.width += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeWidthFactor; this.height += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeHeightFactor; this.radius += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeRadiusFactor; this.growthIndicator = this.width - size; } }; Node.prototype._drawDatabase = function (ctx) { this._resizeDatabase(ctx); this.left = this.x - this.width / 2; this.top = this.y - this.height / 2; var clusterLineWidth = 2.5; var selectionLineWidth = 2; ctx.strokeStyle = this.selected ? this.color.highlight.border : this.hover ? this.color.hover.border : this.color.border; // draw the outer border if (this.clusterSize > 1) { ctx.lineWidth = (this.selected ? selectionLineWidth : 1.0) + ((this.clusterSize > 1) ? clusterLineWidth : 0.0); ctx.lineWidth *= this.graphScaleInv; ctx.lineWidth = Math.min(0.1 * this.width,ctx.lineWidth); ctx.database(this.x - this.width/2 - 2*ctx.lineWidth, this.y - this.height*0.5 - 2*ctx.lineWidth, this.width + 4*ctx.lineWidth, this.height + 4*ctx.lineWidth); ctx.stroke(); } ctx.lineWidth = (this.selected ? selectionLineWidth : 1.0) + ((this.clusterSize > 1) ? clusterLineWidth : 0.0); ctx.lineWidth *= this.graphScaleInv; ctx.lineWidth = Math.min(0.1 * this.width,ctx.lineWidth); ctx.fillStyle = this.selected ? this.color.highlight.background : this.hover ? this.color.hover.background : this.color.background; ctx.database(this.x - this.width/2, this.y - this.height*0.5, this.width, this.height); ctx.fill(); ctx.stroke(); this._label(ctx, this.label, this.x, this.y); }; Node.prototype._resizeCircle = function (ctx) { if (!this.width) { var margin = 5; var textSize = this.getTextSize(ctx); var diameter = Math.max(textSize.width, textSize.height) + 2 * margin; this.radius = diameter / 2; this.width = diameter; this.height = diameter; // scaling used for clustering // this.width += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * 0.5 * this.clusterSizeWidthFactor; // this.height += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * 0.5 * this.clusterSizeHeightFactor; this.radius += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * 0.5 * this.clusterSizeRadiusFactor; this.growthIndicator = this.radius - 0.5*diameter; } }; Node.prototype._drawCircle = function (ctx) { this._resizeCircle(ctx); this.left = this.x - this.width / 2; this.top = this.y - this.height / 2; var clusterLineWidth = 2.5; var selectionLineWidth = 2; ctx.strokeStyle = this.selected ? this.color.highlight.border : this.hover ? this.color.hover.border : this.color.border; // draw the outer border if (this.clusterSize > 1) { ctx.lineWidth = (this.selected ? selectionLineWidth : 1.0) + ((this.clusterSize > 1) ? clusterLineWidth : 0.0); ctx.lineWidth *= this.graphScaleInv; ctx.lineWidth = Math.min(0.1 * this.width,ctx.lineWidth); ctx.circle(this.x, this.y, this.radius+2*ctx.lineWidth); ctx.stroke(); } ctx.lineWidth = (this.selected ? selectionLineWidth : 1.0) + ((this.clusterSize > 1) ? clusterLineWidth : 0.0); ctx.lineWidth *= this.graphScaleInv; ctx.lineWidth = Math.min(0.1 * this.width,ctx.lineWidth); ctx.fillStyle = this.selected ? this.color.highlight.background : this.hover ? this.color.hover.background : this.color.background; ctx.circle(this.x, this.y, this.radius); ctx.fill(); ctx.stroke(); this._label(ctx, this.label, this.x, this.y); }; Node.prototype._resizeEllipse = function (ctx) { if (!this.width) { var textSize = this.getTextSize(ctx); this.width = textSize.width * 1.5; this.height = textSize.height * 2; if (this.width < this.height) { this.width = this.height; } var defaultSize = this.width; // scaling used for clustering this.width += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeWidthFactor; this.height += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeHeightFactor; this.radius += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeRadiusFactor; this.growthIndicator = this.width - defaultSize; } }; Node.prototype._drawEllipse = function (ctx) { this._resizeEllipse(ctx); this.left = this.x - this.width / 2; this.top = this.y - this.height / 2; var clusterLineWidth = 2.5; var selectionLineWidth = 2; ctx.strokeStyle = this.selected ? this.color.highlight.border : this.hover ? this.color.hover.border : this.color.border; // draw the outer border if (this.clusterSize > 1) { ctx.lineWidth = (this.selected ? selectionLineWidth : 1.0) + ((this.clusterSize > 1) ? clusterLineWidth : 0.0); ctx.lineWidth *= this.graphScaleInv; ctx.lineWidth = Math.min(0.1 * this.width,ctx.lineWidth); ctx.ellipse(this.left-2*ctx.lineWidth, this.top-2*ctx.lineWidth, this.width+4*ctx.lineWidth, this.height+4*ctx.lineWidth); ctx.stroke(); } ctx.lineWidth = (this.selected ? selectionLineWidth : 1.0) + ((this.clusterSize > 1) ? clusterLineWidth : 0.0); ctx.lineWidth *= this.graphScaleInv; ctx.lineWidth = Math.min(0.1 * this.width,ctx.lineWidth); ctx.fillStyle = this.selected ? this.color.highlight.background : this.hover ? this.color.hover.background : this.color.background; ctx.ellipse(this.left, this.top, this.width, this.height); ctx.fill(); ctx.stroke(); this._label(ctx, this.label, this.x, this.y); }; Node.prototype._drawDot = function (ctx) { this._drawShape(ctx, 'circle'); }; Node.prototype._drawTriangle = function (ctx) { this._drawShape(ctx, 'triangle'); }; Node.prototype._drawTriangleDown = function (ctx) { this._drawShape(ctx, 'triangleDown'); }; Node.prototype._drawSquare = function (ctx) { this._drawShape(ctx, 'square'); }; Node.prototype._drawStar = function (ctx) { this._drawShape(ctx, 'star'); }; Node.prototype._resizeShape = function (ctx) { if (!this.width) { this.radius = this.baseRadiusValue; var size = 2 * this.radius; this.width = size; this.height = size; // scaling used for clustering this.width += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeWidthFactor; this.height += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeHeightFactor; this.radius += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * 0.5 * this.clusterSizeRadiusFactor; this.growthIndicator = this.width - size; } }; Node.prototype._drawShape = function (ctx, shape) { this._resizeShape(ctx); this.left = this.x - this.width / 2; this.top = this.y - this.height / 2; var clusterLineWidth = 2.5; var selectionLineWidth = 2; var radiusMultiplier = 2; // choose draw method depending on the shape switch (shape) { case 'dot': radiusMultiplier = 2; break; case 'square': radiusMultiplier = 2; break; case 'triangle': radiusMultiplier = 3; break; case 'triangleDown': radiusMultiplier = 3; break; case 'star': radiusMultiplier = 4; break; } ctx.strokeStyle = this.selected ? this.color.highlight.border : this.hover ? this.color.hover.border : this.color.border; // draw the outer border if (this.clusterSize > 1) { ctx.lineWidth = (this.selected ? selectionLineWidth : 1.0) + ((this.clusterSize > 1) ? clusterLineWidth : 0.0); ctx.lineWidth *= this.graphScaleInv; ctx.lineWidth = Math.min(0.1 * this.width,ctx.lineWidth); ctx[shape](this.x, this.y, this.radius + radiusMultiplier * ctx.lineWidth); ctx.stroke(); } ctx.lineWidth = (this.selected ? selectionLineWidth : 1.0) + ((this.clusterSize > 1) ? clusterLineWidth : 0.0); ctx.lineWidth *= this.graphScaleInv; ctx.lineWidth = Math.min(0.1 * this.width,ctx.lineWidth); ctx.fillStyle = this.selected ? this.color.highlight.background : this.hover ? this.color.hover.background : this.color.background; ctx[shape](this.x, this.y, this.radius); ctx.fill(); ctx.stroke(); if (this.label) { this._label(ctx, this.label, this.x, this.y + this.height / 2, undefined, 'top'); } }; Node.prototype._resizeText = function (ctx) { if (!this.width) { var margin = 5; var textSize = this.getTextSize(ctx); this.width = textSize.width + 2 * margin; this.height = textSize.height + 2 * margin; // scaling used for clustering this.width += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeWidthFactor; this.height += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeHeightFactor; this.radius += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeRadiusFactor; this.growthIndicator = this.width - (textSize.width + 2 * margin); } }; Node.prototype._drawText = function (ctx) { this._resizeText(ctx); this.left = this.x - this.width / 2; this.top = this.y - this.height / 2; this._label(ctx, this.label, this.x, this.y); }; Node.prototype._label = function (ctx, text, x, y, align, baseline) { if (text && this.fontSize * this.graphScale > this.fontDrawThreshold) { ctx.font = (this.selected ? "bold " : "") + this.fontSize + "px " + this.fontFace; ctx.fillStyle = this.fontColor || "black"; ctx.textAlign = align || "center"; ctx.textBaseline = baseline || "middle"; var lines = text.split('\n'), lineCount = lines.length, fontSize = (this.fontSize + 4), yLine = y + (1 - lineCount) / 2 * fontSize; for (var i = 0; i < lineCount; i++) { ctx.fillText(lines[i], x, yLine); yLine += fontSize; } } }; Node.prototype.getTextSize = function(ctx) { if (this.label !== undefined) { ctx.font = (this.selected ? "bold " : "") + this.fontSize + "px " + this.fontFace; var lines = this.label.split('\n'), height = (this.fontSize + 4) * lines.length, width = 0; for (var i = 0, iMax = lines.length; i < iMax; i++) { width = Math.max(width, ctx.measureText(lines[i]).width); } return {"width": width, "height": height}; } else { return {"width": 0, "height": 0}; } }; /** * this is used to determine if a node is visible at all. this is used to determine when it needs to be drawn. * there is a safety margin of 0.3 * width; * * @returns {boolean} */ Node.prototype.inArea = function() { if (this.width !== undefined) { return (this.x + this.width *this.graphScaleInv >= this.canvasTopLeft.x && this.x - this.width *this.graphScaleInv < this.canvasBottomRight.x && this.y + this.height*this.graphScaleInv >= this.canvasTopLeft.y && this.y - this.height*this.graphScaleInv < this.canvasBottomRight.y); } else { return true; } }; /** * checks if the core of the node is in the display area, this is used for opening clusters around zoom * @returns {boolean} */ Node.prototype.inView = function() { return (this.x >= this.canvasTopLeft.x && this.x < this.canvasBottomRight.x && this.y >= this.canvasTopLeft.y && this.y < this.canvasBottomRight.y); }; /** * This allows the zoom level of the graph to influence the rendering * We store the inverted scale and the coordinates of the top left, and bottom right points of the canvas * * @param scale * @param canvasTopLeft * @param canvasBottomRight */ Node.prototype.setScaleAndPos = function(scale,canvasTopLeft,canvasBottomRight) { this.graphScaleInv = 1.0/scale; this.graphScale = scale; this.canvasTopLeft = canvasTopLeft; this.canvasBottomRight = canvasBottomRight; }; /** * This allows the zoom level of the graph to influence the rendering * * @param scale */ Node.prototype.setScale = function(scale) { this.graphScaleInv = 1.0/scale; this.graphScale = scale; }; /** * set the velocity at 0. Is called when this node is contained in another during clustering */ Node.prototype.clearVelocity = function() { this.vx = 0; this.vy = 0; }; /** * Basic preservation of (kinectic) energy * * @param massBeforeClustering */ Node.prototype.updateVelocity = function(massBeforeClustering) { var energyBefore = this.vx * this.vx * massBeforeClustering; //this.vx = (this.vx < 0) ? -Math.sqrt(energyBefore/this.mass) : Math.sqrt(energyBefore/this.mass); this.vx = Math.sqrt(energyBefore/this.mass); energyBefore = this.vy * this.vy * massBeforeClustering; //this.vy = (this.vy < 0) ? -Math.sqrt(energyBefore/this.mass) : Math.sqrt(energyBefore/this.mass); this.vy = Math.sqrt(energyBefore/this.mass); }; /** * @class Edge * * A edge connects two nodes * @param {Object} properties Object with properties. Must contain * At least properties from and to. * Available properties: from (number), * to (number), label (string, color (string), * width (number), style (string), * length (number), title (string) * @param {Graph} graph A graph object, used to find and edge to * nodes. * @param {Object} constants An object with default values for * example for the color */ function Edge (properties, graph, constants) { if (!graph) { throw "No graph provided"; } this.graph = graph; // initialize constants this.widthMin = constants.edges.widthMin; this.widthMax = constants.edges.widthMax; // initialize variables this.id = undefined; this.fromId = undefined; this.toId = undefined; this.style = constants.edges.style; this.title = undefined; this.width = constants.edges.width; this.hoverWidth = constants.edges.hoverWidth; this.value = undefined; this.length = constants.physics.springLength; this.customLength = false; this.selected = false; this.hover = false; this.smooth = constants.smoothCurves; this.arrowScaleFactor = constants.edges.arrowScaleFactor; this.from = null; // a node this.to = null; // a node this.via = null; // a temp node // we use this to be able to reconnect the edge to a cluster if its node is put into a cluster // by storing the original information we can revert to the original connection when the cluser is opened. this.originalFromId = []; this.originalToId = []; this.connected = false; // Added to support dashed lines // David Jordan // 2012-08-08 this.dash = util.extend({}, constants.edges.dash); // contains properties length, gap, altLength this.color = {color:constants.edges.color.color, highlight:constants.edges.color.highlight, hover:constants.edges.color.hover}; this.widthFixed = false; this.lengthFixed = false; this.setProperties(properties, constants); } /** * Set or overwrite properties for the edge * @param {Object} properties an object with properties * @param {Object} constants and object with default, global properties */ Edge.prototype.setProperties = function(properties, constants) { if (!properties) { return; } if (properties.from !== undefined) {this.fromId = properties.from;} if (properties.to !== undefined) {this.toId = properties.to;} if (properties.id !== undefined) {this.id = properties.id;} if (properties.style !== undefined) {this.style = properties.style;} if (properties.label !== undefined) {this.label = properties.label;} if (this.label) { this.fontSize = constants.edges.fontSize; this.fontFace = constants.edges.fontFace; this.fontColor = constants.edges.fontColor; this.fontFill = constants.edges.fontFill; if (properties.fontColor !== undefined) {this.fontColor = properties.fontColor;} if (properties.fontSize !== undefined) {this.fontSize = properties.fontSize;} if (properties.fontFace !== undefined) {this.fontFace = properties.fontFace;} if (properties.fontFill !== undefined) {this.fontFill = properties.fontFill;} } if (properties.title !== undefined) {this.title = properties.title;} if (properties.width !== undefined) {this.width = properties.width;} if (properties.hoverWidth !== undefined) {this.hoverWidth = properties.hoverWidth;} if (properties.value !== undefined) {this.value = properties.value;} if (properties.length !== undefined) {this.length = properties.length; this.customLength = true;} // scale the arrow if (properties.arrowScaleFactor !== undefined) {this.arrowScaleFactor = properties.arrowScaleFactor;} // Added to support dashed lines // David Jordan // 2012-08-08 if (properties.dash) { if (properties.dash.length !== undefined) {this.dash.length = properties.dash.length;} if (properties.dash.gap !== undefined) {this.dash.gap = properties.dash.gap;} if (properties.dash.altLength !== undefined) {this.dash.altLength = properties.dash.altLength;} } if (properties.color !== undefined) { if (util.isString(properties.color)) { this.color.color = properties.color; this.color.highlight = properties.color; } else { if (properties.color.color !== undefined) {this.color.color = properties.color.color;} if (properties.color.highlight !== undefined) {this.color.highlight = properties.color.highlight;} } } // A node is connected when it has a from and to node. this.connect(); this.widthFixed = this.widthFixed || (properties.width !== undefined); this.lengthFixed = this.lengthFixed || (properties.length !== undefined); // set draw method based on style switch (this.style) { case 'line': this.draw = this._drawLine; break; case 'arrow': this.draw = this._drawArrow; break; case 'arrow-center': this.draw = this._drawArrowCenter; break; case 'dash-line': this.draw = this._drawDashLine; break; default: this.draw = this._drawLine; break; } }; /** * Connect an edge to its nodes */ Edge.prototype.connect = function () { this.disconnect(); this.from = this.graph.nodes[this.fromId] || null; this.to = this.graph.nodes[this.toId] || null; this.connected = (this.from && this.to); if (this.connected) { this.from.attachEdge(this); this.to.attachEdge(this); } else { if (this.from) { this.from.detachEdge(this); } if (this.to) { this.to.detachEdge(this); } } }; /** * Disconnect an edge from its nodes */ Edge.prototype.disconnect = function () { if (this.from) { this.from.detachEdge(this); this.from = null; } if (this.to) { this.to.detachEdge(this); this.to = null; } this.connected = false; }; /** * get the title of this edge. * @return {string} title The title of the edge, or undefined when no title * has been set. */ Edge.prototype.getTitle = function() { return typeof this.title === "function" ? this.title() : this.title; }; /** * Retrieve the value of the edge. Can be undefined * @return {Number} value */ Edge.prototype.getValue = function() { return this.value; }; /** * Adjust the value range of the edge. The edge will adjust it's width * based on its value. * @param {Number} min * @param {Number} max */ Edge.prototype.setValueRange = function(min, max) { if (!this.widthFixed && this.value !== undefined) { var scale = (this.widthMax - this.widthMin) / (max - min); this.width = (this.value - min) * scale + this.widthMin; } }; /** * Redraw a edge * Draw this edge in the given canvas * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); * @param {CanvasRenderingContext2D} ctx */ Edge.prototype.draw = function(ctx) { throw "Method draw not initialized in edge"; }; /** * Check if this object is overlapping with the provided object * @param {Object} obj an object with parameters left, top * @return {boolean} True if location is located on the edge */ Edge.prototype.isOverlappingWith = function(obj) { if (this.connected) { var distMax = 10; var xFrom = this.from.x; var yFrom = this.from.y; var xTo = this.to.x; var yTo = this.to.y; var xObj = obj.left; var yObj = obj.top; var dist = this._getDistanceToEdge(xFrom, yFrom, xTo, yTo, xObj, yObj); return (dist < distMax); } else { return false } }; /** * Redraw a edge as a line * Draw this edge in the given canvas * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); * @param {CanvasRenderingContext2D} ctx * @private */ Edge.prototype._drawLine = function(ctx) { // set style if (this.selected == true) {ctx.strokeStyle = this.color.highlight;} else if (this.hover == true) {ctx.strokeStyle = this.color.hover;} else {ctx.strokeStyle = this.color.color;} ctx.lineWidth = this._getLineWidth(); if (this.from != this.to) { // draw line this._line(ctx); // draw label var point; if (this.label) { if (this.smooth == true) { var midpointX = 0.5*(0.5*(this.from.x + this.via.x) + 0.5*(this.to.x + this.via.x)); var midpointY = 0.5*(0.5*(this.from.y + this.via.y) + 0.5*(this.to.y + this.via.y)); point = {x:midpointX, y:midpointY}; } else { point = this._pointOnLine(0.5); } this._label(ctx, this.label, point.x, point.y); } } else { var x, y; var radius = this.length / 4; var node = this.from; if (!node.width) { node.resize(ctx); } if (node.width > node.height) { x = node.x + node.width / 2; y = node.y - radius; } else { x = node.x + radius; y = node.y - node.height / 2; } this._circle(ctx, x, y, radius); point = this._pointOnCircle(x, y, radius, 0.5); this._label(ctx, this.label, point.x, point.y); } }; /** * Get the line width of the edge. Depends on width and whether one of the * connected nodes is selected. * @return {Number} width * @private */ Edge.prototype._getLineWidth = function() { if (this.selected == true) { return Math.min(this.width * 2, this.widthMax)*this.graphScaleInv; } else { if (this.hover == true) { return Math.min(this.hoverWidth, this.widthMax)*this.graphScaleInv; } else { return this.width*this.graphScaleInv; } } }; /** * Draw a line between two nodes * @param {CanvasRenderingContext2D} ctx * @private */ Edge.prototype._line = function (ctx) { // draw a straight line ctx.beginPath(); ctx.moveTo(this.from.x, this.from.y); if (this.smooth == true) { ctx.quadraticCurveTo(this.via.x,this.via.y,this.to.x, this.to.y); } else { ctx.lineTo(this.to.x, this.to.y); } ctx.stroke(); }; /** * Draw a line from a node to itself, a circle * @param {CanvasRenderingContext2D} ctx * @param {Number} x * @param {Number} y * @param {Number} radius * @private */ Edge.prototype._circle = function (ctx, x, y, radius) { // draw a circle ctx.beginPath(); ctx.arc(x, y, radius, 0, 2 * Math.PI, false); ctx.stroke(); }; /** * Draw label with white background and with the middle at (x, y) * @param {CanvasRenderingContext2D} ctx * @param {String} text * @param {Number} x * @param {Number} y * @private */ Edge.prototype._label = function (ctx, text, x, y) { if (text) { // TODO: cache the calculated size ctx.font = ((this.from.selected || this.to.selected) ? "bold " : "") + this.fontSize + "px " + this.fontFace; ctx.fillStyle = this.fontFill; var width = ctx.measureText(text).width; var height = this.fontSize; var left = x - width / 2; var top = y - height / 2; ctx.fillRect(left, top, width, height); // draw text ctx.fillStyle = this.fontColor || "black"; ctx.textAlign = "left"; ctx.textBaseline = "top"; ctx.fillText(text, left, top); } }; /** * Redraw a edge as a dashed line * Draw this edge in the given canvas * @author David Jordan * @date 2012-08-08 * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); * @param {CanvasRenderingContext2D} ctx * @private */ Edge.prototype._drawDashLine = function(ctx) { // set style if (this.selected == true) {ctx.strokeStyle = this.color.highlight;} else if (this.hover == true) {ctx.strokeStyle = this.color.hover;} else {ctx.strokeStyle = this.color.color;} ctx.lineWidth = this._getLineWidth(); // only firefox and chrome support this method, else we use the legacy one. if (ctx.mozDash !== undefined || ctx.setLineDash !== undefined) { ctx.beginPath(); ctx.moveTo(this.from.x, this.from.y); // configure the dash pattern var pattern = [0]; if (this.dash.length !== undefined && this.dash.gap !== undefined) { pattern = [this.dash.length,this.dash.gap]; } else { pattern = [5,5]; } // set dash settings for chrome or firefox if (typeof ctx.setLineDash !== 'undefined') { //Chrome ctx.setLineDash(pattern); ctx.lineDashOffset = 0; } else { //Firefox ctx.mozDash = pattern; ctx.mozDashOffset = 0; } // draw the line if (this.smooth == true) { ctx.quadraticCurveTo(this.via.x,this.via.y,this.to.x, this.to.y); } else { ctx.lineTo(this.to.x, this.to.y); } ctx.stroke(); // restore the dash settings. if (typeof ctx.setLineDash !== 'undefined') { //Chrome ctx.setLineDash([0]); ctx.lineDashOffset = 0; } else { //Firefox ctx.mozDash = [0]; ctx.mozDashOffset = 0; } } else { // unsupporting smooth lines // draw dashed line ctx.beginPath(); ctx.lineCap = 'round'; if (this.dash.altLength !== undefined) //If an alt dash value has been set add to the array this value { ctx.dashedLine(this.from.x,this.from.y,this.to.x,this.to.y, [this.dash.length,this.dash.gap,this.dash.altLength,this.dash.gap]); } else if (this.dash.length !== undefined && this.dash.gap !== undefined) //If a dash and gap value has been set add to the array this value { ctx.dashedLine(this.from.x,this.from.y,this.to.x,this.to.y, [this.dash.length,this.dash.gap]); } else //If all else fails draw a line { ctx.moveTo(this.from.x, this.from.y); ctx.lineTo(this.to.x, this.to.y); } ctx.stroke(); } // draw label if (this.label) { var point; if (this.smooth == true) { var midpointX = 0.5*(0.5*(this.from.x + this.via.x) + 0.5*(this.to.x + this.via.x)); var midpointY = 0.5*(0.5*(this.from.y + this.via.y) + 0.5*(this.to.y + this.via.y)); point = {x:midpointX, y:midpointY}; } else { point = this._pointOnLine(0.5); } this._label(ctx, this.label, point.x, point.y); } }; /** * Get a point on a line * @param {Number} percentage. Value between 0 (line start) and 1 (line end) * @return {Object} point * @private */ Edge.prototype._pointOnLine = function (percentage) { return { x: (1 - percentage) * this.from.x + percentage * this.to.x, y: (1 - percentage) * this.from.y + percentage * this.to.y } }; /** * Get a point on a circle * @param {Number} x * @param {Number} y * @param {Number} radius * @param {Number} percentage. Value between 0 (line start) and 1 (line end) * @return {Object} point * @private */ Edge.prototype._pointOnCircle = function (x, y, radius, percentage) { var angle = (percentage - 3/8) * 2 * Math.PI; return { x: x + radius * Math.cos(angle), y: y - radius * Math.sin(angle) } }; /** * Redraw a edge as a line with an arrow halfway the line * Draw this edge in the given canvas * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); * @param {CanvasRenderingContext2D} ctx * @private */ Edge.prototype._drawArrowCenter = function(ctx) { var point; // set style if (this.selected == true) {ctx.strokeStyle = this.color.highlight; ctx.fillStyle = this.color.highlight;} else if (this.hover == true) {ctx.strokeStyle = this.color.hover; ctx.fillStyle = this.color.hover;} else {ctx.strokeStyle = this.color.color; ctx.fillStyle = this.color.color;} ctx.lineWidth = this._getLineWidth(); if (this.from != this.to) { // draw line this._line(ctx); var angle = Math.atan2((this.to.y - this.from.y), (this.to.x - this.from.x)); var length = (10 + 5 * this.width) * this.arrowScaleFactor; // draw an arrow halfway the line if (this.smooth == true) { var midpointX = 0.5*(0.5*(this.from.x + this.via.x) + 0.5*(this.to.x + this.via.x)); var midpointY = 0.5*(0.5*(this.from.y + this.via.y) + 0.5*(this.to.y + this.via.y)); point = {x:midpointX, y:midpointY}; } else { point = this._pointOnLine(0.5); } ctx.arrow(point.x, point.y, angle, length); ctx.fill(); ctx.stroke(); // draw label if (this.label) { this._label(ctx, this.label, point.x, point.y); } } else { // draw circle var x, y; var radius = 0.25 * Math.max(100,this.length); var node = this.from; if (!node.width) { node.resize(ctx); } if (node.width > node.height) { x = node.x + node.width * 0.5; y = node.y - radius; } else { x = node.x + radius; y = node.y - node.height * 0.5; } this._circle(ctx, x, y, radius); // draw all arrows var angle = 0.2 * Math.PI; var length = (10 + 5 * this.width) * this.arrowScaleFactor; point = this._pointOnCircle(x, y, radius, 0.5); ctx.arrow(point.x, point.y, angle, length); ctx.fill(); ctx.stroke(); // draw label if (this.label) { point = this._pointOnCircle(x, y, radius, 0.5); this._label(ctx, this.label, point.x, point.y); } } }; /** * Redraw a edge as a line with an arrow * Draw this edge in the given canvas * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); * @param {CanvasRenderingContext2D} ctx * @private */ Edge.prototype._drawArrow = function(ctx) { // set style if (this.selected == true) {ctx.strokeStyle = this.color.highlight; ctx.fillStyle = this.color.highlight;} else if (this.hover == true) {ctx.strokeStyle = this.color.hover; ctx.fillStyle = this.color.hover;} else {ctx.strokeStyle = this.color.color; ctx.fillStyle = this.color.color;} ctx.lineWidth = this._getLineWidth(); var angle, length; //draw a line if (this.from != this.to) { angle = Math.atan2((this.to.y - this.from.y), (this.to.x - this.from.x)); var dx = (this.to.x - this.from.x); var dy = (this.to.y - this.from.y); var edgeSegmentLength = Math.sqrt(dx * dx + dy * dy); var fromBorderDist = this.from.distanceToBorder(ctx, angle + Math.PI); var fromBorderPoint = (edgeSegmentLength - fromBorderDist) / edgeSegmentLength; var xFrom = (fromBorderPoint) * this.from.x + (1 - fromBorderPoint) * this.to.x; var yFrom = (fromBorderPoint) * this.from.y + (1 - fromBorderPoint) * this.to.y; if (this.smooth == true) { angle = Math.atan2((this.to.y - this.via.y), (this.to.x - this.via.x)); dx = (this.to.x - this.via.x); dy = (this.to.y - this.via.y); edgeSegmentLength = Math.sqrt(dx * dx + dy * dy); } var toBorderDist = this.to.distanceToBorder(ctx, angle); var toBorderPoint = (edgeSegmentLength - toBorderDist) / edgeSegmentLength; var xTo,yTo; if (this.smooth == true) { xTo = (1 - toBorderPoint) * this.via.x + toBorderPoint * this.to.x; yTo = (1 - toBorderPoint) * this.via.y + toBorderPoint * this.to.y; } else { xTo = (1 - toBorderPoint) * this.from.x + toBorderPoint * this.to.x; yTo = (1 - toBorderPoint) * this.from.y + toBorderPoint * this.to.y; } ctx.beginPath(); ctx.moveTo(xFrom,yFrom); if (this.smooth == true) { ctx.quadraticCurveTo(this.via.x,this.via.y,xTo, yTo); } else { ctx.lineTo(xTo, yTo); } ctx.stroke(); // draw arrow at the end of the line length = (10 + 5 * this.width) * this.arrowScaleFactor; ctx.arrow(xTo, yTo, angle, length); ctx.fill(); ctx.stroke(); // draw label if (this.label) { var point; if (this.smooth == true) { var midpointX = 0.5*(0.5*(this.from.x + this.via.x) + 0.5*(this.to.x + this.via.x)); var midpointY = 0.5*(0.5*(this.from.y + this.via.y) + 0.5*(this.to.y + this.via.y)); point = {x:midpointX, y:midpointY}; } else { point = this._pointOnLine(0.5); } this._label(ctx, this.label, point.x, point.y); } } else { // draw circle var node = this.from; var x, y, arrow; var radius = 0.25 * Math.max(100,this.length); if (!node.width) { node.resize(ctx); } if (node.width > node.height) { x = node.x + node.width * 0.5; y = node.y - radius; arrow = { x: x, y: node.y, angle: 0.9 * Math.PI }; } else { x = node.x + radius; y = node.y - node.height * 0.5; arrow = { x: node.x, y: y, angle: 0.6 * Math.PI }; } ctx.beginPath(); // TODO: similarly, for a line without arrows, draw to the border of the nodes instead of the center ctx.arc(x, y, radius, 0, 2 * Math.PI, false); ctx.stroke(); // draw all arrows var length = (10 + 5 * this.width) * this.arrowScaleFactor; ctx.arrow(arrow.x, arrow.y, arrow.angle, length); ctx.fill(); ctx.stroke(); // draw label if (this.label) { point = this._pointOnCircle(x, y, radius, 0.5); this._label(ctx, this.label, point.x, point.y); } } }; /** * Calculate the distance between a point (x3,y3) and a line segment from * (x1,y1) to (x2,y2). * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment * @param {number} x1 * @param {number} y1 * @param {number} x2 * @param {number} y2 * @param {number} x3 * @param {number} y3 * @private */ Edge.prototype._getDistanceToEdge = function (x1,y1, x2,y2, x3,y3) { // x3,y3 is the point if (this.smooth == true) { var minDistance = 1e9; var i,t,x,y,dx,dy; for (i = 0; i < 10; i++) { t = 0.1*i; x = Math.pow(1-t,2)*x1 + (2*t*(1 - t))*this.via.x + Math.pow(t,2)*x2; y = Math.pow(1-t,2)*y1 + (2*t*(1 - t))*this.via.y + Math.pow(t,2)*y2; dx = Math.abs(x3-x); dy = Math.abs(y3-y); minDistance = Math.min(minDistance,Math.sqrt(dx*dx + dy*dy)); } return minDistance } else { var px = x2-x1, py = y2-y1, something = px*px + py*py, u = ((x3 - x1) * px + (y3 - y1) * py) / something; if (u > 1) { u = 1; } else if (u < 0) { u = 0; } var x = x1 + u * px, y = y1 + u * py, dx = x - x3, dy = y - y3; //# Note: If the actual distance does not matter, //# if you only want to compare what this function //# returns to other results of this function, you //# can just return the squared distance instead //# (i.e. remove the sqrt) to gain a little performance return Math.sqrt(dx*dx + dy*dy); } }; /** * This allows the zoom level of the graph to influence the rendering * * @param scale */ Edge.prototype.setScale = function(scale) { this.graphScaleInv = 1.0/scale; }; Edge.prototype.select = function() { this.selected = true; }; Edge.prototype.unselect = function() { this.selected = false; }; Edge.prototype.positionBezierNode = function() { if (this.via !== null) { this.via.x = 0.5 * (this.from.x + this.to.x); this.via.y = 0.5 * (this.from.y + this.to.y); } }; /** * Popup is a class to create a popup window with some text * @param {Element} container The container object. * @param {Number} [x] * @param {Number} [y] * @param {String} [text] * @param {Object} [style] An object containing borderColor, * backgroundColor, etc. */ function Popup(container, x, y, text, style) { if (container) { this.container = container; } else { this.container = document.body; } // x, y and text are optional, see if a style object was passed in their place if (style === undefined) { if (typeof x === "object") { style = x; x = undefined; } else if (typeof text === "object") { style = text; text = undefined; } else { // for backwards compatibility, in case clients other than Graph are creating Popup directly style = { fontColor: 'black', fontSize: 14, // px fontFace: 'verdana', color: { border: '#666', background: '#FFFFC6' } } } } this.x = 0; this.y = 0; this.padding = 5; if (x !== undefined && y !== undefined ) { this.setPosition(x, y); } if (text !== undefined) { this.setText(text); } // create the frame this.frame = document.createElement("div"); var styleAttr = this.frame.style; styleAttr.position = "absolute"; styleAttr.visibility = "hidden"; styleAttr.border = "1px solid " + style.color.border; styleAttr.color = style.fontColor; styleAttr.fontSize = style.fontSize + "px"; styleAttr.fontFamily = style.fontFace; styleAttr.padding = this.padding + "px"; styleAttr.backgroundColor = style.color.background; styleAttr.borderRadius = "3px"; styleAttr.MozBorderRadius = "3px"; styleAttr.WebkitBorderRadius = "3px"; styleAttr.boxShadow = "3px 3px 10px rgba(128, 128, 128, 0.5)"; styleAttr.whiteSpace = "nowrap"; this.container.appendChild(this.frame); } /** * @param {number} x Horizontal position of the popup window * @param {number} y Vertical position of the popup window */ Popup.prototype.setPosition = function(x, y) { this.x = parseInt(x); this.y = parseInt(y); }; /** * Set the text for the popup window. This can be HTML code * @param {string} text */ Popup.prototype.setText = function(text) { this.frame.innerHTML = text; }; /** * Show the popup window * @param {boolean} show Optional. Show or hide the window */ Popup.prototype.show = function (show) { if (show === undefined) { show = true; } if (show) { var height = this.frame.clientHeight; var width = this.frame.clientWidth; var maxHeight = this.frame.parentNode.clientHeight; var maxWidth = this.frame.parentNode.clientWidth; var top = (this.y - height); if (top + height + this.padding > maxHeight) { top = maxHeight - height - this.padding; } if (top < this.padding) { top = this.padding; } var left = this.x; if (left + width + this.padding > maxWidth) { left = maxWidth - width - this.padding; } if (left < this.padding) { left = this.padding; } this.frame.style.left = left + "px"; this.frame.style.top = top + "px"; this.frame.style.visibility = "visible"; } else { this.hide(); } }; /** * Hide the popup window */ Popup.prototype.hide = function () { this.frame.style.visibility = "hidden"; }; /** * @class Groups * This class can store groups and properties specific for groups. */ function Groups() { this.clear(); this.defaultIndex = 0; } /** * default constants for group colors */ Groups.DEFAULT = [ {border: "#2B7CE9", background: "#97C2FC", highlight: {border: "#2B7CE9", background: "#D2E5FF"}}, // blue {border: "#FFA500", background: "#FFFF00", highlight: {border: "#FFA500", background: "#FFFFA3"}}, // yellow {border: "#FA0A10", background: "#FB7E81", highlight: {border: "#FA0A10", background: "#FFAFB1"}}, // red {border: "#41A906", background: "#7BE141", highlight: {border: "#41A906", background: "#A1EC76"}}, // green {border: "#E129F0", background: "#EB7DF4", highlight: {border: "#E129F0", background: "#F0B3F5"}}, // magenta {border: "#7C29F0", background: "#AD85E4", highlight: {border: "#7C29F0", background: "#D3BDF0"}}, // purple {border: "#C37F00", background: "#FFA807", highlight: {border: "#C37F00", background: "#FFCA66"}}, // orange {border: "#4220FB", background: "#6E6EFD", highlight: {border: "#4220FB", background: "#9B9BFD"}}, // darkblue {border: "#FD5A77", background: "#FFC0CB", highlight: {border: "#FD5A77", background: "#FFD1D9"}}, // pink {border: "#4AD63A", background: "#C2FABC", highlight: {border: "#4AD63A", background: "#E6FFE3"}} // mint ]; /** * Clear all groups */ Groups.prototype.clear = function () { this.groups = {}; this.groups.length = function() { var i = 0; for ( var p in this ) { if (this.hasOwnProperty(p)) { i++; } } return i; } }; /** * get group properties of a groupname. If groupname is not found, a new group * is added. * @param {*} groupname Can be a number, string, Date, etc. * @return {Object} group The created group, containing all group properties */ Groups.prototype.get = function (groupname) { var group = this.groups[groupname]; if (group == undefined) { // create new group var index = this.defaultIndex % Groups.DEFAULT.length; this.defaultIndex++; group = {}; group.color = Groups.DEFAULT[index]; this.groups[groupname] = group; } return group; }; /** * Add a custom group style * @param {String} groupname * @param {Object} style An object containing borderColor, * backgroundColor, etc. * @return {Object} group The created group object */ Groups.prototype.add = function (groupname, style) { this.groups[groupname] = style; if (style.color) { style.color = util.parseColor(style.color); } return style; }; /** * @class Images * This class loads images and keeps them stored. */ function Images() { this.images = {}; this.callback = undefined; } /** * Set an onload callback function. This will be called each time an image * is loaded * @param {function} callback */ Images.prototype.setOnloadCallback = function(callback) { this.callback = callback; }; /** * * @param {string} url Url of the image * @return {Image} img The image object */ Images.prototype.load = function(url) { var img = this.images[url]; if (img == undefined) { // create the image var images = this; img = new Image(); this.images[url] = img; img.onload = function() { if (images.callback) { images.callback(this); } }; img.src = url; } return img; }; /** * Created by Alex on 2/6/14. */ var physicsMixin = { /** * Toggling barnes Hut calculation on and off. * * @private */ _toggleBarnesHut: function () { this.constants.physics.barnesHut.enabled = !this.constants.physics.barnesHut.enabled; this._loadSelectedForceSolver(); this.moving = true; this.start(); }, /** * This loads the node force solver based on the barnes hut or repulsion algorithm * * @private */ _loadSelectedForceSolver: function () { // this overloads the this._calculateNodeForces if (this.constants.physics.barnesHut.enabled == true) { this._clearMixin(repulsionMixin); this._clearMixin(hierarchalRepulsionMixin); this.constants.physics.centralGravity = this.constants.physics.barnesHut.centralGravity; this.constants.physics.springLength = this.constants.physics.barnesHut.springLength; this.constants.physics.springConstant = this.constants.physics.barnesHut.springConstant; this.constants.physics.damping = this.constants.physics.barnesHut.damping; this._loadMixin(barnesHutMixin); } else if (this.constants.physics.hierarchicalRepulsion.enabled == true) { this._clearMixin(barnesHutMixin); this._clearMixin(repulsionMixin); this.constants.physics.centralGravity = this.constants.physics.hierarchicalRepulsion.centralGravity; this.constants.physics.springLength = this.constants.physics.hierarchicalRepulsion.springLength; this.constants.physics.springConstant = this.constants.physics.hierarchicalRepulsion.springConstant; this.constants.physics.damping = this.constants.physics.hierarchicalRepulsion.damping; this._loadMixin(hierarchalRepulsionMixin); } else { this._clearMixin(barnesHutMixin); this._clearMixin(hierarchalRepulsionMixin); this.barnesHutTree = undefined; this.constants.physics.centralGravity = this.constants.physics.repulsion.centralGravity; this.constants.physics.springLength = this.constants.physics.repulsion.springLength; this.constants.physics.springConstant = this.constants.physics.repulsion.springConstant; this.constants.physics.damping = this.constants.physics.repulsion.damping; this._loadMixin(repulsionMixin); } }, /** * Before calculating the forces, we check if we need to cluster to keep up performance and we check * if there is more than one node. If it is just one node, we dont calculate anything. * * @private */ _initializeForceCalculation: function () { // stop calculation if there is only one node if (this.nodeIndices.length == 1) { this.nodes[this.nodeIndices[0]]._setForce(0, 0); } else { // if there are too many nodes on screen, we cluster without repositioning if (this.nodeIndices.length > this.constants.clustering.clusterThreshold && this.constants.clustering.enabled == true) { this.clusterToFit(this.constants.clustering.reduceToNodes, false); } // we now start the force calculation this._calculateForces(); } }, /** * Calculate the external forces acting on the nodes * Forces are caused by: edges, repulsing forces between nodes, gravity * @private */ _calculateForces: function () { // Gravity is required to keep separated groups from floating off // the forces are reset to zero in this loop by using _setForce instead // of _addForce this._calculateGravitationalForces(); this._calculateNodeForces(); if (this.constants.smoothCurves == true) { this._calculateSpringForcesWithSupport(); } else { this._calculateSpringForces(); } }, /** * Smooth curves are created by adding invisible nodes in the center of the edges. These nodes are also * handled in the calculateForces function. We then use a quadratic curve with the center node as control. * This function joins the datanodes and invisible (called support) nodes into one object. * We do this so we do not contaminate this.nodes with the support nodes. * * @private */ _updateCalculationNodes: function () { if (this.constants.smoothCurves == true) { this.calculationNodes = {}; this.calculationNodeIndices = []; for (var nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { this.calculationNodes[nodeId] = this.nodes[nodeId]; } } var supportNodes = this.sectors['support']['nodes']; for (var supportNodeId in supportNodes) { if (supportNodes.hasOwnProperty(supportNodeId)) { if (this.edges.hasOwnProperty(supportNodes[supportNodeId].parentEdgeId)) { this.calculationNodes[supportNodeId] = supportNodes[supportNodeId]; } else { supportNodes[supportNodeId]._setForce(0, 0); } } } for (var idx in this.calculationNodes) { if (this.calculationNodes.hasOwnProperty(idx)) { this.calculationNodeIndices.push(idx); } } } else { this.calculationNodes = this.nodes; this.calculationNodeIndices = this.nodeIndices; } }, /** * this function applies the central gravity effect to keep groups from floating off * * @private */ _calculateGravitationalForces: function () { var dx, dy, distance, node, i; var nodes = this.calculationNodes; var gravity = this.constants.physics.centralGravity; var gravityForce = 0; for (i = 0; i < this.calculationNodeIndices.length; i++) { node = nodes[this.calculationNodeIndices[i]]; node.damping = this.constants.physics.damping; // possibly add function to alter damping properties of clusters. // gravity does not apply when we are in a pocket sector if (this._sector() == "default" && gravity != 0) { dx = -node.x; dy = -node.y; distance = Math.sqrt(dx * dx + dy * dy); gravityForce = (distance == 0) ? 0 : (gravity / distance); node.fx = dx * gravityForce; node.fy = dy * gravityForce; } else { node.fx = 0; node.fy = 0; } } }, /** * this function calculates the effects of the springs in the case of unsmooth curves. * * @private */ _calculateSpringForces: function () { var edgeLength, edge, edgeId; var dx, dy, fx, fy, springForce, distance; var edges = this.edges; // forces caused by the edges, modelled as springs for (edgeId in edges) { if (edges.hasOwnProperty(edgeId)) { edge = edges[edgeId]; if (edge.connected) { // only calculate forces if nodes are in the same sector if (this.nodes.hasOwnProperty(edge.toId) && this.nodes.hasOwnProperty(edge.fromId)) { edgeLength = edge.customLength ? edge.length : this.constants.physics.springLength; // this implies that the edges between big clusters are longer edgeLength += (edge.to.clusterSize + edge.from.clusterSize - 2) * this.constants.clustering.edgeGrowth; dx = (edge.from.x - edge.to.x); dy = (edge.from.y - edge.to.y); distance = Math.sqrt(dx * dx + dy * dy); if (distance == 0) { distance = 0.01; } // the 1/distance is so the fx and fy can be calculated without sine or cosine. springForce = this.constants.physics.springConstant * (edgeLength - distance) / distance; fx = dx * springForce; fy = dy * springForce; edge.from.fx += fx; edge.from.fy += fy; edge.to.fx -= fx; edge.to.fy -= fy; } } } } }, /** * This function calculates the springforces on the nodes, accounting for the support nodes. * * @private */ _calculateSpringForcesWithSupport: function () { var edgeLength, edge, edgeId, combinedClusterSize; var edges = this.edges; // forces caused by the edges, modelled as springs for (edgeId in edges) { if (edges.hasOwnProperty(edgeId)) { edge = edges[edgeId]; if (edge.connected) { // only calculate forces if nodes are in the same sector if (this.nodes.hasOwnProperty(edge.toId) && this.nodes.hasOwnProperty(edge.fromId)) { if (edge.via != null) { var node1 = edge.to; var node2 = edge.via; var node3 = edge.from; edgeLength = edge.customLength ? edge.length : this.constants.physics.springLength; combinedClusterSize = node1.clusterSize + node3.clusterSize - 2; // this implies that the edges between big clusters are longer edgeLength += combinedClusterSize * this.constants.clustering.edgeGrowth; this._calculateSpringForce(node1, node2, 0.5 * edgeLength); this._calculateSpringForce(node2, node3, 0.5 * edgeLength); } } } } } }, /** * This is the code actually performing the calculation for the function above. It is split out to avoid repetition. * * @param node1 * @param node2 * @param edgeLength * @private */ _calculateSpringForce: function (node1, node2, edgeLength) { var dx, dy, fx, fy, springForce, distance; dx = (node1.x - node2.x); dy = (node1.y - node2.y); distance = Math.sqrt(dx * dx + dy * dy); if (distance == 0) { distance = 0.01; } // the 1/distance is so the fx and fy can be calculated without sine or cosine. springForce = this.constants.physics.springConstant * (edgeLength - distance) / distance; fx = dx * springForce; fy = dy * springForce; node1.fx += fx; node1.fy += fy; node2.fx -= fx; node2.fy -= fy; }, /** * Load the HTML for the physics config and bind it * @private */ _loadPhysicsConfiguration: function () { if (this.physicsConfiguration === undefined) { this.backupConstants = {}; util.copyObject(this.constants, this.backupConstants); var hierarchicalLayoutDirections = ["LR", "RL", "UD", "DU"]; this.physicsConfiguration = document.createElement('div'); this.physicsConfiguration.className = "PhysicsConfiguration"; this.physicsConfiguration.innerHTML = '' + '<table><tr><td><b>Simulation Mode:</b></td></tr>' + '<tr>' + '<td width="120px"><input type="radio" name="graph_physicsMethod" id="graph_physicsMethod1" value="BH" checked="checked">Barnes Hut</td>' + '<td width="120px"><input type="radio" name="graph_physicsMethod" id="graph_physicsMethod2" value="R">Repulsion</td>' + '<td width="120px"><input type="radio" name="graph_physicsMethod" id="graph_physicsMethod3" value="H">Hierarchical</td>' + '</tr>' + '</table>' + '<table id="graph_BH_table" style="display:none">' + '<tr><td><b>Barnes Hut</b></td></tr>' + '<tr>' + '<td width="150px">gravitationalConstant</td><td>0</td><td><input type="range" min="0" max="20000" value="' + (-1 * this.constants.physics.barnesHut.gravitationalConstant) + '" step="25" style="width:300px" id="graph_BH_gc"></td><td width="50px">-20000</td><td><input value="' + (-1 * this.constants.physics.barnesHut.gravitationalConstant) + '" id="graph_BH_gc_value" style="width:60px"></td>' + '</tr>' + '<tr>' + '<td width="150px">centralGravity</td><td>0</td><td><input type="range" min="0" max="3" value="' + this.constants.physics.barnesHut.centralGravity + '" step="0.05" style="width:300px" id="graph_BH_cg"></td><td>3</td><td><input value="' + this.constants.physics.barnesHut.centralGravity + '" id="graph_BH_cg_value" style="width:60px"></td>' + '</tr>' + '<tr>' + '<td width="150px">springLength</td><td>0</td><td><input type="range" min="0" max="500" value="' + this.constants.physics.barnesHut.springLength + '" step="1" style="width:300px" id="graph_BH_sl"></td><td>500</td><td><input value="' + this.constants.physics.barnesHut.springLength + '" id="graph_BH_sl_value" style="width:60px"></td>' + '</tr>' + '<tr>' + '<td width="150px">springConstant</td><td>0</td><td><input type="range" min="0" max="0.5" value="' + this.constants.physics.barnesHut.springConstant + '" step="0.001" style="width:300px" id="graph_BH_sc"></td><td>0.5</td><td><input value="' + this.constants.physics.barnesHut.springConstant + '" id="graph_BH_sc_value" style="width:60px"></td>' + '</tr>' + '<tr>' + '<td width="150px">damping</td><td>0</td><td><input type="range" min="0" max="0.3" value="' + this.constants.physics.barnesHut.damping + '" step="0.005" style="width:300px" id="graph_BH_damp"></td><td>0.3</td><td><input value="' + this.constants.physics.barnesHut.damping + '" id="graph_BH_damp_value" style="width:60px"></td>' + '</tr>' + '</table>' + '<table id="graph_R_table" style="display:none">' + '<tr><td><b>Repulsion</b></td></tr>' + '<tr>' + '<td width="150px">nodeDistance</td><td>0</td><td><input type="range" min="0" max="300" value="' + this.constants.physics.repulsion.nodeDistance + '" step="1" style="width:300px" id="graph_R_nd"></td><td width="50px">300</td><td><input value="' + this.constants.physics.repulsion.nodeDistance + '" id="graph_R_nd_value" style="width:60px"></td>' + '</tr>' + '<tr>' + '<td width="150px">centralGravity</td><td>0</td><td><input type="range" min="0" max="3" value="' + this.constants.physics.repulsion.centralGravity + '" step="0.05" style="width:300px" id="graph_R_cg"></td><td>3</td><td><input value="' + this.constants.physics.repulsion.centralGravity + '" id="graph_R_cg_value" style="width:60px"></td>' + '</tr>' + '<tr>' + '<td width="150px">springLength</td><td>0</td><td><input type="range" min="0" max="500" value="' + this.constants.physics.repulsion.springLength + '" step="1" style="width:300px" id="graph_R_sl"></td><td>500</td><td><input value="' + this.constants.physics.repulsion.springLength + '" id="graph_R_sl_value" style="width:60px"></td>' + '</tr>' + '<tr>' + '<td width="150px">springConstant</td><td>0</td><td><input type="range" min="0" max="0.5" value="' + this.constants.physics.repulsion.springConstant + '" step="0.001" style="width:300px" id="graph_R_sc"></td><td>0.5</td><td><input value="' + this.constants.physics.repulsion.springConstant + '" id="graph_R_sc_value" style="width:60px"></td>' + '</tr>' + '<tr>' + '<td width="150px">damping</td><td>0</td><td><input type="range" min="0" max="0.3" value="' + this.constants.physics.repulsion.damping + '" step="0.005" style="width:300px" id="graph_R_damp"></td><td>0.3</td><td><input value="' + this.constants.physics.repulsion.damping + '" id="graph_R_damp_value" style="width:60px"></td>' + '</tr>' + '</table>' + '<table id="graph_H_table" style="display:none">' + '<tr><td width="150"><b>Hierarchical</b></td></tr>' + '<tr>' + '<td width="150px">nodeDistance</td><td>0</td><td><input type="range" min="0" max="300" value="' + this.constants.physics.hierarchicalRepulsion.nodeDistance + '" step="1" style="width:300px" id="graph_H_nd"></td><td width="50px">300</td><td><input value="' + this.constants.physics.hierarchicalRepulsion.nodeDistance + '" id="graph_H_nd_value" style="width:60px"></td>' + '</tr>' + '<tr>' + '<td width="150px">centralGravity</td><td>0</td><td><input type="range" min="0" max="3" value="' + this.constants.physics.hierarchicalRepulsion.centralGravity + '" step="0.05" style="width:300px" id="graph_H_cg"></td><td>3</td><td><input value="' + this.constants.physics.hierarchicalRepulsion.centralGravity + '" id="graph_H_cg_value" style="width:60px"></td>' + '</tr>' + '<tr>' + '<td width="150px">springLength</td><td>0</td><td><input type="range" min="0" max="500" value="' + this.constants.physics.hierarchicalRepulsion.springLength + '" step="1" style="width:300px" id="graph_H_sl"></td><td>500</td><td><input value="' + this.constants.physics.hierarchicalRepulsion.springLength + '" id="graph_H_sl_value" style="width:60px"></td>' + '</tr>' + '<tr>' + '<td width="150px">springConstant</td><td>0</td><td><input type="range" min="0" max="0.5" value="' + this.constants.physics.hierarchicalRepulsion.springConstant + '" step="0.001" style="width:300px" id="graph_H_sc"></td><td>0.5</td><td><input value="' + this.constants.physics.hierarchicalRepulsion.springConstant + '" id="graph_H_sc_value" style="width:60px"></td>' + '</tr>' + '<tr>' + '<td width="150px">damping</td><td>0</td><td><input type="range" min="0" max="0.3" value="' + this.constants.physics.hierarchicalRepulsion.damping + '" step="0.005" style="width:300px" id="graph_H_damp"></td><td>0.3</td><td><input value="' + this.constants.physics.hierarchicalRepulsion.damping + '" id="graph_H_damp_value" style="width:60px"></td>' + '</tr>' + '<tr>' + '<td width="150px">direction</td><td>1</td><td><input type="range" min="0" max="3" value="' + hierarchicalLayoutDirections.indexOf(this.constants.hierarchicalLayout.direction) + '" step="1" style="width:300px" id="graph_H_direction"></td><td>4</td><td><input value="' + this.constants.hierarchicalLayout.direction + '" id="graph_H_direction_value" style="width:60px"></td>' + '</tr>' + '<tr>' + '<td width="150px">levelSeparation</td><td>1</td><td><input type="range" min="0" max="500" value="' + this.constants.hierarchicalLayout.levelSeparation + '" step="1" style="width:300px" id="graph_H_levsep"></td><td>500</td><td><input value="' + this.constants.hierarchicalLayout.levelSeparation + '" id="graph_H_levsep_value" style="width:60px"></td>' + '</tr>' + '<tr>' + '<td width="150px">nodeSpacing</td><td>1</td><td><input type="range" min="0" max="500" value="' + this.constants.hierarchicalLayout.nodeSpacing + '" step="1" style="width:300px" id="graph_H_nspac"></td><td>500</td><td><input value="' + this.constants.hierarchicalLayout.nodeSpacing + '" id="graph_H_nspac_value" style="width:60px"></td>' + '</tr>' + '</table>' + '<table><tr><td><b>Options:</b></td></tr>' + '<tr>' + '<td width="180px"><input type="button" id="graph_toggleSmooth" value="Toggle smoothCurves" style="width:150px"></td>' + '<td width="180px"><input type="button" id="graph_repositionNodes" value="Reinitialize" style="width:150px"></td>' + '<td width="180px"><input type="button" id="graph_generateOptions" value="Generate Options" style="width:150px"></td>' + '</tr>' + '</table>' this.containerElement.parentElement.insertBefore(this.physicsConfiguration, this.containerElement); this.optionsDiv = document.createElement("div"); this.optionsDiv.style.fontSize = "14px"; this.optionsDiv.style.fontFamily = "verdana"; this.containerElement.parentElement.insertBefore(this.optionsDiv, this.containerElement); var rangeElement; rangeElement = document.getElementById('graph_BH_gc'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_BH_gc', -1, "physics_barnesHut_gravitationalConstant"); rangeElement = document.getElementById('graph_BH_cg'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_BH_cg', 1, "physics_centralGravity"); rangeElement = document.getElementById('graph_BH_sc'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_BH_sc', 1, "physics_springConstant"); rangeElement = document.getElementById('graph_BH_sl'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_BH_sl', 1, "physics_springLength"); rangeElement = document.getElementById('graph_BH_damp'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_BH_damp', 1, "physics_damping"); rangeElement = document.getElementById('graph_R_nd'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_R_nd', 1, "physics_repulsion_nodeDistance"); rangeElement = document.getElementById('graph_R_cg'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_R_cg', 1, "physics_centralGravity"); rangeElement = document.getElementById('graph_R_sc'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_R_sc', 1, "physics_springConstant"); rangeElement = document.getElementById('graph_R_sl'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_R_sl', 1, "physics_springLength"); rangeElement = document.getElementById('graph_R_damp'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_R_damp', 1, "physics_damping"); rangeElement = document.getElementById('graph_H_nd'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_H_nd', 1, "physics_hierarchicalRepulsion_nodeDistance"); rangeElement = document.getElementById('graph_H_cg'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_H_cg', 1, "physics_centralGravity"); rangeElement = document.getElementById('graph_H_sc'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_H_sc', 1, "physics_springConstant"); rangeElement = document.getElementById('graph_H_sl'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_H_sl', 1, "physics_springLength"); rangeElement = document.getElementById('graph_H_damp'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_H_damp', 1, "physics_damping"); rangeElement = document.getElementById('graph_H_direction'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_H_direction', hierarchicalLayoutDirections, "hierarchicalLayout_direction"); rangeElement = document.getElementById('graph_H_levsep'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_H_levsep', 1, "hierarchicalLayout_levelSeparation"); rangeElement = document.getElementById('graph_H_nspac'); rangeElement.onchange = showValueOfRange.bind(this, 'graph_H_nspac', 1, "hierarchicalLayout_nodeSpacing"); var radioButton1 = document.getElementById("graph_physicsMethod1"); var radioButton2 = document.getElementById("graph_physicsMethod2"); var radioButton3 = document.getElementById("graph_physicsMethod3"); radioButton2.checked = true; if (this.constants.physics.barnesHut.enabled) { radioButton1.checked = true; } if (this.constants.hierarchicalLayout.enabled) { radioButton3.checked = true; } var graph_toggleSmooth = document.getElementById("graph_toggleSmooth"); var graph_repositionNodes = document.getElementById("graph_repositionNodes"); var graph_generateOptions = document.getElementById("graph_generateOptions"); graph_toggleSmooth.onclick = graphToggleSmoothCurves.bind(this); graph_repositionNodes.onclick = graphRepositionNodes.bind(this); graph_generateOptions.onclick = graphGenerateOptions.bind(this); if (this.constants.smoothCurves == true) { graph_toggleSmooth.style.background = "#A4FF56"; } else { graph_toggleSmooth.style.background = "#FF8532"; } switchConfigurations.apply(this); radioButton1.onchange = switchConfigurations.bind(this); radioButton2.onchange = switchConfigurations.bind(this); radioButton3.onchange = switchConfigurations.bind(this); } }, /** * This overwrites the this.constants. * * @param constantsVariableName * @param value * @private */ _overWriteGraphConstants: function (constantsVariableName, value) { var nameArray = constantsVariableName.split("_"); if (nameArray.length == 1) { this.constants[nameArray[0]] = value; } else if (nameArray.length == 2) { this.constants[nameArray[0]][nameArray[1]] = value; } else if (nameArray.length == 3) { this.constants[nameArray[0]][nameArray[1]][nameArray[2]] = value; } } }; /** * this function is bound to the toggle smooth curves button. That is also why it is not in the prototype. */ function graphToggleSmoothCurves () { this.constants.smoothCurves = !this.constants.smoothCurves; var graph_toggleSmooth = document.getElementById("graph_toggleSmooth"); if (this.constants.smoothCurves == true) {graph_toggleSmooth.style.background = "#A4FF56";} else {graph_toggleSmooth.style.background = "#FF8532";} this._configureSmoothCurves(false); }; /** * this function is used to scramble the nodes * */ function graphRepositionNodes () { for (var nodeId in this.calculationNodes) { if (this.calculationNodes.hasOwnProperty(nodeId)) { this.calculationNodes[nodeId].vx = 0; this.calculationNodes[nodeId].vy = 0; this.calculationNodes[nodeId].fx = 0; this.calculationNodes[nodeId].fy = 0; } } if (this.constants.hierarchicalLayout.enabled == true) { this._setupHierarchicalLayout(); } else { this.repositionNodes(); } this.moving = true; this.start(); }; /** * this is used to generate an options file from the playing with physics system. */ function graphGenerateOptions () { var options = "No options are required, default values used."; var optionsSpecific = []; var radioButton1 = document.getElementById("graph_physicsMethod1"); var radioButton2 = document.getElementById("graph_physicsMethod2"); if (radioButton1.checked == true) { if (this.constants.physics.barnesHut.gravitationalConstant != this.backupConstants.physics.barnesHut.gravitationalConstant) {optionsSpecific.push("gravitationalConstant: " + this.constants.physics.barnesHut.gravitationalConstant);} if (this.constants.physics.centralGravity != this.backupConstants.physics.barnesHut.centralGravity) {optionsSpecific.push("centralGravity: " + this.constants.physics.centralGravity);} if (this.constants.physics.springLength != this.backupConstants.physics.barnesHut.springLength) {optionsSpecific.push("springLength: " + this.constants.physics.springLength);} if (this.constants.physics.springConstant != this.backupConstants.physics.barnesHut.springConstant) {optionsSpecific.push("springConstant: " + this.constants.physics.springConstant);} if (this.constants.physics.damping != this.backupConstants.physics.barnesHut.damping) {optionsSpecific.push("damping: " + this.constants.physics.damping);} if (optionsSpecific.length != 0) { options = "var options = {"; options += "physics: {barnesHut: {"; for (var i = 0; i < optionsSpecific.length; i++) { options += optionsSpecific[i]; if (i < optionsSpecific.length - 1) { options += ", " } } options += '}}' } if (this.constants.smoothCurves != this.backupConstants.smoothCurves) { if (optionsSpecific.length == 0) {options = "var options = {";} else {options += ", "} options += "smoothCurves: " + this.constants.smoothCurves; } if (options != "No options are required, default values used.") { options += '};' } } else if (radioButton2.checked == true) { options = "var options = {"; options += "physics: {barnesHut: {enabled: false}"; if (this.constants.physics.repulsion.nodeDistance != this.backupConstants.physics.repulsion.nodeDistance) {optionsSpecific.push("nodeDistance: " + this.constants.physics.repulsion.nodeDistance);} if (this.constants.physics.centralGravity != this.backupConstants.physics.repulsion.centralGravity) {optionsSpecific.push("centralGravity: " + this.constants.physics.centralGravity);} if (this.constants.physics.springLength != this.backupConstants.physics.repulsion.springLength) {optionsSpecific.push("springLength: " + this.constants.physics.springLength);} if (this.constants.physics.springConstant != this.backupConstants.physics.repulsion.springConstant) {optionsSpecific.push("springConstant: " + this.constants.physics.springConstant);} if (this.constants.physics.damping != this.backupConstants.physics.repulsion.damping) {optionsSpecific.push("damping: " + this.constants.physics.damping);} if (optionsSpecific.length != 0) { options += ", repulsion: {"; for (var i = 0; i < optionsSpecific.length; i++) { options += optionsSpecific[i]; if (i < optionsSpecific.length - 1) { options += ", " } } options += '}}' } if (optionsSpecific.length == 0) {options += "}"} if (this.constants.smoothCurves != this.backupConstants.smoothCurves) { options += ", smoothCurves: " + this.constants.smoothCurves; } options += '};' } else { options = "var options = {"; if (this.constants.physics.hierarchicalRepulsion.nodeDistance != this.backupConstants.physics.hierarchicalRepulsion.nodeDistance) {optionsSpecific.push("nodeDistance: " + this.constants.physics.hierarchicalRepulsion.nodeDistance);} if (this.constants.physics.centralGravity != this.backupConstants.physics.hierarchicalRepulsion.centralGravity) {optionsSpecific.push("centralGravity: " + this.constants.physics.centralGravity);} if (this.constants.physics.springLength != this.backupConstants.physics.hierarchicalRepulsion.springLength) {optionsSpecific.push("springLength: " + this.constants.physics.springLength);} if (this.constants.physics.springConstant != this.backupConstants.physics.hierarchicalRepulsion.springConstant) {optionsSpecific.push("springConstant: " + this.constants.physics.springConstant);} if (this.constants.physics.damping != this.backupConstants.physics.hierarchicalRepulsion.damping) {optionsSpecific.push("damping: " + this.constants.physics.damping);} if (optionsSpecific.length != 0) { options += "physics: {hierarchicalRepulsion: {"; for (var i = 0; i < optionsSpecific.length; i++) { options += optionsSpecific[i]; if (i < optionsSpecific.length - 1) { options += ", "; } } options += '}},'; } options += 'hierarchicalLayout: {'; optionsSpecific = []; if (this.constants.hierarchicalLayout.direction != this.backupConstants.hierarchicalLayout.direction) {optionsSpecific.push("direction: " + this.constants.hierarchicalLayout.direction);} if (Math.abs(this.constants.hierarchicalLayout.levelSeparation) != this.backupConstants.hierarchicalLayout.levelSeparation) {optionsSpecific.push("levelSeparation: " + this.constants.hierarchicalLayout.levelSeparation);} if (this.constants.hierarchicalLayout.nodeSpacing != this.backupConstants.hierarchicalLayout.nodeSpacing) {optionsSpecific.push("nodeSpacing: " + this.constants.hierarchicalLayout.nodeSpacing);} if (optionsSpecific.length != 0) { for (var i = 0; i < optionsSpecific.length; i++) { options += optionsSpecific[i]; if (i < optionsSpecific.length - 1) { options += ", " } } options += '}' } else { options += "enabled:true}"; } options += '};' } this.optionsDiv.innerHTML = options; }; /** * this is used to switch between barnesHut, repulsion and hierarchical. * */ function switchConfigurations () { var ids = ["graph_BH_table", "graph_R_table", "graph_H_table"]; var radioButton = document.querySelector('input[name="graph_physicsMethod"]:checked').value; var tableId = "graph_" + radioButton + "_table"; var table = document.getElementById(tableId); table.style.display = "block"; for (var i = 0; i < ids.length; i++) { if (ids[i] != tableId) { table = document.getElementById(ids[i]); table.style.display = "none"; } } this._restoreNodes(); if (radioButton == "R") { this.constants.hierarchicalLayout.enabled = false; this.constants.physics.hierarchicalRepulsion.enabled = false; this.constants.physics.barnesHut.enabled = false; } else if (radioButton == "H") { if (this.constants.hierarchicalLayout.enabled == false) { this.constants.hierarchicalLayout.enabled = true; this.constants.physics.hierarchicalRepulsion.enabled = true; this.constants.physics.barnesHut.enabled = false; this._setupHierarchicalLayout(); } } else { this.constants.hierarchicalLayout.enabled = false; this.constants.physics.hierarchicalRepulsion.enabled = false; this.constants.physics.barnesHut.enabled = true; } this._loadSelectedForceSolver(); var graph_toggleSmooth = document.getElementById("graph_toggleSmooth"); if (this.constants.smoothCurves == true) {graph_toggleSmooth.style.background = "#A4FF56";} else {graph_toggleSmooth.style.background = "#FF8532";} this.moving = true; this.start(); } /** * this generates the ranges depending on the iniital values. * * @param id * @param map * @param constantsVariableName */ function showValueOfRange (id,map,constantsVariableName) { var valueId = id + "_value"; var rangeValue = document.getElementById(id).value; if (map instanceof Array) { document.getElementById(valueId).value = map[parseInt(rangeValue)]; this._overWriteGraphConstants(constantsVariableName,map[parseInt(rangeValue)]); } else { document.getElementById(valueId).value = parseInt(map) * parseFloat(rangeValue); this._overWriteGraphConstants(constantsVariableName, parseInt(map) * parseFloat(rangeValue)); } if (constantsVariableName == "hierarchicalLayout_direction" || constantsVariableName == "hierarchicalLayout_levelSeparation" || constantsVariableName == "hierarchicalLayout_nodeSpacing") { this._setupHierarchicalLayout(); } this.moving = true; this.start(); }; /** * Created by Alex on 2/10/14. */ var hierarchalRepulsionMixin = { /** * Calculate the forces the nodes apply on eachother based on a repulsion field. * This field is linearly approximated. * * @private */ _calculateNodeForces: function () { var dx, dy, distance, fx, fy, combinedClusterSize, repulsingForce, node1, node2, i, j; var nodes = this.calculationNodes; var nodeIndices = this.calculationNodeIndices; // approximation constants var b = 5; var a_base = 0.5 * -b; // repulsing forces between nodes var nodeDistance = this.constants.physics.hierarchicalRepulsion.nodeDistance; var minimumDistance = nodeDistance; // we loop from i over all but the last entree in the array // j loops from i+1 to the last. This way we do not double count any of the indices, nor i == j for (i = 0; i < nodeIndices.length - 1; i++) { node1 = nodes[nodeIndices[i]]; for (j = i + 1; j < nodeIndices.length; j++) { node2 = nodes[nodeIndices[j]]; dx = node2.x - node1.x; dy = node2.y - node1.y; distance = Math.sqrt(dx * dx + dy * dy); var a = a_base / minimumDistance; if (distance < 2 * minimumDistance) { repulsingForce = a * distance + b; // linear approx of 1 / (1 + Math.exp((distance / minimumDistance - 1) * steepness)) // normalize force with if (distance == 0) { distance = 0.01; } else { repulsingForce = repulsingForce / distance; } fx = dx * repulsingForce; fy = dy * repulsingForce; node1.fx -= fx; node1.fy -= fy; node2.fx += fx; node2.fy += fy; } } } } }; /** * Created by Alex on 2/10/14. */ var barnesHutMixin = { /** * This function calculates the forces the nodes apply on eachother based on a gravitational model. * The Barnes Hut method is used to speed up this N-body simulation. * * @private */ _calculateNodeForces : function() { if (this.constants.physics.barnesHut.gravitationalConstant != 0) { var node; var nodes = this.calculationNodes; var nodeIndices = this.calculationNodeIndices; var nodeCount = nodeIndices.length; this._formBarnesHutTree(nodes,nodeIndices); var barnesHutTree = this.barnesHutTree; // place the nodes one by one recursively for (var i = 0; i < nodeCount; i++) { node = nodes[nodeIndices[i]]; // starting with root is irrelevant, it never passes the BarnesHut condition this._getForceContribution(barnesHutTree.root.children.NW,node); this._getForceContribution(barnesHutTree.root.children.NE,node); this._getForceContribution(barnesHutTree.root.children.SW,node); this._getForceContribution(barnesHutTree.root.children.SE,node); } } }, /** * This function traverses the barnesHutTree. It checks when it can approximate distant nodes with their center of mass. * If a region contains a single node, we check if it is not itself, then we apply the force. * * @param parentBranch * @param node * @private */ _getForceContribution : function(parentBranch,node) { // we get no force contribution from an empty region if (parentBranch.childrenCount > 0) { var dx,dy,distance; // get the distance from the center of mass to the node. dx = parentBranch.centerOfMass.x - node.x; dy = parentBranch.centerOfMass.y - node.y; distance = Math.sqrt(dx * dx + dy * dy); // BarnesHut condition // original condition : s/d < theta = passed === d/s > 1/theta = passed // calcSize = 1/s --> d * 1/s > 1/theta = passed if (distance * parentBranch.calcSize > this.constants.physics.barnesHut.theta) { // duplicate code to reduce function calls to speed up program if (distance == 0) { distance = 0.1*Math.random(); dx = distance; } var gravityForce = this.constants.physics.barnesHut.gravitationalConstant * parentBranch.mass * node.mass / (distance * distance * distance); var fx = dx * gravityForce; var fy = dy * gravityForce; node.fx += fx; node.fy += fy; } else { // Did not pass the condition, go into children if available if (parentBranch.childrenCount == 4) { this._getForceContribution(parentBranch.children.NW,node); this._getForceContribution(parentBranch.children.NE,node); this._getForceContribution(parentBranch.children.SW,node); this._getForceContribution(parentBranch.children.SE,node); } else { // parentBranch must have only one node, if it was empty we wouldnt be here if (parentBranch.children.data.id != node.id) { // if it is not self // duplicate code to reduce function calls to speed up program if (distance == 0) { distance = 0.5*Math.random(); dx = distance; } var gravityForce = this.constants.physics.barnesHut.gravitationalConstant * parentBranch.mass * node.mass / (distance * distance * distance); var fx = dx * gravityForce; var fy = dy * gravityForce; node.fx += fx; node.fy += fy; } } } } }, /** * This function constructs the barnesHut tree recursively. It creates the root, splits it and starts placing the nodes. * * @param nodes * @param nodeIndices * @private */ _formBarnesHutTree : function(nodes,nodeIndices) { var node; var nodeCount = nodeIndices.length; var minX = Number.MAX_VALUE, minY = Number.MAX_VALUE, maxX =-Number.MAX_VALUE, maxY =-Number.MAX_VALUE; // get the range of the nodes for (var i = 0; i < nodeCount; i++) { var x = nodes[nodeIndices[i]].x; var y = nodes[nodeIndices[i]].y; if (x < minX) { minX = x; } if (x > maxX) { maxX = x; } if (y < minY) { minY = y; } if (y > maxY) { maxY = y; } } // make the range a square var sizeDiff = Math.abs(maxX - minX) - Math.abs(maxY - minY); // difference between X and Y if (sizeDiff > 0) {minY -= 0.5 * sizeDiff; maxY += 0.5 * sizeDiff;} // xSize > ySize else {minX += 0.5 * sizeDiff; maxX -= 0.5 * sizeDiff;} // xSize < ySize var minimumTreeSize = 1e-5; var rootSize = Math.max(minimumTreeSize,Math.abs(maxX - minX)); var halfRootSize = 0.5 * rootSize; var centerX = 0.5 * (minX + maxX), centerY = 0.5 * (minY + maxY); // construct the barnesHutTree var barnesHutTree = {root:{ centerOfMass:{x:0,y:0}, // Center of Mass mass:0, range: {minX:centerX-halfRootSize,maxX:centerX+halfRootSize, minY:centerY-halfRootSize,maxY:centerY+halfRootSize}, size: rootSize, calcSize: 1 / rootSize, children: {data:null}, maxWidth: 0, level: 0, childrenCount: 4 }}; this._splitBranch(barnesHutTree.root); // place the nodes one by one recursively for (i = 0; i < nodeCount; i++) { node = nodes[nodeIndices[i]]; this._placeInTree(barnesHutTree.root,node); } // make global this.barnesHutTree = barnesHutTree }, /** * this updates the mass of a branch. this is increased by adding a node. * * @param parentBranch * @param node * @private */ _updateBranchMass : function(parentBranch, node) { var totalMass = parentBranch.mass + node.mass; var totalMassInv = 1/totalMass; parentBranch.centerOfMass.x = parentBranch.centerOfMass.x * parentBranch.mass + node.x * node.mass; parentBranch.centerOfMass.x *= totalMassInv; parentBranch.centerOfMass.y = parentBranch.centerOfMass.y * parentBranch.mass + node.y * node.mass; parentBranch.centerOfMass.y *= totalMassInv; parentBranch.mass = totalMass; var biggestSize = Math.max(Math.max(node.height,node.radius),node.width); parentBranch.maxWidth = (parentBranch.maxWidth < biggestSize) ? biggestSize : parentBranch.maxWidth; }, /** * determine in which branch the node will be placed. * * @param parentBranch * @param node * @param skipMassUpdate * @private */ _placeInTree : function(parentBranch,node,skipMassUpdate) { if (skipMassUpdate != true || skipMassUpdate === undefined) { // update the mass of the branch. this._updateBranchMass(parentBranch,node); } if (parentBranch.children.NW.range.maxX > node.x) { // in NW or SW if (parentBranch.children.NW.range.maxY > node.y) { // in NW this._placeInRegion(parentBranch,node,"NW"); } else { // in SW this._placeInRegion(parentBranch,node,"SW"); } } else { // in NE or SE if (parentBranch.children.NW.range.maxY > node.y) { // in NE this._placeInRegion(parentBranch,node,"NE"); } else { // in SE this._placeInRegion(parentBranch,node,"SE"); } } }, /** * actually place the node in a region (or branch) * * @param parentBranch * @param node * @param region * @private */ _placeInRegion : function(parentBranch,node,region) { switch (parentBranch.children[region].childrenCount) { case 0: // place node here parentBranch.children[region].children.data = node; parentBranch.children[region].childrenCount = 1; this._updateBranchMass(parentBranch.children[region],node); break; case 1: // convert into children // if there are two nodes exactly overlapping (on init, on opening of cluster etc.) // we move one node a pixel and we do not put it in the tree. if (parentBranch.children[region].children.data.x == node.x && parentBranch.children[region].children.data.y == node.y) { node.x += Math.random(); node.y += Math.random(); } else { this._splitBranch(parentBranch.children[region]); this._placeInTree(parentBranch.children[region],node); } break; case 4: // place in branch this._placeInTree(parentBranch.children[region],node); break; } }, /** * this function splits a branch into 4 sub branches. If the branch contained a node, we place it in the subbranch * after the split is complete. * * @param parentBranch * @private */ _splitBranch : function(parentBranch) { // if the branch is filled with a node, replace the node in the new subset. var containedNode = null; if (parentBranch.childrenCount == 1) { containedNode = parentBranch.children.data; parentBranch.mass = 0; parentBranch.centerOfMass.x = 0; parentBranch.centerOfMass.y = 0; } parentBranch.childrenCount = 4; parentBranch.children.data = null; this._insertRegion(parentBranch,"NW"); this._insertRegion(parentBranch,"NE"); this._insertRegion(parentBranch,"SW"); this._insertRegion(parentBranch,"SE"); if (containedNode != null) { this._placeInTree(parentBranch,containedNode); } }, /** * This function subdivides the region into four new segments. * Specifically, this inserts a single new segment. * It fills the children section of the parentBranch * * @param parentBranch * @param region * @param parentRange * @private */ _insertRegion : function(parentBranch, region) { var minX,maxX,minY,maxY; var childSize = 0.5 * parentBranch.size; switch (region) { case "NW": minX = parentBranch.range.minX; maxX = parentBranch.range.minX + childSize; minY = parentBranch.range.minY; maxY = parentBranch.range.minY + childSize; break; case "NE": minX = parentBranch.range.minX + childSize; maxX = parentBranch.range.maxX; minY = parentBranch.range.minY; maxY = parentBranch.range.minY + childSize; break; case "SW": minX = parentBranch.range.minX; maxX = parentBranch.range.minX + childSize; minY = parentBranch.range.minY + childSize; maxY = parentBranch.range.maxY; break; case "SE": minX = parentBranch.range.minX + childSize; maxX = parentBranch.range.maxX; minY = parentBranch.range.minY + childSize; maxY = parentBranch.range.maxY; break; } parentBranch.children[region] = { centerOfMass:{x:0,y:0}, mass:0, range:{minX:minX,maxX:maxX,minY:minY,maxY:maxY}, size: 0.5 * parentBranch.size, calcSize: 2 * parentBranch.calcSize, children: {data:null}, maxWidth: 0, level: parentBranch.level+1, childrenCount: 0 }; }, /** * This function is for debugging purposed, it draws the tree. * * @param ctx * @param color * @private */ _drawTree : function(ctx,color) { if (this.barnesHutTree !== undefined) { ctx.lineWidth = 1; this._drawBranch(this.barnesHutTree.root,ctx,color); } }, /** * This function is for debugging purposes. It draws the branches recursively. * * @param branch * @param ctx * @param color * @private */ _drawBranch : function(branch,ctx,color) { if (color === undefined) { color = "#FF0000"; } if (branch.childrenCount == 4) { this._drawBranch(branch.children.NW,ctx); this._drawBranch(branch.children.NE,ctx); this._drawBranch(branch.children.SE,ctx); this._drawBranch(branch.children.SW,ctx); } ctx.strokeStyle = color; ctx.beginPath(); ctx.moveTo(branch.range.minX,branch.range.minY); ctx.lineTo(branch.range.maxX,branch.range.minY); ctx.stroke(); ctx.beginPath(); ctx.moveTo(branch.range.maxX,branch.range.minY); ctx.lineTo(branch.range.maxX,branch.range.maxY); ctx.stroke(); ctx.beginPath(); ctx.moveTo(branch.range.maxX,branch.range.maxY); ctx.lineTo(branch.range.minX,branch.range.maxY); ctx.stroke(); ctx.beginPath(); ctx.moveTo(branch.range.minX,branch.range.maxY); ctx.lineTo(branch.range.minX,branch.range.minY); ctx.stroke(); /* if (branch.mass > 0) { ctx.circle(branch.centerOfMass.x, branch.centerOfMass.y, 3*branch.mass); ctx.stroke(); } */ } }; /** * Created by Alex on 2/10/14. */ var repulsionMixin = { /** * Calculate the forces the nodes apply on eachother based on a repulsion field. * This field is linearly approximated. * * @private */ _calculateNodeForces: function () { var dx, dy, angle, distance, fx, fy, combinedClusterSize, repulsingForce, node1, node2, i, j; var nodes = this.calculationNodes; var nodeIndices = this.calculationNodeIndices; // approximation constants var a_base = -2 / 3; var b = 4 / 3; // repulsing forces between nodes var nodeDistance = this.constants.physics.repulsion.nodeDistance; var minimumDistance = nodeDistance; // we loop from i over all but the last entree in the array // j loops from i+1 to the last. This way we do not double count any of the indices, nor i == j for (i = 0; i < nodeIndices.length - 1; i++) { node1 = nodes[nodeIndices[i]]; for (j = i + 1; j < nodeIndices.length; j++) { node2 = nodes[nodeIndices[j]]; combinedClusterSize = node1.clusterSize + node2.clusterSize - 2; dx = node2.x - node1.x; dy = node2.y - node1.y; distance = Math.sqrt(dx * dx + dy * dy); minimumDistance = (combinedClusterSize == 0) ? nodeDistance : (nodeDistance * (1 + combinedClusterSize * this.constants.clustering.distanceAmplification)); var a = a_base / minimumDistance; if (distance < 2 * minimumDistance) { if (distance < 0.5 * minimumDistance) { repulsingForce = 1.0; } else { repulsingForce = a * distance + b; // linear approx of 1 / (1 + Math.exp((distance / minimumDistance - 1) * steepness)) } // amplify the repulsion for clusters. repulsingForce *= (combinedClusterSize == 0) ? 1 : 1 + combinedClusterSize * this.constants.clustering.forceAmplification; repulsingForce = repulsingForce / distance; fx = dx * repulsingForce; fy = dy * repulsingForce; node1.fx -= fx; node1.fy -= fy; node2.fx += fx; node2.fy += fy; } } } } }; var HierarchicalLayoutMixin = { _resetLevels : function() { for (var nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { var node = this.nodes[nodeId]; if (node.preassignedLevel == false) { node.level = -1; } } } }, /** * This is the main function to layout the nodes in a hierarchical way. * It checks if the node details are supplied correctly * * @private */ _setupHierarchicalLayout : function() { if (this.constants.hierarchicalLayout.enabled == true && this.nodeIndices.length > 0) { if (this.constants.hierarchicalLayout.direction == "RL" || this.constants.hierarchicalLayout.direction == "DU") { this.constants.hierarchicalLayout.levelSeparation *= -1; } else { this.constants.hierarchicalLayout.levelSeparation = Math.abs(this.constants.hierarchicalLayout.levelSeparation); } // get the size of the largest hubs and check if the user has defined a level for a node. var hubsize = 0; var node, nodeId; var definedLevel = false; var undefinedLevel = false; for (nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { node = this.nodes[nodeId]; if (node.level != -1) { definedLevel = true; } else { undefinedLevel = true; } if (hubsize < node.edges.length) { hubsize = node.edges.length; } } } // if the user defined some levels but not all, alert and run without hierarchical layout if (undefinedLevel == true && definedLevel == true) { alert("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes."); this.zoomExtent(true,this.constants.clustering.enabled); if (!this.constants.clustering.enabled) { this.start(); } } else { // setup the system to use hierarchical method. this._changeConstants(); // define levels if undefined by the users. Based on hubsize if (undefinedLevel == true) { this._determineLevels(hubsize); } // check the distribution of the nodes per level. var distribution = this._getDistribution(); // place the nodes on the canvas. This also stablilizes the system. this._placeNodesByHierarchy(distribution); // start the simulation. this.start(); } } }, /** * This function places the nodes on the canvas based on the hierarchial distribution. * * @param {Object} distribution | obtained by the function this._getDistribution() * @private */ _placeNodesByHierarchy : function(distribution) { var nodeId, node; // start placing all the level 0 nodes first. Then recursively position their branches. for (nodeId in distribution[0].nodes) { if (distribution[0].nodes.hasOwnProperty(nodeId)) { node = distribution[0].nodes[nodeId]; if (this.constants.hierarchicalLayout.direction == "UD" || this.constants.hierarchicalLayout.direction == "DU") { if (node.xFixed) { node.x = distribution[0].minPos; node.xFixed = false; distribution[0].minPos += distribution[0].nodeSpacing; } } else { if (node.yFixed) { node.y = distribution[0].minPos; node.yFixed = false; distribution[0].minPos += distribution[0].nodeSpacing; } } this._placeBranchNodes(node.edges,node.id,distribution,node.level); } } // stabilize the system after positioning. This function calls zoomExtent. this._stabilize(); }, /** * This function get the distribution of levels based on hubsize * * @returns {Object} * @private */ _getDistribution : function() { var distribution = {}; var nodeId, node, level; // we fix Y because the hierarchy is vertical, we fix X so we do not give a node an x position for a second time. // the fix of X is removed after the x value has been set. for (nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { node = this.nodes[nodeId]; node.xFixed = true; node.yFixed = true; if (this.constants.hierarchicalLayout.direction == "UD" || this.constants.hierarchicalLayout.direction == "DU") { node.y = this.constants.hierarchicalLayout.levelSeparation*node.level; } else { node.x = this.constants.hierarchicalLayout.levelSeparation*node.level; } if (!distribution.hasOwnProperty(node.level)) { distribution[node.level] = {amount: 0, nodes: {}, minPos:0, nodeSpacing:0}; } distribution[node.level].amount += 1; distribution[node.level].nodes[node.id] = node; } } // determine the largest amount of nodes of all levels var maxCount = 0; for (level in distribution) { if (distribution.hasOwnProperty(level)) { if (maxCount < distribution[level].amount) { maxCount = distribution[level].amount; } } } // set the initial position and spacing of each nodes accordingly for (level in distribution) { if (distribution.hasOwnProperty(level)) { distribution[level].nodeSpacing = (maxCount + 1) * this.constants.hierarchicalLayout.nodeSpacing; distribution[level].nodeSpacing /= (distribution[level].amount + 1); distribution[level].minPos = distribution[level].nodeSpacing - (0.5 * (distribution[level].amount + 1) * distribution[level].nodeSpacing); } } return distribution; }, /** * this function allocates nodes in levels based on the recursive branching from the largest hubs. * * @param hubsize * @private */ _determineLevels : function(hubsize) { var nodeId, node; // determine hubs for (nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { node = this.nodes[nodeId]; if (node.edges.length == hubsize) { node.level = 0; } } } // branch from hubs for (nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { node = this.nodes[nodeId]; if (node.level == 0) { this._setLevel(1,node.edges,node.id); } } } }, /** * Since hierarchical layout does not support: * - smooth curves (based on the physics), * - clustering (based on dynamic node counts) * * We disable both features so there will be no problems. * * @private */ _changeConstants : function() { this.constants.clustering.enabled = false; this.constants.physics.barnesHut.enabled = false; this.constants.physics.hierarchicalRepulsion.enabled = true; this._loadSelectedForceSolver(); this.constants.smoothCurves = false; this._configureSmoothCurves(); }, /** * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes * on a X position that ensures there will be no overlap. * * @param edges * @param parentId * @param distribution * @param parentLevel * @private */ _placeBranchNodes : function(edges, parentId, distribution, parentLevel) { for (var i = 0; i < edges.length; i++) { var childNode = null; if (edges[i].toId == parentId) { childNode = edges[i].from; } else { childNode = edges[i].to; } // if a node is conneceted to another node on the same level (or higher (means lower level))!, this is not handled here. var nodeMoved = false; if (this.constants.hierarchicalLayout.direction == "UD" || this.constants.hierarchicalLayout.direction == "DU") { if (childNode.xFixed && childNode.level > parentLevel) { childNode.xFixed = false; childNode.x = distribution[childNode.level].minPos; nodeMoved = true; } } else { if (childNode.yFixed && childNode.level > parentLevel) { childNode.yFixed = false; childNode.y = distribution[childNode.level].minPos; nodeMoved = true; } } if (nodeMoved == true) { distribution[childNode.level].minPos += distribution[childNode.level].nodeSpacing; if (childNode.edges.length > 1) { this._placeBranchNodes(childNode.edges,childNode.id,distribution,childNode.level); } } } }, /** * this function is called recursively to enumerate the barnches of the largest hubs and give each node a level. * * @param level * @param edges * @param parentId * @private */ _setLevel : function(level, edges, parentId) { for (var i = 0; i < edges.length; i++) { var childNode = null; if (edges[i].toId == parentId) { childNode = edges[i].from; } else { childNode = edges[i].to; } if (childNode.level == -1 || childNode.level > level) { childNode.level = level; if (edges.length > 1) { this._setLevel(level+1, childNode.edges, childNode.id); } } } }, /** * Unfix nodes * * @private */ _restoreNodes : function() { for (nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { this.nodes[nodeId].xFixed = false; this.nodes[nodeId].yFixed = false; } } } }; /** * Created by Alex on 2/4/14. */ var manipulationMixin = { /** * clears the toolbar div element of children * * @private */ _clearManipulatorBar : function() { while (this.manipulationDiv.hasChildNodes()) { this.manipulationDiv.removeChild(this.manipulationDiv.firstChild); } }, /** * Manipulation UI temporarily overloads certain functions to extend or replace them. To be able to restore * these functions to their original functionality, we saved them in this.cachedFunctions. * This function restores these functions to their original function. * * @private */ _restoreOverloadedFunctions : function() { for (var functionName in this.cachedFunctions) { if (this.cachedFunctions.hasOwnProperty(functionName)) { this[functionName] = this.cachedFunctions[functionName]; } } }, /** * Enable or disable edit-mode. * * @private */ _toggleEditMode : function() { this.editMode = !this.editMode; var toolbar = document.getElementById("graph-manipulationDiv"); var closeDiv = document.getElementById("graph-manipulation-closeDiv"); var editModeDiv = document.getElementById("graph-manipulation-editMode"); if (this.editMode == true) { toolbar.style.display="block"; closeDiv.style.display="block"; editModeDiv.style.display="none"; closeDiv.onclick = this._toggleEditMode.bind(this); } else { toolbar.style.display="none"; closeDiv.style.display="none"; editModeDiv.style.display="block"; closeDiv.onclick = null; } this._createManipulatorBar() }, /** * main function, creates the main toolbar. Removes functions bound to the select event. Binds all the buttons of the toolbar. * * @private */ _createManipulatorBar : function() { // remove bound functions if (this.boundFunction) { this.off('select', this.boundFunction); } // restore overloaded functions this._restoreOverloadedFunctions(); // resume calculation this.freezeSimulation = false; // reset global variables this.blockConnectingEdgeSelection = false; this.forceAppendSelection = false; if (this.editMode == true) { while (this.manipulationDiv.hasChildNodes()) { this.manipulationDiv.removeChild(this.manipulationDiv.firstChild); } // add the icons to the manipulator div this.manipulationDiv.innerHTML = "" + "<span class='graph-manipulationUI add' id='graph-manipulate-addNode'>" + "<span class='graph-manipulationLabel'>"+this.constants.labels['add'] +"</span></span>" + "<div class='graph-seperatorLine'></div>" + "<span class='graph-manipulationUI connect' id='graph-manipulate-connectNode'>" + "<span class='graph-manipulationLabel'>"+this.constants.labels['link'] +"</span></span>"; if (this._getSelectedNodeCount() == 1 && this.triggerFunctions.edit) { this.manipulationDiv.innerHTML += "" + "<div class='graph-seperatorLine'></div>" + "<span class='graph-manipulationUI edit' id='graph-manipulate-editNode'>" + "<span class='graph-manipulationLabel'>"+this.constants.labels['editNode'] +"</span></span>"; } if (this._selectionIsEmpty() == false) { this.manipulationDiv.innerHTML += "" + "<div class='graph-seperatorLine'></div>" + "<span class='graph-manipulationUI delete' id='graph-manipulate-delete'>" + "<span class='graph-manipulationLabel'>"+this.constants.labels['del'] +"</span></span>"; } // bind the icons var addNodeButton = document.getElementById("graph-manipulate-addNode"); addNodeButton.onclick = this._createAddNodeToolbar.bind(this); var addEdgeButton = document.getElementById("graph-manipulate-connectNode"); addEdgeButton.onclick = this._createAddEdgeToolbar.bind(this); if (this._getSelectedNodeCount() == 1 && this.triggerFunctions.edit) { var editButton = document.getElementById("graph-manipulate-editNode"); editButton.onclick = this._editNode.bind(this); } if (this._selectionIsEmpty() == false) { var deleteButton = document.getElementById("graph-manipulate-delete"); deleteButton.onclick = this._deleteSelected.bind(this); } var closeDiv = document.getElementById("graph-manipulation-closeDiv"); closeDiv.onclick = this._toggleEditMode.bind(this); this.boundFunction = this._createManipulatorBar.bind(this); this.on('select', this.boundFunction); } else { this.editModeDiv.innerHTML = "" + "<span class='graph-manipulationUI edit editmode' id='graph-manipulate-editModeButton'>" + "<span class='graph-manipulationLabel'>" + this.constants.labels['edit'] + "</span></span>"; var editModeButton = document.getElementById("graph-manipulate-editModeButton"); editModeButton.onclick = this._toggleEditMode.bind(this); } }, /** * Create the toolbar for adding Nodes * * @private */ _createAddNodeToolbar : function() { // clear the toolbar this._clearManipulatorBar(); if (this.boundFunction) { this.off('select', this.boundFunction); } // create the toolbar contents this.manipulationDiv.innerHTML = "" + "<span class='graph-manipulationUI back' id='graph-manipulate-back'>" + "<span class='graph-manipulationLabel'>" + this.constants.labels['back'] + " </span></span>" + "<div class='graph-seperatorLine'></div>" + "<span class='graph-manipulationUI none' id='graph-manipulate-back'>" + "<span id='graph-manipulatorLabel' class='graph-manipulationLabel'>" + this.constants.labels['addDescription'] + "</span></span>"; // bind the icon var backButton = document.getElementById("graph-manipulate-back"); backButton.onclick = this._createManipulatorBar.bind(this); // we use the boundFunction so we can reference it when we unbind it from the "select" event. this.boundFunction = this._addNode.bind(this); this.on('select', this.boundFunction); }, /** * create the toolbar to connect nodes * * @private */ _createAddEdgeToolbar : function() { // clear the toolbar this._clearManipulatorBar(); this._unselectAll(true); this.freezeSimulation = true; if (this.boundFunction) { this.off('select', this.boundFunction); } this._unselectAll(); this.forceAppendSelection = false; this.blockConnectingEdgeSelection = true; this.manipulationDiv.innerHTML = "" + "<span class='graph-manipulationUI back' id='graph-manipulate-back'>" + "<span class='graph-manipulationLabel'>" + this.constants.labels['back'] + " </span></span>" + "<div class='graph-seperatorLine'></div>" + "<span class='graph-manipulationUI none' id='graph-manipulate-back'>" + "<span id='graph-manipulatorLabel' class='graph-manipulationLabel'>" + this.constants.labels['linkDescription'] + "</span></span>"; // bind the icon var backButton = document.getElementById("graph-manipulate-back"); backButton.onclick = this._createManipulatorBar.bind(this); // we use the boundFunction so we can reference it when we unbind it from the "select" event. this.boundFunction = this._handleConnect.bind(this); this.on('select', this.boundFunction); // temporarily overload functions this.cachedFunctions["_handleTouch"] = this._handleTouch; this.cachedFunctions["_handleOnRelease"] = this._handleOnRelease; this._handleTouch = this._handleConnect; this._handleOnRelease = this._finishConnect; // redraw to show the unselect this._redraw(); }, /** * the function bound to the selection event. It checks if you want to connect a cluster and changes the description * to walk the user through the process. * * @private */ _handleConnect : function(pointer) { if (this._getSelectedNodeCount() == 0) { var node = this._getNodeAt(pointer); if (node != null) { if (node.clusterSize > 1) { alert("Cannot create edges to a cluster.") } else { this._selectObject(node,false); // create a node the temporary line can look at this.sectors['support']['nodes']['targetNode'] = new Node({id:'targetNode'},{},{},this.constants); this.sectors['support']['nodes']['targetNode'].x = node.x; this.sectors['support']['nodes']['targetNode'].y = node.y; this.sectors['support']['nodes']['targetViaNode'] = new Node({id:'targetViaNode'},{},{},this.constants); this.sectors['support']['nodes']['targetViaNode'].x = node.x; this.sectors['support']['nodes']['targetViaNode'].y = node.y; this.sectors['support']['nodes']['targetViaNode'].parentEdgeId = "connectionEdge"; // create a temporary edge this.edges['connectionEdge'] = new Edge({id:"connectionEdge",from:node.id,to:this.sectors['support']['nodes']['targetNode'].id}, this, this.constants); this.edges['connectionEdge'].from = node; this.edges['connectionEdge'].connected = true; this.edges['connectionEdge'].smooth = true; this.edges['connectionEdge'].selected = true; this.edges['connectionEdge'].to = this.sectors['support']['nodes']['targetNode']; this.edges['connectionEdge'].via = this.sectors['support']['nodes']['targetViaNode']; this.cachedFunctions["_handleOnDrag"] = this._handleOnDrag; this._handleOnDrag = function(event) { var pointer = this._getPointer(event.gesture.center); this.sectors['support']['nodes']['targetNode'].x = this._XconvertDOMtoCanvas(pointer.x); this.sectors['support']['nodes']['targetNode'].y = this._YconvertDOMtoCanvas(pointer.y); this.sectors['support']['nodes']['targetViaNode'].x = 0.5 * (this._XconvertDOMtoCanvas(pointer.x) + this.edges['connectionEdge'].from.x); this.sectors['support']['nodes']['targetViaNode'].y = this._YconvertDOMtoCanvas(pointer.y); }; this.moving = true; this.start(); } } } }, _finishConnect : function(pointer) { if (this._getSelectedNodeCount() == 1) { // restore the drag function this._handleOnDrag = this.cachedFunctions["_handleOnDrag"]; delete this.cachedFunctions["_handleOnDrag"]; // remember the edge id var connectFromId = this.edges['connectionEdge'].fromId; // remove the temporary nodes and edge delete this.edges['connectionEdge']; delete this.sectors['support']['nodes']['targetNode']; delete this.sectors['support']['nodes']['targetViaNode']; var node = this._getNodeAt(pointer); if (node != null) { if (node.clusterSize > 1) { alert("Cannot create edges to a cluster.") } else { this._createEdge(connectFromId,node.id); this._createManipulatorBar(); } } this._unselectAll(); } }, /** * Adds a node on the specified location */ _addNode : function() { if (this._selectionIsEmpty() && this.editMode == true) { var positionObject = this._pointerToPositionObject(this.pointerPosition); var defaultData = {id:util.randomUUID(),x:positionObject.left,y:positionObject.top,label:"new",allowedToMoveX:true,allowedToMoveY:true}; if (this.triggerFunctions.add) { if (this.triggerFunctions.add.length == 2) { var me = this; this.triggerFunctions.add(defaultData, function(finalizedData) { me.nodesData.add(finalizedData); me._createManipulatorBar(); me.moving = true; me.start(); }); } else { alert(this.constants.labels['addError']); this._createManipulatorBar(); this.moving = true; this.start(); } } else { this.nodesData.add(defaultData); this._createManipulatorBar(); this.moving = true; this.start(); } } }, /** * connect two nodes with a new edge. * * @private */ _createEdge : function(sourceNodeId,targetNodeId) { if (this.editMode == true) { var defaultData = {from:sourceNodeId, to:targetNodeId}; if (this.triggerFunctions.connect) { if (this.triggerFunctions.connect.length == 2) { var me = this; this.triggerFunctions.connect(defaultData, function(finalizedData) { me.edgesData.add(finalizedData); me.moving = true; me.start(); }); } else { alert(this.constants.labels["linkError"]); this.moving = true; this.start(); } } else { this.edgesData.add(defaultData); this.moving = true; this.start(); } } }, /** * Create the toolbar to edit the selected node. The label and the color can be changed. Other colors are derived from the chosen color. * * @private */ _editNode : function() { if (this.triggerFunctions.edit && this.editMode == true) { var node = this._getSelectedNode(); var data = {id:node.id, label: node.label, group: node.group, shape: node.shape, color: { background:node.color.background, border:node.color.border, highlight: { background:node.color.highlight.background, border:node.color.highlight.border } }}; if (this.triggerFunctions.edit.length == 2) { var me = this; this.triggerFunctions.edit(data, function (finalizedData) { me.nodesData.update(finalizedData); me._createManipulatorBar(); me.moving = true; me.start(); }); } else { alert(this.constants.labels["editError"]); } } else { alert(this.constants.labels["editBoundError"]); } }, /** * delete everything in the selection * * @private */ _deleteSelected : function() { if (!this._selectionIsEmpty() && this.editMode == true) { if (!this._clusterInSelection()) { var selectedNodes = this.getSelectedNodes(); var selectedEdges = this.getSelectedEdges(); if (this.triggerFunctions.del) { var me = this; var data = {nodes: selectedNodes, edges: selectedEdges}; if (this.triggerFunctions.del.length = 2) { this.triggerFunctions.del(data, function (finalizedData) { me.edgesData.remove(finalizedData.edges); me.nodesData.remove(finalizedData.nodes); me._unselectAll(); me.moving = true; me.start(); }); } else { alert(this.constants.labels["deleteError"]) } } else { this.edgesData.remove(selectedEdges); this.nodesData.remove(selectedNodes); this._unselectAll(); this.moving = true; this.start(); } } else { alert(this.constants.labels["deleteClusterError"]); } } } }; /** * Creation of the SectorMixin var. * * This contains all the functions the Graph object can use to employ the sector system. * The sector system is always used by Graph, though the benefits only apply to the use of clustering. * If clustering is not used, there is no overhead except for a duplicate object with references to nodes and edges. * * Alex de Mulder * 21-01-2013 */ var SectorMixin = { /** * This function is only called by the setData function of the Graph object. * This loads the global references into the active sector. This initializes the sector. * * @private */ _putDataInSector : function() { this.sectors["active"][this._sector()].nodes = this.nodes; this.sectors["active"][this._sector()].edges = this.edges; this.sectors["active"][this._sector()].nodeIndices = this.nodeIndices; }, /** * /** * This function sets the global references to nodes, edges and nodeIndices back to * those of the supplied (active) sector. If a type is defined, do the specific type * * @param {String} sectorId * @param {String} [sectorType] | "active" or "frozen" * @private */ _switchToSector : function(sectorId, sectorType) { if (sectorType === undefined || sectorType == "active") { this._switchToActiveSector(sectorId); } else { this._switchToFrozenSector(sectorId); } }, /** * This function sets the global references to nodes, edges and nodeIndices back to * those of the supplied active sector. * * @param sectorId * @private */ _switchToActiveSector : function(sectorId) { this.nodeIndices = this.sectors["active"][sectorId]["nodeIndices"]; this.nodes = this.sectors["active"][sectorId]["nodes"]; this.edges = this.sectors["active"][sectorId]["edges"]; }, /** * This function sets the global references to nodes, edges and nodeIndices back to * those of the supplied active sector. * * @param sectorId * @private */ _switchToSupportSector : function() { this.nodeIndices = this.sectors["support"]["nodeIndices"]; this.nodes = this.sectors["support"]["nodes"]; this.edges = this.sectors["support"]["edges"]; }, /** * This function sets the global references to nodes, edges and nodeIndices back to * those of the supplied frozen sector. * * @param sectorId * @private */ _switchToFrozenSector : function(sectorId) { this.nodeIndices = this.sectors["frozen"][sectorId]["nodeIndices"]; this.nodes = this.sectors["frozen"][sectorId]["nodes"]; this.edges = this.sectors["frozen"][sectorId]["edges"]; }, /** * This function sets the global references to nodes, edges and nodeIndices back to * those of the currently active sector. * * @private */ _loadLatestSector : function() { this._switchToSector(this._sector()); }, /** * This function returns the currently active sector Id * * @returns {String} * @private */ _sector : function() { return this.activeSector[this.activeSector.length-1]; }, /** * This function returns the previously active sector Id * * @returns {String} * @private */ _previousSector : function() { if (this.activeSector.length > 1) { return this.activeSector[this.activeSector.length-2]; } else { throw new TypeError('there are not enough sectors in the this.activeSector array.'); } }, /** * We add the active sector at the end of the this.activeSector array * This ensures it is the currently active sector returned by _sector() and it reaches the top * of the activeSector stack. When we reverse our steps we move from the end to the beginning of this stack. * * @param newId * @private */ _setActiveSector : function(newId) { this.activeSector.push(newId); }, /** * We remove the currently active sector id from the active sector stack. This happens when * we reactivate the previously active sector * * @private */ _forgetLastSector : function() { this.activeSector.pop(); }, /** * This function creates a new active sector with the supplied newId. This newId * is the expanding node id. * * @param {String} newId | Id of the new active sector * @private */ _createNewSector : function(newId) { // create the new sector this.sectors["active"][newId] = {"nodes":{}, "edges":{}, "nodeIndices":[], "formationScale": this.scale, "drawingNode": undefined}; // create the new sector render node. This gives visual feedback that you are in a new sector. this.sectors["active"][newId]['drawingNode'] = new Node( {id:newId, color: { background: "#eaefef", border: "495c5e" } },{},{},this.constants); this.sectors["active"][newId]['drawingNode'].clusterSize = 2; }, /** * This function removes the currently active sector. This is called when we create a new * active sector. * * @param {String} sectorId | Id of the active sector that will be removed * @private */ _deleteActiveSector : function(sectorId) { delete this.sectors["active"][sectorId]; }, /** * This function removes the currently active sector. This is called when we reactivate * the previously active sector. * * @param {String} sectorId | Id of the active sector that will be removed * @private */ _deleteFrozenSector : function(sectorId) { delete this.sectors["frozen"][sectorId]; }, /** * Freezing an active sector means moving it from the "active" object to the "frozen" object. * We copy the references, then delete the active entree. * * @param sectorId * @private */ _freezeSector : function(sectorId) { // we move the set references from the active to the frozen stack. this.sectors["frozen"][sectorId] = this.sectors["active"][sectorId]; // we have moved the sector data into the frozen set, we now remove it from the active set this._deleteActiveSector(sectorId); }, /** * This is the reverse operation of _freezeSector. Activating means moving the sector from the "frozen" * object to the "active" object. * * @param sectorId * @private */ _activateSector : function(sectorId) { // we move the set references from the frozen to the active stack. this.sectors["active"][sectorId] = this.sectors["frozen"][sectorId]; // we have moved the sector data into the active set, we now remove it from the frozen stack this._deleteFrozenSector(sectorId); }, /** * This function merges the data from the currently active sector with a frozen sector. This is used * in the process of reverting back to the previously active sector. * The data that is placed in the frozen (the previously active) sector is the node that has been removed from it * upon the creation of a new active sector. * * @param sectorId * @private */ _mergeThisWithFrozen : function(sectorId) { // copy all nodes for (var nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { this.sectors["frozen"][sectorId]["nodes"][nodeId] = this.nodes[nodeId]; } } // copy all edges (if not fully clustered, else there are no edges) for (var edgeId in this.edges) { if (this.edges.hasOwnProperty(edgeId)) { this.sectors["frozen"][sectorId]["edges"][edgeId] = this.edges[edgeId]; } } // merge the nodeIndices for (var i = 0; i < this.nodeIndices.length; i++) { this.sectors["frozen"][sectorId]["nodeIndices"].push(this.nodeIndices[i]); } }, /** * This clusters the sector to one cluster. It was a single cluster before this process started so * we revert to that state. The clusterToFit function with a maximum size of 1 node does this. * * @private */ _collapseThisToSingleCluster : function() { this.clusterToFit(1,false); }, /** * We create a new active sector from the node that we want to open. * * @param node * @private */ _addSector : function(node) { // this is the currently active sector var sector = this._sector(); // // this should allow me to select nodes from a frozen set. // if (this.sectors['active'][sector]["nodes"].hasOwnProperty(node.id)) { // console.log("the node is part of the active sector"); // } // else { // console.log("I dont know what happened!!"); // } // when we switch to a new sector, we remove the node that will be expanded from the current nodes list. delete this.nodes[node.id]; var unqiueIdentifier = util.randomUUID(); // we fully freeze the currently active sector this._freezeSector(sector); // we create a new active sector. This sector has the Id of the node to ensure uniqueness this._createNewSector(unqiueIdentifier); // we add the active sector to the sectors array to be able to revert these steps later on this._setActiveSector(unqiueIdentifier); // we redirect the global references to the new sector's references. this._sector() now returns unqiueIdentifier this._switchToSector(this._sector()); // finally we add the node we removed from our previous active sector to the new active sector this.nodes[node.id] = node; }, /** * We close the sector that is currently open and revert back to the one before. * If the active sector is the "default" sector, nothing happens. * * @private */ _collapseSector : function() { // the currently active sector var sector = this._sector(); // we cannot collapse the default sector if (sector != "default") { if ((this.nodeIndices.length == 1) || (this.sectors["active"][sector]["drawingNode"].width*this.scale < this.constants.clustering.screenSizeThreshold * this.frame.canvas.clientWidth) || (this.sectors["active"][sector]["drawingNode"].height*this.scale < this.constants.clustering.screenSizeThreshold * this.frame.canvas.clientHeight)) { var previousSector = this._previousSector(); // we collapse the sector back to a single cluster this._collapseThisToSingleCluster(); // we move the remaining nodes, edges and nodeIndices to the previous sector. // This previous sector is the one we will reactivate this._mergeThisWithFrozen(previousSector); // the previously active (frozen) sector now has all the data from the currently active sector. // we can now delete the active sector. this._deleteActiveSector(sector); // we activate the previously active (and currently frozen) sector. this._activateSector(previousSector); // we load the references from the newly active sector into the global references this._switchToSector(previousSector); // we forget the previously active sector because we reverted to the one before this._forgetLastSector(); // finally, we update the node index list. this._updateNodeIndexList(); // we refresh the list with calulation nodes and calculation node indices. this._updateCalculationNodes(); } } }, /** * This runs a function in all active sectors. This is used in _redraw() and the _initializeForceCalculation(). * * @param {String} runFunction | This is the NAME of a function we want to call in all active sectors * | we dont pass the function itself because then the "this" is the window object * | instead of the Graph object * @param {*} [argument] | Optional: arguments to pass to the runFunction * @private */ _doInAllActiveSectors : function(runFunction,argument) { if (argument === undefined) { for (var sector in this.sectors["active"]) { if (this.sectors["active"].hasOwnProperty(sector)) { // switch the global references to those of this sector this._switchToActiveSector(sector); this[runFunction](); } } } else { for (var sector in this.sectors["active"]) { if (this.sectors["active"].hasOwnProperty(sector)) { // switch the global references to those of this sector this._switchToActiveSector(sector); var args = Array.prototype.splice.call(arguments, 1); if (args.length > 1) { this[runFunction](args[0],args[1]); } else { this[runFunction](argument); } } } } // we revert the global references back to our active sector this._loadLatestSector(); }, /** * This runs a function in all active sectors. This is used in _redraw() and the _initializeForceCalculation(). * * @param {String} runFunction | This is the NAME of a function we want to call in all active sectors * | we dont pass the function itself because then the "this" is the window object * | instead of the Graph object * @param {*} [argument] | Optional: arguments to pass to the runFunction * @private */ _doInSupportSector : function(runFunction,argument) { if (argument === undefined) { this._switchToSupportSector(); this[runFunction](); } else { this._switchToSupportSector(); var args = Array.prototype.splice.call(arguments, 1); if (args.length > 1) { this[runFunction](args[0],args[1]); } else { this[runFunction](argument); } } // we revert the global references back to our active sector this._loadLatestSector(); }, /** * This runs a function in all frozen sectors. This is used in the _redraw(). * * @param {String} runFunction | This is the NAME of a function we want to call in all active sectors * | we don't pass the function itself because then the "this" is the window object * | instead of the Graph object * @param {*} [argument] | Optional: arguments to pass to the runFunction * @private */ _doInAllFrozenSectors : function(runFunction,argument) { if (argument === undefined) { for (var sector in this.sectors["frozen"]) { if (this.sectors["frozen"].hasOwnProperty(sector)) { // switch the global references to those of this sector this._switchToFrozenSector(sector); this[runFunction](); } } } else { for (var sector in this.sectors["frozen"]) { if (this.sectors["frozen"].hasOwnProperty(sector)) { // switch the global references to those of this sector this._switchToFrozenSector(sector); var args = Array.prototype.splice.call(arguments, 1); if (args.length > 1) { this[runFunction](args[0],args[1]); } else { this[runFunction](argument); } } } } this._loadLatestSector(); }, /** * This runs a function in all sectors. This is used in the _redraw(). * * @param {String} runFunction | This is the NAME of a function we want to call in all active sectors * | we don't pass the function itself because then the "this" is the window object * | instead of the Graph object * @param {*} [argument] | Optional: arguments to pass to the runFunction * @private */ _doInAllSectors : function(runFunction,argument) { var args = Array.prototype.splice.call(arguments, 1); if (argument === undefined) { this._doInAllActiveSectors(runFunction); this._doInAllFrozenSectors(runFunction); } else { if (args.length > 1) { this._doInAllActiveSectors(runFunction,args[0],args[1]); this._doInAllFrozenSectors(runFunction,args[0],args[1]); } else { this._doInAllActiveSectors(runFunction,argument); this._doInAllFrozenSectors(runFunction,argument); } } }, /** * This clears the nodeIndices list. We cannot use this.nodeIndices = [] because we would break the link with the * active sector. Thus we clear the nodeIndices in the active sector, then reconnect the this.nodeIndices to it. * * @private */ _clearNodeIndexList : function() { var sector = this._sector(); this.sectors["active"][sector]["nodeIndices"] = []; this.nodeIndices = this.sectors["active"][sector]["nodeIndices"]; }, /** * Draw the encompassing sector node * * @param ctx * @param sectorType * @private */ _drawSectorNodes : function(ctx,sectorType) { var minY = 1e9, maxY = -1e9, minX = 1e9, maxX = -1e9, node; for (var sector in this.sectors[sectorType]) { if (this.sectors[sectorType].hasOwnProperty(sector)) { if (this.sectors[sectorType][sector]["drawingNode"] !== undefined) { this._switchToSector(sector,sectorType); minY = 1e9; maxY = -1e9; minX = 1e9; maxX = -1e9; for (var nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { node = this.nodes[nodeId]; node.resize(ctx); if (minX > node.x - 0.5 * node.width) {minX = node.x - 0.5 * node.width;} if (maxX < node.x + 0.5 * node.width) {maxX = node.x + 0.5 * node.width;} if (minY > node.y - 0.5 * node.height) {minY = node.y - 0.5 * node.height;} if (maxY < node.y + 0.5 * node.height) {maxY = node.y + 0.5 * node.height;} } } node = this.sectors[sectorType][sector]["drawingNode"]; node.x = 0.5 * (maxX + minX); node.y = 0.5 * (maxY + minY); node.width = 2 * (node.x - minX); node.height = 2 * (node.y - minY); node.radius = Math.sqrt(Math.pow(0.5*node.width,2) + Math.pow(0.5*node.height,2)); node.setScale(this.scale); node._drawCircle(ctx); } } } }, _drawAllSectorNodes : function(ctx) { this._drawSectorNodes(ctx,"frozen"); this._drawSectorNodes(ctx,"active"); this._loadLatestSector(); } }; /** * Creation of the ClusterMixin var. * * This contains all the functions the Graph object can use to employ clustering * * Alex de Mulder * 21-01-2013 */ var ClusterMixin = { /** * This is only called in the constructor of the graph object * */ startWithClustering : function() { // cluster if the data set is big this.clusterToFit(this.constants.clustering.initialMaxNodes, true); // updates the lables after clustering this.updateLabels(); // this is called here because if clusterin is disabled, the start and stabilize are called in // the setData function. if (this.stabilize) { this._stabilize(); } this.start(); }, /** * This function clusters until the initialMaxNodes has been reached * * @param {Number} maxNumberOfNodes * @param {Boolean} reposition */ clusterToFit : function(maxNumberOfNodes, reposition) { var numberOfNodes = this.nodeIndices.length; var maxLevels = 50; var level = 0; // we first cluster the hubs, then we pull in the outliers, repeat while (numberOfNodes > maxNumberOfNodes && level < maxLevels) { if (level % 3 == 0) { this.forceAggregateHubs(true); this.normalizeClusterLevels(); } else { this.increaseClusterLevel(); // this also includes a cluster normalization } numberOfNodes = this.nodeIndices.length; level += 1; } // after the clustering we reposition the nodes to reduce the initial chaos if (level > 0 && reposition == true) { this.repositionNodes(); } this._updateCalculationNodes(); }, /** * This function can be called to open up a specific cluster. It is only called by * It will unpack the cluster back one level. * * @param node | Node object: cluster to open. */ openCluster : function(node) { var isMovingBeforeClustering = this.moving; if (node.clusterSize > this.constants.clustering.sectorThreshold && this._nodeInActiveArea(node) && !(this._sector() == "default" && this.nodeIndices.length == 1)) { // this loads a new sector, loads the nodes and edges and nodeIndices of it. this._addSector(node); var level = 0; // we decluster until we reach a decent number of nodes while ((this.nodeIndices.length < this.constants.clustering.initialMaxNodes) && (level < 10)) { this.decreaseClusterLevel(); level += 1; } } else { this._expandClusterNode(node,false,true); // update the index list, dynamic edges and labels this._updateNodeIndexList(); this._updateDynamicEdges(); this._updateCalculationNodes(); this.updateLabels(); } // if the simulation was settled, we restart the simulation if a cluster has been formed or expanded if (this.moving != isMovingBeforeClustering) { this.start(); } }, /** * This calls the updateClustes with default arguments */ updateClustersDefault : function() { if (this.constants.clustering.enabled == true) { this.updateClusters(0,false,false); } }, /** * This function can be called to increase the cluster level. This means that the nodes with only one edge connection will * be clustered with their connected node. This can be repeated as many times as needed. * This can be called externally (by a keybind for instance) to reduce the complexity of big datasets. */ increaseClusterLevel : function() { this.updateClusters(-1,false,true); }, /** * This function can be called to decrease the cluster level. This means that the nodes with only one edge connection will * be unpacked if they are a cluster. This can be repeated as many times as needed. * This can be called externally (by a key-bind for instance) to look into clusters without zooming. */ decreaseClusterLevel : function() { this.updateClusters(1,false,true); }, /** * This is the main clustering function. It clusters and declusters on zoom or forced * This function clusters on zoom, it can be called with a predefined zoom direction * If out, check if we can form clusters, if in, check if we can open clusters. * This function is only called from _zoom() * * @param {Number} zoomDirection | -1 / 0 / +1 for zoomOut / determineByZoom / zoomIn * @param {Boolean} recursive | enabled or disable recursive calling of the opening of clusters * @param {Boolean} force | enabled or disable forcing * @param {Boolean} doNotStart | if true do not call start * */ updateClusters : function(zoomDirection,recursive,force,doNotStart) { var isMovingBeforeClustering = this.moving; var amountOfNodes = this.nodeIndices.length; // on zoom out collapse the sector if the scale is at the level the sector was made if (this.previousScale > this.scale && zoomDirection == 0) { this._collapseSector(); } // check if we zoom in or out if (this.previousScale > this.scale || zoomDirection == -1) { // zoom out // forming clusters when forced pulls outliers in. When not forced, the edge length of the // outer nodes determines if it is being clustered this._formClusters(force); } else if (this.previousScale < this.scale || zoomDirection == 1) { // zoom in if (force == true) { // _openClusters checks for each node if the formationScale of the cluster is smaller than // the current scale and if so, declusters. When forced, all clusters are reduced by one step this._openClusters(recursive,force); } else { // if a cluster takes up a set percentage of the active window this._openClustersBySize(); } } this._updateNodeIndexList(); // if a cluster was NOT formed and the user zoomed out, we try clustering by hubs if (this.nodeIndices.length == amountOfNodes && (this.previousScale > this.scale || zoomDirection == -1)) { this._aggregateHubs(force); this._updateNodeIndexList(); } // we now reduce chains. if (this.previousScale > this.scale || zoomDirection == -1) { // zoom out this.handleChains(); this._updateNodeIndexList(); } this.previousScale = this.scale; // rest of the update the index list, dynamic edges and labels this._updateDynamicEdges(); this.updateLabels(); // if a cluster was formed, we increase the clusterSession if (this.nodeIndices.length < amountOfNodes) { // this means a clustering operation has taken place this.clusterSession += 1; // if clusters have been made, we normalize the cluster level this.normalizeClusterLevels(); } if (doNotStart == false || doNotStart === undefined) { // if the simulation was settled, we restart the simulation if a cluster has been formed or expanded if (this.moving != isMovingBeforeClustering) { this.start(); } } this._updateCalculationNodes(); }, /** * This function handles the chains. It is called on every updateClusters(). */ handleChains : function() { // after clustering we check how many chains there are var chainPercentage = this._getChainFraction(); if (chainPercentage > this.constants.clustering.chainThreshold) { this._reduceAmountOfChains(1 - this.constants.clustering.chainThreshold / chainPercentage) } }, /** * this functions starts clustering by hubs * The minimum hub threshold is set globally * * @private */ _aggregateHubs : function(force) { this._getHubSize(); this._formClustersByHub(force,false); }, /** * This function is fired by keypress. It forces hubs to form. * */ forceAggregateHubs : function(doNotStart) { var isMovingBeforeClustering = this.moving; var amountOfNodes = this.nodeIndices.length; this._aggregateHubs(true); // update the index list, dynamic edges and labels this._updateNodeIndexList(); this._updateDynamicEdges(); this.updateLabels(); // if a cluster was formed, we increase the clusterSession if (this.nodeIndices.length != amountOfNodes) { this.clusterSession += 1; } if (doNotStart == false || doNotStart === undefined) { // if the simulation was settled, we restart the simulation if a cluster has been formed or expanded if (this.moving != isMovingBeforeClustering) { this.start(); } } }, /** * If a cluster takes up more than a set percentage of the screen, open the cluster * * @private */ _openClustersBySize : function() { for (var nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { var node = this.nodes[nodeId]; if (node.inView() == true) { if ((node.width*this.scale > this.constants.clustering.screenSizeThreshold * this.frame.canvas.clientWidth) || (node.height*this.scale > this.constants.clustering.screenSizeThreshold * this.frame.canvas.clientHeight)) { this.openCluster(node); } } } } }, /** * This function loops over all nodes in the nodeIndices list. For each node it checks if it is a cluster and if it * has to be opened based on the current zoom level. * * @private */ _openClusters : function(recursive,force) { for (var i = 0; i < this.nodeIndices.length; i++) { var node = this.nodes[this.nodeIndices[i]]; this._expandClusterNode(node,recursive,force); this._updateCalculationNodes(); } }, /** * This function checks if a node has to be opened. This is done by checking the zoom level. * If the node contains child nodes, this function is recursively called on the child nodes as well. * This recursive behaviour is optional and can be set by the recursive argument. * * @param {Node} parentNode | to check for cluster and expand * @param {Boolean} recursive | enabled or disable recursive calling * @param {Boolean} force | enabled or disable forcing * @param {Boolean} [openAll] | This will recursively force all nodes in the parent to be released * @private */ _expandClusterNode : function(parentNode, recursive, force, openAll) { // first check if node is a cluster if (parentNode.clusterSize > 1) { // this means that on a double tap event or a zoom event, the cluster fully unpacks if it is smaller than 20 if (parentNode.clusterSize < this.constants.clustering.sectorThreshold) { openAll = true; } recursive = openAll ? true : recursive; // if the last child has been added on a smaller scale than current scale decluster if (parentNode.formationScale < this.scale || force == true) { // we will check if any of the contained child nodes should be removed from the cluster for (var containedNodeId in parentNode.containedNodes) { if (parentNode.containedNodes.hasOwnProperty(containedNodeId)) { var childNode = parentNode.containedNodes[containedNodeId]; // force expand will expand the largest cluster size clusters. Since we cluster from outside in, we assume that // the largest cluster is the one that comes from outside if (force == true) { if (childNode.clusterSession == parentNode.clusterSessions[parentNode.clusterSessions.length-1] || openAll) { this._expelChildFromParent(parentNode,containedNodeId,recursive,force,openAll); } } else { if (this._nodeInActiveArea(parentNode)) { this._expelChildFromParent(parentNode,containedNodeId,recursive,force,openAll); } } } } } } }, /** * ONLY CALLED FROM _expandClusterNode * * This function will expel a child_node from a parent_node. This is to de-cluster the node. This function will remove * the child node from the parent contained_node object and put it back into the global nodes object. * The same holds for the edge that was connected to the child node. It is moved back into the global edges object. * * @param {Node} parentNode | the parent node * @param {String} containedNodeId | child_node id as it is contained in the containedNodes object of the parent node * @param {Boolean} recursive | This will also check if the child needs to be expanded. * With force and recursive both true, the entire cluster is unpacked * @param {Boolean} force | This will disregard the zoom level and will expel this child from the parent * @param {Boolean} openAll | This will recursively force all nodes in the parent to be released * @private */ _expelChildFromParent : function(parentNode, containedNodeId, recursive, force, openAll) { var childNode = parentNode.containedNodes[containedNodeId]; // if child node has been added on smaller scale than current, kick out if (childNode.formationScale < this.scale || force == true) { // unselect all selected items this._unselectAll(); // put the child node back in the global nodes object this.nodes[containedNodeId] = childNode; // release the contained edges from this childNode back into the global edges this._releaseContainedEdges(parentNode,childNode); // reconnect rerouted edges to the childNode this._connectEdgeBackToChild(parentNode,childNode); // validate all edges in dynamicEdges this._validateEdges(parentNode); // undo the changes from the clustering operation on the parent node parentNode.mass -= childNode.mass; parentNode.clusterSize -= childNode.clusterSize; parentNode.fontSize = Math.min(this.constants.clustering.maxFontSize, this.constants.nodes.fontSize + this.constants.clustering.fontSizeMultiplier*parentNode.clusterSize); parentNode.dynamicEdgesLength = parentNode.dynamicEdges.length; // place the child node near the parent, not at the exact same location to avoid chaos in the system childNode.x = parentNode.x + parentNode.growthIndicator * (0.5 - Math.random()); childNode.y = parentNode.y + parentNode.growthIndicator * (0.5 - Math.random()); // remove node from the list delete parentNode.containedNodes[containedNodeId]; // check if there are other childs with this clusterSession in the parent. var othersPresent = false; for (var childNodeId in parentNode.containedNodes) { if (parentNode.containedNodes.hasOwnProperty(childNodeId)) { if (parentNode.containedNodes[childNodeId].clusterSession == childNode.clusterSession) { othersPresent = true; break; } } } // if there are no others, remove the cluster session from the list if (othersPresent == false) { parentNode.clusterSessions.pop(); } this._repositionBezierNodes(childNode); // this._repositionBezierNodes(parentNode); // remove the clusterSession from the child node childNode.clusterSession = 0; // recalculate the size of the node on the next time the node is rendered parentNode.clearSizeCache(); // restart the simulation to reorganise all nodes this.moving = true; } // check if a further expansion step is possible if recursivity is enabled if (recursive == true) { this._expandClusterNode(childNode,recursive,force,openAll); } }, /** * position the bezier nodes at the center of the edges * * @param node * @private */ _repositionBezierNodes : function(node) { for (var i = 0; i < node.dynamicEdges.length; i++) { node.dynamicEdges[i].positionBezierNode(); } }, /** * This function checks if any nodes at the end of their trees have edges below a threshold length * This function is called only from updateClusters() * forceLevelCollapse ignores the length of the edge and collapses one level * This means that a node with only one edge will be clustered with its connected node * * @private * @param {Boolean} force */ _formClusters : function(force) { if (force == false) { this._formClustersByZoom(); } else { this._forceClustersByZoom(); } }, /** * This function handles the clustering by zooming out, this is based on a minimum edge distance * * @private */ _formClustersByZoom : function() { var dx,dy,length, minLength = this.constants.clustering.clusterEdgeThreshold/this.scale; // check if any edges are shorter than minLength and start the clustering // the clustering favours the node with the larger mass for (var edgeId in this.edges) { if (this.edges.hasOwnProperty(edgeId)) { var edge = this.edges[edgeId]; if (edge.connected) { if (edge.toId != edge.fromId) { dx = (edge.to.x - edge.from.x); dy = (edge.to.y - edge.from.y); length = Math.sqrt(dx * dx + dy * dy); if (length < minLength) { // first check which node is larger var parentNode = edge.from; var childNode = edge.to; if (edge.to.mass > edge.from.mass) { parentNode = edge.to; childNode = edge.from; } if (childNode.dynamicEdgesLength == 1) { this._addToCluster(parentNode,childNode,false); } else if (parentNode.dynamicEdgesLength == 1) { this._addToCluster(childNode,parentNode,false); } } } } } } }, /** * This function forces the graph to cluster all nodes with only one connecting edge to their * connected node. * * @private */ _forceClustersByZoom : function() { for (var nodeId in this.nodes) { // another node could have absorbed this child. if (this.nodes.hasOwnProperty(nodeId)) { var childNode = this.nodes[nodeId]; // the edges can be swallowed by another decrease if (childNode.dynamicEdgesLength == 1 && childNode.dynamicEdges.length != 0) { var edge = childNode.dynamicEdges[0]; var parentNode = (edge.toId == childNode.id) ? this.nodes[edge.fromId] : this.nodes[edge.toId]; // group to the largest node if (childNode.id != parentNode.id) { if (parentNode.mass > childNode.mass) { this._addToCluster(parentNode,childNode,true); } else { this._addToCluster(childNode,parentNode,true); } } } } } }, /** * To keep the nodes of roughly equal size we normalize the cluster levels. * This function clusters a node to its smallest connected neighbour. * * @param node * @private */ _clusterToSmallestNeighbour : function(node) { var smallestNeighbour = -1; var smallestNeighbourNode = null; for (var i = 0; i < node.dynamicEdges.length; i++) { if (node.dynamicEdges[i] !== undefined) { var neighbour = null; if (node.dynamicEdges[i].fromId != node.id) { neighbour = node.dynamicEdges[i].from; } else if (node.dynamicEdges[i].toId != node.id) { neighbour = node.dynamicEdges[i].to; } if (neighbour != null && smallestNeighbour > neighbour.clusterSessions.length) { smallestNeighbour = neighbour.clusterSessions.length; smallestNeighbourNode = neighbour; } } } if (neighbour != null && this.nodes[neighbour.id] !== undefined) { this._addToCluster(neighbour, node, true); } }, /** * This function forms clusters from hubs, it loops over all nodes * * @param {Boolean} force | Disregard zoom level * @param {Boolean} onlyEqual | This only clusters a hub with a specific number of edges * @private */ _formClustersByHub : function(force, onlyEqual) { // we loop over all nodes in the list for (var nodeId in this.nodes) { // we check if it is still available since it can be used by the clustering in this loop if (this.nodes.hasOwnProperty(nodeId)) { this._formClusterFromHub(this.nodes[nodeId],force,onlyEqual); } } }, /** * This function forms a cluster from a specific preselected hub node * * @param {Node} hubNode | the node we will cluster as a hub * @param {Boolean} force | Disregard zoom level * @param {Boolean} onlyEqual | This only clusters a hub with a specific number of edges * @param {Number} [absorptionSizeOffset] | * @private */ _formClusterFromHub : function(hubNode, force, onlyEqual, absorptionSizeOffset) { if (absorptionSizeOffset === undefined) { absorptionSizeOffset = 0; } // we decide if the node is a hub if ((hubNode.dynamicEdgesLength >= this.hubThreshold && onlyEqual == false) || (hubNode.dynamicEdgesLength == this.hubThreshold && onlyEqual == true)) { // initialize variables var dx,dy,length; var minLength = this.constants.clustering.clusterEdgeThreshold/this.scale; var allowCluster = false; // we create a list of edges because the dynamicEdges change over the course of this loop var edgesIdarray = []; var amountOfInitialEdges = hubNode.dynamicEdges.length; for (var j = 0; j < amountOfInitialEdges; j++) { edgesIdarray.push(hubNode.dynamicEdges[j].id); } // if the hub clustering is not forces, we check if one of the edges connected // to a cluster is small enough based on the constants.clustering.clusterEdgeThreshold if (force == false) { allowCluster = false; for (j = 0; j < amountOfInitialEdges; j++) { var edge = this.edges[edgesIdarray[j]]; if (edge !== undefined) { if (edge.connected) { if (edge.toId != edge.fromId) { dx = (edge.to.x - edge.from.x); dy = (edge.to.y - edge.from.y); length = Math.sqrt(dx * dx + dy * dy); if (length < minLength) { allowCluster = true; break; } } } } } } // start the clustering if allowed if ((!force && allowCluster) || force) { // we loop over all edges INITIALLY connected to this hub for (j = 0; j < amountOfInitialEdges; j++) { edge = this.edges[edgesIdarray[j]]; // the edge can be clustered by this function in a previous loop if (edge !== undefined) { var childNode = this.nodes[(edge.fromId == hubNode.id) ? edge.toId : edge.fromId]; // we do not want hubs to merge with other hubs nor do we want to cluster itself. if ((childNode.dynamicEdges.length <= (this.hubThreshold + absorptionSizeOffset)) && (childNode.id != hubNode.id)) { this._addToCluster(hubNode,childNode,force); } } } } } }, /** * This function adds the child node to the parent node, creating a cluster if it is not already. * * @param {Node} parentNode | this is the node that will house the child node * @param {Node} childNode | this node will be deleted from the global this.nodes and stored in the parent node * @param {Boolean} force | true will only update the remainingEdges at the very end of the clustering, ensuring single level collapse * @private */ _addToCluster : function(parentNode, childNode, force) { // join child node in the parent node parentNode.containedNodes[childNode.id] = childNode; // manage all the edges connected to the child and parent nodes for (var i = 0; i < childNode.dynamicEdges.length; i++) { var edge = childNode.dynamicEdges[i]; if (edge.toId == parentNode.id || edge.fromId == parentNode.id) { // edge connected to parentNode this._addToContainedEdges(parentNode,childNode,edge); } else { this._connectEdgeToCluster(parentNode,childNode,edge); } } // a contained node has no dynamic edges. childNode.dynamicEdges = []; // remove circular edges from clusters this._containCircularEdgesFromNode(parentNode,childNode); // remove the childNode from the global nodes object delete this.nodes[childNode.id]; // update the properties of the child and parent var massBefore = parentNode.mass; childNode.clusterSession = this.clusterSession; parentNode.mass += childNode.mass; parentNode.clusterSize += childNode.clusterSize; parentNode.fontSize = Math.min(this.constants.clustering.maxFontSize, this.constants.nodes.fontSize + this.constants.clustering.fontSizeMultiplier*parentNode.clusterSize); // keep track of the clustersessions so we can open the cluster up as it has been formed. if (parentNode.clusterSessions[parentNode.clusterSessions.length - 1] != this.clusterSession) { parentNode.clusterSessions.push(this.clusterSession); } // forced clusters only open from screen size and double tap if (force == true) { // parentNode.formationScale = Math.pow(1 - (1.0/11.0),this.clusterSession+3); parentNode.formationScale = 0; } else { parentNode.formationScale = this.scale; // The latest child has been added on this scale } // recalculate the size of the node on the next time the node is rendered parentNode.clearSizeCache(); // set the pop-out scale for the childnode parentNode.containedNodes[childNode.id].formationScale = parentNode.formationScale; // nullify the movement velocity of the child, this is to avoid hectic behaviour childNode.clearVelocity(); // the mass has altered, preservation of energy dictates the velocity to be updated parentNode.updateVelocity(massBefore); // restart the simulation to reorganise all nodes this.moving = true; }, /** * This function will apply the changes made to the remainingEdges during the formation of the clusters. * This is a seperate function to allow for level-wise collapsing of the node barnesHutTree. * It has to be called if a level is collapsed. It is called by _formClusters(). * @private */ _updateDynamicEdges : function() { for (var i = 0; i < this.nodeIndices.length; i++) { var node = this.nodes[this.nodeIndices[i]]; node.dynamicEdgesLength = node.dynamicEdges.length; // this corrects for multiple edges pointing at the same other node var correction = 0; if (node.dynamicEdgesLength > 1) { for (var j = 0; j < node.dynamicEdgesLength - 1; j++) { var edgeToId = node.dynamicEdges[j].toId; var edgeFromId = node.dynamicEdges[j].fromId; for (var k = j+1; k < node.dynamicEdgesLength; k++) { if ((node.dynamicEdges[k].toId == edgeToId && node.dynamicEdges[k].fromId == edgeFromId) || (node.dynamicEdges[k].fromId == edgeToId && node.dynamicEdges[k].toId == edgeFromId)) { correction += 1; } } } } node.dynamicEdgesLength -= correction; } }, /** * This adds an edge from the childNode to the contained edges of the parent node * * @param parentNode | Node object * @param childNode | Node object * @param edge | Edge object * @private */ _addToContainedEdges : function(parentNode, childNode, edge) { // create an array object if it does not yet exist for this childNode if (!(parentNode.containedEdges.hasOwnProperty(childNode.id))) { parentNode.containedEdges[childNode.id] = [] } // add this edge to the list parentNode.containedEdges[childNode.id].push(edge); // remove the edge from the global edges object delete this.edges[edge.id]; // remove the edge from the parent object for (var i = 0; i < parentNode.dynamicEdges.length; i++) { if (parentNode.dynamicEdges[i].id == edge.id) { parentNode.dynamicEdges.splice(i,1); break; } } }, /** * This function connects an edge that was connected to a child node to the parent node. * It keeps track of which nodes it has been connected to with the originalId array. * * @param {Node} parentNode | Node object * @param {Node} childNode | Node object * @param {Edge} edge | Edge object * @private */ _connectEdgeToCluster : function(parentNode, childNode, edge) { // handle circular edges if (edge.toId == edge.fromId) { this._addToContainedEdges(parentNode, childNode, edge); } else { if (edge.toId == childNode.id) { // edge connected to other node on the "to" side edge.originalToId.push(childNode.id); edge.to = parentNode; edge.toId = parentNode.id; } else { // edge connected to other node with the "from" side edge.originalFromId.push(childNode.id); edge.from = parentNode; edge.fromId = parentNode.id; } this._addToReroutedEdges(parentNode,childNode,edge); } }, /** * If a node is connected to itself, a circular edge is drawn. When clustering we want to contain * these edges inside of the cluster. * * @param parentNode * @param childNode * @private */ _containCircularEdgesFromNode : function(parentNode, childNode) { // manage all the edges connected to the child and parent nodes for (var i = 0; i < parentNode.dynamicEdges.length; i++) { var edge = parentNode.dynamicEdges[i]; // handle circular edges if (edge.toId == edge.fromId) { this._addToContainedEdges(parentNode, childNode, edge); } } }, /** * This adds an edge from the childNode to the rerouted edges of the parent node * * @param parentNode | Node object * @param childNode | Node object * @param edge | Edge object * @private */ _addToReroutedEdges : function(parentNode, childNode, edge) { // create an array object if it does not yet exist for this childNode // we store the edge in the rerouted edges so we can restore it when the cluster pops open if (!(parentNode.reroutedEdges.hasOwnProperty(childNode.id))) { parentNode.reroutedEdges[childNode.id] = []; } parentNode.reroutedEdges[childNode.id].push(edge); // this edge becomes part of the dynamicEdges of the cluster node parentNode.dynamicEdges.push(edge); }, /** * This function connects an edge that was connected to a cluster node back to the child node. * * @param parentNode | Node object * @param childNode | Node object * @private */ _connectEdgeBackToChild : function(parentNode, childNode) { if (parentNode.reroutedEdges.hasOwnProperty(childNode.id)) { for (var i = 0; i < parentNode.reroutedEdges[childNode.id].length; i++) { var edge = parentNode.reroutedEdges[childNode.id][i]; if (edge.originalFromId[edge.originalFromId.length-1] == childNode.id) { edge.originalFromId.pop(); edge.fromId = childNode.id; edge.from = childNode; } else { edge.originalToId.pop(); edge.toId = childNode.id; edge.to = childNode; } // append this edge to the list of edges connecting to the childnode childNode.dynamicEdges.push(edge); // remove the edge from the parent object for (var j = 0; j < parentNode.dynamicEdges.length; j++) { if (parentNode.dynamicEdges[j].id == edge.id) { parentNode.dynamicEdges.splice(j,1); break; } } } // remove the entry from the rerouted edges delete parentNode.reroutedEdges[childNode.id]; } }, /** * When loops are clustered, an edge can be both in the rerouted array and the contained array. * This function is called last to verify that all edges in dynamicEdges are in fact connected to the * parentNode * * @param parentNode | Node object * @private */ _validateEdges : function(parentNode) { for (var i = 0; i < parentNode.dynamicEdges.length; i++) { var edge = parentNode.dynamicEdges[i]; if (parentNode.id != edge.toId && parentNode.id != edge.fromId) { parentNode.dynamicEdges.splice(i,1); } } }, /** * This function released the contained edges back into the global domain and puts them back into the * dynamic edges of both parent and child. * * @param {Node} parentNode | * @param {Node} childNode | * @private */ _releaseContainedEdges : function(parentNode, childNode) { for (var i = 0; i < parentNode.containedEdges[childNode.id].length; i++) { var edge = parentNode.containedEdges[childNode.id][i]; // put the edge back in the global edges object this.edges[edge.id] = edge; // put the edge back in the dynamic edges of the child and parent childNode.dynamicEdges.push(edge); parentNode.dynamicEdges.push(edge); } // remove the entry from the contained edges delete parentNode.containedEdges[childNode.id]; }, // ------------------- UTILITY FUNCTIONS ---------------------------- // /** * This updates the node labels for all nodes (for debugging purposes) */ updateLabels : function() { var nodeId; // update node labels for (nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { var node = this.nodes[nodeId]; if (node.clusterSize > 1) { node.label = "[".concat(String(node.clusterSize),"]"); } } } // update node labels for (nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { node = this.nodes[nodeId]; if (node.clusterSize == 1) { if (node.originalLabel !== undefined) { node.label = node.originalLabel; } else { node.label = String(node.id); } } } } // /* Debug Override */ // for (nodeId in this.nodes) { // if (this.nodes.hasOwnProperty(nodeId)) { // node = this.nodes[nodeId]; // node.label = String(node.level); // } // } }, /** * We want to keep the cluster level distribution rather small. This means we do not want unclustered nodes * if the rest of the nodes are already a few cluster levels in. * To fix this we use this function. It determines the min and max cluster level and sends nodes that have not * clustered enough to the clusterToSmallestNeighbours function. */ normalizeClusterLevels : function() { var maxLevel = 0; var minLevel = 1e9; var clusterLevel = 0; var nodeId; // we loop over all nodes in the list for (nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { clusterLevel = this.nodes[nodeId].clusterSessions.length; if (maxLevel < clusterLevel) {maxLevel = clusterLevel;} if (minLevel > clusterLevel) {minLevel = clusterLevel;} } } if (maxLevel - minLevel > this.constants.clustering.clusterLevelDifference) { var amountOfNodes = this.nodeIndices.length; var targetLevel = maxLevel - this.constants.clustering.clusterLevelDifference; // we loop over all nodes in the list for (nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { if (this.nodes[nodeId].clusterSessions.length < targetLevel) { this._clusterToSmallestNeighbour(this.nodes[nodeId]); } } } this._updateNodeIndexList(); this._updateDynamicEdges(); // if a cluster was formed, we increase the clusterSession if (this.nodeIndices.length != amountOfNodes) { this.clusterSession += 1; } } }, /** * This function determines if the cluster we want to decluster is in the active area * this means around the zoom center * * @param {Node} node * @returns {boolean} * @private */ _nodeInActiveArea : function(node) { return ( Math.abs(node.x - this.areaCenter.x) <= this.constants.clustering.activeAreaBoxSize/this.scale && Math.abs(node.y - this.areaCenter.y) <= this.constants.clustering.activeAreaBoxSize/this.scale ) }, /** * This is an adaptation of the original repositioning function. This is called if the system is clustered initially * It puts large clusters away from the center and randomizes the order. * */ repositionNodes : function() { for (var i = 0; i < this.nodeIndices.length; i++) { var node = this.nodes[this.nodeIndices[i]]; if ((node.xFixed == false || node.yFixed == false)) { var radius = 10 * 0.1*this.nodeIndices.length * Math.min(100,node.mass); var angle = 2 * Math.PI * Math.random(); if (node.xFixed == false) {node.x = radius * Math.cos(angle);} if (node.yFixed == false) {node.y = radius * Math.sin(angle);} this._repositionBezierNodes(node); } } }, /** * We determine how many connections denote an important hub. * We take the mean + 2*std as the important hub size. (Assuming a normal distribution of data, ~2.2%) * * @private */ _getHubSize : function() { var average = 0; var averageSquared = 0; var hubCounter = 0; var largestHub = 0; for (var i = 0; i < this.nodeIndices.length; i++) { var node = this.nodes[this.nodeIndices[i]]; if (node.dynamicEdgesLength > largestHub) { largestHub = node.dynamicEdgesLength; } average += node.dynamicEdgesLength; averageSquared += Math.pow(node.dynamicEdgesLength,2); hubCounter += 1; } average = average / hubCounter; averageSquared = averageSquared / hubCounter; var variance = averageSquared - Math.pow(average,2); var standardDeviation = Math.sqrt(variance); this.hubThreshold = Math.floor(average + 2*standardDeviation); // always have at least one to cluster if (this.hubThreshold > largestHub) { this.hubThreshold = largestHub; } // console.log("average",average,"averageSQ",averageSquared,"var",variance,"std",standardDeviation); // console.log("hubThreshold:",this.hubThreshold); }, /** * We reduce the amount of "extension nodes" or chains. These are not quickly clustered with the outliers and hubs methods * with this amount we can cluster specifically on these chains. * * @param {Number} fraction | between 0 and 1, the percentage of chains to reduce * @private */ _reduceAmountOfChains : function(fraction) { this.hubThreshold = 2; var reduceAmount = Math.floor(this.nodeIndices.length * fraction); for (var nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { if (this.nodes[nodeId].dynamicEdgesLength == 2 && this.nodes[nodeId].dynamicEdges.length >= 2) { if (reduceAmount > 0) { this._formClusterFromHub(this.nodes[nodeId],true,true,1); reduceAmount -= 1; } } } } }, /** * We get the amount of "extension nodes" or chains. These are not quickly clustered with the outliers and hubs methods * with this amount we can cluster specifically on these chains. * * @private */ _getChainFraction : function() { var chains = 0; var total = 0; for (var nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { if (this.nodes[nodeId].dynamicEdgesLength == 2 && this.nodes[nodeId].dynamicEdges.length >= 2) { chains += 1; } total += 1; } } return chains/total; } }; var SelectionMixin = { /** * This function can be called from the _doInAllSectors function * * @param object * @param overlappingNodes * @private */ _getNodesOverlappingWith : function(object, overlappingNodes) { var nodes = this.nodes; for (var nodeId in nodes) { if (nodes.hasOwnProperty(nodeId)) { if (nodes[nodeId].isOverlappingWith(object)) { overlappingNodes.push(nodeId); } } } }, /** * retrieve all nodes overlapping with given object * @param {Object} object An object with parameters left, top, right, bottom * @return {Number[]} An array with id's of the overlapping nodes * @private */ _getAllNodesOverlappingWith : function (object) { var overlappingNodes = []; this._doInAllActiveSectors("_getNodesOverlappingWith",object,overlappingNodes); return overlappingNodes; }, /** * Return a position object in canvasspace from a single point in screenspace * * @param pointer * @returns {{left: number, top: number, right: number, bottom: number}} * @private */ _pointerToPositionObject : function(pointer) { var x = this._XconvertDOMtoCanvas(pointer.x); var y = this._YconvertDOMtoCanvas(pointer.y); return {left: x, top: y, right: x, bottom: y}; }, /** * Get the top node at the a specific point (like a click) * * @param {{x: Number, y: Number}} pointer * @return {Node | null} node * @private */ _getNodeAt : function (pointer) { // we first check if this is an navigation controls element var positionObject = this._pointerToPositionObject(pointer); var overlappingNodes = this._getAllNodesOverlappingWith(positionObject); // if there are overlapping nodes, select the last one, this is the // one which is drawn on top of the others if (overlappingNodes.length > 0) { return this.nodes[overlappingNodes[overlappingNodes.length - 1]]; } else { return null; } }, /** * retrieve all edges overlapping with given object, selector is around center * @param {Object} object An object with parameters left, top, right, bottom * @return {Number[]} An array with id's of the overlapping nodes * @private */ _getEdgesOverlappingWith : function (object, overlappingEdges) { var edges = this.edges; for (var edgeId in edges) { if (edges.hasOwnProperty(edgeId)) { if (edges[edgeId].isOverlappingWith(object)) { overlappingEdges.push(edgeId); } } } }, /** * retrieve all nodes overlapping with given object * @param {Object} object An object with parameters left, top, right, bottom * @return {Number[]} An array with id's of the overlapping nodes * @private */ _getAllEdgesOverlappingWith : function (object) { var overlappingEdges = []; this._doInAllActiveSectors("_getEdgesOverlappingWith",object,overlappingEdges); return overlappingEdges; }, /** * Place holder. To implement change the _getNodeAt to a _getObjectAt. Have the _getObjectAt call * _getNodeAt and _getEdgesAt, then priortize the selection to user preferences. * * @param pointer * @returns {null} * @private */ _getEdgeAt : function(pointer) { var positionObject = this._pointerToPositionObject(pointer); var overlappingEdges = this._getAllEdgesOverlappingWith(positionObject); if (overlappingEdges.length > 0) { return this.edges[overlappingEdges[overlappingEdges.length - 1]]; } else { return null; } }, /** * Add object to the selection array. * * @param obj * @private */ _addToSelection : function(obj) { if (obj instanceof Node) { this.selectionObj.nodes[obj.id] = obj; } else { this.selectionObj.edges[obj.id] = obj; } }, /** * Add object to the selection array. * * @param obj * @private */ _addToHover : function(obj) { if (obj instanceof Node) { this.hoverObj.nodes[obj.id] = obj; } else { this.hoverObj.edges[obj.id] = obj; } }, /** * Remove a single option from selection. * * @param {Object} obj * @private */ _removeFromSelection : function(obj) { if (obj instanceof Node) { delete this.selectionObj.nodes[obj.id]; } else { delete this.selectionObj.edges[obj.id]; } }, /** * Unselect all. The selectionObj is useful for this. * * @param {Boolean} [doNotTrigger] | ignore trigger * @private */ _unselectAll : function(doNotTrigger) { if (doNotTrigger === undefined) { doNotTrigger = false; } for(var nodeId in this.selectionObj.nodes) { if(this.selectionObj.nodes.hasOwnProperty(nodeId)) { this.selectionObj.nodes[nodeId].unselect(); } } for(var edgeId in this.selectionObj.edges) { if(this.selectionObj.edges.hasOwnProperty(edgeId)) { this.selectionObj.edges[edgeId].unselect(); } } this.selectionObj = {nodes:{},edges:{}}; if (doNotTrigger == false) { this.emit('select', this.getSelection()); } }, /** * Unselect all clusters. The selectionObj is useful for this. * * @param {Boolean} [doNotTrigger] | ignore trigger * @private */ _unselectClusters : function(doNotTrigger) { if (doNotTrigger === undefined) { doNotTrigger = false; } for (var nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { if (this.selectionObj.nodes[nodeId].clusterSize > 1) { this.selectionObj.nodes[nodeId].unselect(); this._removeFromSelection(this.selectionObj.nodes[nodeId]); } } } if (doNotTrigger == false) { this.emit('select', this.getSelection()); } }, /** * return the number of selected nodes * * @returns {number} * @private */ _getSelectedNodeCount : function() { var count = 0; for (var nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { count += 1; } } return count; }, /** * return the number of selected nodes * * @returns {number} * @private */ _getSelectedNode : function() { for (var nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { return this.selectionObj.nodes[nodeId]; } } return null; }, /** * return the number of selected edges * * @returns {number} * @private */ _getSelectedEdgeCount : function() { var count = 0; for (var edgeId in this.selectionObj.edges) { if (this.selectionObj.edges.hasOwnProperty(edgeId)) { count += 1; } } return count; }, /** * return the number of selected objects. * * @returns {number} * @private */ _getSelectedObjectCount : function() { var count = 0; for(var nodeId in this.selectionObj.nodes) { if(this.selectionObj.nodes.hasOwnProperty(nodeId)) { count += 1; } } for(var edgeId in this.selectionObj.edges) { if(this.selectionObj.edges.hasOwnProperty(edgeId)) { count += 1; } } return count; }, /** * Check if anything is selected * * @returns {boolean} * @private */ _selectionIsEmpty : function() { for(var nodeId in this.selectionObj.nodes) { if(this.selectionObj.nodes.hasOwnProperty(nodeId)) { return false; } } for(var edgeId in this.selectionObj.edges) { if(this.selectionObj.edges.hasOwnProperty(edgeId)) { return false; } } return true; }, /** * check if one of the selected nodes is a cluster. * * @returns {boolean} * @private */ _clusterInSelection : function() { for(var nodeId in this.selectionObj.nodes) { if(this.selectionObj.nodes.hasOwnProperty(nodeId)) { if (this.selectionObj.nodes[nodeId].clusterSize > 1) { return true; } } } return false; }, /** * select the edges connected to the node that is being selected * * @param {Node} node * @private */ _selectConnectedEdges : function(node) { for (var i = 0; i < node.dynamicEdges.length; i++) { var edge = node.dynamicEdges[i]; edge.select(); this._addToSelection(edge); } }, /** * select the edges connected to the node that is being selected * * @param {Node} node * @private */ _hoverConnectedEdges : function(node) { for (var i = 0; i < node.dynamicEdges.length; i++) { var edge = node.dynamicEdges[i]; edge.hover = true; this._addToHover(edge); } }, /** * unselect the edges connected to the node that is being selected * * @param {Node} node * @private */ _unselectConnectedEdges : function(node) { for (var i = 0; i < node.dynamicEdges.length; i++) { var edge = node.dynamicEdges[i]; edge.unselect(); this._removeFromSelection(edge); } }, /** * This is called when someone clicks on a node. either select or deselect it. * If there is an existing selection and we don't want to append to it, clear the existing selection * * @param {Node || Edge} object * @param {Boolean} append * @param {Boolean} [doNotTrigger] | ignore trigger * @private */ _selectObject : function(object, append, doNotTrigger) { if (doNotTrigger === undefined) { doNotTrigger = false; } if (this._selectionIsEmpty() == false && append == false && this.forceAppendSelection == false) { this._unselectAll(true); } if (object.selected == false) { object.select(); this._addToSelection(object); if (object instanceof Node && this.blockConnectingEdgeSelection == false) { this._selectConnectedEdges(object); } } else { object.unselect(); this._removeFromSelection(object); } if (doNotTrigger == false) { this.emit('select', this.getSelection()); } }, /** * This is called when someone clicks on a node. either select or deselect it. * If there is an existing selection and we don't want to append to it, clear the existing selection * * @param {Node || Edge} object * @private */ _blurObject : function(object) { if (object.hover == true) { object.hover = false; this.emit("blurNode",{node:object.id}); } }, /** * This is called when someone clicks on a node. either select or deselect it. * If there is an existing selection and we don't want to append to it, clear the existing selection * * @param {Node || Edge} object * @private */ _hoverObject : function(object) { if (object.hover == false) { object.hover = true; this._addToHover(object); if (object instanceof Node) { this.emit("hoverNode",{node:object.id}); } } if (object instanceof Node) { this._hoverConnectedEdges(object); } }, /** * handles the selection part of the touch, only for navigation controls elements; * Touch is triggered before tap, also before hold. Hold triggers after a while. * This is the most responsive solution * * @param {Object} pointer * @private */ _handleTouch : function(pointer) { }, /** * handles the selection part of the tap; * * @param {Object} pointer * @private */ _handleTap : function(pointer) { var node = this._getNodeAt(pointer); if (node != null) { this._selectObject(node,false); } else { var edge = this._getEdgeAt(pointer); if (edge != null) { this._selectObject(edge,false); } else { this._unselectAll(); } } this.emit("click", this.getSelection()); this._redraw(); }, /** * handles the selection part of the double tap and opens a cluster if needed * * @param {Object} pointer * @private */ _handleDoubleTap : function(pointer) { var node = this._getNodeAt(pointer); if (node != null && node !== undefined) { // we reset the areaCenter here so the opening of the node will occur this.areaCenter = {"x" : this._XconvertDOMtoCanvas(pointer.x), "y" : this._YconvertDOMtoCanvas(pointer.y)}; this.openCluster(node); } this.emit("doubleClick", this.getSelection()); }, /** * Handle the onHold selection part * * @param pointer * @private */ _handleOnHold : function(pointer) { var node = this._getNodeAt(pointer); if (node != null) { this._selectObject(node,true); } else { var edge = this._getEdgeAt(pointer); if (edge != null) { this._selectObject(edge,true); } } this._redraw(); }, /** * handle the onRelease event. These functions are here for the navigation controls module. * * @private */ _handleOnRelease : function(pointer) { }, /** * * retrieve the currently selected objects * @return {Number[] | String[]} selection An array with the ids of the * selected nodes. */ getSelection : function() { var nodeIds = this.getSelectedNodes(); var edgeIds = this.getSelectedEdges(); return {nodes:nodeIds, edges:edgeIds}; }, /** * * retrieve the currently selected nodes * @return {String} selection An array with the ids of the * selected nodes. */ getSelectedNodes : function() { var idArray = []; for(var nodeId in this.selectionObj.nodes) { if(this.selectionObj.nodes.hasOwnProperty(nodeId)) { idArray.push(nodeId); } } return idArray }, /** * * retrieve the currently selected edges * @return {Array} selection An array with the ids of the * selected nodes. */ getSelectedEdges : function() { var idArray = []; for(var edgeId in this.selectionObj.edges) { if(this.selectionObj.edges.hasOwnProperty(edgeId)) { idArray.push(edgeId); } } return idArray; }, /** * select zero or more nodes * @param {Number[] | String[]} selection An array with the ids of the * selected nodes. */ setSelection : function(selection) { var i, iMax, id; if (!selection || (selection.length == undefined)) throw 'Selection must be an array with ids'; // first unselect any selected node this._unselectAll(true); for (i = 0, iMax = selection.length; i < iMax; i++) { id = selection[i]; var node = this.nodes[id]; if (!node) { throw new RangeError('Node with id "' + id + '" not found'); } this._selectObject(node,true,true); } this.redraw(); }, /** * Validate the selection: remove ids of nodes which no longer exist * @private */ _updateSelection : function () { for(var nodeId in this.selectionObj.nodes) { if(this.selectionObj.nodes.hasOwnProperty(nodeId)) { if (!this.nodes.hasOwnProperty(nodeId)) { delete this.selectionObj.nodes[nodeId]; } } } for(var edgeId in this.selectionObj.edges) { if(this.selectionObj.edges.hasOwnProperty(edgeId)) { if (!this.edges.hasOwnProperty(edgeId)) { delete this.selectionObj.edges[edgeId]; } } } } }; /** * Created by Alex on 1/22/14. */ var NavigationMixin = { _cleanNavigation : function() { // clean up previosu navigation items var wrapper = document.getElementById('graph-navigation_wrapper'); if (wrapper != null) { this.containerElement.removeChild(wrapper); } document.onmouseup = null; }, /** * Creation of the navigation controls nodes. They are drawn over the rest of the nodes and are not affected by scale and translation * they have a triggerFunction which is called on click. If the position of the navigation controls is dependent * on this.frame.canvas.clientWidth or this.frame.canvas.clientHeight, we flag horizontalAlignLeft and verticalAlignTop false. * This means that the location will be corrected by the _relocateNavigation function on a size change of the canvas. * * @private */ _loadNavigationElements : function() { this._cleanNavigation(); this.navigationDivs = {}; var navigationDivs = ['up','down','left','right','zoomIn','zoomOut','zoomExtends']; var navigationDivActions = ['_moveUp','_moveDown','_moveLeft','_moveRight','_zoomIn','_zoomOut','zoomExtent']; this.navigationDivs['wrapper'] = document.createElement('div'); this.navigationDivs['wrapper'].id = "graph-navigation_wrapper"; this.navigationDivs['wrapper'].style.position = "absolute"; this.navigationDivs['wrapper'].style.width = this.frame.canvas.clientWidth + "px"; this.navigationDivs['wrapper'].style.height = this.frame.canvas.clientHeight + "px"; this.containerElement.insertBefore(this.navigationDivs['wrapper'],this.frame); for (var i = 0; i < navigationDivs.length; i++) { this.navigationDivs[navigationDivs[i]] = document.createElement('div'); this.navigationDivs[navigationDivs[i]].id = "graph-navigation_" + navigationDivs[i]; this.navigationDivs[navigationDivs[i]].className = "graph-navigation " + navigationDivs[i]; this.navigationDivs['wrapper'].appendChild(this.navigationDivs[navigationDivs[i]]); this.navigationDivs[navigationDivs[i]].onmousedown = this[navigationDivActions[i]].bind(this); } document.onmouseup = this._stopMovement.bind(this); }, /** * this stops all movement induced by the navigation buttons * * @private */ _stopMovement : function() { this._xStopMoving(); this._yStopMoving(); this._stopZoom(); }, /** * stops the actions performed by page up and down etc. * * @param event * @private */ _preventDefault : function(event) { if (event !== undefined) { if (event.preventDefault) { event.preventDefault(); } else { event.returnValue = false; } } }, /** * move the screen up * By using the increments, instead of adding a fixed number to the translation, we keep fluent and * instant movement. The onKeypress event triggers immediately, then pauses, then triggers frequently * To avoid this behaviour, we do the translation in the start loop. * * @private */ _moveUp : function(event) { this.yIncrement = this.constants.keyboard.speed.y; this.start(); // if there is no node movement, the calculation wont be done this._preventDefault(event); if (this.navigationDivs) { this.navigationDivs['up'].className += " active"; } }, /** * move the screen down * @private */ _moveDown : function(event) { this.yIncrement = -this.constants.keyboard.speed.y; this.start(); // if there is no node movement, the calculation wont be done this._preventDefault(event); if (this.navigationDivs) { this.navigationDivs['down'].className += " active"; } }, /** * move the screen left * @private */ _moveLeft : function(event) { this.xIncrement = this.constants.keyboard.speed.x; this.start(); // if there is no node movement, the calculation wont be done this._preventDefault(event); if (this.navigationDivs) { this.navigationDivs['left'].className += " active"; } }, /** * move the screen right * @private */ _moveRight : function(event) { this.xIncrement = -this.constants.keyboard.speed.y; this.start(); // if there is no node movement, the calculation wont be done this._preventDefault(event); if (this.navigationDivs) { this.navigationDivs['right'].className += " active"; } }, /** * Zoom in, using the same method as the movement. * @private */ _zoomIn : function(event) { this.zoomIncrement = this.constants.keyboard.speed.zoom; this.start(); // if there is no node movement, the calculation wont be done this._preventDefault(event); if (this.navigationDivs) { this.navigationDivs['zoomIn'].className += " active"; } }, /** * Zoom out * @private */ _zoomOut : function() { this.zoomIncrement = -this.constants.keyboard.speed.zoom; this.start(); // if there is no node movement, the calculation wont be done this._preventDefault(event); if (this.navigationDivs) { this.navigationDivs['zoomOut'].className += " active"; } }, /** * Stop zooming and unhighlight the zoom controls * @private */ _stopZoom : function() { this.zoomIncrement = 0; if (this.navigationDivs) { this.navigationDivs['zoomIn'].className = this.navigationDivs['zoomIn'].className.replace(" active",""); this.navigationDivs['zoomOut'].className = this.navigationDivs['zoomOut'].className.replace(" active",""); } }, /** * Stop moving in the Y direction and unHighlight the up and down * @private */ _yStopMoving : function() { this.yIncrement = 0; if (this.navigationDivs) { this.navigationDivs['up'].className = this.navigationDivs['up'].className.replace(" active",""); this.navigationDivs['down'].className = this.navigationDivs['down'].className.replace(" active",""); } }, /** * Stop moving in the X direction and unHighlight left and right. * @private */ _xStopMoving : function() { this.xIncrement = 0; if (this.navigationDivs) { this.navigationDivs['left'].className = this.navigationDivs['left'].className.replace(" active",""); this.navigationDivs['right'].className = this.navigationDivs['right'].className.replace(" active",""); } } }; /** * Created by Alex on 2/10/14. */ var graphMixinLoaders = { /** * Load a mixin into the graph object * * @param {Object} sourceVariable | this object has to contain functions. * @private */ _loadMixin: function (sourceVariable) { for (var mixinFunction in sourceVariable) { if (sourceVariable.hasOwnProperty(mixinFunction)) { Graph.prototype[mixinFunction] = sourceVariable[mixinFunction]; } } }, /** * removes a mixin from the graph object. * * @param {Object} sourceVariable | this object has to contain functions. * @private */ _clearMixin: function (sourceVariable) { for (var mixinFunction in sourceVariable) { if (sourceVariable.hasOwnProperty(mixinFunction)) { Graph.prototype[mixinFunction] = undefined; } } }, /** * Mixin the physics system and initialize the parameters required. * * @private */ _loadPhysicsSystem: function () { this._loadMixin(physicsMixin); this._loadSelectedForceSolver(); if (this.constants.configurePhysics == true) { this._loadPhysicsConfiguration(); } }, /** * Mixin the cluster system and initialize the parameters required. * * @private */ _loadClusterSystem: function () { this.clusterSession = 0; this.hubThreshold = 5; this._loadMixin(ClusterMixin); }, /** * Mixin the sector system and initialize the parameters required * * @private */ _loadSectorSystem: function () { this.sectors = {}; this.activeSector = ["default"]; this.sectors["active"] = {}; this.sectors["active"]["default"] = {"nodes": {}, "edges": {}, "nodeIndices": [], "formationScale": 1.0, "drawingNode": undefined }; this.sectors["frozen"] = {}; this.sectors["support"] = {"nodes": {}, "edges": {}, "nodeIndices": [], "formationScale": 1.0, "drawingNode": undefined }; this.nodeIndices = this.sectors["active"]["default"]["nodeIndices"]; // the node indices list is used to speed up the computation of the repulsion fields this._loadMixin(SectorMixin); }, /** * Mixin the selection system and initialize the parameters required * * @private */ _loadSelectionSystem: function () { this.selectionObj = {nodes: {}, edges: {}}; this._loadMixin(SelectionMixin); }, /** * Mixin the navigationUI (User Interface) system and initialize the parameters required * * @private */ _loadManipulationSystem: function () { // reset global variables -- these are used by the selection of nodes and edges. this.blockConnectingEdgeSelection = false; this.forceAppendSelection = false; if (this.constants.dataManipulation.enabled == true) { // load the manipulator HTML elements. All styling done in css. if (this.manipulationDiv === undefined) { this.manipulationDiv = document.createElement('div'); this.manipulationDiv.className = 'graph-manipulationDiv'; this.manipulationDiv.id = 'graph-manipulationDiv'; if (this.editMode == true) { this.manipulationDiv.style.display = "block"; } else { this.manipulationDiv.style.display = "none"; } this.containerElement.insertBefore(this.manipulationDiv, this.frame); } if (this.editModeDiv === undefined) { this.editModeDiv = document.createElement('div'); this.editModeDiv.className = 'graph-manipulation-editMode'; this.editModeDiv.id = 'graph-manipulation-editMode'; if (this.editMode == true) { this.editModeDiv.style.display = "none"; } else { this.editModeDiv.style.display = "block"; } this.containerElement.insertBefore(this.editModeDiv, this.frame); } if (this.closeDiv === undefined) { this.closeDiv = document.createElement('div'); this.closeDiv.className = 'graph-manipulation-closeDiv'; this.closeDiv.id = 'graph-manipulation-closeDiv'; this.closeDiv.style.display = this.manipulationDiv.style.display; this.containerElement.insertBefore(this.closeDiv, this.frame); } // load the manipulation functions this._loadMixin(manipulationMixin); // create the manipulator toolbar this._createManipulatorBar(); } else { if (this.manipulationDiv !== undefined) { // removes all the bindings and overloads this._createManipulatorBar(); // remove the manipulation divs this.containerElement.removeChild(this.manipulationDiv); this.containerElement.removeChild(this.editModeDiv); this.containerElement.removeChild(this.closeDiv); this.manipulationDiv = undefined; this.editModeDiv = undefined; this.closeDiv = undefined; // remove the mixin functions this._clearMixin(manipulationMixin); } } }, /** * Mixin the navigation (User Interface) system and initialize the parameters required * * @private */ _loadNavigationControls: function () { this._loadMixin(NavigationMixin); // the clean function removes the button divs, this is done to remove the bindings. this._cleanNavigation(); if (this.constants.navigation.enabled == true) { this._loadNavigationElements(); } }, /** * Mixin the hierarchical layout system. * * @private */ _loadHierarchySystem: function () { this._loadMixin(HierarchicalLayoutMixin); } }; /** * @constructor Graph * Create a graph visualization, displaying nodes and edges. * * @param {Element} container The DOM element in which the Graph will * be created. Normally a div element. * @param {Object} data An object containing parameters * {Array} nodes * {Array} edges * @param {Object} options Options */ function Graph (container, data, options) { this._initializeMixinLoaders(); // create variables and set default values this.containerElement = container; this.width = '100%'; this.height = '100%'; // render and calculation settings this.renderRefreshRate = 60; // hz (fps) this.renderTimestep = 1000 / this.renderRefreshRate; // ms -- saves calculation later on this.renderTime = 0.5 * this.renderTimestep; // measured time it takes to render a frame this.maxPhysicsTicksPerRender = 3; // max amount of physics ticks per render step. this.physicsDiscreteStepsize = 0.65; // discrete stepsize of the simulation this.stabilize = true; // stabilize before displaying the graph this.selectable = true; this.initializing = true; // these functions are triggered when the dataset is edited this.triggerFunctions = {add:null,edit:null,connect:null,del:null}; // set constant values this.constants = { nodes: { radiusMin: 5, radiusMax: 20, radius: 5, shape: 'ellipse', image: undefined, widthMin: 16, // px widthMax: 64, // px fixed: false, fontColor: 'black', fontSize: 14, // px fontFace: 'verdana', level: -1, color: { border: '#2B7CE9', background: '#97C2FC', highlight: { border: '#2B7CE9', background: '#D2E5FF' }, hover: { border: '#2B7CE9', background: '#D2E5FF' } }, borderColor: '#2B7CE9', backgroundColor: '#97C2FC', highlightColor: '#D2E5FF', group: undefined }, edges: { widthMin: 1, widthMax: 15, width: 1, hoverWidth: 1.5, style: 'line', color: { color:'#848484', highlight:'#848484', hover: '#848484' }, fontColor: '#343434', fontSize: 14, // px fontFace: 'arial', fontFill: 'white', arrowScaleFactor: 1, dash: { length: 10, gap: 5, altLength: undefined } }, configurePhysics:false, physics: { barnesHut: { enabled: true, theta: 1 / 0.6, // inverted to save time during calculation gravitationalConstant: -2000, centralGravity: 0.3, springLength: 95, springConstant: 0.04, damping: 0.09 }, repulsion: { centralGravity: 0.1, springLength: 200, springConstant: 0.05, nodeDistance: 100, damping: 0.09 }, hierarchicalRepulsion: { enabled: false, centralGravity: 0.0, springLength: 100, springConstant: 0.01, nodeDistance: 60, damping: 0.09 }, damping: null, centralGravity: null, springLength: null, springConstant: null }, clustering: { // Per Node in Cluster = PNiC enabled: false, // (Boolean) | global on/off switch for clustering. initialMaxNodes: 100, // (# nodes) | if the initial amount of nodes is larger than this, we cluster until the total number is less than this threshold. clusterThreshold:500, // (# nodes) | during calculate forces, we check if the total number of nodes is larger than this. If it is, cluster until reduced to reduceToNodes reduceToNodes:300, // (# nodes) | during calculate forces, we check if the total number of nodes is larger than clusterThreshold. If it is, cluster until reduced to this chainThreshold: 0.4, // (% of all drawn nodes)| maximum percentage of allowed chainnodes (long strings of connected nodes) within all nodes. (lower means less chains). clusterEdgeThreshold: 20, // (px) | edge length threshold. if smaller, this node is clustered. sectorThreshold: 100, // (# nodes in cluster) | cluster size threshold. If larger, expanding in own sector. screenSizeThreshold: 0.2, // (% of canvas) | relative size threshold. If the width or height of a clusternode takes up this much of the screen, decluster node. fontSizeMultiplier: 4.0, // (px PNiC) | how much the cluster font size grows per node in cluster (in px). maxFontSize: 1000, forceAmplification: 0.1, // (multiplier PNiC) | factor of increase fo the repulsion force of a cluster (per node in cluster). distanceAmplification: 0.1, // (multiplier PNiC) | factor how much the repulsion distance of a cluster increases (per node in cluster). edgeGrowth: 20, // (px PNiC) | amount of clusterSize connected to the edge is multiplied with this and added to edgeLength. nodeScaling: {width: 1, // (px PNiC) | growth of the width per node in cluster. height: 1, // (px PNiC) | growth of the height per node in cluster. radius: 1}, // (px PNiC) | growth of the radius per node in cluster. maxNodeSizeIncrements: 600, // (# increments) | max growth of the width per node in cluster. activeAreaBoxSize: 80, // (px) | box area around the curser where clusters are popped open. clusterLevelDifference: 2 }, navigation: { enabled: false }, keyboard: { enabled: false, speed: {x: 10, y: 10, zoom: 0.02} }, dataManipulation: { enabled: false, initiallyVisible: false }, hierarchicalLayout: { enabled:false, levelSeparation: 150, nodeSpacing: 100, direction: "UD" // UD, DU, LR, RL }, freezeForStabilization: false, smoothCurves: true, maxVelocity: 10, minVelocity: 0.1, // px/s stabilizationIterations: 1000, // maximum number of iteration to stabilize labels:{ add:"Add Node", edit:"Edit", link:"Add Link", del:"Delete selected", editNode:"Edit Node", back:"Back", addDescription:"Click in an empty space to place a new node.", linkDescription:"Click on a node and drag the edge to another node to connect them.", addError:"The function for add does not support two arguments (data,callback).", linkError:"The function for connect does not support two arguments (data,callback).", editError:"The function for edit does not support two arguments (data, callback).", editBoundError:"No edit function has been bound to this button.", deleteError:"The function for delete does not support two arguments (data, callback).", deleteClusterError:"Clusters cannot be deleted." }, tooltip: { delay: 300, fontColor: 'black', fontSize: 14, // px fontFace: 'verdana', color: { border: '#666', background: '#FFFFC6' } }, moveable: true, zoomable: true, hover: false }; this.hoverObj = {nodes:{},edges:{}}; this.editMode = this.constants.dataManipulation.initiallyVisible; // Node variables var graph = this; this.groups = new Groups(); // object with groups this.images = new Images(); // object with images this.images.setOnloadCallback(function () { graph._redraw(); }); // keyboard navigation variables this.xIncrement = 0; this.yIncrement = 0; this.zoomIncrement = 0; // loading all the mixins: // load the force calculation functions, grouped under the physics system. this._loadPhysicsSystem(); // create a frame and canvas this._create(); // load the sector system. (mandatory, fully integrated with Graph) this._loadSectorSystem(); // load the cluster system. (mandatory, even when not using the cluster system, there are function calls to it) this._loadClusterSystem(); // load the selection system. (mandatory, required by Graph) this._loadSelectionSystem(); // load the selection system. (mandatory, required by Graph) this._loadHierarchySystem(); // apply options this._setTranslation(this.frame.clientWidth / 2, this.frame.clientHeight / 2); this._setScale(1); this.setOptions(options); // other vars this.freezeSimulation = false;// freeze the simulation this.cachedFunctions = {}; // containers for nodes and edges this.calculationNodes = {}; this.calculationNodeIndices = []; this.nodeIndices = []; // array with all the indices of the nodes. Used to speed up forces calculation this.nodes = {}; // object with Node objects this.edges = {}; // object with Edge objects // position and scale variables and objects this.canvasTopLeft = {"x": 0,"y": 0}; // coordinates of the top left of the canvas. they will be set during _redraw. this.canvasBottomRight = {"x": 0,"y": 0}; // coordinates of the bottom right of the canvas. they will be set during _redraw this.pointerPosition = {"x": 0,"y": 0}; // coordinates of the bottom right of the canvas. they will be set during _redraw this.areaCenter = {}; // object with x and y elements used for determining the center of the zoom action this.scale = 1; // defining the global scale variable in the constructor this.previousScale = this.scale; // this is used to check if the zoom operation is zooming in or out // datasets or dataviews this.nodesData = null; // A DataSet or DataView this.edgesData = null; // A DataSet or DataView // create event listeners used to subscribe on the DataSets of the nodes and edges this.nodesListeners = { 'add': function (event, params) { graph._addNodes(params.items); graph.start(); }, 'update': function (event, params) { graph._updateNodes(params.items); graph.start(); }, 'remove': function (event, params) { graph._removeNodes(params.items); graph.start(); } }; this.edgesListeners = { 'add': function (event, params) { graph._addEdges(params.items); graph.start(); }, 'update': function (event, params) { graph._updateEdges(params.items); graph.start(); }, 'remove': function (event, params) { graph._removeEdges(params.items); graph.start(); } }; // properties for the animation this.moving = true; this.timer = undefined; // Scheduling function. Is definded in this.start(); // load data (the disable start variable will be the same as the enabled clustering) this.setData(data,this.constants.clustering.enabled || this.constants.hierarchicalLayout.enabled); // hierarchical layout this.initializing = false; if (this.constants.hierarchicalLayout.enabled == true) { this._setupHierarchicalLayout(); } else { // zoom so all data will fit on the screen, if clustering is enabled, we do not want start to be called here. if (this.stabilize == false) { this.zoomExtent(true,this.constants.clustering.enabled); } } // if clustering is disabled, the simulation will have started in the setData function if (this.constants.clustering.enabled) { this.startWithClustering(); } } // Extend Graph with an Emitter mixin Emitter(Graph.prototype); /** * Get the script path where the vis.js library is located * * @returns {string | null} path Path or null when not found. Path does not * end with a slash. * @private */ Graph.prototype._getScriptPath = function() { var scripts = document.getElementsByTagName( 'script' ); // find script named vis.js or vis.min.js for (var i = 0; i < scripts.length; i++) { var src = scripts[i].src; var match = src && /\/?vis(.min)?\.js$/.exec(src); if (match) { // return path without the script name return src.substring(0, src.length - match[0].length); } } return null; }; /** * Find the center position of the graph * @private */ Graph.prototype._getRange = function() { var minY = 1e9, maxY = -1e9, minX = 1e9, maxX = -1e9, node; for (var nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { node = this.nodes[nodeId]; if (minX > (node.x)) {minX = node.x;} if (maxX < (node.x)) {maxX = node.x;} if (minY > (node.y)) {minY = node.y;} if (maxY < (node.y)) {maxY = node.y;} } } if (minX == 1e9 && maxX == -1e9 && minY == 1e9 && maxY == -1e9) { minY = 0, maxY = 0, minX = 0, maxX = 0; } return {minX: minX, maxX: maxX, minY: minY, maxY: maxY}; }; /** * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY}; * @returns {{x: number, y: number}} * @private */ Graph.prototype._findCenter = function(range) { return {x: (0.5 * (range.maxX + range.minX)), y: (0.5 * (range.maxY + range.minY))}; }; /** * center the graph * * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY}; */ Graph.prototype._centerGraph = function(range) { var center = this._findCenter(range); center.x *= this.scale; center.y *= this.scale; center.x -= 0.5 * this.frame.canvas.clientWidth; center.y -= 0.5 * this.frame.canvas.clientHeight; this._setTranslation(-center.x,-center.y); // set at 0,0 }; /** * This function zooms out to fit all data on screen based on amount of nodes * * @param {Boolean} [initialZoom] | zoom based on fitted formula or range, true = fitted, default = false; * @param {Boolean} [disableStart] | If true, start is not called. */ Graph.prototype.zoomExtent = function(initialZoom, disableStart) { if (initialZoom === undefined) { initialZoom = false; } if (disableStart === undefined) { disableStart = false; } var range = this._getRange(); var zoomLevel; if (initialZoom == true) { var numberOfNodes = this.nodeIndices.length; if (this.constants.smoothCurves == true) { if (this.constants.clustering.enabled == true && numberOfNodes >= this.constants.clustering.initialMaxNodes) { zoomLevel = 49.07548 / (numberOfNodes + 142.05338) + 9.1444e-04; // this is obtained from fitting a dataset from 5 points with scale levels that looked good. } else { zoomLevel = 12.662 / (numberOfNodes + 7.4147) + 0.0964822; // this is obtained from fitting a dataset from 5 points with scale levels that looked good. } } else { if (this.constants.clustering.enabled == true && numberOfNodes >= this.constants.clustering.initialMaxNodes) { zoomLevel = 77.5271985 / (numberOfNodes + 187.266146) + 4.76710517e-05; // this is obtained from fitting a dataset from 5 points with scale levels that looked good. } else { zoomLevel = 30.5062972 / (numberOfNodes + 19.93597763) + 0.08413486; // this is obtained from fitting a dataset from 5 points with scale levels that looked good. } } // correct for larger canvasses. var factor = Math.min(this.frame.canvas.clientWidth / 600, this.frame.canvas.clientHeight / 600); zoomLevel *= factor; } else { var xDistance = (Math.abs(range.minX) + Math.abs(range.maxX)) * 1.1; var yDistance = (Math.abs(range.minY) + Math.abs(range.maxY)) * 1.1; var xZoomLevel = this.frame.canvas.clientWidth / xDistance; var yZoomLevel = this.frame.canvas.clientHeight / yDistance; zoomLevel = (xZoomLevel <= yZoomLevel) ? xZoomLevel : yZoomLevel; } if (zoomLevel > 1.0) { zoomLevel = 1.0; } this._setScale(zoomLevel); this._centerGraph(range); if (disableStart == false) { this.moving = true; this.start(); } }; /** * Update the this.nodeIndices with the most recent node index list * @private */ Graph.prototype._updateNodeIndexList = function() { this._clearNodeIndexList(); for (var idx in this.nodes) { if (this.nodes.hasOwnProperty(idx)) { this.nodeIndices.push(idx); } } }; /** * Set nodes and edges, and optionally options as well. * * @param {Object} data Object containing parameters: * {Array | DataSet | DataView} [nodes] Array with nodes * {Array | DataSet | DataView} [edges] Array with edges * {String} [dot] String containing data in DOT format * {Options} [options] Object with options * @param {Boolean} [disableStart] | optional: disable the calling of the start function. */ Graph.prototype.setData = function(data, disableStart) { if (disableStart === undefined) { disableStart = false; } if (data && data.dot && (data.nodes || data.edges)) { throw new SyntaxError('Data must contain either parameter "dot" or ' + ' parameter pair "nodes" and "edges", but not both.'); } // set options this.setOptions(data && data.options); // set all data if (data && data.dot) { // parse DOT file if(data && data.dot) { var dotData = vis.util.DOTToGraph(data.dot); this.setData(dotData); return; } } else { this._setNodes(data && data.nodes); this._setEdges(data && data.edges); } this._putDataInSector(); if (!disableStart) { // find a stable position or start animating to a stable position if (this.stabilize) { var me = this; setTimeout(function() {me._stabilize(); me.start();},0) } else { this.start(); } } }; /** * Set options * @param {Object} options * @param {Boolean} [initializeView] | set zoom and translation to default. */ Graph.prototype.setOptions = function (options) { if (options) { var prop; // retrieve parameter values if (options.width !== undefined) {this.width = options.width;} if (options.height !== undefined) {this.height = options.height;} if (options.stabilize !== undefined) {this.stabilize = options.stabilize;} if (options.selectable !== undefined) {this.selectable = options.selectable;} if (options.smoothCurves !== undefined) {this.constants.smoothCurves = options.smoothCurves;} if (options.freezeForStabilization !== undefined) {this.constants.freezeForStabilization = options.freezeForStabilization;} if (options.configurePhysics !== undefined){this.constants.configurePhysics = options.configurePhysics;} if (options.stabilizationIterations !== undefined) {this.constants.stabilizationIterations = options.stabilizationIterations;} if (options.moveable !== undefined) {this.constants.moveable = options.moveable;} if (options.zoomable !== undefined) {this.constants.zoomable = options.zoomable;} if (options.hover !== undefined) {this.constants.hover = options.hover;} if (options.labels !== undefined) { for (prop in options.labels) { if (options.labels.hasOwnProperty(prop)) { this.constants.labels[prop] = options.labels[prop]; } } } if (options.onAdd) { this.triggerFunctions.add = options.onAdd; } if (options.onEdit) { this.triggerFunctions.edit = options.onEdit; } if (options.onConnect) { this.triggerFunctions.connect = options.onConnect; } if (options.onDelete) { this.triggerFunctions.del = options.onDelete; } if (options.physics) { if (options.physics.barnesHut) { this.constants.physics.barnesHut.enabled = true; for (prop in options.physics.barnesHut) { if (options.physics.barnesHut.hasOwnProperty(prop)) { this.constants.physics.barnesHut[prop] = options.physics.barnesHut[prop]; } } } if (options.physics.repulsion) { this.constants.physics.barnesHut.enabled = false; for (prop in options.physics.repulsion) { if (options.physics.repulsion.hasOwnProperty(prop)) { this.constants.physics.repulsion[prop] = options.physics.repulsion[prop]; } } } if (options.physics.hierarchicalRepulsion) { this.constants.hierarchicalLayout.enabled = true; this.constants.physics.hierarchicalRepulsion.enabled = true; this.constants.physics.barnesHut.enabled = false; for (prop in options.physics.hierarchicalRepulsion) { if (options.physics.hierarchicalRepulsion.hasOwnProperty(prop)) { this.constants.physics.hierarchicalRepulsion[prop] = options.physics.hierarchicalRepulsion[prop]; } } } } if (options.hierarchicalLayout) { this.constants.hierarchicalLayout.enabled = true; for (prop in options.hierarchicalLayout) { if (options.hierarchicalLayout.hasOwnProperty(prop)) { this.constants.hierarchicalLayout[prop] = options.hierarchicalLayout[prop]; } } } else if (options.hierarchicalLayout !== undefined) { this.constants.hierarchicalLayout.enabled = false; } if (options.clustering) { this.constants.clustering.enabled = true; for (prop in options.clustering) { if (options.clustering.hasOwnProperty(prop)) { this.constants.clustering[prop] = options.clustering[prop]; } } } else if (options.clustering !== undefined) { this.constants.clustering.enabled = false; } if (options.navigation) { this.constants.navigation.enabled = true; for (prop in options.navigation) { if (options.navigation.hasOwnProperty(prop)) { this.constants.navigation[prop] = options.navigation[prop]; } } } else if (options.navigation !== undefined) { this.constants.navigation.enabled = false; } if (options.keyboard) { this.constants.keyboard.enabled = true; for (prop in options.keyboard) { if (options.keyboard.hasOwnProperty(prop)) { this.constants.keyboard[prop] = options.keyboard[prop]; } } } else if (options.keyboard !== undefined) { this.constants.keyboard.enabled = false; } if (options.dataManipulation) { this.constants.dataManipulation.enabled = true; for (prop in options.dataManipulation) { if (options.dataManipulation.hasOwnProperty(prop)) { this.constants.dataManipulation[prop] = options.dataManipulation[prop]; } } } else if (options.dataManipulation !== undefined) { this.constants.dataManipulation.enabled = false; } // TODO: work out these options and document them if (options.edges) { for (prop in options.edges) { if (options.edges.hasOwnProperty(prop)) { if (typeof options.edges[prop] != "object") { this.constants.edges[prop] = options.edges[prop]; } } } if (options.edges.color !== undefined) { if (util.isString(options.edges.color)) { this.constants.edges.color = {}; this.constants.edges.color.color = options.edges.color; this.constants.edges.color.highlight = options.edges.color; this.constants.edges.color.hover = options.edges.color; } else { if (options.edges.color.color !== undefined) {this.constants.edges.color.color = options.edges.color.color;} if (options.edges.color.highlight !== undefined) {this.constants.edges.color.highlight = options.edges.color.highlight;} if (options.edges.color.hover !== undefined) {this.constants.edges.color.hover = options.edges.color.hover;} } } if (!options.edges.fontColor) { if (options.edges.color !== undefined) { if (util.isString(options.edges.color)) {this.constants.edges.fontColor = options.edges.color;} else if (options.edges.color.color !== undefined) {this.constants.edges.fontColor = options.edges.color.color;} } } // Added to support dashed lines // David Jordan // 2012-08-08 if (options.edges.dash) { if (options.edges.dash.length !== undefined) { this.constants.edges.dash.length = options.edges.dash.length; } if (options.edges.dash.gap !== undefined) { this.constants.edges.dash.gap = options.edges.dash.gap; } if (options.edges.dash.altLength !== undefined) { this.constants.edges.dash.altLength = options.edges.dash.altLength; } } } if (options.nodes) { for (prop in options.nodes) { if (options.nodes.hasOwnProperty(prop)) { this.constants.nodes[prop] = options.nodes[prop]; } } if (options.nodes.color) { this.constants.nodes.color = util.parseColor(options.nodes.color); } /* if (options.nodes.widthMin) this.constants.nodes.radiusMin = options.nodes.widthMin; if (options.nodes.widthMax) this.constants.nodes.radiusMax = options.nodes.widthMax; */ } if (options.groups) { for (var groupname in options.groups) { if (options.groups.hasOwnProperty(groupname)) { var group = options.groups[groupname]; this.groups.add(groupname, group); } } } if (options.tooltip) { for (prop in options.tooltip) { if (options.tooltip.hasOwnProperty(prop)) { this.constants.tooltip[prop] = options.tooltip[prop]; } } if (options.tooltip.color) { this.constants.tooltip.color = util.parseColor(options.tooltip.color); } } } // (Re)loading the mixins that can be enabled or disabled in the options. // load the force calculation functions, grouped under the physics system. this._loadPhysicsSystem(); // load the navigation system. this._loadNavigationControls(); // load the data manipulation system this._loadManipulationSystem(); // configure the smooth curves this._configureSmoothCurves(); // bind keys. If disabled, this will not do anything; this._createKeyBinds(); this.setSize(this.width, this.height); this.moving = true; this.start(); }; /** * Create the main frame for the Graph. * This function is executed once when a Graph object is created. The frame * contains a canvas, and this canvas contains all objects like the axis and * nodes. * @private */ Graph.prototype._create = function () { // remove all elements from the container element. while (this.containerElement.hasChildNodes()) { this.containerElement.removeChild(this.containerElement.firstChild); } this.frame = document.createElement('div'); this.frame.className = 'graph-frame'; this.frame.style.position = 'relative'; this.frame.style.overflow = 'hidden'; // create the graph canvas (HTML canvas element) this.frame.canvas = document.createElement( 'canvas' ); this.frame.canvas.style.position = 'relative'; this.frame.appendChild(this.frame.canvas); if (!this.frame.canvas.getContext) { var noCanvas = document.createElement( 'DIV' ); noCanvas.style.color = 'red'; noCanvas.style.fontWeight = 'bold' ; noCanvas.style.padding = '10px'; noCanvas.innerHTML = 'Error: your browser does not support HTML canvas'; this.frame.canvas.appendChild(noCanvas); } var me = this; this.drag = {}; this.pinch = {}; this.hammer = Hammer(this.frame.canvas, { prevent_default: true }); this.hammer.on('tap', me._onTap.bind(me) ); this.hammer.on('doubletap', me._onDoubleTap.bind(me) ); this.hammer.on('hold', me._onHold.bind(me) ); this.hammer.on('pinch', me._onPinch.bind(me) ); this.hammer.on('touch', me._onTouch.bind(me) ); this.hammer.on('dragstart', me._onDragStart.bind(me) ); this.hammer.on('drag', me._onDrag.bind(me) ); this.hammer.on('dragend', me._onDragEnd.bind(me) ); this.hammer.on('release', me._onRelease.bind(me) ); this.hammer.on('mousewheel',me._onMouseWheel.bind(me) ); this.hammer.on('DOMMouseScroll',me._onMouseWheel.bind(me) ); // for FF this.hammer.on('mousemove', me._onMouseMoveTitle.bind(me) ); // add the frame to the container element this.containerElement.appendChild(this.frame); }; /** * Binding the keys for keyboard navigation. These functions are defined in the NavigationMixin * @private */ Graph.prototype._createKeyBinds = function() { var me = this; this.mousetrap = mousetrap; this.mousetrap.reset(); if (this.constants.keyboard.enabled == true) { this.mousetrap.bind("up", this._moveUp.bind(me) , "keydown"); this.mousetrap.bind("up", this._yStopMoving.bind(me), "keyup"); this.mousetrap.bind("down", this._moveDown.bind(me) , "keydown"); this.mousetrap.bind("down", this._yStopMoving.bind(me), "keyup"); this.mousetrap.bind("left", this._moveLeft.bind(me) , "keydown"); this.mousetrap.bind("left", this._xStopMoving.bind(me), "keyup"); this.mousetrap.bind("right",this._moveRight.bind(me), "keydown"); this.mousetrap.bind("right",this._xStopMoving.bind(me), "keyup"); this.mousetrap.bind("=", this._zoomIn.bind(me), "keydown"); this.mousetrap.bind("=", this._stopZoom.bind(me), "keyup"); this.mousetrap.bind("-", this._zoomOut.bind(me), "keydown"); this.mousetrap.bind("-", this._stopZoom.bind(me), "keyup"); this.mousetrap.bind("[", this._zoomIn.bind(me), "keydown"); this.mousetrap.bind("[", this._stopZoom.bind(me), "keyup"); this.mousetrap.bind("]", this._zoomOut.bind(me), "keydown"); this.mousetrap.bind("]", this._stopZoom.bind(me), "keyup"); this.mousetrap.bind("pageup",this._zoomIn.bind(me), "keydown"); this.mousetrap.bind("pageup",this._stopZoom.bind(me), "keyup"); this.mousetrap.bind("pagedown",this._zoomOut.bind(me),"keydown"); this.mousetrap.bind("pagedown",this._stopZoom.bind(me), "keyup"); } if (this.constants.dataManipulation.enabled == true) { this.mousetrap.bind("escape",this._createManipulatorBar.bind(me)); this.mousetrap.bind("del",this._deleteSelected.bind(me)); } }; /** * Get the pointer location from a touch location * @param {{pageX: Number, pageY: Number}} touch * @return {{x: Number, y: Number}} pointer * @private */ Graph.prototype._getPointer = function (touch) { return { x: touch.pageX - vis.util.getAbsoluteLeft(this.frame.canvas), y: touch.pageY - vis.util.getAbsoluteTop(this.frame.canvas) }; }; /** * On start of a touch gesture, store the pointer * @param event * @private */ Graph.prototype._onTouch = function (event) { this.drag.pointer = this._getPointer(event.gesture.center); this.drag.pinched = false; this.pinch.scale = this._getScale(); this._handleTouch(this.drag.pointer); }; /** * handle drag start event * @private */ Graph.prototype._onDragStart = function () { this._handleDragStart(); }; /** * This function is called by _onDragStart. * It is separated out because we can then overload it for the datamanipulation system. * * @private */ Graph.prototype._handleDragStart = function() { var drag = this.drag; var node = this._getNodeAt(drag.pointer); // note: drag.pointer is set in _onTouch to get the initial touch location drag.dragging = true; drag.selection = []; drag.translation = this._getTranslation(); drag.nodeId = null; if (node != null) { drag.nodeId = node.id; // select the clicked node if not yet selected if (!node.isSelected()) { this._selectObject(node,false); } // create an array with the selected nodes and their original location and status for (var objectId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(objectId)) { var object = this.selectionObj.nodes[objectId]; var s = { id: object.id, node: object, // store original x, y, xFixed and yFixed, make the node temporarily Fixed x: object.x, y: object.y, xFixed: object.xFixed, yFixed: object.yFixed }; object.xFixed = true; object.yFixed = true; drag.selection.push(s); } } } }; /** * handle drag event * @private */ Graph.prototype._onDrag = function (event) { this._handleOnDrag(event) }; /** * This function is called by _onDrag. * It is separated out because we can then overload it for the datamanipulation system. * * @private */ Graph.prototype._handleOnDrag = function(event) { if (this.drag.pinched) { return; } var pointer = this._getPointer(event.gesture.center); var me = this, drag = this.drag, selection = drag.selection; if (selection && selection.length) { // calculate delta's and new location var deltaX = pointer.x - drag.pointer.x, deltaY = pointer.y - drag.pointer.y; // update position of all selected nodes selection.forEach(function (s) { var node = s.node; if (!s.xFixed) { node.x = me._XconvertDOMtoCanvas(me._XconvertCanvasToDOM(s.x) + deltaX); } if (!s.yFixed) { node.y = me._YconvertDOMtoCanvas(me._YconvertCanvasToDOM(s.y) + deltaY); } }); // start _animationStep if not yet running if (!this.moving) { this.moving = true; this.start(); } } else { if (this.constants.moveable == true) { // move the graph var diffX = pointer.x - this.drag.pointer.x; var diffY = pointer.y - this.drag.pointer.y; this._setTranslation( this.drag.translation.x + diffX, this.drag.translation.y + diffY); this._redraw(); this.moving = true; this.start(); } } }; /** * handle drag start event * @private */ Graph.prototype._onDragEnd = function () { this.drag.dragging = false; var selection = this.drag.selection; if (selection) { selection.forEach(function (s) { // restore original xFixed and yFixed s.node.xFixed = s.xFixed; s.node.yFixed = s.yFixed; }); } }; /** * handle tap/click event: select/unselect a node * @private */ Graph.prototype._onTap = function (event) { var pointer = this._getPointer(event.gesture.center); this.pointerPosition = pointer; this._handleTap(pointer); }; /** * handle doubletap event * @private */ Graph.prototype._onDoubleTap = function (event) { var pointer = this._getPointer(event.gesture.center); this._handleDoubleTap(pointer); }; /** * handle long tap event: multi select nodes * @private */ Graph.prototype._onHold = function (event) { var pointer = this._getPointer(event.gesture.center); this.pointerPosition = pointer; this._handleOnHold(pointer); }; /** * handle the release of the screen * * @private */ Graph.prototype._onRelease = function (event) { var pointer = this._getPointer(event.gesture.center); this._handleOnRelease(pointer); }; /** * Handle pinch event * @param event * @private */ Graph.prototype._onPinch = function (event) { var pointer = this._getPointer(event.gesture.center); this.drag.pinched = true; if (!('scale' in this.pinch)) { this.pinch.scale = 1; } // TODO: enabled moving while pinching? var scale = this.pinch.scale * event.gesture.scale; this._zoom(scale, pointer) }; /** * Zoom the graph in or out * @param {Number} scale a number around 1, and between 0.01 and 10 * @param {{x: Number, y: Number}} pointer Position on screen * @return {Number} appliedScale scale is limited within the boundaries * @private */ Graph.prototype._zoom = function(scale, pointer) { if (this.constants.zoomable == true) { var scaleOld = this._getScale(); if (scale < 0.00001) { scale = 0.00001; } if (scale > 10) { scale = 10; } // + this.frame.canvas.clientHeight / 2 var translation = this._getTranslation(); var scaleFrac = scale / scaleOld; var tx = (1 - scaleFrac) * pointer.x + translation.x * scaleFrac; var ty = (1 - scaleFrac) * pointer.y + translation.y * scaleFrac; this.areaCenter = {"x" : this._XconvertDOMtoCanvas(pointer.x), "y" : this._YconvertDOMtoCanvas(pointer.y)}; this._setScale(scale); this._setTranslation(tx, ty); this.updateClustersDefault(); this._redraw(); if (scaleOld < scale) { this.emit("zoom", {direction:"+"}); } else { this.emit("zoom", {direction:"-"}); } return scale; } }; /** * Event handler for mouse wheel event, used to zoom the timeline * See http://adomas.org/javascript-mouse-wheel/ * https://github.com/EightMedia/hammer.js/issues/256 * @param {MouseEvent} event * @private */ Graph.prototype._onMouseWheel = function(event) { // retrieve delta var delta = 0; if (event.wheelDelta) { /* IE/Opera. */ delta = event.wheelDelta/120; } else if (event.detail) { /* Mozilla case. */ // In Mozilla, sign of delta is different than in IE. // Also, delta is multiple of 3. delta = -event.detail/3; } // If delta is nonzero, handle it. // Basically, delta is now positive if wheel was scrolled up, // and negative, if wheel was scrolled down. if (delta) { // calculate the new scale var scale = this._getScale(); var zoom = delta / 10; if (delta < 0) { zoom = zoom / (1 - zoom); } scale *= (1 + zoom); // calculate the pointer location var gesture = util.fakeGesture(this, event); var pointer = this._getPointer(gesture.center); // apply the new scale this._zoom(scale, pointer); } // Prevent default actions caused by mouse wheel. event.preventDefault(); }; /** * Mouse move handler for checking whether the title moves over a node with a title. * @param {Event} event * @private */ Graph.prototype._onMouseMoveTitle = function (event) { var gesture = util.fakeGesture(this, event); var pointer = this._getPointer(gesture.center); // check if the previously selected node is still selected if (this.popupObj) { this._checkHidePopup(pointer); } // start a timeout that will check if the mouse is positioned above // an element var me = this; var checkShow = function() { me._checkShowPopup(pointer); }; if (this.popupTimer) { clearInterval(this.popupTimer); // stop any running calculationTimer } if (!this.drag.dragging) { this.popupTimer = setTimeout(checkShow, this.constants.tooltip.delay); } /** * Adding hover highlights */ if (this.constants.hover == true) { // removing all hover highlights for (var edgeId in this.hoverObj.edges) { if (this.hoverObj.edges.hasOwnProperty(edgeId)) { this.hoverObj.edges[edgeId].hover = false; delete this.hoverObj.edges[edgeId]; } } // adding hover highlights var obj = this._getNodeAt(pointer); if (obj == null) { obj = this._getEdgeAt(pointer); } if (obj != null) { this._hoverObject(obj); } // removing all node hover highlights except for the selected one. for (var nodeId in this.hoverObj.nodes) { if (this.hoverObj.nodes.hasOwnProperty(nodeId)) { if (obj instanceof Node && obj.id != nodeId || obj instanceof Edge || obj == null) { this._blurObject(this.hoverObj.nodes[nodeId]); delete this.hoverObj.nodes[nodeId]; } } } this.redraw(); } }; /** * Check if there is an element on the given position in the graph * (a node or edge). If so, and if this element has a title, * show a popup window with its title. * * @param {{x:Number, y:Number}} pointer * @private */ Graph.prototype._checkShowPopup = function (pointer) { var obj = { left: this._XconvertDOMtoCanvas(pointer.x), top: this._YconvertDOMtoCanvas(pointer.y), right: this._XconvertDOMtoCanvas(pointer.x), bottom: this._YconvertDOMtoCanvas(pointer.y) }; var id; var lastPopupNode = this.popupObj; if (this.popupObj == undefined) { // search the nodes for overlap, select the top one in case of multiple nodes var nodes = this.nodes; for (id in nodes) { if (nodes.hasOwnProperty(id)) { var node = nodes[id]; if (node.getTitle() !== undefined && node.isOverlappingWith(obj)) { this.popupObj = node; break; } } } } if (this.popupObj === undefined) { // search the edges for overlap var edges = this.edges; for (id in edges) { if (edges.hasOwnProperty(id)) { var edge = edges[id]; if (edge.connected && (edge.getTitle() !== undefined) && edge.isOverlappingWith(obj)) { this.popupObj = edge; break; } } } } if (this.popupObj) { // show popup message window if (this.popupObj != lastPopupNode) { var me = this; if (!me.popup) { me.popup = new Popup(me.frame, me.constants.tooltip); } // adjust a small offset such that the mouse cursor is located in the // bottom left location of the popup, and you can easily move over the // popup area me.popup.setPosition(pointer.x - 3, pointer.y - 3); me.popup.setText(me.popupObj.getTitle()); me.popup.show(); } } else { if (this.popup) { this.popup.hide(); } } }; /** * Check if the popup must be hided, which is the case when the mouse is no * longer hovering on the object * @param {{x:Number, y:Number}} pointer * @private */ Graph.prototype._checkHidePopup = function (pointer) { if (!this.popupObj || !this._getNodeAt(pointer) ) { this.popupObj = undefined; if (this.popup) { this.popup.hide(); } } }; /** * Set a new size for the graph * @param {string} width Width in pixels or percentage (for example '800px' * or '50%') * @param {string} height Height in pixels or percentage (for example '400px' * or '30%') */ Graph.prototype.setSize = function(width, height) { this.frame.style.width = width; this.frame.style.height = height; this.frame.canvas.style.width = '100%'; this.frame.canvas.style.height = '100%'; this.frame.canvas.width = this.frame.canvas.clientWidth; this.frame.canvas.height = this.frame.canvas.clientHeight; if (this.manipulationDiv !== undefined) { this.manipulationDiv.style.width = this.frame.canvas.clientWidth + "px"; } if (this.navigationDivs !== undefined) { if (this.navigationDivs['wrapper'] !== undefined) { this.navigationDivs['wrapper'].style.width = this.frame.canvas.clientWidth + "px"; this.navigationDivs['wrapper'].style.height = this.frame.canvas.clientHeight + "px"; } } this.emit('resize', {width:this.frame.canvas.width,height:this.frame.canvas.height}); }; /** * Set a data set with nodes for the graph * @param {Array | DataSet | DataView} nodes The data containing the nodes. * @private */ Graph.prototype._setNodes = function(nodes) { var oldNodesData = this.nodesData; if (nodes instanceof DataSet || nodes instanceof DataView) { this.nodesData = nodes; } else if (nodes instanceof Array) { this.nodesData = new DataSet(); this.nodesData.add(nodes); } else if (!nodes) { this.nodesData = new DataSet(); } else { throw new TypeError('Array or DataSet expected'); } if (oldNodesData) { // unsubscribe from old dataset util.forEach(this.nodesListeners, function (callback, event) { oldNodesData.off(event, callback); }); } // remove drawn nodes this.nodes = {}; if (this.nodesData) { // subscribe to new dataset var me = this; util.forEach(this.nodesListeners, function (callback, event) { me.nodesData.on(event, callback); }); // draw all new nodes var ids = this.nodesData.getIds(); this._addNodes(ids); } this._updateSelection(); }; /** * Add nodes * @param {Number[] | String[]} ids * @private */ Graph.prototype._addNodes = function(ids) { var id; for (var i = 0, len = ids.length; i < len; i++) { id = ids[i]; var data = this.nodesData.get(id); var node = new Node(data, this.images, this.groups, this.constants); this.nodes[id] = node; // note: this may replace an existing node if ((node.xFixed == false || node.yFixed == false) && (node.x === null || node.y === null)) { var radius = 10 * 0.1*ids.length; var angle = 2 * Math.PI * Math.random(); if (node.xFixed == false) {node.x = radius * Math.cos(angle);} if (node.yFixed == false) {node.y = radius * Math.sin(angle);} } this.moving = true; } this._updateNodeIndexList(); if (this.constants.hierarchicalLayout.enabled == true && this.initializing == false) { this._resetLevels(); this._setupHierarchicalLayout(); } this._updateCalculationNodes(); this._reconnectEdges(); this._updateValueRange(this.nodes); this.updateLabels(); }; /** * Update existing nodes, or create them when not yet existing * @param {Number[] | String[]} ids * @private */ Graph.prototype._updateNodes = function(ids) { var nodes = this.nodes, nodesData = this.nodesData; for (var i = 0, len = ids.length; i < len; i++) { var id = ids[i]; var node = nodes[id]; var data = nodesData.get(id); if (node) { // update node node.setProperties(data, this.constants); } else { // create node node = new Node(properties, this.images, this.groups, this.constants); nodes[id] = node; } } this.moving = true; if (this.constants.hierarchicalLayout.enabled == true && this.initializing == false) { this._resetLevels(); this._setupHierarchicalLayout(); } this._updateNodeIndexList(); this._reconnectEdges(); this._updateValueRange(nodes); }; /** * Remove existing nodes. If nodes do not exist, the method will just ignore it. * @param {Number[] | String[]} ids * @private */ Graph.prototype._removeNodes = function(ids) { var nodes = this.nodes; for (var i = 0, len = ids.length; i < len; i++) { var id = ids[i]; delete nodes[id]; } this._updateNodeIndexList(); if (this.constants.hierarchicalLayout.enabled == true && this.initializing == false) { this._resetLevels(); this._setupHierarchicalLayout(); } this._updateCalculationNodes(); this._reconnectEdges(); this._updateSelection(); this._updateValueRange(nodes); }; /** * Load edges by reading the data table * @param {Array | DataSet | DataView} edges The data containing the edges. * @private * @private */ Graph.prototype._setEdges = function(edges) { var oldEdgesData = this.edgesData; if (edges instanceof DataSet || edges instanceof DataView) { this.edgesData = edges; } else if (edges instanceof Array) { this.edgesData = new DataSet(); this.edgesData.add(edges); } else if (!edges) { this.edgesData = new DataSet(); } else { throw new TypeError('Array or DataSet expected'); } if (oldEdgesData) { // unsubscribe from old dataset util.forEach(this.edgesListeners, function (callback, event) { oldEdgesData.off(event, callback); }); } // remove drawn edges this.edges = {}; if (this.edgesData) { // subscribe to new dataset var me = this; util.forEach(this.edgesListeners, function (callback, event) { me.edgesData.on(event, callback); }); // draw all new nodes var ids = this.edgesData.getIds(); this._addEdges(ids); } this._reconnectEdges(); }; /** * Add edges * @param {Number[] | String[]} ids * @private */ Graph.prototype._addEdges = function (ids) { var edges = this.edges, edgesData = this.edgesData; for (var i = 0, len = ids.length; i < len; i++) { var id = ids[i]; var oldEdge = edges[id]; if (oldEdge) { oldEdge.disconnect(); } var data = edgesData.get(id, {"showInternalIds" : true}); edges[id] = new Edge(data, this, this.constants); } this.moving = true; this._updateValueRange(edges); this._createBezierNodes(); if (this.constants.hierarchicalLayout.enabled == true && this.initializing == false) { this._resetLevels(); this._setupHierarchicalLayout(); } this._updateCalculationNodes(); }; /** * Update existing edges, or create them when not yet existing * @param {Number[] | String[]} ids * @private */ Graph.prototype._updateEdges = function (ids) { var edges = this.edges, edgesData = this.edgesData; for (var i = 0, len = ids.length; i < len; i++) { var id = ids[i]; var data = edgesData.get(id); var edge = edges[id]; if (edge) { // update edge edge.disconnect(); edge.setProperties(data, this.constants); edge.connect(); } else { // create edge edge = new Edge(data, this, this.constants); this.edges[id] = edge; } } this._createBezierNodes(); if (this.constants.hierarchicalLayout.enabled == true && this.initializing == false) { this._resetLevels(); this._setupHierarchicalLayout(); } this.moving = true; this._updateValueRange(edges); }; /** * Remove existing edges. Non existing ids will be ignored * @param {Number[] | String[]} ids * @private */ Graph.prototype._removeEdges = function (ids) { var edges = this.edges; for (var i = 0, len = ids.length; i < len; i++) { var id = ids[i]; var edge = edges[id]; if (edge) { if (edge.via != null) { delete this.sectors['support']['nodes'][edge.via.id]; } edge.disconnect(); delete edges[id]; } } this.moving = true; this._updateValueRange(edges); if (this.constants.hierarchicalLayout.enabled == true && this.initializing == false) { this._resetLevels(); this._setupHierarchicalLayout(); } this._updateCalculationNodes(); }; /** * Reconnect all edges * @private */ Graph.prototype._reconnectEdges = function() { var id, nodes = this.nodes, edges = this.edges; for (id in nodes) { if (nodes.hasOwnProperty(id)) { nodes[id].edges = []; } } for (id in edges) { if (edges.hasOwnProperty(id)) { var edge = edges[id]; edge.from = null; edge.to = null; edge.connect(); } } }; /** * Update the values of all object in the given array according to the current * value range of the objects in the array. * @param {Object} obj An object containing a set of Edges or Nodes * The objects must have a method getValue() and * setValueRange(min, max). * @private */ Graph.prototype._updateValueRange = function(obj) { var id; // determine the range of the objects var valueMin = undefined; var valueMax = undefined; for (id in obj) { if (obj.hasOwnProperty(id)) { var value = obj[id].getValue(); if (value !== undefined) { valueMin = (valueMin === undefined) ? value : Math.min(value, valueMin); valueMax = (valueMax === undefined) ? value : Math.max(value, valueMax); } } } // adjust the range of all objects if (valueMin !== undefined && valueMax !== undefined) { for (id in obj) { if (obj.hasOwnProperty(id)) { obj[id].setValueRange(valueMin, valueMax); } } } }; /** * Redraw the graph with the current data * chart will be resized too. */ Graph.prototype.redraw = function() { this.setSize(this.width, this.height); this._redraw(); }; /** * Redraw the graph with the current data * @private */ Graph.prototype._redraw = function() { var ctx = this.frame.canvas.getContext('2d'); // clear the canvas var w = this.frame.canvas.width; var h = this.frame.canvas.height; ctx.clearRect(0, 0, w, h); // set scaling and translation ctx.save(); ctx.translate(this.translation.x, this.translation.y); ctx.scale(this.scale, this.scale); this.canvasTopLeft = { "x": this._XconvertDOMtoCanvas(0), "y": this._YconvertDOMtoCanvas(0) }; this.canvasBottomRight = { "x": this._XconvertDOMtoCanvas(this.frame.canvas.clientWidth), "y": this._YconvertDOMtoCanvas(this.frame.canvas.clientHeight) }; this._doInAllSectors("_drawAllSectorNodes",ctx); this._doInAllSectors("_drawEdges",ctx); this._doInAllSectors("_drawNodes",ctx,false); // this._doInSupportSector("_drawNodes",ctx,true); // this._drawTree(ctx,"#F00F0F"); // restore original scaling and translation ctx.restore(); }; /** * Set the translation of the graph * @param {Number} offsetX Horizontal offset * @param {Number} offsetY Vertical offset * @private */ Graph.prototype._setTranslation = function(offsetX, offsetY) { if (this.translation === undefined) { this.translation = { x: 0, y: 0 }; } if (offsetX !== undefined) { this.translation.x = offsetX; } if (offsetY !== undefined) { this.translation.y = offsetY; } this.emit('viewChanged'); }; /** * Get the translation of the graph * @return {Object} translation An object with parameters x and y, both a number * @private */ Graph.prototype._getTranslation = function() { return { x: this.translation.x, y: this.translation.y }; }; /** * Scale the graph * @param {Number} scale Scaling factor 1.0 is unscaled * @private */ Graph.prototype._setScale = function(scale) { this.scale = scale; }; /** * Get the current scale of the graph * @return {Number} scale Scaling factor 1.0 is unscaled * @private */ Graph.prototype._getScale = function() { return this.scale; }; /** * Convert the X coordinate in DOM-space (coordinate point in browser relative to the container div) to * the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) * @param {number} x * @returns {number} * @private */ Graph.prototype._XconvertDOMtoCanvas = function(x) { return (x - this.translation.x) / this.scale; }; /** * Convert the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to * the X coordinate in DOM-space (coordinate point in browser relative to the container div) * @param {number} x * @returns {number} * @private */ Graph.prototype._XconvertCanvasToDOM = function(x) { return x * this.scale + this.translation.x; }; /** * Convert the Y coordinate in DOM-space (coordinate point in browser relative to the container div) to * the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) * @param {number} y * @returns {number} * @private */ Graph.prototype._YconvertDOMtoCanvas = function(y) { return (y - this.translation.y) / this.scale; }; /** * Convert the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to * the Y coordinate in DOM-space (coordinate point in browser relative to the container div) * @param {number} y * @returns {number} * @private */ Graph.prototype._YconvertCanvasToDOM = function(y) { return y * this.scale + this.translation.y ; }; /** * * @param {object} pos = {x: number, y: number} * @returns {{x: number, y: number}} * @constructor */ Graph.prototype.canvasToDOM = function(pos) { return {x:this._XconvertCanvasToDOM(pos.x),y:this._YconvertCanvasToDOM(pos.y)}; } /** * * @param {object} pos = {x: number, y: number} * @returns {{x: number, y: number}} * @constructor */ Graph.prototype.DOMtoCanvas = function(pos) { return {x:this._XconvertDOMtoCanvas(pos.x),y:this._YconvertDOMtoCanvas(pos.y)}; } /** * Redraw all nodes * The 2d context of a HTML canvas can be retrieved by canvas.getContext('2d'); * @param {CanvasRenderingContext2D} ctx * @param {Boolean} [alwaysShow] * @private */ Graph.prototype._drawNodes = function(ctx,alwaysShow) { if (alwaysShow === undefined) { alwaysShow = false; } // first draw the unselected nodes var nodes = this.nodes; var selected = []; for (var id in nodes) { if (nodes.hasOwnProperty(id)) { nodes[id].setScaleAndPos(this.scale,this.canvasTopLeft,this.canvasBottomRight); if (nodes[id].isSelected()) { selected.push(id); } else { if (nodes[id].inArea() || alwaysShow) { nodes[id].draw(ctx); } } } } // draw the selected nodes on top for (var s = 0, sMax = selected.length; s < sMax; s++) { if (nodes[selected[s]].inArea() || alwaysShow) { nodes[selected[s]].draw(ctx); } } }; /** * Redraw all edges * The 2d context of a HTML canvas can be retrieved by canvas.getContext('2d'); * @param {CanvasRenderingContext2D} ctx * @private */ Graph.prototype._drawEdges = function(ctx) { var edges = this.edges; for (var id in edges) { if (edges.hasOwnProperty(id)) { var edge = edges[id]; edge.setScale(this.scale); if (edge.connected) { edges[id].draw(ctx); } } } }; /** * Find a stable position for all nodes * @private */ Graph.prototype._stabilize = function() { if (this.constants.freezeForStabilization == true) { this._freezeDefinedNodes(); } // find stable position var count = 0; while (this.moving && count < this.constants.stabilizationIterations) { this._physicsTick(); count++; } this.zoomExtent(false,true); if (this.constants.freezeForStabilization == true) { this._restoreFrozenNodes(); } this.emit("stabilized",{iterations:count}); }; /** * When initializing and stabilizing, we can freeze nodes with a predefined position. This greatly speeds up stabilization * because only the supportnodes for the smoothCurves have to settle. * * @private */ Graph.prototype._freezeDefinedNodes = function() { var nodes = this.nodes; for (var id in nodes) { if (nodes.hasOwnProperty(id)) { if (nodes[id].x != null && nodes[id].y != null) { nodes[id].fixedData.x = nodes[id].xFixed; nodes[id].fixedData.y = nodes[id].yFixed; nodes[id].xFixed = true; nodes[id].yFixed = true; } } } }; /** * Unfreezes the nodes that have been frozen by _freezeDefinedNodes. * * @private */ Graph.prototype._restoreFrozenNodes = function() { var nodes = this.nodes; for (var id in nodes) { if (nodes.hasOwnProperty(id)) { if (nodes[id].fixedData.x != null) { nodes[id].xFixed = nodes[id].fixedData.x; nodes[id].yFixed = nodes[id].fixedData.y; } } } }; /** * Check if any of the nodes is still moving * @param {number} vmin the minimum velocity considered as 'moving' * @return {boolean} true if moving, false if non of the nodes is moving * @private */ Graph.prototype._isMoving = function(vmin) { var nodes = this.nodes; for (var id in nodes) { if (nodes.hasOwnProperty(id) && nodes[id].isMoving(vmin)) { return true; } } return false; }; /** * /** * Perform one discrete step for all nodes * * @private */ Graph.prototype._discreteStepNodes = function() { var interval = this.physicsDiscreteStepsize; var nodes = this.nodes; var nodeId; var nodesPresent = false; if (this.constants.maxVelocity > 0) { for (nodeId in nodes) { if (nodes.hasOwnProperty(nodeId)) { nodes[nodeId].discreteStepLimited(interval, this.constants.maxVelocity); nodesPresent = true; } } } else { for (nodeId in nodes) { if (nodes.hasOwnProperty(nodeId)) { nodes[nodeId].discreteStep(interval); nodesPresent = true; } } } if (nodesPresent == true) { var vminCorrected = this.constants.minVelocity / Math.max(this.scale,0.05); if (vminCorrected > 0.5*this.constants.maxVelocity) { this.moving = true; } else { this.moving = this._isMoving(vminCorrected); } } }; /** * A single simulation step (or "tick") in the physics simulation * * @private */ Graph.prototype._physicsTick = function() { if (!this.freezeSimulation) { if (this.moving) { this._doInAllActiveSectors("_initializeForceCalculation"); this._doInAllActiveSectors("_discreteStepNodes"); if (this.constants.smoothCurves) { this._doInSupportSector("_discreteStepNodes"); } this._findCenter(this._getRange()) } } }; /** * This function runs one step of the animation. It calls an x amount of physics ticks and one render tick. * It reschedules itself at the beginning of the function * * @private */ Graph.prototype._animationStep = function() { // reset the timer so a new scheduled animation step can be set this.timer = undefined; // handle the keyboad movement this._handleNavigation(); // this schedules a new animation step this.start(); // start the physics simulation var calculationTime = Date.now(); var maxSteps = 1; this._physicsTick(); var timeRequired = Date.now() - calculationTime; while (timeRequired < (this.renderTimestep - this.renderTime) && maxSteps < this.maxPhysicsTicksPerRender) { this._physicsTick(); timeRequired = Date.now() - calculationTime; maxSteps++; } // start the rendering process var renderTime = Date.now(); this._redraw(); this.renderTime = Date.now() - renderTime; }; if (typeof window !== 'undefined') { window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; } /** * Schedule a animation step with the refreshrate interval. */ Graph.prototype.start = function() { if (this.moving || this.xIncrement != 0 || this.yIncrement != 0 || this.zoomIncrement != 0) { if (!this.timer) { var ua = navigator.userAgent.toLowerCase(); var requiresTimeout = false; if (ua.indexOf('msie 9.0') != -1) { // IE 9 requiresTimeout = true; } else if (ua.indexOf('safari') != -1) { // safari if (ua.indexOf('chrome') <= -1) { requiresTimeout = true; } } if (requiresTimeout == true) { this.timer = window.setTimeout(this._animationStep.bind(this), this.renderTimestep); // wait this.renderTimeStep milliseconds and perform the animation step function } else{ this.timer = window.requestAnimationFrame(this._animationStep.bind(this), this.renderTimestep); // wait this.renderTimeStep milliseconds and perform the animation step function } } } else { this._redraw(); } }; /** * Move the graph according to the keyboard presses. * * @private */ Graph.prototype._handleNavigation = function() { if (this.xIncrement != 0 || this.yIncrement != 0) { var translation = this._getTranslation(); this._setTranslation(translation.x+this.xIncrement, translation.y+this.yIncrement); } if (this.zoomIncrement != 0) { var center = { x: this.frame.canvas.clientWidth / 2, y: this.frame.canvas.clientHeight / 2 }; this._zoom(this.scale*(1 + this.zoomIncrement), center); } }; /** * Freeze the _animationStep */ Graph.prototype.toggleFreeze = function() { if (this.freezeSimulation == false) { this.freezeSimulation = true; } else { this.freezeSimulation = false; this.start(); } }; /** * This function cleans the support nodes if they are not needed and adds them when they are. * * @param {boolean} [disableStart] * @private */ Graph.prototype._configureSmoothCurves = function(disableStart) { if (disableStart === undefined) { disableStart = true; } if (this.constants.smoothCurves == true) { this._createBezierNodes(); } else { // delete the support nodes this.sectors['support']['nodes'] = {}; for (var edgeId in this.edges) { if (this.edges.hasOwnProperty(edgeId)) { this.edges[edgeId].smooth = false; this.edges[edgeId].via = null; } } } this._updateCalculationNodes(); if (!disableStart) { this.moving = true; this.start(); } }; /** * Bezier curves require an anchor point to calculate the smooth flow. These points are nodes. These nodes are invisible but * are used for the force calculation. * * @private */ Graph.prototype._createBezierNodes = function() { if (this.constants.smoothCurves == true) { for (var edgeId in this.edges) { if (this.edges.hasOwnProperty(edgeId)) { var edge = this.edges[edgeId]; if (edge.via == null) { edge.smooth = true; var nodeId = "edgeId:".concat(edge.id); this.sectors['support']['nodes'][nodeId] = new Node( {id:nodeId, mass:1, shape:'circle', image:"", internalMultiplier:1 },{},{},this.constants); edge.via = this.sectors['support']['nodes'][nodeId]; edge.via.parentEdgeId = edge.id; edge.positionBezierNode(); } } } } }; /** * load the functions that load the mixins into the prototype. * * @private */ Graph.prototype._initializeMixinLoaders = function () { for (var mixinFunction in graphMixinLoaders) { if (graphMixinLoaders.hasOwnProperty(mixinFunction)) { Graph.prototype[mixinFunction] = graphMixinLoaders[mixinFunction]; } } }; /** * Load the XY positions of the nodes into the dataset. */ Graph.prototype.storePosition = function() { var dataArray = []; for (var nodeId in this.nodes) { if (this.nodes.hasOwnProperty(nodeId)) { var node = this.nodes[nodeId]; var allowedToMoveX = !this.nodes.xFixed; var allowedToMoveY = !this.nodes.yFixed; if (this.nodesData.data[nodeId].x != Math.round(node.x) || this.nodesData.data[nodeId].y != Math.round(node.y)) { dataArray.push({id:nodeId,x:Math.round(node.x),y:Math.round(node.y),allowedToMoveX:allowedToMoveX,allowedToMoveY:allowedToMoveY}); } } } this.nodesData.update(dataArray); }; /** * Center a node in view. * * @param {Number} nodeId * @param {Number} [zoomLevel] */ Graph.prototype.focusOnNode = function (nodeId, zoomLevel) { if (this.nodes.hasOwnProperty(nodeId)) { if (zoomLevel === undefined) { zoomLevel = this._getScale(); } var nodePosition= {x: this.nodes[nodeId].x, y: this.nodes[nodeId].y}; var requiredScale = zoomLevel; this._setScale(requiredScale); var canvasCenter = this.DOMtoCanvas({x:0.5 * this.frame.canvas.width,y:0.5 * this.frame.canvas.height}); var translation = this._getTranslation(); var distanceFromCenter = {x:canvasCenter.x - nodePosition.x, y:canvasCenter.y - nodePosition.y}; this._setTranslation(translation.x + requiredScale * distanceFromCenter.x, translation.y + requiredScale * distanceFromCenter.y); this.redraw(); } else { console.log("This nodeId cannot be found.") } }; /** * @constructor Graph3d * The Graph is a visualization Graphs on a time line * * Graph is developed in javascript as a Google Visualization Chart. * * @param {Element} container The DOM element in which the Graph will * be created. Normally a div element. * @param {DataSet | DataView | Array} [data] * @param {Object} [options] */ function Graph3d(container, data, options) { // create variables and set default values this.containerElement = container; this.width = '400px'; this.height = '400px'; this.margin = 10; // px this.defaultXCenter = '55%'; this.defaultYCenter = '50%'; this.xLabel = 'x'; this.yLabel = 'y'; this.zLabel = 'z'; this.filterLabel = 'time'; this.legendLabel = 'value'; this.style = Graph3d.STYLE.DOT; this.showPerspective = true; this.showGrid = true; this.keepAspectRatio = true; this.showShadow = false; this.showGrayBottom = false; // TODO: this does not work correctly this.showTooltip = false; this.verticalRatio = 0.5; // 0.1 to 1.0, where 1.0 results in a 'cube' this.animationInterval = 1000; // milliseconds this.animationPreload = false; this.camera = new Graph3d.Camera(); this.eye = new Point3d(0, 0, -1); // TODO: set eye.z about 3/4 of the width of the window? this.dataTable = null; // The original data table this.dataPoints = null; // The table with point objects // the column indexes this.colX = undefined; this.colY = undefined; this.colZ = undefined; this.colValue = undefined; this.colFilter = undefined; this.xMin = 0; this.xStep = undefined; // auto by default this.xMax = 1; this.yMin = 0; this.yStep = undefined; // auto by default this.yMax = 1; this.zMin = 0; this.zStep = undefined; // auto by default this.zMax = 1; this.valueMin = 0; this.valueMax = 1; this.xBarWidth = 1; this.yBarWidth = 1; // TODO: customize axis range // constants this.colorAxis = '#4D4D4D'; this.colorGrid = '#D3D3D3'; this.colorDot = '#7DC1FF'; this.colorDotBorder = '#3267D2'; // create a frame and canvas this.create(); // apply options (also when undefined) this.setOptions(options); // apply data if (data) { this.setData(data); } } // Extend Graph with an Emitter mixin Emitter(Graph3d.prototype); /** * @class Camera * The camera is mounted on a (virtual) camera arm. The camera arm can rotate * The camera is always looking in the direction of the origin of the arm. * This way, the camera always rotates around one fixed point, the location * of the camera arm. * * Documentation: * http://en.wikipedia.org/wiki/3D_projection */ Graph3d.Camera = function () { this.armLocation = new Point3d(); this.armRotation = {}; this.armRotation.horizontal = 0; this.armRotation.vertical = 0; this.armLength = 1.7; this.cameraLocation = new Point3d(); this.cameraRotation = new Point3d(0.5*Math.PI, 0, 0); this.calculateCameraOrientation(); }; /** * Set the location (origin) of the arm * @param {Number} x Normalized value of x * @param {Number} y Normalized value of y * @param {Number} z Normalized value of z */ Graph3d.Camera.prototype.setArmLocation = function(x, y, z) { this.armLocation.x = x; this.armLocation.y = y; this.armLocation.z = z; this.calculateCameraOrientation(); }; /** * Set the rotation of the camera arm * @param {Number} horizontal The horizontal rotation, between 0 and 2*PI. * Optional, can be left undefined. * @param {Number} vertical The vertical rotation, between 0 and 0.5*PI * if vertical=0.5*PI, the graph is shown from the * top. Optional, can be left undefined. */ Graph3d.Camera.prototype.setArmRotation = function(horizontal, vertical) { if (horizontal !== undefined) { this.armRotation.horizontal = horizontal; } if (vertical !== undefined) { this.armRotation.vertical = vertical; if (this.armRotation.vertical < 0) this.armRotation.vertical = 0; if (this.armRotation.vertical > 0.5*Math.PI) this.armRotation.vertical = 0.5*Math.PI; } if (horizontal !== undefined || vertical !== undefined) { this.calculateCameraOrientation(); } }; /** * Retrieve the current arm rotation * @return {object} An object with parameters horizontal and vertical */ Graph3d.Camera.prototype.getArmRotation = function() { var rot = {}; rot.horizontal = this.armRotation.horizontal; rot.vertical = this.armRotation.vertical; return rot; }; /** * Set the (normalized) length of the camera arm. * @param {Number} length A length between 0.71 and 5.0 */ Graph3d.Camera.prototype.setArmLength = function(length) { if (length === undefined) return; this.armLength = length; // Radius must be larger than the corner of the graph, // which has a distance of sqrt(0.5^2+0.5^2) = 0.71 from the center of the // graph if (this.armLength < 0.71) this.armLength = 0.71; if (this.armLength > 5.0) this.armLength = 5.0; this.calculateCameraOrientation(); }; /** * Retrieve the arm length * @return {Number} length */ Graph3d.Camera.prototype.getArmLength = function() { return this.armLength; }; /** * Retrieve the camera location * @return {Point3d} cameraLocation */ Graph3d.Camera.prototype.getCameraLocation = function() { return this.cameraLocation; }; /** * Retrieve the camera rotation * @return {Point3d} cameraRotation */ Graph3d.Camera.prototype.getCameraRotation = function() { return this.cameraRotation; }; /** * Calculate the location and rotation of the camera based on the * position and orientation of the camera arm */ Graph3d.Camera.prototype.calculateCameraOrientation = function() { // calculate location of the camera this.cameraLocation.x = this.armLocation.x - this.armLength * Math.sin(this.armRotation.horizontal) * Math.cos(this.armRotation.vertical); this.cameraLocation.y = this.armLocation.y - this.armLength * Math.cos(this.armRotation.horizontal) * Math.cos(this.armRotation.vertical); this.cameraLocation.z = this.armLocation.z + this.armLength * Math.sin(this.armRotation.vertical); // calculate rotation of the camera this.cameraRotation.x = Math.PI/2 - this.armRotation.vertical; this.cameraRotation.y = 0; this.cameraRotation.z = -this.armRotation.horizontal; }; /** * Calculate the scaling values, dependent on the range in x, y, and z direction */ Graph3d.prototype._setScale = function() { this.scale = new Point3d(1 / (this.xMax - this.xMin), 1 / (this.yMax - this.yMin), 1 / (this.zMax - this.zMin)); // keep aspect ration between x and y scale if desired if (this.keepAspectRatio) { if (this.scale.x < this.scale.y) { //noinspection JSSuspiciousNameCombination this.scale.y = this.scale.x; } else { //noinspection JSSuspiciousNameCombination this.scale.x = this.scale.y; } } // scale the vertical axis this.scale.z *= this.verticalRatio; // TODO: can this be automated? verticalRatio? // determine scale for (optional) value this.scale.value = 1 / (this.valueMax - this.valueMin); // position the camera arm var xCenter = (this.xMax + this.xMin) / 2 * this.scale.x; var yCenter = (this.yMax + this.yMin) / 2 * this.scale.y; var zCenter = (this.zMax + this.zMin) / 2 * this.scale.z; this.camera.setArmLocation(xCenter, yCenter, zCenter); }; /** * Convert a 3D location to a 2D location on screen * http://en.wikipedia.org/wiki/3D_projection * @param {Point3d} point3d A 3D point with parameters x, y, z * @return {Point2d} point2d A 2D point with parameters x, y */ Graph3d.prototype._convert3Dto2D = function(point3d) { var translation = this._convertPointToTranslation(point3d); return this._convertTranslationToScreen(translation); }; /** * Convert a 3D location its translation seen from the camera * http://en.wikipedia.org/wiki/3D_projection * @param {Point3d} point3d A 3D point with parameters x, y, z * @return {Point3d} translation A 3D point with parameters x, y, z This is * the translation of the point, seen from the * camera */ Graph3d.prototype._convertPointToTranslation = function(point3d) { var ax = point3d.x * this.scale.x, ay = point3d.y * this.scale.y, az = point3d.z * this.scale.z, cx = this.camera.getCameraLocation().x, cy = this.camera.getCameraLocation().y, cz = this.camera.getCameraLocation().z, // calculate angles sinTx = Math.sin(this.camera.getCameraRotation().x), cosTx = Math.cos(this.camera.getCameraRotation().x), sinTy = Math.sin(this.camera.getCameraRotation().y), cosTy = Math.cos(this.camera.getCameraRotation().y), sinTz = Math.sin(this.camera.getCameraRotation().z), cosTz = Math.cos(this.camera.getCameraRotation().z), // calculate translation dx = cosTy * (sinTz * (ay - cy) + cosTz * (ax - cx)) - sinTy * (az - cz), dy = sinTx * (cosTy * (az - cz) + sinTy * (sinTz * (ay - cy) + cosTz * (ax - cx))) + cosTx * (cosTz * (ay - cy) - sinTz * (ax-cx)), dz = cosTx * (cosTy * (az - cz) + sinTy * (sinTz * (ay - cy) + cosTz * (ax - cx))) - sinTx * (cosTz * (ay - cy) - sinTz * (ax-cx)); return new Point3d(dx, dy, dz); }; /** * Convert a translation point to a point on the screen * @param {Point3d} translation A 3D point with parameters x, y, z This is * the translation of the point, seen from the * camera * @return {Point2d} point2d A 2D point with parameters x, y */ Graph3d.prototype._convertTranslationToScreen = function(translation) { var ex = this.eye.x, ey = this.eye.y, ez = this.eye.z, dx = translation.x, dy = translation.y, dz = translation.z; // calculate position on screen from translation var bx; var by; if (this.showPerspective) { bx = (dx - ex) * (ez / dz); by = (dy - ey) * (ez / dz); } else { bx = dx * -(ez / this.camera.getArmLength()); by = dy * -(ez / this.camera.getArmLength()); } // shift and scale the point to the center of the screen // use the width of the graph to scale both horizontally and vertically. return new Point2d( this.xcenter + bx * this.frame.canvas.clientWidth, this.ycenter - by * this.frame.canvas.clientWidth); }; /** * Set the background styling for the graph * @param {string | {fill: string, stroke: string, strokeWidth: string}} backgroundColor */ Graph3d.prototype._setBackgroundColor = function(backgroundColor) { var fill = 'white'; var stroke = 'gray'; var strokeWidth = 1; if (typeof(backgroundColor) === 'string') { fill = backgroundColor; stroke = 'none'; strokeWidth = 0; } else if (typeof(backgroundColor) === 'object') { if (backgroundColor.fill !== undefined) fill = backgroundColor.fill; if (backgroundColor.stroke !== undefined) stroke = backgroundColor.stroke; if (backgroundColor.strokeWidth !== undefined) strokeWidth = backgroundColor.strokeWidth; } else if (backgroundColor === undefined) { // use use defaults } else { throw 'Unsupported type of backgroundColor'; } this.frame.style.backgroundColor = fill; this.frame.style.borderColor = stroke; this.frame.style.borderWidth = strokeWidth + 'px'; this.frame.style.borderStyle = 'solid'; }; /// enumerate the available styles Graph3d.STYLE = { BAR: 0, BARCOLOR: 1, BARSIZE: 2, DOT : 3, DOTLINE : 4, DOTCOLOR: 5, DOTSIZE: 6, GRID : 7, LINE: 8, SURFACE : 9 }; /** * Retrieve the style index from given styleName * @param {string} styleName Style name such as 'dot', 'grid', 'dot-line' * @return {Number} styleNumber Enumeration value representing the style, or -1 * when not found */ Graph3d.prototype._getStyleNumber = function(styleName) { switch (styleName) { case 'dot': return Graph3d.STYLE.DOT; case 'dot-line': return Graph3d.STYLE.DOTLINE; case 'dot-color': return Graph3d.STYLE.DOTCOLOR; case 'dot-size': return Graph3d.STYLE.DOTSIZE; case 'line': return Graph3d.STYLE.LINE; case 'grid': return Graph3d.STYLE.GRID; case 'surface': return Graph3d.STYLE.SURFACE; case 'bar': return Graph3d.STYLE.BAR; case 'bar-color': return Graph3d.STYLE.BARCOLOR; case 'bar-size': return Graph3d.STYLE.BARSIZE; } return -1; }; /** * Determine the indexes of the data columns, based on the given style and data * @param {DataSet} data * @param {Number} style */ Graph3d.prototype._determineColumnIndexes = function(data, style) { if (this.style === Graph3d.STYLE.DOT || this.style === Graph3d.STYLE.DOTLINE || this.style === Graph3d.STYLE.LINE || this.style === Graph3d.STYLE.GRID || this.style === Graph3d.STYLE.SURFACE || this.style === Graph3d.STYLE.BAR) { // 3 columns expected, and optionally a 4th with filter values this.colX = 0; this.colY = 1; this.colZ = 2; this.colValue = undefined; if (data.getNumberOfColumns() > 3) { this.colFilter = 3; } } else if (this.style === Graph3d.STYLE.DOTCOLOR || this.style === Graph3d.STYLE.DOTSIZE || this.style === Graph3d.STYLE.BARCOLOR || this.style === Graph3d.STYLE.BARSIZE) { // 4 columns expected, and optionally a 5th with filter values this.colX = 0; this.colY = 1; this.colZ = 2; this.colValue = 3; if (data.getNumberOfColumns() > 4) { this.colFilter = 4; } } else { throw 'Unknown style "' + this.style + '"'; } }; Graph3d.prototype.getNumberOfRows = function(data) { return data.length; } Graph3d.prototype.getNumberOfColumns = function(data) { var counter = 0; for (var column in data[0]) { if (data[0].hasOwnProperty(column)) { counter++; } } return counter; } Graph3d.prototype.getDistinctValues = function(data, column) { var distinctValues = []; for (var i = 0; i < data.length; i++) { if (distinctValues.indexOf(data[i][column]) == -1) { distinctValues.push(data[i][column]); } } return distinctValues; } Graph3d.prototype.getColumnRange = function(data,column) { var minMax = {min:data[0][column],max:data[0][column]}; for (var i = 0; i < data.length; i++) { if (minMax.min > data[i][column]) { minMax.min = data[i][column]; } if (minMax.max < data[i][column]) { minMax.max = data[i][column]; } } return minMax; }; /** * Initialize the data from the data table. Calculate minimum and maximum values * and column index values * @param {Array | DataSet | DataView} rawData The data containing the items for the Graph. * @param {Number} style Style Number */ Graph3d.prototype._dataInitialize = function (rawData, style) { var me = this; // unsubscribe from the dataTable if (this.dataSet) { this.dataSet.off('*', this._onChange); } if (rawData === undefined) return; if (Array.isArray(rawData)) { rawData = new DataSet(rawData); } var data; if (rawData instanceof DataSet || rawData instanceof DataView) { data = rawData.get(); } else { throw new Error('Array, DataSet, or DataView expected'); } if (data.length == 0) return; this.dataSet = rawData; this.dataTable = data; // subscribe to changes in the dataset this._onChange = function () { me.setData(me.dataSet); }; this.dataSet.on('*', this._onChange); // _determineColumnIndexes // getNumberOfRows (points) // getNumberOfColumns (x,y,z,v,t,t1,t2...) // getDistinctValues (unique values?) // getColumnRange // determine the location of x,y,z,value,filter columns this.colX = 'x'; this.colY = 'y'; this.colZ = 'z'; this.colValue = 'style'; this.colFilter = 'filter'; // check if a filter column is provided if (data[0].hasOwnProperty('filter')) { if (this.dataFilter === undefined) { this.dataFilter = new Filter(rawData, this.colFilter, this); this.dataFilter.setOnLoadCallback(function() {me.redraw();}); } } var withBars = this.style == Graph3d.STYLE.BAR || this.style == Graph3d.STYLE.BARCOLOR || this.style == Graph3d.STYLE.BARSIZE; // determine barWidth from data if (withBars) { if (this.defaultXBarWidth !== undefined) { this.xBarWidth = this.defaultXBarWidth; } else { var dataX = this.getDistinctValues(data,this.colX); this.xBarWidth = (dataX[1] - dataX[0]) || 1; } if (this.defaultYBarWidth !== undefined) { this.yBarWidth = this.defaultYBarWidth; } else { var dataY = this.getDistinctValues(data,this.colY); this.yBarWidth = (dataY[1] - dataY[0]) || 1; } } // calculate minimums and maximums var xRange = this.getColumnRange(data,this.colX); if (withBars) { xRange.min -= this.xBarWidth / 2; xRange.max += this.xBarWidth / 2; } this.xMin = (this.defaultXMin !== undefined) ? this.defaultXMin : xRange.min; this.xMax = (this.defaultXMax !== undefined) ? this.defaultXMax : xRange.max; if (this.xMax <= this.xMin) this.xMax = this.xMin + 1; this.xStep = (this.defaultXStep !== undefined) ? this.defaultXStep : (this.xMax-this.xMin)/5; var yRange = this.getColumnRange(data,this.colY); if (withBars) { yRange.min -= this.yBarWidth / 2; yRange.max += this.yBarWidth / 2; } this.yMin = (this.defaultYMin !== undefined) ? this.defaultYMin : yRange.min; this.yMax = (this.defaultYMax !== undefined) ? this.defaultYMax : yRange.max; if (this.yMax <= this.yMin) this.yMax = this.yMin + 1; this.yStep = (this.defaultYStep !== undefined) ? this.defaultYStep : (this.yMax-this.yMin)/5; var zRange = this.getColumnRange(data,this.colZ); this.zMin = (this.defaultZMin !== undefined) ? this.defaultZMin : zRange.min; this.zMax = (this.defaultZMax !== undefined) ? this.defaultZMax : zRange.max; if (this.zMax <= this.zMin) this.zMax = this.zMin + 1; this.zStep = (this.defaultZStep !== undefined) ? this.defaultZStep : (this.zMax-this.zMin)/5; if (this.colValue !== undefined) { var valueRange = this.getColumnRange(data,this.colValue); this.valueMin = (this.defaultValueMin !== undefined) ? this.defaultValueMin : valueRange.min; this.valueMax = (this.defaultValueMax !== undefined) ? this.defaultValueMax : valueRange.max; if (this.valueMax <= this.valueMin) this.valueMax = this.valueMin + 1; } // set the scale dependent on the ranges. this._setScale(); }; /** * Filter the data based on the current filter * @param {Array} data * @return {Array} dataPoints Array with point objects which can be drawn on screen */ Graph3d.prototype._getDataPoints = function (data) { // TODO: store the created matrix dataPoints in the filters instead of reloading each time var x, y, i, z, obj, point; var dataPoints = []; if (this.style === Graph3d.STYLE.GRID || this.style === Graph3d.STYLE.SURFACE) { // copy all values from the google data table to a matrix // the provided values are supposed to form a grid of (x,y) positions // create two lists with all present x and y values var dataX = []; var dataY = []; for (i = 0; i < this.getNumberOfRows(data); i++) { x = data[i][this.colX] || 0; y = data[i][this.colY] || 0; if (dataX.indexOf(x) === -1) { dataX.push(x); } if (dataY.indexOf(y) === -1) { dataY.push(y); } } function sortNumber(a, b) { return a - b; } dataX.sort(sortNumber); dataY.sort(sortNumber); // create a grid, a 2d matrix, with all values. var dataMatrix = []; // temporary data matrix for (i = 0; i < data.length; i++) { x = data[i][this.colX] || 0; y = data[i][this.colY] || 0; z = data[i][this.colZ] || 0; var xIndex = dataX.indexOf(x); // TODO: implement Array().indexOf() for Internet Explorer var yIndex = dataY.indexOf(y); if (dataMatrix[xIndex] === undefined) { dataMatrix[xIndex] = []; } var point3d = new Point3d(); point3d.x = x; point3d.y = y; point3d.z = z; obj = {}; obj.point = point3d; obj.trans = undefined; obj.screen = undefined; obj.bottom = new Point3d(x, y, this.zMin); dataMatrix[xIndex][yIndex] = obj; dataPoints.push(obj); } // fill in the pointers to the neighbors. for (x = 0; x < dataMatrix.length; x++) { for (y = 0; y < dataMatrix[x].length; y++) { if (dataMatrix[x][y]) { dataMatrix[x][y].pointRight = (x < dataMatrix.length-1) ? dataMatrix[x+1][y] : undefined; dataMatrix[x][y].pointTop = (y < dataMatrix[x].length-1) ? dataMatrix[x][y+1] : undefined; dataMatrix[x][y].pointCross = (x < dataMatrix.length-1 && y < dataMatrix[x].length-1) ? dataMatrix[x+1][y+1] : undefined; } } } } else { // 'dot', 'dot-line', etc. // copy all values from the google data table to a list with Point3d objects for (i = 0; i < data.length; i++) { point = new Point3d(); point.x = data[i][this.colX] || 0; point.y = data[i][this.colY] || 0; point.z = data[i][this.colZ] || 0; if (this.colValue !== undefined) { point.value = data[i][this.colValue] || 0; } obj = {}; obj.point = point; obj.bottom = new Point3d(point.x, point.y, this.zMin); obj.trans = undefined; obj.screen = undefined; dataPoints.push(obj); } } return dataPoints; }; /** * Append suffix 'px' to provided value x * @param {int} x An integer value * @return {string} the string value of x, followed by the suffix 'px' */ Graph3d.px = function(x) { return x + 'px'; }; /** * Create the main frame for the Graph3d. * This function is executed once when a Graph3d object is created. The frame * contains a canvas, and this canvas contains all objects like the axis and * nodes. */ Graph3d.prototype.create = function () { // remove all elements from the container element. while (this.containerElement.hasChildNodes()) { this.containerElement.removeChild(this.containerElement.firstChild); } this.frame = document.createElement('div'); this.frame.style.position = 'relative'; this.frame.style.overflow = 'hidden'; // create the graph canvas (HTML canvas element) this.frame.canvas = document.createElement( 'canvas' ); this.frame.canvas.style.position = 'relative'; this.frame.appendChild(this.frame.canvas); //if (!this.frame.canvas.getContext) { { var noCanvas = document.createElement( 'DIV' ); noCanvas.style.color = 'red'; noCanvas.style.fontWeight = 'bold' ; noCanvas.style.padding = '10px'; noCanvas.innerHTML = 'Error: your browser does not support HTML canvas'; this.frame.canvas.appendChild(noCanvas); } this.frame.filter = document.createElement( 'div' ); this.frame.filter.style.position = 'absolute'; this.frame.filter.style.bottom = '0px'; this.frame.filter.style.left = '0px'; this.frame.filter.style.width = '100%'; this.frame.appendChild(this.frame.filter); // add event listeners to handle moving and zooming the contents var me = this; var onmousedown = function (event) {me._onMouseDown(event);}; var ontouchstart = function (event) {me._onTouchStart(event);}; var onmousewheel = function (event) {me._onWheel(event);}; var ontooltip = function (event) {me._onTooltip(event);}; // TODO: these events are never cleaned up... can give a 'memory leakage' G3DaddEventListener(this.frame.canvas, 'keydown', onkeydown); G3DaddEventListener(this.frame.canvas, 'mousedown', onmousedown); G3DaddEventListener(this.frame.canvas, 'touchstart', ontouchstart); G3DaddEventListener(this.frame.canvas, 'mousewheel', onmousewheel); G3DaddEventListener(this.frame.canvas, 'mousemove', ontooltip); // add the new graph to the container element this.containerElement.appendChild(this.frame); }; /** * Set a new size for the graph * @param {string} width Width in pixels or percentage (for example '800px' * or '50%') * @param {string} height Height in pixels or percentage (for example '400px' * or '30%') */ Graph3d.prototype.setSize = function(width, height) { this.frame.style.width = width; this.frame.style.height = height; this._resizeCanvas(); }; /** * Resize the canvas to the current size of the frame */ Graph3d.prototype._resizeCanvas = function() { this.frame.canvas.style.width = '100%'; this.frame.canvas.style.height = '100%'; this.frame.canvas.width = this.frame.canvas.clientWidth; this.frame.canvas.height = this.frame.canvas.clientHeight; // adjust with for margin this.frame.filter.style.width = (this.frame.canvas.clientWidth - 2 * 10) + 'px'; }; /** * Start animation */ Graph3d.prototype.animationStart = function() { if (!this.frame.filter || !this.frame.filter.slider) throw 'No animation available'; this.frame.filter.slider.play(); }; /** * Stop animation */ Graph3d.prototype.animationStop = function() { if (!this.frame.filter || !this.frame.filter.slider) return; this.frame.filter.slider.stop(); }; /** * Resize the center position based on the current values in this.defaultXCenter * and this.defaultYCenter (which are strings with a percentage or a value * in pixels). The center positions are the variables this.xCenter * and this.yCenter */ Graph3d.prototype._resizeCenter = function() { // calculate the horizontal center position if (this.defaultXCenter.charAt(this.defaultXCenter.length-1) === '%') { this.xcenter = parseFloat(this.defaultXCenter) / 100 * this.frame.canvas.clientWidth; } else { this.xcenter = parseFloat(this.defaultXCenter); // supposed to be in px } // calculate the vertical center position if (this.defaultYCenter.charAt(this.defaultYCenter.length-1) === '%') { this.ycenter = parseFloat(this.defaultYCenter) / 100 * (this.frame.canvas.clientHeight - this.frame.filter.clientHeight); } else { this.ycenter = parseFloat(this.defaultYCenter); // supposed to be in px } }; /** * Set the rotation and distance of the camera * @param {Object} pos An object with the camera position. The object * contains three parameters: * - horizontal {Number} * The horizontal rotation, between 0 and 2*PI. * Optional, can be left undefined. * - vertical {Number} * The vertical rotation, between 0 and 0.5*PI * if vertical=0.5*PI, the graph is shown from the * top. Optional, can be left undefined. * - distance {Number} * The (normalized) distance of the camera to the * center of the graph, a value between 0.71 and 5.0. * Optional, can be left undefined. */ Graph3d.prototype.setCameraPosition = function(pos) { if (pos === undefined) { return; } if (pos.horizontal !== undefined && pos.vertical !== undefined) { this.camera.setArmRotation(pos.horizontal, pos.vertical); } if (pos.distance !== undefined) { this.camera.setArmLength(pos.distance); } this.redraw(); }; /** * Retrieve the current camera rotation * @return {object} An object with parameters horizontal, vertical, and * distance */ Graph3d.prototype.getCameraPosition = function() { var pos = this.camera.getArmRotation(); pos.distance = this.camera.getArmLength(); return pos; }; /** * Load data into the 3D Graph */ Graph3d.prototype._readData = function(data) { // read the data this._dataInitialize(data, this.style); if (this.dataFilter) { // apply filtering this.dataPoints = this.dataFilter._getDataPoints(); } else { // no filtering. load all data this.dataPoints = this._getDataPoints(this.dataTable); } // draw the filter this._redrawFilter(); }; /** * Replace the dataset of the Graph3d * @param {Array | DataSet | DataView} data */ Graph3d.prototype.setData = function (data) { this._readData(data); this.redraw(); // start animation when option is true if (this.animationAutoStart && this.dataFilter) { this.animationStart(); } }; /** * Update the options. Options will be merged with current options * @param {Object} options */ Graph3d.prototype.setOptions = function (options) { var cameraPosition = undefined; this.animationStop(); if (options !== undefined) { // retrieve parameter values if (options.width !== undefined) this.width = options.width; if (options.height !== undefined) this.height = options.height; if (options.xCenter !== undefined) this.defaultXCenter = options.xCenter; if (options.yCenter !== undefined) this.defaultYCenter = options.yCenter; if (options.filterLabel !== undefined) this.filterLabel = options.filterLabel; if (options.legendLabel !== undefined) this.legendLabel = options.legendLabel; if (options.xLabel !== undefined) this.xLabel = options.xLabel; if (options.yLabel !== undefined) this.yLabel = options.yLabel; if (options.zLabel !== undefined) this.zLabel = options.zLabel; if (options.style !== undefined) { var styleNumber = this._getStyleNumber(options.style); if (styleNumber !== -1) { this.style = styleNumber; } } if (options.showGrid !== undefined) this.showGrid = options.showGrid; if (options.showPerspective !== undefined) this.showPerspective = options.showPerspective; if (options.showShadow !== undefined) this.showShadow = options.showShadow; if (options.tooltip !== undefined) this.showTooltip = options.tooltip; if (options.showAnimationControls !== undefined) this.showAnimationControls = options.showAnimationControls; if (options.keepAspectRatio !== undefined) this.keepAspectRatio = options.keepAspectRatio; if (options.verticalRatio !== undefined) this.verticalRatio = options.verticalRatio; if (options.animationInterval !== undefined) this.animationInterval = options.animationInterval; if (options.animationPreload !== undefined) this.animationPreload = options.animationPreload; if (options.animationAutoStart !== undefined)this.animationAutoStart = options.animationAutoStart; if (options.xBarWidth !== undefined) this.defaultXBarWidth = options.xBarWidth; if (options.yBarWidth !== undefined) this.defaultYBarWidth = options.yBarWidth; if (options.xMin !== undefined) this.defaultXMin = options.xMin; if (options.xStep !== undefined) this.defaultXStep = options.xStep; if (options.xMax !== undefined) this.defaultXMax = options.xMax; if (options.yMin !== undefined) this.defaultYMin = options.yMin; if (options.yStep !== undefined) this.defaultYStep = options.yStep; if (options.yMax !== undefined) this.defaultYMax = options.yMax; if (options.zMin !== undefined) this.defaultZMin = options.zMin; if (options.zStep !== undefined) this.defaultZStep = options.zStep; if (options.zMax !== undefined) this.defaultZMax = options.zMax; if (options.valueMin !== undefined) this.defaultValueMin = options.valueMin; if (options.valueMax !== undefined) this.defaultValueMax = options.valueMax; if (options.cameraPosition !== undefined) cameraPosition = options.cameraPosition; if (cameraPosition !== undefined) { this.camera.setArmRotation(cameraPosition.horizontal, cameraPosition.vertical); this.camera.setArmLength(cameraPosition.distance); } else { this.camera.setArmRotation(1.0, 0.5); this.camera.setArmLength(1.7); } } this._setBackgroundColor(options && options.backgroundColor); this.setSize(this.width, this.height); // re-load the data if (this.dataTable) { this.setData(this.dataTable); } // start animation when option is true if (this.animationAutoStart && this.dataFilter) { this.animationStart(); } }; /** * Redraw the Graph. */ Graph3d.prototype.redraw = function() { if (this.dataPoints === undefined) { throw 'Error: graph data not initialized'; } this._resizeCanvas(); this._resizeCenter(); this._redrawSlider(); this._redrawClear(); this._redrawAxis(); if (this.style === Graph3d.STYLE.GRID || this.style === Graph3d.STYLE.SURFACE) { this._redrawDataGrid(); } else if (this.style === Graph3d.STYLE.LINE) { this._redrawDataLine(); } else if (this.style === Graph3d.STYLE.BAR || this.style === Graph3d.STYLE.BARCOLOR || this.style === Graph3d.STYLE.BARSIZE) { this._redrawDataBar(); } else { // style is DOT, DOTLINE, DOTCOLOR, DOTSIZE this._redrawDataDot(); } this._redrawInfo(); this._redrawLegend(); }; /** * Clear the canvas before redrawing */ Graph3d.prototype._redrawClear = function() { var canvas = this.frame.canvas; var ctx = canvas.getContext('2d'); ctx.clearRect(0, 0, canvas.width, canvas.height); }; /** * Redraw the legend showing the colors */ Graph3d.prototype._redrawLegend = function() { var y; if (this.style === Graph3d.STYLE.DOTCOLOR || this.style === Graph3d.STYLE.DOTSIZE) { var dotSize = this.frame.clientWidth * 0.02; var widthMin, widthMax; if (this.style === Graph3d.STYLE.DOTSIZE) { widthMin = dotSize / 2; // px widthMax = dotSize / 2 + dotSize * 2; // Todo: put this in one function } else { widthMin = 20; // px widthMax = 20; // px } var height = Math.max(this.frame.clientHeight * 0.25, 100); var top = this.margin; var right = this.frame.clientWidth - this.margin; var left = right - widthMax; var bottom = top + height; } var canvas = this.frame.canvas; var ctx = canvas.getContext('2d'); ctx.lineWidth = 1; ctx.font = '14px arial'; // TODO: put in options if (this.style === Graph3d.STYLE.DOTCOLOR) { // draw the color bar var ymin = 0; var ymax = height; // Todo: make height customizable for (y = ymin; y < ymax; y++) { var f = (y - ymin) / (ymax - ymin); //var width = (dotSize / 2 + (1-f) * dotSize * 2); // Todo: put this in one function var hue = f * 240; var color = this._hsv2rgb(hue, 1, 1); ctx.strokeStyle = color; ctx.beginPath(); ctx.moveTo(left, top + y); ctx.lineTo(right, top + y); ctx.stroke(); } ctx.strokeStyle = this.colorAxis; ctx.strokeRect(left, top, widthMax, height); } if (this.style === Graph3d.STYLE.DOTSIZE) { // draw border around color bar ctx.strokeStyle = this.colorAxis; ctx.fillStyle = this.colorDot; ctx.beginPath(); ctx.moveTo(left, top); ctx.lineTo(right, top); ctx.lineTo(right - widthMax + widthMin, bottom); ctx.lineTo(left, bottom); ctx.closePath(); ctx.fill(); ctx.stroke(); } if (this.style === Graph3d.STYLE.DOTCOLOR || this.style === Graph3d.STYLE.DOTSIZE) { // print values along the color bar var gridLineLen = 5; // px var step = new StepNumber(this.valueMin, this.valueMax, (this.valueMax-this.valueMin)/5, true); step.start(); if (step.getCurrent() < this.valueMin) { step.next(); } while (!step.end()) { y = bottom - (step.getCurrent() - this.valueMin) / (this.valueMax - this.valueMin) * height; ctx.beginPath(); ctx.moveTo(left - gridLineLen, y); ctx.lineTo(left, y); ctx.stroke(); ctx.textAlign = 'right'; ctx.textBaseline = 'middle'; ctx.fillStyle = this.colorAxis; ctx.fillText(step.getCurrent(), left - 2 * gridLineLen, y); step.next(); } ctx.textAlign = 'right'; ctx.textBaseline = 'top'; var label = this.legendLabel; ctx.fillText(label, right, bottom + this.margin); } }; /** * Redraw the filter */ Graph3d.prototype._redrawFilter = function() { this.frame.filter.innerHTML = ''; if (this.dataFilter) { var options = { 'visible': this.showAnimationControls }; var slider = new Slider(this.frame.filter, options); this.frame.filter.slider = slider; // TODO: css here is not nice here... this.frame.filter.style.padding = '10px'; //this.frame.filter.style.backgroundColor = '#EFEFEF'; slider.setValues(this.dataFilter.values); slider.setPlayInterval(this.animationInterval); // create an event handler var me = this; var onchange = function () { var index = slider.getIndex(); me.dataFilter.selectValue(index); me.dataPoints = me.dataFilter._getDataPoints(); me.redraw(); }; slider.setOnChangeCallback(onchange); } else { this.frame.filter.slider = undefined; } }; /** * Redraw the slider */ Graph3d.prototype._redrawSlider = function() { if ( this.frame.filter.slider !== undefined) { this.frame.filter.slider.redraw(); } }; /** * Redraw common information */ Graph3d.prototype._redrawInfo = function() { if (this.dataFilter) { var canvas = this.frame.canvas; var ctx = canvas.getContext('2d'); ctx.font = '14px arial'; // TODO: put in options ctx.lineStyle = 'gray'; ctx.fillStyle = 'gray'; ctx.textAlign = 'left'; ctx.textBaseline = 'top'; var x = this.margin; var y = this.margin; ctx.fillText(this.dataFilter.getLabel() + ': ' + this.dataFilter.getSelectedValue(), x, y); } }; /** * Redraw the axis */ Graph3d.prototype._redrawAxis = function() { var canvas = this.frame.canvas, ctx = canvas.getContext('2d'), from, to, step, prettyStep, text, xText, yText, zText, offset, xOffset, yOffset, xMin2d, xMax2d; // TODO: get the actual rendered style of the containerElement //ctx.font = this.containerElement.style.font; ctx.font = 24 / this.camera.getArmLength() + 'px arial'; // calculate the length for the short grid lines var gridLenX = 0.025 / this.scale.x; var gridLenY = 0.025 / this.scale.y; var textMargin = 5 / this.camera.getArmLength(); // px var armAngle = this.camera.getArmRotation().horizontal; // draw x-grid lines ctx.lineWidth = 1; prettyStep = (this.defaultXStep === undefined); step = new StepNumber(this.xMin, this.xMax, this.xStep, prettyStep); step.start(); if (step.getCurrent() < this.xMin) { step.next(); } while (!step.end()) { var x = step.getCurrent(); if (this.showGrid) { from = this._convert3Dto2D(new Point3d(x, this.yMin, this.zMin)); to = this._convert3Dto2D(new Point3d(x, this.yMax, this.zMin)); ctx.strokeStyle = this.colorGrid; ctx.beginPath(); ctx.moveTo(from.x, from.y); ctx.lineTo(to.x, to.y); ctx.stroke(); } else { from = this._convert3Dto2D(new Point3d(x, this.yMin, this.zMin)); to = this._convert3Dto2D(new Point3d(x, this.yMin+gridLenX, this.zMin)); ctx.strokeStyle = this.colorAxis; ctx.beginPath(); ctx.moveTo(from.x, from.y); ctx.lineTo(to.x, to.y); ctx.stroke(); from = this._convert3Dto2D(new Point3d(x, this.yMax, this.zMin)); to = this._convert3Dto2D(new Point3d(x, this.yMax-gridLenX, this.zMin)); ctx.strokeStyle = this.colorAxis; ctx.beginPath(); ctx.moveTo(from.x, from.y); ctx.lineTo(to.x, to.y); ctx.stroke(); } yText = (Math.cos(armAngle) > 0) ? this.yMin : this.yMax; text = this._convert3Dto2D(new Point3d(x, yText, this.zMin)); if (Math.cos(armAngle * 2) > 0) { ctx.textAlign = 'center'; ctx.textBaseline = 'top'; text.y += textMargin; } else if (Math.sin(armAngle * 2) < 0){ ctx.textAlign = 'right'; ctx.textBaseline = 'middle'; } else { ctx.textAlign = 'left'; ctx.textBaseline = 'middle'; } ctx.fillStyle = this.colorAxis; ctx.fillText(' ' + step.getCurrent() + ' ', text.x, text.y); step.next(); } // draw y-grid lines ctx.lineWidth = 1; prettyStep = (this.defaultYStep === undefined); step = new StepNumber(this.yMin, this.yMax, this.yStep, prettyStep); step.start(); if (step.getCurrent() < this.yMin) { step.next(); } while (!step.end()) { if (this.showGrid) { from = this._convert3Dto2D(new Point3d(this.xMin, step.getCurrent(), this.zMin)); to = this._convert3Dto2D(new Point3d(this.xMax, step.getCurrent(), this.zMin)); ctx.strokeStyle = this.colorGrid; ctx.beginPath(); ctx.moveTo(from.x, from.y); ctx.lineTo(to.x, to.y); ctx.stroke(); } else { from = this._convert3Dto2D(new Point3d(this.xMin, step.getCurrent(), this.zMin)); to = this._convert3Dto2D(new Point3d(this.xMin+gridLenY, step.getCurrent(), this.zMin)); ctx.strokeStyle = this.colorAxis; ctx.beginPath(); ctx.moveTo(from.x, from.y); ctx.lineTo(to.x, to.y); ctx.stroke(); from = this._convert3Dto2D(new Point3d(this.xMax, step.getCurrent(), this.zMin)); to = this._convert3Dto2D(new Point3d(this.xMax-gridLenY, step.getCurrent(), this.zMin)); ctx.strokeStyle = this.colorAxis; ctx.beginPath(); ctx.moveTo(from.x, from.y); ctx.lineTo(to.x, to.y); ctx.stroke(); } xText = (Math.sin(armAngle ) > 0) ? this.xMin : this.xMax; text = this._convert3Dto2D(new Point3d(xText, step.getCurrent(), this.zMin)); if (Math.cos(armAngle * 2) < 0) { ctx.textAlign = 'center'; ctx.textBaseline = 'top'; text.y += textMargin; } else if (Math.sin(armAngle * 2) > 0){ ctx.textAlign = 'right'; ctx.textBaseline = 'middle'; } else { ctx.textAlign = 'left'; ctx.textBaseline = 'middle'; } ctx.fillStyle = this.colorAxis; ctx.fillText(' ' + step.getCurrent() + ' ', text.x, text.y); step.next(); } // draw z-grid lines and axis ctx.lineWidth = 1; prettyStep = (this.defaultZStep === undefined); step = new StepNumber(this.zMin, this.zMax, this.zStep, prettyStep); step.start(); if (step.getCurrent() < this.zMin) { step.next(); } xText = (Math.cos(armAngle ) > 0) ? this.xMin : this.xMax; yText = (Math.sin(armAngle ) < 0) ? this.yMin : this.yMax; while (!step.end()) { // TODO: make z-grid lines really 3d? from = this._convert3Dto2D(new Point3d(xText, yText, step.getCurrent())); ctx.strokeStyle = this.colorAxis; ctx.beginPath(); ctx.moveTo(from.x, from.y); ctx.lineTo(from.x - textMargin, from.y); ctx.stroke(); ctx.textAlign = 'right'; ctx.textBaseline = 'middle'; ctx.fillStyle = this.colorAxis; ctx.fillText(step.getCurrent() + ' ', from.x - 5, from.y); step.next(); } ctx.lineWidth = 1; from = this._convert3Dto2D(new Point3d(xText, yText, this.zMin)); to = this._convert3Dto2D(new Point3d(xText, yText, this.zMax)); ctx.strokeStyle = this.colorAxis; ctx.beginPath(); ctx.moveTo(from.x, from.y); ctx.lineTo(to.x, to.y); ctx.stroke(); // draw x-axis ctx.lineWidth = 1; // line at yMin xMin2d = this._convert3Dto2D(new Point3d(this.xMin, this.yMin, this.zMin)); xMax2d = this._convert3Dto2D(new Point3d(this.xMax, this.yMin, this.zMin)); ctx.strokeStyle = this.colorAxis; ctx.beginPath(); ctx.moveTo(xMin2d.x, xMin2d.y); ctx.lineTo(xMax2d.x, xMax2d.y); ctx.stroke(); // line at ymax xMin2d = this._convert3Dto2D(new Point3d(this.xMin, this.yMax, this.zMin)); xMax2d = this._convert3Dto2D(new Point3d(this.xMax, this.yMax, this.zMin)); ctx.strokeStyle = this.colorAxis; ctx.beginPath(); ctx.moveTo(xMin2d.x, xMin2d.y); ctx.lineTo(xMax2d.x, xMax2d.y); ctx.stroke(); // draw y-axis ctx.lineWidth = 1; // line at xMin from = this._convert3Dto2D(new Point3d(this.xMin, this.yMin, this.zMin)); to = this._convert3Dto2D(new Point3d(this.xMin, this.yMax, this.zMin)); ctx.strokeStyle = this.colorAxis; ctx.beginPath(); ctx.moveTo(from.x, from.y); ctx.lineTo(to.x, to.y); ctx.stroke(); // line at xMax from = this._convert3Dto2D(new Point3d(this.xMax, this.yMin, this.zMin)); to = this._convert3Dto2D(new Point3d(this.xMax, this.yMax, this.zMin)); ctx.strokeStyle = this.colorAxis; ctx.beginPath(); ctx.moveTo(from.x, from.y); ctx.lineTo(to.x, to.y); ctx.stroke(); // draw x-label var xLabel = this.xLabel; if (xLabel.length > 0) { yOffset = 0.1 / this.scale.y; xText = (this.xMin + this.xMax) / 2; yText = (Math.cos(armAngle) > 0) ? this.yMin - yOffset: this.yMax + yOffset; text = this._convert3Dto2D(new Point3d(xText, yText, this.zMin)); if (Math.cos(armAngle * 2) > 0) { ctx.textAlign = 'center'; ctx.textBaseline = 'top'; } else if (Math.sin(armAngle * 2) < 0){ ctx.textAlign = 'right'; ctx.textBaseline = 'middle'; } else { ctx.textAlign = 'left'; ctx.textBaseline = 'middle'; } ctx.fillStyle = this.colorAxis; ctx.fillText(xLabel, text.x, text.y); } // draw y-label var yLabel = this.yLabel; if (yLabel.length > 0) { xOffset = 0.1 / this.scale.x; xText = (Math.sin(armAngle ) > 0) ? this.xMin - xOffset : this.xMax + xOffset; yText = (this.yMin + this.yMax) / 2; text = this._convert3Dto2D(new Point3d(xText, yText, this.zMin)); if (Math.cos(armAngle * 2) < 0) { ctx.textAlign = 'center'; ctx.textBaseline = 'top'; } else if (Math.sin(armAngle * 2) > 0){ ctx.textAlign = 'right'; ctx.textBaseline = 'middle'; } else { ctx.textAlign = 'left'; ctx.textBaseline = 'middle'; } ctx.fillStyle = this.colorAxis; ctx.fillText(yLabel, text.x, text.y); } // draw z-label var zLabel = this.zLabel; if (zLabel.length > 0) { offset = 30; // pixels. // TODO: relate to the max width of the values on the z axis? xText = (Math.cos(armAngle ) > 0) ? this.xMin : this.xMax; yText = (Math.sin(armAngle ) < 0) ? this.yMin : this.yMax; zText = (this.zMin + this.zMax) / 2; text = this._convert3Dto2D(new Point3d(xText, yText, zText)); ctx.textAlign = 'right'; ctx.textBaseline = 'middle'; ctx.fillStyle = this.colorAxis; ctx.fillText(zLabel, text.x - offset, text.y); } }; /** * Calculate the color based on the given value. * @param {Number} H Hue, a value be between 0 and 360 * @param {Number} S Saturation, a value between 0 and 1 * @param {Number} V Value, a value between 0 and 1 */ Graph3d.prototype._hsv2rgb = function(H, S, V) { var R, G, B, C, Hi, X; C = V * S; Hi = Math.floor(H/60); // hi = 0,1,2,3,4,5 X = C * (1 - Math.abs(((H/60) % 2) - 1)); switch (Hi) { case 0: R = C; G = X; B = 0; break; case 1: R = X; G = C; B = 0; break; case 2: R = 0; G = C; B = X; break; case 3: R = 0; G = X; B = C; break; case 4: R = X; G = 0; B = C; break; case 5: R = C; G = 0; B = X; break; default: R = 0; G = 0; B = 0; break; } return 'RGB(' + parseInt(R*255) + ',' + parseInt(G*255) + ',' + parseInt(B*255) + ')'; }; /** * Draw all datapoints as a grid * This function can be used when the style is 'grid' */ Graph3d.prototype._redrawDataGrid = function() { var canvas = this.frame.canvas, ctx = canvas.getContext('2d'), point, right, top, cross, i, topSideVisible, fillStyle, strokeStyle, lineWidth, h, s, v, zAvg; if (this.dataPoints === undefined || this.dataPoints.length <= 0) return; // TODO: throw exception? // calculate the translations and screen position of all points for (i = 0; i < this.dataPoints.length; i++) { var trans = this._convertPointToTranslation(this.dataPoints[i].point); var screen = this._convertTranslationToScreen(trans); this.dataPoints[i].trans = trans; this.dataPoints[i].screen = screen; // calculate the translation of the point at the bottom (needed for sorting) var transBottom = this._convertPointToTranslation(this.dataPoints[i].bottom); this.dataPoints[i].dist = this.showPerspective ? transBottom.length() : -transBottom.z; } // sort the points on depth of their (x,y) position (not on z) var sortDepth = function (a, b) { return b.dist - a.dist; }; this.dataPoints.sort(sortDepth); if (this.style === Graph3d.STYLE.SURFACE) { for (i = 0; i < this.dataPoints.length; i++) { point = this.dataPoints[i]; right = this.dataPoints[i].pointRight; top = this.dataPoints[i].pointTop; cross = this.dataPoints[i].pointCross; if (point !== undefined && right !== undefined && top !== undefined && cross !== undefined) { if (this.showGrayBottom || this.showShadow) { // calculate the cross product of the two vectors from center // to left and right, in order to know whether we are looking at the // bottom or at the top side. We can also use the cross product // for calculating light intensity var aDiff = Point3d.subtract(cross.trans, point.trans); var bDiff = Point3d.subtract(top.trans, right.trans); var crossproduct = Point3d.crossProduct(aDiff, bDiff); var len = crossproduct.length(); // FIXME: there is a bug with determining the surface side (shadow or colored) topSideVisible = (crossproduct.z > 0); } else { topSideVisible = true; } if (topSideVisible) { // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 zAvg = (point.point.z + right.point.z + top.point.z + cross.point.z) / 4; h = (1 - (zAvg - this.zMin) * this.scale.z / this.verticalRatio) * 240; s = 1; // saturation if (this.showShadow) { v = Math.min(1 + (crossproduct.x / len) / 2, 1); // value. TODO: scale fillStyle = this._hsv2rgb(h, s, v); strokeStyle = fillStyle; } else { v = 1; fillStyle = this._hsv2rgb(h, s, v); strokeStyle = this.colorAxis; } } else { fillStyle = 'gray'; strokeStyle = this.colorAxis; } lineWidth = 0.5; ctx.lineWidth = lineWidth; ctx.fillStyle = fillStyle; ctx.strokeStyle = strokeStyle; ctx.beginPath(); ctx.moveTo(point.screen.x, point.screen.y); ctx.lineTo(right.screen.x, right.screen.y); ctx.lineTo(cross.screen.x, cross.screen.y); ctx.lineTo(top.screen.x, top.screen.y); ctx.closePath(); ctx.fill(); ctx.stroke(); } } } else { // grid style for (i = 0; i < this.dataPoints.length; i++) { point = this.dataPoints[i]; right = this.dataPoints[i].pointRight; top = this.dataPoints[i].pointTop; if (point !== undefined) { if (this.showPerspective) { lineWidth = 2 / -point.trans.z; } else { lineWidth = 2 * -(this.eye.z / this.camera.getArmLength()); } } if (point !== undefined && right !== undefined) { // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 zAvg = (point.point.z + right.point.z) / 2; h = (1 - (zAvg - this.zMin) * this.scale.z / this.verticalRatio) * 240; ctx.lineWidth = lineWidth; ctx.strokeStyle = this._hsv2rgb(h, 1, 1); ctx.beginPath(); ctx.moveTo(point.screen.x, point.screen.y); ctx.lineTo(right.screen.x, right.screen.y); ctx.stroke(); } if (point !== undefined && top !== undefined) { // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 zAvg = (point.point.z + top.point.z) / 2; h = (1 - (zAvg - this.zMin) * this.scale.z / this.verticalRatio) * 240; ctx.lineWidth = lineWidth; ctx.strokeStyle = this._hsv2rgb(h, 1, 1); ctx.beginPath(); ctx.moveTo(point.screen.x, point.screen.y); ctx.lineTo(top.screen.x, top.screen.y); ctx.stroke(); } } } }; /** * Draw all datapoints as dots. * This function can be used when the style is 'dot' or 'dot-line' */ Graph3d.prototype._redrawDataDot = function() { var canvas = this.frame.canvas; var ctx = canvas.getContext('2d'); var i; if (this.dataPoints === undefined || this.dataPoints.length <= 0) return; // TODO: throw exception? // calculate the translations of all points for (i = 0; i < this.dataPoints.length; i++) { var trans = this._convertPointToTranslation(this.dataPoints[i].point); var screen = this._convertTranslationToScreen(trans); this.dataPoints[i].trans = trans; this.dataPoints[i].screen = screen; // calculate the distance from the point at the bottom to the camera var transBottom = this._convertPointToTranslation(this.dataPoints[i].bottom); this.dataPoints[i].dist = this.showPerspective ? transBottom.length() : -transBottom.z; } // order the translated points by depth var sortDepth = function (a, b) { return b.dist - a.dist; }; this.dataPoints.sort(sortDepth); // draw the datapoints as colored circles var dotSize = this.frame.clientWidth * 0.02; // px for (i = 0; i < this.dataPoints.length; i++) { var point = this.dataPoints[i]; if (this.style === Graph3d.STYLE.DOTLINE) { // draw a vertical line from the bottom to the graph value //var from = this._convert3Dto2D(new Point3d(point.point.x, point.point.y, this.zMin)); var from = this._convert3Dto2D(point.bottom); ctx.lineWidth = 1; ctx.strokeStyle = this.colorGrid; ctx.beginPath(); ctx.moveTo(from.x, from.y); ctx.lineTo(point.screen.x, point.screen.y); ctx.stroke(); } // calculate radius for the circle var size; if (this.style === Graph3d.STYLE.DOTSIZE) { size = dotSize/2 + 2*dotSize * (point.point.value - this.valueMin) / (this.valueMax - this.valueMin); } else { size = dotSize; } var radius; if (this.showPerspective) { radius = size / -point.trans.z; } else { radius = size * -(this.eye.z / this.camera.getArmLength()); } if (radius < 0) { radius = 0; } var hue, color, borderColor; if (this.style === Graph3d.STYLE.DOTCOLOR ) { // calculate the color based on the value hue = (1 - (point.point.value - this.valueMin) * this.scale.value) * 240; color = this._hsv2rgb(hue, 1, 1); borderColor = this._hsv2rgb(hue, 1, 0.8); } else if (this.style === Graph3d.STYLE.DOTSIZE) { color = this.colorDot; borderColor = this.colorDotBorder; } else { // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 hue = (1 - (point.point.z - this.zMin) * this.scale.z / this.verticalRatio) * 240; color = this._hsv2rgb(hue, 1, 1); borderColor = this._hsv2rgb(hue, 1, 0.8); } // draw the circle ctx.lineWidth = 1.0; ctx.strokeStyle = borderColor; ctx.fillStyle = color; ctx.beginPath(); ctx.arc(point.screen.x, point.screen.y, radius, 0, Math.PI*2, true); ctx.fill(); ctx.stroke(); } }; /** * Draw all datapoints as bars. * This function can be used when the style is 'bar', 'bar-color', or 'bar-size' */ Graph3d.prototype._redrawDataBar = function() { var canvas = this.frame.canvas; var ctx = canvas.getContext('2d'); var i, j, surface, corners; if (this.dataPoints === undefined || this.dataPoints.length <= 0) return; // TODO: throw exception? // calculate the translations of all points for (i = 0; i < this.dataPoints.length; i++) { var trans = this._convertPointToTranslation(this.dataPoints[i].point); var screen = this._convertTranslationToScreen(trans); this.dataPoints[i].trans = trans; this.dataPoints[i].screen = screen; // calculate the distance from the point at the bottom to the camera var transBottom = this._convertPointToTranslation(this.dataPoints[i].bottom); this.dataPoints[i].dist = this.showPerspective ? transBottom.length() : -transBottom.z; } // order the translated points by depth var sortDepth = function (a, b) { return b.dist - a.dist; }; this.dataPoints.sort(sortDepth); // draw the datapoints as bars var xWidth = this.xBarWidth / 2; var yWidth = this.yBarWidth / 2; for (i = 0; i < this.dataPoints.length; i++) { var point = this.dataPoints[i]; // determine color var hue, color, borderColor; if (this.style === Graph3d.STYLE.BARCOLOR ) { // calculate the color based on the value hue = (1 - (point.point.value - this.valueMin) * this.scale.value) * 240; color = this._hsv2rgb(hue, 1, 1); borderColor = this._hsv2rgb(hue, 1, 0.8); } else if (this.style === Graph3d.STYLE.BARSIZE) { color = this.colorDot; borderColor = this.colorDotBorder; } else { // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 hue = (1 - (point.point.z - this.zMin) * this.scale.z / this.verticalRatio) * 240; color = this._hsv2rgb(hue, 1, 1); borderColor = this._hsv2rgb(hue, 1, 0.8); } // calculate size for the bar if (this.style === Graph3d.STYLE.BARSIZE) { xWidth = (this.xBarWidth / 2) * ((point.point.value - this.valueMin) / (this.valueMax - this.valueMin) * 0.8 + 0.2); yWidth = (this.yBarWidth / 2) * ((point.point.value - this.valueMin) / (this.valueMax - this.valueMin) * 0.8 + 0.2); } // calculate all corner points var me = this; var point3d = point.point; var top = [ {point: new Point3d(point3d.x - xWidth, point3d.y - yWidth, point3d.z)}, {point: new Point3d(point3d.x + xWidth, point3d.y - yWidth, point3d.z)}, {point: new Point3d(point3d.x + xWidth, point3d.y + yWidth, point3d.z)}, {point: new Point3d(point3d.x - xWidth, point3d.y + yWidth, point3d.z)} ]; var bottom = [ {point: new Point3d(point3d.x - xWidth, point3d.y - yWidth, this.zMin)}, {point: new Point3d(point3d.x + xWidth, point3d.y - yWidth, this.zMin)}, {point: new Point3d(point3d.x + xWidth, point3d.y + yWidth, this.zMin)}, {point: new Point3d(point3d.x - xWidth, point3d.y + yWidth, this.zMin)} ]; // calculate screen location of the points top.forEach(function (obj) { obj.screen = me._convert3Dto2D(obj.point); }); bottom.forEach(function (obj) { obj.screen = me._convert3Dto2D(obj.point); }); // create five sides, calculate both corner points and center points var surfaces = [ {corners: top, center: Point3d.avg(bottom[0].point, bottom[2].point)}, {corners: [top[0], top[1], bottom[1], bottom[0]], center: Point3d.avg(bottom[1].point, bottom[0].point)}, {corners: [top[1], top[2], bottom[2], bottom[1]], center: Point3d.avg(bottom[2].point, bottom[1].point)}, {corners: [top[2], top[3], bottom[3], bottom[2]], center: Point3d.avg(bottom[3].point, bottom[2].point)}, {corners: [top[3], top[0], bottom[0], bottom[3]], center: Point3d.avg(bottom[0].point, bottom[3].point)} ]; point.surfaces = surfaces; // calculate the distance of each of the surface centers to the camera for (j = 0; j < surfaces.length; j++) { surface = surfaces[j]; var transCenter = this._convertPointToTranslation(surface.center); surface.dist = this.showPerspective ? transCenter.length() : -transCenter.z; // TODO: this dept calculation doesn't work 100% of the cases due to perspective, // but the current solution is fast/simple and works in 99.9% of all cases // the issue is visible in example 14, with graph.setCameraPosition({horizontal: 2.97, vertical: 0.5, distance: 0.9}) } // order the surfaces by their (translated) depth surfaces.sort(function (a, b) { var diff = b.dist - a.dist; if (diff) return diff; // if equal depth, sort the top surface last if (a.corners === top) return 1; if (b.corners === top) return -1; // both are equal return 0; }); // draw the ordered surfaces ctx.lineWidth = 1; ctx.strokeStyle = borderColor; ctx.fillStyle = color; // NOTE: we start at j=2 instead of j=0 as we don't need to draw the two surfaces at the backside for (j = 2; j < surfaces.length; j++) { surface = surfaces[j]; corners = surface.corners; ctx.beginPath(); ctx.moveTo(corners[3].screen.x, corners[3].screen.y); ctx.lineTo(corners[0].screen.x, corners[0].screen.y); ctx.lineTo(corners[1].screen.x, corners[1].screen.y); ctx.lineTo(corners[2].screen.x, corners[2].screen.y); ctx.lineTo(corners[3].screen.x, corners[3].screen.y); ctx.fill(); ctx.stroke(); } } }; /** * Draw a line through all datapoints. * This function can be used when the style is 'line' */ Graph3d.prototype._redrawDataLine = function() { var canvas = this.frame.canvas, ctx = canvas.getContext('2d'), point, i; if (this.dataPoints === undefined || this.dataPoints.length <= 0) return; // TODO: throw exception? // calculate the translations of all points for (i = 0; i < this.dataPoints.length; i++) { var trans = this._convertPointToTranslation(this.dataPoints[i].point); var screen = this._convertTranslationToScreen(trans); this.dataPoints[i].trans = trans; this.dataPoints[i].screen = screen; } // start the line if (this.dataPoints.length > 0) { point = this.dataPoints[0]; ctx.lineWidth = 1; // TODO: make customizable ctx.strokeStyle = 'blue'; // TODO: make customizable ctx.beginPath(); ctx.moveTo(point.screen.x, point.screen.y); } // draw the datapoints as colored circles for (i = 1; i < this.dataPoints.length; i++) { point = this.dataPoints[i]; ctx.lineTo(point.screen.x, point.screen.y); } // finish the line if (this.dataPoints.length > 0) { ctx.stroke(); } }; /** * Start a moving operation inside the provided parent element * @param {Event} event The event that occurred (required for * retrieving the mouse position) */ Graph3d.prototype._onMouseDown = function(event) { event = event || window.event; // check if mouse is still down (may be up when focus is lost for example // in an iframe) if (this.leftButtonDown) { this._onMouseUp(event); } // only react on left mouse button down this.leftButtonDown = event.which ? (event.which === 1) : (event.button === 1); if (!this.leftButtonDown && !this.touchDown) return; // get mouse position (different code for IE and all other browsers) this.startMouseX = getMouseX(event); this.startMouseY = getMouseY(event); this.startStart = new Date(this.start); this.startEnd = new Date(this.end); this.startArmRotation = this.camera.getArmRotation(); this.frame.style.cursor = 'move'; // add event listeners to handle moving the contents // we store the function onmousemove and onmouseup in the graph, so we can // remove the eventlisteners lateron in the function mouseUp() var me = this; this.onmousemove = function (event) {me._onMouseMove(event);}; this.onmouseup = function (event) {me._onMouseUp(event);}; G3DaddEventListener(document, 'mousemove', me.onmousemove); G3DaddEventListener(document, 'mouseup', me.onmouseup); G3DpreventDefault(event); }; /** * Perform moving operating. * This function activated from within the funcion Graph.mouseDown(). * @param {Event} event Well, eehh, the event */ Graph3d.prototype._onMouseMove = function (event) { event = event || window.event; // calculate change in mouse position var diffX = parseFloat(getMouseX(event)) - this.startMouseX; var diffY = parseFloat(getMouseY(event)) - this.startMouseY; var horizontalNew = this.startArmRotation.horizontal + diffX / 200; var verticalNew = this.startArmRotation.vertical + diffY / 200; var snapAngle = 4; // degrees var snapValue = Math.sin(snapAngle / 360 * 2 * Math.PI); // snap horizontally to nice angles at 0pi, 0.5pi, 1pi, 1.5pi, etc... // the -0.001 is to take care that the vertical axis is always drawn at the left front corner if (Math.abs(Math.sin(horizontalNew)) < snapValue) { horizontalNew = Math.round((horizontalNew / Math.PI)) * Math.PI - 0.001; } if (Math.abs(Math.cos(horizontalNew)) < snapValue) { horizontalNew = (Math.round((horizontalNew/ Math.PI - 0.5)) + 0.5) * Math.PI - 0.001; } // snap vertically to nice angles if (Math.abs(Math.sin(verticalNew)) < snapValue) { verticalNew = Math.round((verticalNew / Math.PI)) * Math.PI; } if (Math.abs(Math.cos(verticalNew)) < snapValue) { verticalNew = (Math.round((verticalNew/ Math.PI - 0.5)) + 0.5) * Math.PI; } this.camera.setArmRotation(horizontalNew, verticalNew); this.redraw(); // fire a cameraPositionChange event var parameters = this.getCameraPosition(); this.emit('cameraPositionChange', parameters); G3DpreventDefault(event); }; /** * Stop moving operating. * This function activated from within the funcion Graph.mouseDown(). * @param {event} event The event */ Graph3d.prototype._onMouseUp = function (event) { this.frame.style.cursor = 'auto'; this.leftButtonDown = false; // remove event listeners here G3DremoveEventListener(document, 'mousemove', this.onmousemove); G3DremoveEventListener(document, 'mouseup', this.onmouseup); G3DpreventDefault(event); }; /** * After having moved the mouse, a tooltip should pop up when the mouse is resting on a data point * @param {Event} event A mouse move event */ Graph3d.prototype._onTooltip = function (event) { var delay = 300; // ms var mouseX = getMouseX(event) - getAbsoluteLeft(this.frame); var mouseY = getMouseY(event) - getAbsoluteTop(this.frame); if (!this.showTooltip) { return; } if (this.tooltipTimeout) { clearTimeout(this.tooltipTimeout); } // (delayed) display of a tooltip only if no mouse button is down if (this.leftButtonDown) { this._hideTooltip(); return; } if (this.tooltip && this.tooltip.dataPoint) { // tooltip is currently visible var dataPoint = this._dataPointFromXY(mouseX, mouseY); if (dataPoint !== this.tooltip.dataPoint) { // datapoint changed if (dataPoint) { this._showTooltip(dataPoint); } else { this._hideTooltip(); } } } else { // tooltip is currently not visible var me = this; this.tooltipTimeout = setTimeout(function () { me.tooltipTimeout = null; // show a tooltip if we have a data point var dataPoint = me._dataPointFromXY(mouseX, mouseY); if (dataPoint) { me._showTooltip(dataPoint); } }, delay); } }; /** * Event handler for touchstart event on mobile devices */ Graph3d.prototype._onTouchStart = function(event) { this.touchDown = true; var me = this; this.ontouchmove = function (event) {me._onTouchMove(event);}; this.ontouchend = function (event) {me._onTouchEnd(event);}; G3DaddEventListener(document, 'touchmove', me.ontouchmove); G3DaddEventListener(document, 'touchend', me.ontouchend); this._onMouseDown(event); }; /** * Event handler for touchmove event on mobile devices */ Graph3d.prototype._onTouchMove = function(event) { this._onMouseMove(event); }; /** * Event handler for touchend event on mobile devices */ Graph3d.prototype._onTouchEnd = function(event) { this.touchDown = false; G3DremoveEventListener(document, 'touchmove', this.ontouchmove); G3DremoveEventListener(document, 'touchend', this.ontouchend); this._onMouseUp(event); }; /** * Event handler for mouse wheel event, used to zoom the graph * Code from http://adomas.org/javascript-mouse-wheel/ * @param {event} event The event */ Graph3d.prototype._onWheel = function(event) { if (!event) /* For IE. */ event = window.event; // retrieve delta var delta = 0; if (event.wheelDelta) { /* IE/Opera. */ delta = event.wheelDelta/120; } else if (event.detail) { /* Mozilla case. */ // In Mozilla, sign of delta is different than in IE. // Also, delta is multiple of 3. delta = -event.detail/3; } // If delta is nonzero, handle it. // Basically, delta is now positive if wheel was scrolled up, // and negative, if wheel was scrolled down. if (delta) { var oldLength = this.camera.getArmLength(); var newLength = oldLength * (1 - delta / 10); this.camera.setArmLength(newLength); this.redraw(); this._hideTooltip(); } // fire a cameraPositionChange event var parameters = this.getCameraPosition(); this.emit('cameraPositionChange', parameters); // Prevent default actions caused by mouse wheel. // That might be ugly, but we handle scrolls somehow // anyway, so don't bother here.. G3DpreventDefault(event); }; /** * Test whether a point lies inside given 2D triangle * @param {Point2d} point * @param {Point2d[]} triangle * @return {boolean} Returns true if given point lies inside or on the edge of the triangle * @private */ Graph3d.prototype._insideTriangle = function (point, triangle) { var a = triangle[0], b = triangle[1], c = triangle[2]; function sign (x) { return x > 0 ? 1 : x < 0 ? -1 : 0; } var as = sign((b.x - a.x) * (point.y - a.y) - (b.y - a.y) * (point.x - a.x)); var bs = sign((c.x - b.x) * (point.y - b.y) - (c.y - b.y) * (point.x - b.x)); var cs = sign((a.x - c.x) * (point.y - c.y) - (a.y - c.y) * (point.x - c.x)); // each of the three signs must be either equal to each other or zero return (as == 0 || bs == 0 || as == bs) && (bs == 0 || cs == 0 || bs == cs) && (as == 0 || cs == 0 || as == cs); }; /** * Find a data point close to given screen position (x, y) * @param {Number} x * @param {Number} y * @return {Object | null} The closest data point or null if not close to any data point * @private */ Graph3d.prototype._dataPointFromXY = function (x, y) { var i, distMax = 100, // px dataPoint = null, closestDataPoint = null, closestDist = null, center = new Point2d(x, y); if (this.style === Graph3d.STYLE.BAR || this.style === Graph3d.STYLE.BARCOLOR || this.style === Graph3d.STYLE.BARSIZE) { // the data points are ordered from far away to closest for (i = this.dataPoints.length - 1; i >= 0; i--) { dataPoint = this.dataPoints[i]; var surfaces = dataPoint.surfaces; if (surfaces) { for (var s = surfaces.length - 1; s >= 0; s--) { // split each surface in two triangles, and see if the center point is inside one of these var surface = surfaces[s]; var corners = surface.corners; var triangle1 = [corners[0].screen, corners[1].screen, corners[2].screen]; var triangle2 = [corners[2].screen, corners[3].screen, corners[0].screen]; if (this._insideTriangle(center, triangle1) || this._insideTriangle(center, triangle2)) { // return immediately at the first hit return dataPoint; } } } } } else { // find the closest data point, using distance to the center of the point on 2d screen for (i = 0; i < this.dataPoints.length; i++) { dataPoint = this.dataPoints[i]; var point = dataPoint.screen; if (point) { var distX = Math.abs(x - point.x); var distY = Math.abs(y - point.y); var dist = Math.sqrt(distX * distX + distY * distY); if ((closestDist === null || dist < closestDist) && dist < distMax) { closestDist = dist; closestDataPoint = dataPoint; } } } } return closestDataPoint; }; /** * Display a tooltip for given data point * @param {Object} dataPoint * @private */ Graph3d.prototype._showTooltip = function (dataPoint) { var content, line, dot; if (!this.tooltip) { content = document.createElement('div'); content.style.position = 'absolute'; content.style.padding = '10px'; content.style.border = '1px solid #4d4d4d'; content.style.color = '#1a1a1a'; content.style.background = 'rgba(255,255,255,0.7)'; content.style.borderRadius = '2px'; content.style.boxShadow = '5px 5px 10px rgba(128,128,128,0.5)'; line = document.createElement('div'); line.style.position = 'absolute'; line.style.height = '40px'; line.style.width = '0'; line.style.borderLeft = '1px solid #4d4d4d'; dot = document.createElement('div'); dot.style.position = 'absolute'; dot.style.height = '0'; dot.style.width = '0'; dot.style.border = '5px solid #4d4d4d'; dot.style.borderRadius = '5px'; this.tooltip = { dataPoint: null, dom: { content: content, line: line, dot: dot } }; } else { content = this.tooltip.dom.content; line = this.tooltip.dom.line; dot = this.tooltip.dom.dot; } this._hideTooltip(); this.tooltip.dataPoint = dataPoint; if (typeof this.showTooltip === 'function') { content.innerHTML = this.showTooltip(dataPoint.point); } else { content.innerHTML = '<table>' + '<tr><td>x:</td><td>' + dataPoint.point.x + '</td></tr>' + '<tr><td>y:</td><td>' + dataPoint.point.y + '</td></tr>' + '<tr><td>z:</td><td>' + dataPoint.point.z + '</td></tr>' + '</table>'; } content.style.left = '0'; content.style.top = '0'; this.frame.appendChild(content); this.frame.appendChild(line); this.frame.appendChild(dot); // calculate sizes var contentWidth = content.offsetWidth; var contentHeight = content.offsetHeight; var lineHeight = line.offsetHeight; var dotWidth = dot.offsetWidth; var dotHeight = dot.offsetHeight; var left = dataPoint.screen.x - contentWidth / 2; left = Math.min(Math.max(left, 10), this.frame.clientWidth - 10 - contentWidth); line.style.left = dataPoint.screen.x + 'px'; line.style.top = (dataPoint.screen.y - lineHeight) + 'px'; content.style.left = left + 'px'; content.style.top = (dataPoint.screen.y - lineHeight - contentHeight) + 'px'; dot.style.left = (dataPoint.screen.x - dotWidth / 2) + 'px'; dot.style.top = (dataPoint.screen.y - dotHeight / 2) + 'px'; }; /** * Hide the tooltip when displayed * @private */ Graph3d.prototype._hideTooltip = function () { if (this.tooltip) { this.tooltip.dataPoint = null; for (var prop in this.tooltip.dom) { if (this.tooltip.dom.hasOwnProperty(prop)) { var elem = this.tooltip.dom[prop]; if (elem && elem.parentNode) { elem.parentNode.removeChild(elem); } } } } }; /** * Add and event listener. Works for all browsers * @param {Element} element An html element * @param {string} action The action, for example 'click', * without the prefix 'on' * @param {function} listener The callback function to be executed * @param {boolean} useCapture */ G3DaddEventListener = function(element, action, listener, useCapture) { if (element.addEventListener) { if (useCapture === undefined) useCapture = false; if (action === 'mousewheel' && navigator.userAgent.indexOf('Firefox') >= 0) { action = 'DOMMouseScroll'; // For Firefox } element.addEventListener(action, listener, useCapture); } else { element.attachEvent('on' + action, listener); // IE browsers } }; /** * Remove an event listener from an element * @param {Element} element An html dom element * @param {string} action The name of the event, for example 'mousedown' * @param {function} listener The listener function * @param {boolean} useCapture */ G3DremoveEventListener = function(element, action, listener, useCapture) { if (element.removeEventListener) { // non-IE browsers if (useCapture === undefined) useCapture = false; if (action === 'mousewheel' && navigator.userAgent.indexOf('Firefox') >= 0) { action = 'DOMMouseScroll'; // For Firefox } element.removeEventListener(action, listener, useCapture); } else { // IE browsers element.detachEvent('on' + action, listener); } }; /** * Stop event propagation */ G3DstopPropagation = function(event) { if (!event) event = window.event; if (event.stopPropagation) { event.stopPropagation(); // non-IE browsers } else { event.cancelBubble = true; // IE browsers } }; /** * Cancels the event if it is cancelable, without stopping further propagation of the event. */ G3DpreventDefault = function (event) { if (!event) event = window.event; if (event.preventDefault) { event.preventDefault(); // non-IE browsers } else { event.returnValue = false; // IE browsers } }; /** * @prototype Point3d * @param {Number} x * @param {Number} y * @param {Number} z */ function Point3d(x, y, z) { this.x = x !== undefined ? x : 0; this.y = y !== undefined ? y : 0; this.z = z !== undefined ? z : 0; }; /** * Subtract the two provided points, returns a-b * @param {Point3d} a * @param {Point3d} b * @return {Point3d} a-b */ Point3d.subtract = function(a, b) { var sub = new Point3d(); sub.x = a.x - b.x; sub.y = a.y - b.y; sub.z = a.z - b.z; return sub; }; /** * Add the two provided points, returns a+b * @param {Point3d} a * @param {Point3d} b * @return {Point3d} a+b */ Point3d.add = function(a, b) { var sum = new Point3d(); sum.x = a.x + b.x; sum.y = a.y + b.y; sum.z = a.z + b.z; return sum; }; /** * Calculate the average of two 3d points * @param {Point3d} a * @param {Point3d} b * @return {Point3d} The average, (a+b)/2 */ Point3d.avg = function(a, b) { return new Point3d( (a.x + b.x) / 2, (a.y + b.y) / 2, (a.z + b.z) / 2 ); }; /** * Calculate the cross product of the two provided points, returns axb * Documentation: http://en.wikipedia.org/wiki/Cross_product * @param {Point3d} a * @param {Point3d} b * @return {Point3d} cross product axb */ Point3d.crossProduct = function(a, b) { var crossproduct = new Point3d(); crossproduct.x = a.y * b.z - a.z * b.y; crossproduct.y = a.z * b.x - a.x * b.z; crossproduct.z = a.x * b.y - a.y * b.x; return crossproduct; }; /** * Rtrieve the length of the vector (or the distance from this point to the origin * @return {Number} length */ Point3d.prototype.length = function() { return Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z ); }; /** * @prototype Point2d */ Point2d = function (x, y) { this.x = x !== undefined ? x : 0; this.y = y !== undefined ? y : 0; }; /** * @class Filter * * @param {DataSet} data The google data table * @param {Number} column The index of the column to be filtered * @param {Graph} graph The graph */ function Filter (data, column, graph) { this.data = data; this.column = column; this.graph = graph; // the parent graph this.index = undefined; this.value = undefined; // read all distinct values and select the first one this.values = graph.getDistinctValues(data.get(), this.column); // sort both numeric and string values correctly this.values.sort(function (a, b) { return a > b ? 1 : a < b ? -1 : 0; }); if (this.values.length > 0) { this.selectValue(0); } // create an array with the filtered datapoints. this will be loaded afterwards this.dataPoints = []; this.loaded = false; this.onLoadCallback = undefined; if (graph.animationPreload) { this.loaded = false; this.loadInBackground(); } else { this.loaded = true; } }; /** * Return the label * @return {string} label */ Filter.prototype.isLoaded = function() { return this.loaded; }; /** * Return the loaded progress * @return {Number} percentage between 0 and 100 */ Filter.prototype.getLoadedProgress = function() { var len = this.values.length; var i = 0; while (this.dataPoints[i]) { i++; } return Math.round(i / len * 100); }; /** * Return the label * @return {string} label */ Filter.prototype.getLabel = function() { return this.graph.filterLabel; }; /** * Return the columnIndex of the filter * @return {Number} columnIndex */ Filter.prototype.getColumn = function() { return this.column; }; /** * Return the currently selected value. Returns undefined if there is no selection * @return {*} value */ Filter.prototype.getSelectedValue = function() { if (this.index === undefined) return undefined; return this.values[this.index]; }; /** * Retrieve all values of the filter * @return {Array} values */ Filter.prototype.getValues = function() { return this.values; }; /** * Retrieve one value of the filter * @param {Number} index * @return {*} value */ Filter.prototype.getValue = function(index) { if (index >= this.values.length) throw 'Error: index out of range'; return this.values[index]; }; /** * Retrieve the (filtered) dataPoints for the currently selected filter index * @param {Number} [index] (optional) * @return {Array} dataPoints */ Filter.prototype._getDataPoints = function(index) { if (index === undefined) index = this.index; if (index === undefined) return []; var dataPoints; if (this.dataPoints[index]) { dataPoints = this.dataPoints[index]; } else { var f = {}; f.column = this.column; f.value = this.values[index]; var dataView = new DataView(this.data,{filter: function (item) {return (item[f.column] == f.value);}}).get(); dataPoints = this.graph._getDataPoints(dataView); this.dataPoints[index] = dataPoints; } return dataPoints; }; /** * Set a callback function when the filter is fully loaded. */ Filter.prototype.setOnLoadCallback = function(callback) { this.onLoadCallback = callback; }; /** * Add a value to the list with available values for this filter * No double entries will be created. * @param {Number} index */ Filter.prototype.selectValue = function(index) { if (index >= this.values.length) throw 'Error: index out of range'; this.index = index; this.value = this.values[index]; }; /** * Load all filtered rows in the background one by one * Start this method without providing an index! */ Filter.prototype.loadInBackground = function(index) { if (index === undefined) index = 0; var frame = this.graph.frame; if (index < this.values.length) { var dataPointsTemp = this._getDataPoints(index); //this.graph.redrawInfo(); // TODO: not neat // create a progress box if (frame.progress === undefined) { frame.progress = document.createElement('DIV'); frame.progress.style.position = 'absolute'; frame.progress.style.color = 'gray'; frame.appendChild(frame.progress); } var progress = this.getLoadedProgress(); frame.progress.innerHTML = 'Loading animation... ' + progress + '%'; // TODO: this is no nice solution... frame.progress.style.bottom = Graph3d.px(60); // TODO: use height of slider frame.progress.style.left = Graph3d.px(10); var me = this; setTimeout(function() {me.loadInBackground(index+1);}, 10); this.loaded = false; } else { this.loaded = true; // remove the progress box if (frame.progress !== undefined) { frame.removeChild(frame.progress); frame.progress = undefined; } if (this.onLoadCallback) this.onLoadCallback(); } }; /** * @prototype StepNumber * The class StepNumber is an iterator for Numbers. You provide a start and end * value, and a best step size. StepNumber itself rounds to fixed values and * a finds the step that best fits the provided step. * * If prettyStep is true, the step size is chosen as close as possible to the * provided step, but being a round value like 1, 2, 5, 10, 20, 50, .... * * Example usage: * var step = new StepNumber(0, 10, 2.5, true); * step.start(); * while (!step.end()) { * alert(step.getCurrent()); * step.next(); * } * * Version: 1.0 * * @param {Number} start The start value * @param {Number} end The end value * @param {Number} step Optional. Step size. Must be a positive value. * @param {boolean} prettyStep Optional. If true, the step size is rounded * To a pretty step size (like 1, 2, 5, 10, 20, 50, ...) */ StepNumber = function (start, end, step, prettyStep) { // set default values this._start = 0; this._end = 0; this._step = 1; this.prettyStep = true; this.precision = 5; this._current = 0; this.setRange(start, end, step, prettyStep); }; /** * Set a new range: start, end and step. * * @param {Number} start The start value * @param {Number} end The end value * @param {Number} step Optional. Step size. Must be a positive value. * @param {boolean} prettyStep Optional. If true, the step size is rounded * To a pretty step size (like 1, 2, 5, 10, 20, 50, ...) */ StepNumber.prototype.setRange = function(start, end, step, prettyStep) { this._start = start ? start : 0; this._end = end ? end : 0; this.setStep(step, prettyStep); }; /** * Set a new step size * @param {Number} step New step size. Must be a positive value * @param {boolean} prettyStep Optional. If true, the provided step is rounded * to a pretty step size (like 1, 2, 5, 10, 20, 50, ...) */ StepNumber.prototype.setStep = function(step, prettyStep) { if (step === undefined || step <= 0) return; if (prettyStep !== undefined) this.prettyStep = prettyStep; if (this.prettyStep === true) this._step = StepNumber.calculatePrettyStep(step); else this._step = step; }; /** * Calculate a nice step size, closest to the desired step size. * Returns a value in one of the ranges 1*10^n, 2*10^n, or 5*10^n, where n is an * integer Number. For example 1, 2, 5, 10, 20, 50, etc... * @param {Number} step Desired step size * @return {Number} Nice step size */ StepNumber.calculatePrettyStep = function (step) { var log10 = function (x) {return Math.log(x) / Math.LN10;}; // try three steps (multiple of 1, 2, or 5 var step1 = Math.pow(10, Math.round(log10(step))), step2 = 2 * Math.pow(10, Math.round(log10(step / 2))), step5 = 5 * Math.pow(10, Math.round(log10(step / 5))); // choose the best step (closest to minimum step) var prettyStep = step1; if (Math.abs(step2 - step) <= Math.abs(prettyStep - step)) prettyStep = step2; if (Math.abs(step5 - step) <= Math.abs(prettyStep - step)) prettyStep = step5; // for safety if (prettyStep <= 0) { prettyStep = 1; } return prettyStep; }; /** * returns the current value of the step * @return {Number} current value */ StepNumber.prototype.getCurrent = function () { return parseFloat(this._current.toPrecision(this.precision)); }; /** * returns the current step size * @return {Number} current step size */ StepNumber.prototype.getStep = function () { return this._step; }; /** * Set the current value to the largest value smaller than start, which * is a multiple of the step size */ StepNumber.prototype.start = function() { this._current = this._start - this._start % this._step; }; /** * Do a step, add the step size to the current value */ StepNumber.prototype.next = function () { this._current += this._step; }; /** * Returns true whether the end is reached * @return {boolean} True if the current value has passed the end value. */ StepNumber.prototype.end = function () { return (this._current > this._end); }; /** * @constructor Slider * * An html slider control with start/stop/prev/next buttons * @param {Element} container The element where the slider will be created * @param {Object} options Available options: * {boolean} visible If true (default) the * slider is visible. */ function Slider(container, options) { if (container === undefined) { throw 'Error: No container element defined'; } this.container = container; this.visible = (options && options.visible != undefined) ? options.visible : true; if (this.visible) { this.frame = document.createElement('DIV'); //this.frame.style.backgroundColor = '#E5E5E5'; this.frame.style.width = '100%'; this.frame.style.position = 'relative'; this.container.appendChild(this.frame); this.frame.prev = document.createElement('INPUT'); this.frame.prev.type = 'BUTTON'; this.frame.prev.value = 'Prev'; this.frame.appendChild(this.frame.prev); this.frame.play = document.createElement('INPUT'); this.frame.play.type = 'BUTTON'; this.frame.play.value = 'Play'; this.frame.appendChild(this.frame.play); this.frame.next = document.createElement('INPUT'); this.frame.next.type = 'BUTTON'; this.frame.next.value = 'Next'; this.frame.appendChild(this.frame.next); this.frame.bar = document.createElement('INPUT'); this.frame.bar.type = 'BUTTON'; this.frame.bar.style.position = 'absolute'; this.frame.bar.style.border = '1px solid red'; this.frame.bar.style.width = '100px'; this.frame.bar.style.height = '6px'; this.frame.bar.style.borderRadius = '2px'; this.frame.bar.style.MozBorderRadius = '2px'; this.frame.bar.style.border = '1px solid #7F7F7F'; this.frame.bar.style.backgroundColor = '#E5E5E5'; this.frame.appendChild(this.frame.bar); this.frame.slide = document.createElement('INPUT'); this.frame.slide.type = 'BUTTON'; this.frame.slide.style.margin = '0px'; this.frame.slide.value = ' '; this.frame.slide.style.position = 'relative'; this.frame.slide.style.left = '-100px'; this.frame.appendChild(this.frame.slide); // create events var me = this; this.frame.slide.onmousedown = function (event) {me._onMouseDown(event);}; this.frame.prev.onclick = function (event) {me.prev(event);}; this.frame.play.onclick = function (event) {me.togglePlay(event);}; this.frame.next.onclick = function (event) {me.next(event);}; } this.onChangeCallback = undefined; this.values = []; this.index = undefined; this.playTimeout = undefined; this.playInterval = 1000; // milliseconds this.playLoop = true; }; /** * Select the previous index */ Slider.prototype.prev = function() { var index = this.getIndex(); if (index > 0) { index--; this.setIndex(index); } }; /** * Select the next index */ Slider.prototype.next = function() { var index = this.getIndex(); if (index < this.values.length - 1) { index++; this.setIndex(index); } }; /** * Select the next index */ Slider.prototype.playNext = function() { var start = new Date(); var index = this.getIndex(); if (index < this.values.length - 1) { index++; this.setIndex(index); } else if (this.playLoop) { // jump to the start index = 0; this.setIndex(index); } var end = new Date(); var diff = (end - start); // calculate how much time it to to set the index and to execute the callback // function. var interval = Math.max(this.playInterval - diff, 0); // document.title = diff // TODO: cleanup var me = this; this.playTimeout = setTimeout(function() {me.playNext();}, interval); }; /** * Toggle start or stop playing */ Slider.prototype.togglePlay = function() { if (this.playTimeout === undefined) { this.play(); } else { this.stop(); } }; /** * Start playing */ Slider.prototype.play = function() { // Test whether already playing if (this.playTimeout) return; this.playNext(); if (this.frame) { this.frame.play.value = 'Stop'; } }; /** * Stop playing */ Slider.prototype.stop = function() { clearInterval(this.playTimeout); this.playTimeout = undefined; if (this.frame) { this.frame.play.value = 'Play'; } }; /** * Set a callback function which will be triggered when the value of the * slider bar has changed. */ Slider.prototype.setOnChangeCallback = function(callback) { this.onChangeCallback = callback; }; /** * Set the interval for playing the list * @param {Number} interval The interval in milliseconds */ Slider.prototype.setPlayInterval = function(interval) { this.playInterval = interval; }; /** * Retrieve the current play interval * @return {Number} interval The interval in milliseconds */ Slider.prototype.getPlayInterval = function(interval) { return this.playInterval; }; /** * Set looping on or off * @pararm {boolean} doLoop If true, the slider will jump to the start when * the end is passed, and will jump to the end * when the start is passed. */ Slider.prototype.setPlayLoop = function(doLoop) { this.playLoop = doLoop; }; /** * Execute the onchange callback function */ Slider.prototype.onChange = function() { if (this.onChangeCallback !== undefined) { this.onChangeCallback(); } }; /** * redraw the slider on the correct place */ Slider.prototype.redraw = function() { if (this.frame) { // resize the bar this.frame.bar.style.top = (this.frame.clientHeight/2 - this.frame.bar.offsetHeight/2) + 'px'; this.frame.bar.style.width = (this.frame.clientWidth - this.frame.prev.clientWidth - this.frame.play.clientWidth - this.frame.next.clientWidth - 30) + 'px'; // position the slider button var left = this.indexToLeft(this.index); this.frame.slide.style.left = (left) + 'px'; } }; /** * Set the list with values for the slider * @param {Array} values A javascript array with values (any type) */ Slider.prototype.setValues = function(values) { this.values = values; if (this.values.length > 0) this.setIndex(0); else this.index = undefined; }; /** * Select a value by its index * @param {Number} index */ Slider.prototype.setIndex = function(index) { if (index < this.values.length) { this.index = index; this.redraw(); this.onChange(); } else { throw 'Error: index out of range'; } }; /** * retrieve the index of the currently selected vaue * @return {Number} index */ Slider.prototype.getIndex = function() { return this.index; }; /** * retrieve the currently selected value * @return {*} value */ Slider.prototype.get = function() { return this.values[this.index]; }; Slider.prototype._onMouseDown = function(event) { // only react on left mouse button down var leftButtonDown = event.which ? (event.which === 1) : (event.button === 1); if (!leftButtonDown) return; this.startClientX = event.clientX; this.startSlideX = parseFloat(this.frame.slide.style.left); this.frame.style.cursor = 'move'; // add event listeners to handle moving the contents // we store the function onmousemove and onmouseup in the graph, so we can // remove the eventlisteners lateron in the function mouseUp() var me = this; this.onmousemove = function (event) {me._onMouseMove(event);}; this.onmouseup = function (event) {me._onMouseUp(event);}; G3DaddEventListener(document, 'mousemove', this.onmousemove); G3DaddEventListener(document, 'mouseup', this.onmouseup); G3DpreventDefault(event); }; Slider.prototype.leftToIndex = function (left) { var width = parseFloat(this.frame.bar.style.width) - this.frame.slide.clientWidth - 10; var x = left - 3; var index = Math.round(x / width * (this.values.length-1)); if (index < 0) index = 0; if (index > this.values.length-1) index = this.values.length-1; return index; }; Slider.prototype.indexToLeft = function (index) { var width = parseFloat(this.frame.bar.style.width) - this.frame.slide.clientWidth - 10; var x = index / (this.values.length-1) * width; var left = x + 3; return left; }; Slider.prototype._onMouseMove = function (event) { var diff = event.clientX - this.startClientX; var x = this.startSlideX + diff; var index = this.leftToIndex(x); this.setIndex(index); G3DpreventDefault(); }; Slider.prototype._onMouseUp = function (event) { this.frame.style.cursor = 'auto'; // remove event listeners G3DremoveEventListener(document, 'mousemove', this.onmousemove); G3DremoveEventListener(document, 'mouseup', this.onmouseup); G3DpreventDefault(); }; /**--------------------------------------------------------------------------**/ /** * Retrieve the absolute left value of a DOM element * @param {Element} elem A dom element, for example a div * @return {Number} left The absolute left position of this element * in the browser page. */ getAbsoluteLeft = function(elem) { var left = 0; while( elem !== null ) { left += elem.offsetLeft; left -= elem.scrollLeft; elem = elem.offsetParent; } return left; }; /** * Retrieve the absolute top value of a DOM element * @param {Element} elem A dom element, for example a div * @return {Number} top The absolute top position of this element * in the browser page. */ getAbsoluteTop = function(elem) { var top = 0; while( elem !== null ) { top += elem.offsetTop; top -= elem.scrollTop; elem = elem.offsetParent; } return top; }; /** * Get the horizontal mouse position from a mouse event * @param {Event} event * @return {Number} mouse x */ getMouseX = function(event) { if ('clientX' in event) return event.clientX; return event.targetTouches[0] && event.targetTouches[0].clientX || 0; }; /** * Get the vertical mouse position from a mouse event * @param {Event} event * @return {Number} mouse y */ getMouseY = function(event) { if ('clientY' in event) return event.clientY; return event.targetTouches[0] && event.targetTouches[0].clientY || 0; }; /** * vis.js module exports */ var vis = { util: util, moment: moment, DataSet: DataSet, DataView: DataView, Range: Range, stack: stack, TimeStep: TimeStep, components: { items: { Item: Item, ItemBox: ItemBox, ItemPoint: ItemPoint, ItemRange: ItemRange }, Component: Component, Panel: Panel, RootPanel: RootPanel, ItemSet: ItemSet, TimeAxis: TimeAxis }, graph: { Node: Node, Edge: Edge, Popup: Popup, Groups: Groups, Images: Images }, Timeline: Timeline, Graph: Graph, Graph3d: Graph3d }; /** * CommonJS module exports */ if (typeof exports !== 'undefined') { exports = vis; } if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { module.exports = vis; } /** * AMD module exports */ if (typeof(define) === 'function') { define(function () { return vis; }); } /** * Window exports */ if (typeof window !== 'undefined') { // attach the module to the window, load as a regular javascript file window['vis'] = vis; } },{"emitter-component":2,"hammerjs":3,"moment":4,"mousetrap":5}],2:[function(require,module,exports){ /** * Expose `Emitter`. */ module.exports = Emitter; /** * Initialize a new `Emitter`. * * @api public */ function Emitter(obj) { if (obj) return mixin(obj); }; /** * Mixin the emitter properties. * * @param {Object} obj * @return {Object} * @api private */ function mixin(obj) { for (var key in Emitter.prototype) { obj[key] = Emitter.prototype[key]; } return obj; } /** * Listen on the given `event` with `fn`. * * @param {String} event * @param {Function} fn * @return {Emitter} * @api public */ Emitter.prototype.on = Emitter.prototype.addEventListener = function(event, fn){ this._callbacks = this._callbacks || {}; (this._callbacks[event] = this._callbacks[event] || []) .push(fn); return this; }; /** * Adds an `event` listener that will be invoked a single * time then automatically removed. * * @param {String} event * @param {Function} fn * @return {Emitter} * @api public */ Emitter.prototype.once = function(event, fn){ var self = this; this._callbacks = this._callbacks || {}; function on() { self.off(event, on); fn.apply(this, arguments); } on.fn = fn; this.on(event, on); return this; }; /** * Remove the given callback for `event` or all * registered callbacks. * * @param {String} event * @param {Function} fn * @return {Emitter} * @api public */ Emitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function(event, fn){ this._callbacks = this._callbacks || {}; // all if (0 == arguments.length) { this._callbacks = {}; return this; } // specific event var callbacks = this._callbacks[event]; if (!callbacks) return this; // remove all handlers if (1 == arguments.length) { delete this._callbacks[event]; return this; } // remove specific handler var cb; for (var i = 0; i < callbacks.length; i++) { cb = callbacks[i]; if (cb === fn || cb.fn === fn) { callbacks.splice(i, 1); break; } } return this; }; /** * Emit `event` with the given args. * * @param {String} event * @param {Mixed} ... * @return {Emitter} */ Emitter.prototype.emit = function(event){ this._callbacks = this._callbacks || {}; var args = [].slice.call(arguments, 1) , callbacks = this._callbacks[event]; if (callbacks) { callbacks = callbacks.slice(0); for (var i = 0, len = callbacks.length; i < len; ++i) { callbacks[i].apply(this, args); } } return this; }; /** * Return array of callbacks for `event`. * * @param {String} event * @return {Array} * @api public */ Emitter.prototype.listeners = function(event){ this._callbacks = this._callbacks || {}; return this._callbacks[event] || []; }; /** * Check if this emitter has `event` handlers. * * @param {String} event * @return {Boolean} * @api public */ Emitter.prototype.hasListeners = function(event){ return !! this.listeners(event).length; }; },{}],3:[function(require,module,exports){ /*! Hammer.JS - v1.0.5 - 2013-04-07 * http://eightmedia.github.com/hammer.js * * Copyright (c) 2013 Jorik Tangelder <[email protected]>; * Licensed under the MIT license */ (function(window, undefined) { 'use strict'; /** * Hammer * use this to create instances * @param {HTMLElement} element * @param {Object} options * @returns {Hammer.Instance} * @constructor */ var Hammer = function(element, options) { return new Hammer.Instance(element, options || {}); }; // default settings Hammer.defaults = { // add styles and attributes to the element to prevent the browser from doing // its native behavior. this doesnt prevent the scrolling, but cancels // the contextmenu, tap highlighting etc // set to false to disable this stop_browser_behavior: { // this also triggers onselectstart=false for IE userSelect: 'none', // this makes the element blocking in IE10 >, you could experiment with the value // see for more options this issue; https://github.com/EightMedia/hammer.js/issues/241 touchAction: 'none', touchCallout: 'none', contentZooming: 'none', userDrag: 'none', tapHighlightColor: 'rgba(0,0,0,0)' } // more settings are defined per gesture at gestures.js }; // detect touchevents Hammer.HAS_POINTEREVENTS = navigator.pointerEnabled || navigator.msPointerEnabled; Hammer.HAS_TOUCHEVENTS = ('ontouchstart' in window); // dont use mouseevents on mobile devices Hammer.MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; Hammer.NO_MOUSEEVENTS = Hammer.HAS_TOUCHEVENTS && navigator.userAgent.match(Hammer.MOBILE_REGEX); // eventtypes per touchevent (start, move, end) // are filled by Hammer.event.determineEventTypes on setup Hammer.EVENT_TYPES = {}; // direction defines Hammer.DIRECTION_DOWN = 'down'; Hammer.DIRECTION_LEFT = 'left'; Hammer.DIRECTION_UP = 'up'; Hammer.DIRECTION_RIGHT = 'right'; // pointer type Hammer.POINTER_MOUSE = 'mouse'; Hammer.POINTER_TOUCH = 'touch'; Hammer.POINTER_PEN = 'pen'; // touch event defines Hammer.EVENT_START = 'start'; Hammer.EVENT_MOVE = 'move'; Hammer.EVENT_END = 'end'; // hammer document where the base events are added at Hammer.DOCUMENT = document; // plugins namespace Hammer.plugins = {}; // if the window events are set... Hammer.READY = false; /** * setup events to detect gestures on the document */ function setup() { if(Hammer.READY) { return; } // find what eventtypes we add listeners to Hammer.event.determineEventTypes(); // Register all gestures inside Hammer.gestures for(var name in Hammer.gestures) { if(Hammer.gestures.hasOwnProperty(name)) { Hammer.detection.register(Hammer.gestures[name]); } } // Add touch events on the document Hammer.event.onTouch(Hammer.DOCUMENT, Hammer.EVENT_MOVE, Hammer.detection.detect); Hammer.event.onTouch(Hammer.DOCUMENT, Hammer.EVENT_END, Hammer.detection.detect); // Hammer is ready...! Hammer.READY = true; } /** * create new hammer instance * all methods should return the instance itself, so it is chainable. * @param {HTMLElement} element * @param {Object} [options={}] * @returns {Hammer.Instance} * @constructor */ Hammer.Instance = function(element, options) { var self = this; // setup HammerJS window events and register all gestures // this also sets up the default options setup(); this.element = element; // start/stop detection option this.enabled = true; // merge options this.options = Hammer.utils.extend( Hammer.utils.extend({}, Hammer.defaults), options || {}); // add some css to the element to prevent the browser from doing its native behavoir if(this.options.stop_browser_behavior) { Hammer.utils.stopDefaultBrowserBehavior(this.element, this.options.stop_browser_behavior); } // start detection on touchstart Hammer.event.onTouch(element, Hammer.EVENT_START, function(ev) { if(self.enabled) { Hammer.detection.startDetect(self, ev); } }); // return instance return this; }; Hammer.Instance.prototype = { /** * bind events to the instance * @param {String} gesture * @param {Function} handler * @returns {Hammer.Instance} */ on: function onEvent(gesture, handler){ var gestures = gesture.split(' '); for(var t=0; t<gestures.length; t++) { this.element.addEventListener(gestures[t], handler, false); } return this; }, /** * unbind events to the instance * @param {String} gesture * @param {Function} handler * @returns {Hammer.Instance} */ off: function offEvent(gesture, handler){ var gestures = gesture.split(' '); for(var t=0; t<gestures.length; t++) { this.element.removeEventListener(gestures[t], handler, false); } return this; }, /** * trigger gesture event * @param {String} gesture * @param {Object} eventData * @returns {Hammer.Instance} */ trigger: function triggerEvent(gesture, eventData){ // create DOM event var event = Hammer.DOCUMENT.createEvent('Event'); event.initEvent(gesture, true, true); event.gesture = eventData; // trigger on the target if it is in the instance element, // this is for event delegation tricks var element = this.element; if(Hammer.utils.hasParent(eventData.target, element)) { element = eventData.target; } element.dispatchEvent(event); return this; }, /** * enable of disable hammer.js detection * @param {Boolean} state * @returns {Hammer.Instance} */ enable: function enable(state) { this.enabled = state; return this; } }; /** * this holds the last move event, * used to fix empty touchend issue * see the onTouch event for an explanation * @type {Object} */ var last_move_event = null; /** * when the mouse is hold down, this is true * @type {Boolean} */ var enable_detect = false; /** * when touch events have been fired, this is true * @type {Boolean} */ var touch_triggered = false; Hammer.event = { /** * simple addEventListener * @param {HTMLElement} element * @param {String} type * @param {Function} handler */ bindDom: function(element, type, handler) { var types = type.split(' '); for(var t=0; t<types.length; t++) { element.addEventListener(types[t], handler, false); } }, /** * touch events with mouse fallback * @param {HTMLElement} element * @param {String} eventType like Hammer.EVENT_MOVE * @param {Function} handler */ onTouch: function onTouch(element, eventType, handler) { var self = this; this.bindDom(element, Hammer.EVENT_TYPES[eventType], function bindDomOnTouch(ev) { var sourceEventType = ev.type.toLowerCase(); // onmouseup, but when touchend has been fired we do nothing. // this is for touchdevices which also fire a mouseup on touchend if(sourceEventType.match(/mouse/) && touch_triggered) { return; } // mousebutton must be down or a touch event else if( sourceEventType.match(/touch/) || // touch events are always on screen sourceEventType.match(/pointerdown/) || // pointerevents touch (sourceEventType.match(/mouse/) && ev.which === 1) // mouse is pressed ){ enable_detect = true; } // we are in a touch event, set the touch triggered bool to true, // this for the conflicts that may occur on ios and android if(sourceEventType.match(/touch|pointer/)) { touch_triggered = true; } // count the total touches on the screen var count_touches = 0; // when touch has been triggered in this detection session // and we are now handling a mouse event, we stop that to prevent conflicts if(enable_detect) { // update pointerevent if(Hammer.HAS_POINTEREVENTS && eventType != Hammer.EVENT_END) { count_touches = Hammer.PointerEvent.updatePointer(eventType, ev); } // touch else if(sourceEventType.match(/touch/)) { count_touches = ev.touches.length; } // mouse else if(!touch_triggered) { count_touches = sourceEventType.match(/up/) ? 0 : 1; } // if we are in a end event, but when we remove one touch and // we still have enough, set eventType to move if(count_touches > 0 && eventType == Hammer.EVENT_END) { eventType = Hammer.EVENT_MOVE; } // no touches, force the end event else if(!count_touches) { eventType = Hammer.EVENT_END; } // because touchend has no touches, and we often want to use these in our gestures, // we send the last move event as our eventData in touchend if(!count_touches && last_move_event !== null) { ev = last_move_event; } // store the last move event else { last_move_event = ev; } // trigger the handler handler.call(Hammer.detection, self.collectEventData(element, eventType, ev)); // remove pointerevent from list if(Hammer.HAS_POINTEREVENTS && eventType == Hammer.EVENT_END) { count_touches = Hammer.PointerEvent.updatePointer(eventType, ev); } } //debug(sourceEventType +" "+ eventType); // on the end we reset everything if(!count_touches) { last_move_event = null; enable_detect = false; touch_triggered = false; Hammer.PointerEvent.reset(); } }); }, /** * we have different events for each device/browser * determine what we need and set them in the Hammer.EVENT_TYPES constant */ determineEventTypes: function determineEventTypes() { // determine the eventtype we want to set var types; // pointerEvents magic if(Hammer.HAS_POINTEREVENTS) { types = Hammer.PointerEvent.getEvents(); } // on Android, iOS, blackberry, windows mobile we dont want any mouseevents else if(Hammer.NO_MOUSEEVENTS) { types = [ 'touchstart', 'touchmove', 'touchend touchcancel']; } // for non pointer events browsers and mixed browsers, // like chrome on windows8 touch laptop else { types = [ 'touchstart mousedown', 'touchmove mousemove', 'touchend touchcancel mouseup']; } Hammer.EVENT_TYPES[Hammer.EVENT_START] = types[0]; Hammer.EVENT_TYPES[Hammer.EVENT_MOVE] = types[1]; Hammer.EVENT_TYPES[Hammer.EVENT_END] = types[2]; }, /** * create touchlist depending on the event * @param {Object} ev * @param {String} eventType used by the fakemultitouch plugin */ getTouchList: function getTouchList(ev/*, eventType*/) { // get the fake pointerEvent touchlist if(Hammer.HAS_POINTEREVENTS) { return Hammer.PointerEvent.getTouchList(); } // get the touchlist else if(ev.touches) { return ev.touches; } // make fake touchlist from mouse position else { return [{ identifier: 1, pageX: ev.pageX, pageY: ev.pageY, target: ev.target }]; } }, /** * collect event data for Hammer js * @param {HTMLElement} element * @param {String} eventType like Hammer.EVENT_MOVE * @param {Object} eventData */ collectEventData: function collectEventData(element, eventType, ev) { var touches = this.getTouchList(ev, eventType); // find out pointerType var pointerType = Hammer.POINTER_TOUCH; if(ev.type.match(/mouse/) || Hammer.PointerEvent.matchType(Hammer.POINTER_MOUSE, ev)) { pointerType = Hammer.POINTER_MOUSE; } return { center : Hammer.utils.getCenter(touches), timeStamp : new Date().getTime(), target : ev.target, touches : touches, eventType : eventType, pointerType : pointerType, srcEvent : ev, /** * prevent the browser default actions * mostly used to disable scrolling of the browser */ preventDefault: function() { if(this.srcEvent.preventManipulation) { this.srcEvent.preventManipulation(); } if(this.srcEvent.preventDefault) { this.srcEvent.preventDefault(); } }, /** * stop bubbling the event up to its parents */ stopPropagation: function() { this.srcEvent.stopPropagation(); }, /** * immediately stop gesture detection * might be useful after a swipe was detected * @return {*} */ stopDetect: function() { return Hammer.detection.stopDetect(); } }; } }; Hammer.PointerEvent = { /** * holds all pointers * @type {Object} */ pointers: {}, /** * get a list of pointers * @returns {Array} touchlist */ getTouchList: function() { var self = this; var touchlist = []; // we can use forEach since pointerEvents only is in IE10 Object.keys(self.pointers).sort().forEach(function(id) { touchlist.push(self.pointers[id]); }); return touchlist; }, /** * update the position of a pointer * @param {String} type Hammer.EVENT_END * @param {Object} pointerEvent */ updatePointer: function(type, pointerEvent) { if(type == Hammer.EVENT_END) { this.pointers = {}; } else { pointerEvent.identifier = pointerEvent.pointerId; this.pointers[pointerEvent.pointerId] = pointerEvent; } return Object.keys(this.pointers).length; }, /** * check if ev matches pointertype * @param {String} pointerType Hammer.POINTER_MOUSE * @param {PointerEvent} ev */ matchType: function(pointerType, ev) { if(!ev.pointerType) { return false; } var types = {}; types[Hammer.POINTER_MOUSE] = (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE || ev.pointerType == Hammer.POINTER_MOUSE); types[Hammer.POINTER_TOUCH] = (ev.pointerType == ev.MSPOINTER_TYPE_TOUCH || ev.pointerType == Hammer.POINTER_TOUCH); types[Hammer.POINTER_PEN] = (ev.pointerType == ev.MSPOINTER_TYPE_PEN || ev.pointerType == Hammer.POINTER_PEN); return types[pointerType]; }, /** * get events */ getEvents: function() { return [ 'pointerdown MSPointerDown', 'pointermove MSPointerMove', 'pointerup pointercancel MSPointerUp MSPointerCancel' ]; }, /** * reset the list */ reset: function() { this.pointers = {}; } }; Hammer.utils = { /** * extend method, * also used for cloning when dest is an empty object * @param {Object} dest * @param {Object} src * @parm {Boolean} merge do a merge * @returns {Object} dest */ extend: function extend(dest, src, merge) { for (var key in src) { if(dest[key] !== undefined && merge) { continue; } dest[key] = src[key]; } return dest; }, /** * find if a node is in the given parent * used for event delegation tricks * @param {HTMLElement} node * @param {HTMLElement} parent * @returns {boolean} has_parent */ hasParent: function(node, parent) { while(node){ if(node == parent) { return true; } node = node.parentNode; } return false; }, /** * get the center of all the touches * @param {Array} touches * @returns {Object} center */ getCenter: function getCenter(touches) { var valuesX = [], valuesY = []; for(var t= 0,len=touches.length; t<len; t++) { valuesX.push(touches[t].pageX); valuesY.push(touches[t].pageY); } return { pageX: ((Math.min.apply(Math, valuesX) + Math.max.apply(Math, valuesX)) / 2), pageY: ((Math.min.apply(Math, valuesY) + Math.max.apply(Math, valuesY)) / 2) }; }, /** * calculate the velocity between two points * @param {Number} delta_time * @param {Number} delta_x * @param {Number} delta_y * @returns {Object} velocity */ getVelocity: function getVelocity(delta_time, delta_x, delta_y) { return { x: Math.abs(delta_x / delta_time) || 0, y: Math.abs(delta_y / delta_time) || 0 }; }, /** * calculate the angle between two coordinates * @param {Touch} touch1 * @param {Touch} touch2 * @returns {Number} angle */ getAngle: function getAngle(touch1, touch2) { var y = touch2.pageY - touch1.pageY, x = touch2.pageX - touch1.pageX; return Math.atan2(y, x) * 180 / Math.PI; }, /** * angle to direction define * @param {Touch} touch1 * @param {Touch} touch2 * @returns {String} direction constant, like Hammer.DIRECTION_LEFT */ getDirection: function getDirection(touch1, touch2) { var x = Math.abs(touch1.pageX - touch2.pageX), y = Math.abs(touch1.pageY - touch2.pageY); if(x >= y) { return touch1.pageX - touch2.pageX > 0 ? Hammer.DIRECTION_LEFT : Hammer.DIRECTION_RIGHT; } else { return touch1.pageY - touch2.pageY > 0 ? Hammer.DIRECTION_UP : Hammer.DIRECTION_DOWN; } }, /** * calculate the distance between two touches * @param {Touch} touch1 * @param {Touch} touch2 * @returns {Number} distance */ getDistance: function getDistance(touch1, touch2) { var x = touch2.pageX - touch1.pageX, y = touch2.pageY - touch1.pageY; return Math.sqrt((x*x) + (y*y)); }, /** * calculate the scale factor between two touchLists (fingers) * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out * @param {Array} start * @param {Array} end * @returns {Number} scale */ getScale: function getScale(start, end) { // need two fingers... if(start.length >= 2 && end.length >= 2) { return this.getDistance(end[0], end[1]) / this.getDistance(start[0], start[1]); } return 1; }, /** * calculate the rotation degrees between two touchLists (fingers) * @param {Array} start * @param {Array} end * @returns {Number} rotation */ getRotation: function getRotation(start, end) { // need two fingers if(start.length >= 2 && end.length >= 2) { return this.getAngle(end[1], end[0]) - this.getAngle(start[1], start[0]); } return 0; }, /** * boolean if the direction is vertical * @param {String} direction * @returns {Boolean} is_vertical */ isVertical: function isVertical(direction) { return (direction == Hammer.DIRECTION_UP || direction == Hammer.DIRECTION_DOWN); }, /** * stop browser default behavior with css props * @param {HtmlElement} element * @param {Object} css_props */ stopDefaultBrowserBehavior: function stopDefaultBrowserBehavior(element, css_props) { var prop, vendors = ['webkit','khtml','moz','ms','o','']; if(!css_props || !element.style) { return; } // with css properties for modern browsers for(var i = 0; i < vendors.length; i++) { for(var p in css_props) { if(css_props.hasOwnProperty(p)) { prop = p; // vender prefix at the property if(vendors[i]) { prop = vendors[i] + prop.substring(0, 1).toUpperCase() + prop.substring(1); } // set the style element.style[prop] = css_props[p]; } } } // also the disable onselectstart if(css_props.userSelect == 'none') { element.onselectstart = function() { return false; }; } } }; Hammer.detection = { // contains all registred Hammer.gestures in the correct order gestures: [], // data of the current Hammer.gesture detection session current: null, // the previous Hammer.gesture session data // is a full clone of the previous gesture.current object previous: null, // when this becomes true, no gestures are fired stopped: false, /** * start Hammer.gesture detection * @param {Hammer.Instance} inst * @param {Object} eventData */ startDetect: function startDetect(inst, eventData) { // already busy with a Hammer.gesture detection on an element if(this.current) { return; } this.stopped = false; this.current = { inst : inst, // reference to HammerInstance we're working for startEvent : Hammer.utils.extend({}, eventData), // start eventData for distances, timing etc lastEvent : false, // last eventData name : '' // current gesture we're in/detected, can be 'tap', 'hold' etc }; this.detect(eventData); }, /** * Hammer.gesture detection * @param {Object} eventData * @param {Object} eventData */ detect: function detect(eventData) { if(!this.current || this.stopped) { return; } // extend event data with calculations about scale, distance etc eventData = this.extendEventData(eventData); // instance options var inst_options = this.current.inst.options; // call Hammer.gesture handlers for(var g=0,len=this.gestures.length; g<len; g++) { var gesture = this.gestures[g]; // only when the instance options have enabled this gesture if(!this.stopped && inst_options[gesture.name] !== false) { // if a handler returns false, we stop with the detection if(gesture.handler.call(gesture, eventData, this.current.inst) === false) { this.stopDetect(); break; } } } // store as previous event event if(this.current) { this.current.lastEvent = eventData; } // endevent, but not the last touch, so dont stop if(eventData.eventType == Hammer.EVENT_END && !eventData.touches.length-1) { this.stopDetect(); } return eventData; }, /** * clear the Hammer.gesture vars * this is called on endDetect, but can also be used when a final Hammer.gesture has been detected * to stop other Hammer.gestures from being fired */ stopDetect: function stopDetect() { // clone current data to the store as the previous gesture // used for the double tap gesture, since this is an other gesture detect session this.previous = Hammer.utils.extend({}, this.current); // reset the current this.current = null; // stopped! this.stopped = true; }, /** * extend eventData for Hammer.gestures * @param {Object} ev * @returns {Object} ev */ extendEventData: function extendEventData(ev) { var startEv = this.current.startEvent; // if the touches change, set the new touches over the startEvent touches // this because touchevents don't have all the touches on touchstart, or the // user must place his fingers at the EXACT same time on the screen, which is not realistic // but, sometimes it happens that both fingers are touching at the EXACT same time if(startEv && (ev.touches.length != startEv.touches.length || ev.touches === startEv.touches)) { // extend 1 level deep to get the touchlist with the touch objects startEv.touches = []; for(var i=0,len=ev.touches.length; i<len; i++) { startEv.touches.push(Hammer.utils.extend({}, ev.touches[i])); } } var delta_time = ev.timeStamp - startEv.timeStamp, delta_x = ev.center.pageX - startEv.center.pageX, delta_y = ev.center.pageY - startEv.center.pageY, velocity = Hammer.utils.getVelocity(delta_time, delta_x, delta_y); Hammer.utils.extend(ev, { deltaTime : delta_time, deltaX : delta_x, deltaY : delta_y, velocityX : velocity.x, velocityY : velocity.y, distance : Hammer.utils.getDistance(startEv.center, ev.center), angle : Hammer.utils.getAngle(startEv.center, ev.center), direction : Hammer.utils.getDirection(startEv.center, ev.center), scale : Hammer.utils.getScale(startEv.touches, ev.touches), rotation : Hammer.utils.getRotation(startEv.touches, ev.touches), startEvent : startEv }); return ev; }, /** * register new gesture * @param {Object} gesture object, see gestures.js for documentation * @returns {Array} gestures */ register: function register(gesture) { // add an enable gesture options if there is no given var options = gesture.defaults || {}; if(options[gesture.name] === undefined) { options[gesture.name] = true; } // extend Hammer default options with the Hammer.gesture options Hammer.utils.extend(Hammer.defaults, options, true); // set its index gesture.index = gesture.index || 1000; // add Hammer.gesture to the list this.gestures.push(gesture); // sort the list by index this.gestures.sort(function(a, b) { if (a.index < b.index) { return -1; } if (a.index > b.index) { return 1; } return 0; }); return this.gestures; } }; Hammer.gestures = Hammer.gestures || {}; /** * Custom gestures * ============================== * * Gesture object * -------------------- * The object structure of a gesture: * * { name: 'mygesture', * index: 1337, * defaults: { * mygesture_option: true * } * handler: function(type, ev, inst) { * // trigger gesture event * inst.trigger(this.name, ev); * } * } * @param {String} name * this should be the name of the gesture, lowercase * it is also being used to disable/enable the gesture per instance config. * * @param {Number} [index=1000] * the index of the gesture, where it is going to be in the stack of gestures detection * like when you build an gesture that depends on the drag gesture, it is a good * idea to place it after the index of the drag gesture. * * @param {Object} [defaults={}] * the default settings of the gesture. these are added to the instance settings, * and can be overruled per instance. you can also add the name of the gesture, * but this is also added by default (and set to true). * * @param {Function} handler * this handles the gesture detection of your custom gesture and receives the * following arguments: * * @param {Object} eventData * event data containing the following properties: * timeStamp {Number} time the event occurred * target {HTMLElement} target element * touches {Array} touches (fingers, pointers, mouse) on the screen * pointerType {String} kind of pointer that was used. matches Hammer.POINTER_MOUSE|TOUCH * center {Object} center position of the touches. contains pageX and pageY * deltaTime {Number} the total time of the touches in the screen * deltaX {Number} the delta on x axis we haved moved * deltaY {Number} the delta on y axis we haved moved * velocityX {Number} the velocity on the x * velocityY {Number} the velocity on y * angle {Number} the angle we are moving * direction {String} the direction we are moving. matches Hammer.DIRECTION_UP|DOWN|LEFT|RIGHT * distance {Number} the distance we haved moved * scale {Number} scaling of the touches, needs 2 touches * rotation {Number} rotation of the touches, needs 2 touches * * eventType {String} matches Hammer.EVENT_START|MOVE|END * srcEvent {Object} the source event, like TouchStart or MouseDown * * startEvent {Object} contains the same properties as above, * but from the first touch. this is used to calculate * distances, deltaTime, scaling etc * * @param {Hammer.Instance} inst * the instance we are doing the detection for. you can get the options from * the inst.options object and trigger the gesture event by calling inst.trigger * * * Handle gestures * -------------------- * inside the handler you can get/set Hammer.detection.current. This is the current * detection session. It has the following properties * @param {String} name * contains the name of the gesture we have detected. it has not a real function, * only to check in other gestures if something is detected. * like in the drag gesture we set it to 'drag' and in the swipe gesture we can * check if the current gesture is 'drag' by accessing Hammer.detection.current.name * * @readonly * @param {Hammer.Instance} inst * the instance we do the detection for * * @readonly * @param {Object} startEvent * contains the properties of the first gesture detection in this session. * Used for calculations about timing, distance, etc. * * @readonly * @param {Object} lastEvent * contains all the properties of the last gesture detect in this session. * * after the gesture detection session has been completed (user has released the screen) * the Hammer.detection.current object is copied into Hammer.detection.previous, * this is usefull for gestures like doubletap, where you need to know if the * previous gesture was a tap * * options that have been set by the instance can be received by calling inst.options * * You can trigger a gesture event by calling inst.trigger("mygesture", event). * The first param is the name of your gesture, the second the event argument * * * Register gestures * -------------------- * When an gesture is added to the Hammer.gestures object, it is auto registered * at the setup of the first Hammer instance. You can also call Hammer.detection.register * manually and pass your gesture object as a param * */ /** * Hold * Touch stays at the same place for x time * @events hold */ Hammer.gestures.Hold = { name: 'hold', index: 10, defaults: { hold_timeout : 500, hold_threshold : 1 }, timer: null, handler: function holdGesture(ev, inst) { switch(ev.eventType) { case Hammer.EVENT_START: // clear any running timers clearTimeout(this.timer); // set the gesture so we can check in the timeout if it still is Hammer.detection.current.name = this.name; // set timer and if after the timeout it still is hold, // we trigger the hold event this.timer = setTimeout(function() { if(Hammer.detection.current.name == 'hold') { inst.trigger('hold', ev); } }, inst.options.hold_timeout); break; // when you move or end we clear the timer case Hammer.EVENT_MOVE: if(ev.distance > inst.options.hold_threshold) { clearTimeout(this.timer); } break; case Hammer.EVENT_END: clearTimeout(this.timer); break; } } }; /** * Tap/DoubleTap * Quick touch at a place or double at the same place * @events tap, doubletap */ Hammer.gestures.Tap = { name: 'tap', index: 100, defaults: { tap_max_touchtime : 250, tap_max_distance : 10, tap_always : true, doubletap_distance : 20, doubletap_interval : 300 }, handler: function tapGesture(ev, inst) { if(ev.eventType == Hammer.EVENT_END) { // previous gesture, for the double tap since these are two different gesture detections var prev = Hammer.detection.previous, did_doubletap = false; // when the touchtime is higher then the max touch time // or when the moving distance is too much if(ev.deltaTime > inst.options.tap_max_touchtime || ev.distance > inst.options.tap_max_distance) { return; } // check if double tap if(prev && prev.name == 'tap' && (ev.timeStamp - prev.lastEvent.timeStamp) < inst.options.doubletap_interval && ev.distance < inst.options.doubletap_distance) { inst.trigger('doubletap', ev); did_doubletap = true; } // do a single tap if(!did_doubletap || inst.options.tap_always) { Hammer.detection.current.name = 'tap'; inst.trigger(Hammer.detection.current.name, ev); } } } }; /** * Swipe * triggers swipe events when the end velocity is above the threshold * @events swipe, swipeleft, swiperight, swipeup, swipedown */ Hammer.gestures.Swipe = { name: 'swipe', index: 40, defaults: { // set 0 for unlimited, but this can conflict with transform swipe_max_touches : 1, swipe_velocity : 0.7 }, handler: function swipeGesture(ev, inst) { if(ev.eventType == Hammer.EVENT_END) { // max touches if(inst.options.swipe_max_touches > 0 && ev.touches.length > inst.options.swipe_max_touches) { return; } // when the distance we moved is too small we skip this gesture // or we can be already in dragging if(ev.velocityX > inst.options.swipe_velocity || ev.velocityY > inst.options.swipe_velocity) { // trigger swipe events inst.trigger(this.name, ev); inst.trigger(this.name + ev.direction, ev); } } } }; /** * Drag * Move with x fingers (default 1) around on the page. Blocking the scrolling when * moving left and right is a good practice. When all the drag events are blocking * you disable scrolling on that area. * @events drag, drapleft, dragright, dragup, dragdown */ Hammer.gestures.Drag = { name: 'drag', index: 50, defaults: { drag_min_distance : 10, // set 0 for unlimited, but this can conflict with transform drag_max_touches : 1, // prevent default browser behavior when dragging occurs // be careful with it, it makes the element a blocking element // when you are using the drag gesture, it is a good practice to set this true drag_block_horizontal : false, drag_block_vertical : false, // drag_lock_to_axis keeps the drag gesture on the axis that it started on, // It disallows vertical directions if the initial direction was horizontal, and vice versa. drag_lock_to_axis : false, // drag lock only kicks in when distance > drag_lock_min_distance // This way, locking occurs only when the distance has become large enough to reliably determine the direction drag_lock_min_distance : 25 }, triggered: false, handler: function dragGesture(ev, inst) { // current gesture isnt drag, but dragged is true // this means an other gesture is busy. now call dragend if(Hammer.detection.current.name != this.name && this.triggered) { inst.trigger(this.name +'end', ev); this.triggered = false; return; } // max touches if(inst.options.drag_max_touches > 0 && ev.touches.length > inst.options.drag_max_touches) { return; } switch(ev.eventType) { case Hammer.EVENT_START: this.triggered = false; break; case Hammer.EVENT_MOVE: // when the distance we moved is too small we skip this gesture // or we can be already in dragging if(ev.distance < inst.options.drag_min_distance && Hammer.detection.current.name != this.name) { return; } // we are dragging! Hammer.detection.current.name = this.name; // lock drag to axis? if(Hammer.detection.current.lastEvent.drag_locked_to_axis || (inst.options.drag_lock_to_axis && inst.options.drag_lock_min_distance<=ev.distance)) { ev.drag_locked_to_axis = true; } var last_direction = Hammer.detection.current.lastEvent.direction; if(ev.drag_locked_to_axis && last_direction !== ev.direction) { // keep direction on the axis that the drag gesture started on if(Hammer.utils.isVertical(last_direction)) { ev.direction = (ev.deltaY < 0) ? Hammer.DIRECTION_UP : Hammer.DIRECTION_DOWN; } else { ev.direction = (ev.deltaX < 0) ? Hammer.DIRECTION_LEFT : Hammer.DIRECTION_RIGHT; } } // first time, trigger dragstart event if(!this.triggered) { inst.trigger(this.name +'start', ev); this.triggered = true; } // trigger normal event inst.trigger(this.name, ev); // direction event, like dragdown inst.trigger(this.name + ev.direction, ev); // block the browser events if( (inst.options.drag_block_vertical && Hammer.utils.isVertical(ev.direction)) || (inst.options.drag_block_horizontal && !Hammer.utils.isVertical(ev.direction))) { ev.preventDefault(); } break; case Hammer.EVENT_END: // trigger dragend if(this.triggered) { inst.trigger(this.name +'end', ev); } this.triggered = false; break; } } }; /** * Transform * User want to scale or rotate with 2 fingers * @events transform, pinch, pinchin, pinchout, rotate */ Hammer.gestures.Transform = { name: 'transform', index: 45, defaults: { // factor, no scale is 1, zoomin is to 0 and zoomout until higher then 1 transform_min_scale : 0.01, // rotation in degrees transform_min_rotation : 1, // prevent default browser behavior when two touches are on the screen // but it makes the element a blocking element // when you are using the transform gesture, it is a good practice to set this true transform_always_block : false }, triggered: false, handler: function transformGesture(ev, inst) { // current gesture isnt drag, but dragged is true // this means an other gesture is busy. now call dragend if(Hammer.detection.current.name != this.name && this.triggered) { inst.trigger(this.name +'end', ev); this.triggered = false; return; } // atleast multitouch if(ev.touches.length < 2) { return; } // prevent default when two fingers are on the screen if(inst.options.transform_always_block) { ev.preventDefault(); } switch(ev.eventType) { case Hammer.EVENT_START: this.triggered = false; break; case Hammer.EVENT_MOVE: var scale_threshold = Math.abs(1-ev.scale); var rotation_threshold = Math.abs(ev.rotation); // when the distance we moved is too small we skip this gesture // or we can be already in dragging if(scale_threshold < inst.options.transform_min_scale && rotation_threshold < inst.options.transform_min_rotation) { return; } // we are transforming! Hammer.detection.current.name = this.name; // first time, trigger dragstart event if(!this.triggered) { inst.trigger(this.name +'start', ev); this.triggered = true; } inst.trigger(this.name, ev); // basic transform event // trigger rotate event if(rotation_threshold > inst.options.transform_min_rotation) { inst.trigger('rotate', ev); } // trigger pinch event if(scale_threshold > inst.options.transform_min_scale) { inst.trigger('pinch', ev); inst.trigger('pinch'+ ((ev.scale < 1) ? 'in' : 'out'), ev); } break; case Hammer.EVENT_END: // trigger dragend if(this.triggered) { inst.trigger(this.name +'end', ev); } this.triggered = false; break; } } }; /** * Touch * Called as first, tells the user has touched the screen * @events touch */ Hammer.gestures.Touch = { name: 'touch', index: -Infinity, defaults: { // call preventDefault at touchstart, and makes the element blocking by // disabling the scrolling of the page, but it improves gestures like // transforming and dragging. // be careful with using this, it can be very annoying for users to be stuck // on the page prevent_default: false, // disable mouse events, so only touch (or pen!) input triggers events prevent_mouseevents: false }, handler: function touchGesture(ev, inst) { if(inst.options.prevent_mouseevents && ev.pointerType == Hammer.POINTER_MOUSE) { ev.stopDetect(); return; } if(inst.options.prevent_default) { ev.preventDefault(); } if(ev.eventType == Hammer.EVENT_START) { inst.trigger(this.name, ev); } } }; /** * Release * Called as last, tells the user has released the screen * @events release */ Hammer.gestures.Release = { name: 'release', index: Infinity, handler: function releaseGesture(ev, inst) { if(ev.eventType == Hammer.EVENT_END) { inst.trigger(this.name, ev); } } }; // node export if(typeof module === 'object' && typeof module.exports === 'object'){ module.exports = Hammer; } // just window export else { window.Hammer = Hammer; // requireJS module definition if(typeof window.define === 'function' && window.define.amd) { window.define('hammer', [], function() { return Hammer; }); } } })(this); },{}],4:[function(require,module,exports){ var global=typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};//! moment.js //! version : 2.6.0 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com (function (undefined) { /************************************ Constants ************************************/ var moment, VERSION = "2.6.0", // the global-scope this is NOT the global object in Node.js globalScope = typeof global !== 'undefined' ? global : this, oldGlobalMoment, round = Math.round, i, YEAR = 0, MONTH = 1, DATE = 2, HOUR = 3, MINUTE = 4, SECOND = 5, MILLISECOND = 6, // internal storage for language config files languages = {}, // moment internal properties momentProperties = { _isAMomentObject: null, _i : null, _f : null, _l : null, _strict : null, _isUTC : null, _offset : null, // optional. Combine with _isUTC _pf : null, _lang : null // optional }, // check for nodeJS hasModule = (typeof module !== 'undefined' && module.exports), // ASP.NET json date format regex aspNetJsonRegex = /^\/?Date\((\-?\d+)/i, aspNetTimeSpanJsonRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/, // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere isoDurationRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/, // format tokens formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g, localFormattingTokens = /(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g, // parsing token regexes parseTokenOneOrTwoDigits = /\d\d?/, // 0 - 99 parseTokenOneToThreeDigits = /\d{1,3}/, // 0 - 999 parseTokenOneToFourDigits = /\d{1,4}/, // 0 - 9999 parseTokenOneToSixDigits = /[+\-]?\d{1,6}/, // -999,999 - 999,999 parseTokenDigits = /\d+/, // nonzero number of digits parseTokenWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, // any word (or two) characters or numbers including two/three word month in arabic. parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z parseTokenT = /T/i, // T (ISO separator) parseTokenTimestampMs = /[\+\-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123 parseTokenOrdinal = /\d{1,2}/, //strict parsing regexes parseTokenOneDigit = /\d/, // 0 - 9 parseTokenTwoDigits = /\d\d/, // 00 - 99 parseTokenThreeDigits = /\d{3}/, // 000 - 999 parseTokenFourDigits = /\d{4}/, // 0000 - 9999 parseTokenSixDigits = /[+-]?\d{6}/, // -999,999 - 999,999 parseTokenSignedNumber = /[+-]?\d+/, // -inf - inf // iso 8601 regex // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) isoRegex = /^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/, isoFormat = 'YYYY-MM-DDTHH:mm:ssZ', isoDates = [ ['YYYYYY-MM-DD', /[+-]\d{6}-\d{2}-\d{2}/], ['YYYY-MM-DD', /\d{4}-\d{2}-\d{2}/], ['GGGG-[W]WW-E', /\d{4}-W\d{2}-\d/], ['GGGG-[W]WW', /\d{4}-W\d{2}/], ['YYYY-DDD', /\d{4}-\d{3}/] ], // iso time formats and regexes isoTimes = [ ['HH:mm:ss.SSSS', /(T| )\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/], ['HH:mm', /(T| )\d\d:\d\d/], ['HH', /(T| )\d\d/] ], // timezone chunker "+10:00" > ["10", "00"] or "-1530" > ["-15", "30"] parseTimezoneChunker = /([\+\-]|\d\d)/gi, // getter and setter names proxyGettersAndSetters = 'Date|Hours|Minutes|Seconds|Milliseconds'.split('|'), unitMillisecondFactors = { 'Milliseconds' : 1, 'Seconds' : 1e3, 'Minutes' : 6e4, 'Hours' : 36e5, 'Days' : 864e5, 'Months' : 2592e6, 'Years' : 31536e6 }, unitAliases = { ms : 'millisecond', s : 'second', m : 'minute', h : 'hour', d : 'day', D : 'date', w : 'week', W : 'isoWeek', M : 'month', Q : 'quarter', y : 'year', DDD : 'dayOfYear', e : 'weekday', E : 'isoWeekday', gg: 'weekYear', GG: 'isoWeekYear' }, camelFunctions = { dayofyear : 'dayOfYear', isoweekday : 'isoWeekday', isoweek : 'isoWeek', weekyear : 'weekYear', isoweekyear : 'isoWeekYear' }, // format function strings formatFunctions = {}, // tokens to ordinalize and pad ordinalizeTokens = 'DDD w W M D d'.split(' '), paddedTokens = 'M D H h m s w W'.split(' '), formatTokenFunctions = { M : function () { return this.month() + 1; }, MMM : function (format) { return this.lang().monthsShort(this, format); }, MMMM : function (format) { return this.lang().months(this, format); }, D : function () { return this.date(); }, DDD : function () { return this.dayOfYear(); }, d : function () { return this.day(); }, dd : function (format) { return this.lang().weekdaysMin(this, format); }, ddd : function (format) { return this.lang().weekdaysShort(this, format); }, dddd : function (format) { return this.lang().weekdays(this, format); }, w : function () { return this.week(); }, W : function () { return this.isoWeek(); }, YY : function () { return leftZeroFill(this.year() % 100, 2); }, YYYY : function () { return leftZeroFill(this.year(), 4); }, YYYYY : function () { return leftZeroFill(this.year(), 5); }, YYYYYY : function () { var y = this.year(), sign = y >= 0 ? '+' : '-'; return sign + leftZeroFill(Math.abs(y), 6); }, gg : function () { return leftZeroFill(this.weekYear() % 100, 2); }, gggg : function () { return leftZeroFill(this.weekYear(), 4); }, ggggg : function () { return leftZeroFill(this.weekYear(), 5); }, GG : function () { return leftZeroFill(this.isoWeekYear() % 100, 2); }, GGGG : function () { return leftZeroFill(this.isoWeekYear(), 4); }, GGGGG : function () { return leftZeroFill(this.isoWeekYear(), 5); }, e : function () { return this.weekday(); }, E : function () { return this.isoWeekday(); }, a : function () { return this.lang().meridiem(this.hours(), this.minutes(), true); }, A : function () { return this.lang().meridiem(this.hours(), this.minutes(), false); }, H : function () { return this.hours(); }, h : function () { return this.hours() % 12 || 12; }, m : function () { return this.minutes(); }, s : function () { return this.seconds(); }, S : function () { return toInt(this.milliseconds() / 100); }, SS : function () { return leftZeroFill(toInt(this.milliseconds() / 10), 2); }, SSS : function () { return leftZeroFill(this.milliseconds(), 3); }, SSSS : function () { return leftZeroFill(this.milliseconds(), 3); }, Z : function () { var a = -this.zone(), b = "+"; if (a < 0) { a = -a; b = "-"; } return b + leftZeroFill(toInt(a / 60), 2) + ":" + leftZeroFill(toInt(a) % 60, 2); }, ZZ : function () { var a = -this.zone(), b = "+"; if (a < 0) { a = -a; b = "-"; } return b + leftZeroFill(toInt(a / 60), 2) + leftZeroFill(toInt(a) % 60, 2); }, z : function () { return this.zoneAbbr(); }, zz : function () { return this.zoneName(); }, X : function () { return this.unix(); }, Q : function () { return this.quarter(); } }, lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin']; function defaultParsingFlags() { // We need to deep clone this object, and es5 standard is not very // helpful. return { empty : false, unusedTokens : [], unusedInput : [], overflow : -2, charsLeftOver : 0, nullInput : false, invalidMonth : null, invalidFormat : false, userInvalidated : false, iso: false }; } function deprecate(msg, fn) { var firstTime = true; function printMsg() { if (moment.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { console.warn("Deprecation warning: " + msg); } } return extend(function () { if (firstTime) { printMsg(); firstTime = false; } return fn.apply(this, arguments); }, fn); } function padToken(func, count) { return function (a) { return leftZeroFill(func.call(this, a), count); }; } function ordinalizeToken(func, period) { return function (a) { return this.lang().ordinal(func.call(this, a), period); }; } while (ordinalizeTokens.length) { i = ordinalizeTokens.pop(); formatTokenFunctions[i + 'o'] = ordinalizeToken(formatTokenFunctions[i], i); } while (paddedTokens.length) { i = paddedTokens.pop(); formatTokenFunctions[i + i] = padToken(formatTokenFunctions[i], 2); } formatTokenFunctions.DDDD = padToken(formatTokenFunctions.DDD, 3); /************************************ Constructors ************************************/ function Language() { } // Moment prototype object function Moment(config) { checkOverflow(config); extend(this, config); } // Duration Constructor function Duration(duration) { var normalizedInput = normalizeObjectUnits(duration), years = normalizedInput.year || 0, quarters = normalizedInput.quarter || 0, months = normalizedInput.month || 0, weeks = normalizedInput.week || 0, days = normalizedInput.day || 0, hours = normalizedInput.hour || 0, minutes = normalizedInput.minute || 0, seconds = normalizedInput.second || 0, milliseconds = normalizedInput.millisecond || 0; // representation for dateAddRemove this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 minutes * 6e4 + // 1000 * 60 hours * 36e5; // 1000 * 60 * 60 // Because of dateAddRemove treats 24 hours as different from a // day when working around DST, we need to store them separately this._days = +days + weeks * 7; // It is impossible translate months into days without knowing // which months you are are talking about, so we have to store // it separately. this._months = +months + quarters * 3 + years * 12; this._data = {}; this._bubble(); } /************************************ Helpers ************************************/ function extend(a, b) { for (var i in b) { if (b.hasOwnProperty(i)) { a[i] = b[i]; } } if (b.hasOwnProperty("toString")) { a.toString = b.toString; } if (b.hasOwnProperty("valueOf")) { a.valueOf = b.valueOf; } return a; } function cloneMoment(m) { var result = {}, i; for (i in m) { if (m.hasOwnProperty(i) && momentProperties.hasOwnProperty(i)) { result[i] = m[i]; } } return result; } function absRound(number) { if (number < 0) { return Math.ceil(number); } else { return Math.floor(number); } } // left zero fill a number // see http://jsperf.com/left-zero-filling for performance comparison function leftZeroFill(number, targetLength, forceSign) { var output = '' + Math.abs(number), sign = number >= 0; while (output.length < targetLength) { output = '0' + output; } return (sign ? (forceSign ? '+' : '') : '-') + output; } // helper function for _.addTime and _.subtractTime function addOrSubtractDurationFromMoment(mom, duration, isAdding, updateOffset) { var milliseconds = duration._milliseconds, days = duration._days, months = duration._months; updateOffset = updateOffset == null ? true : updateOffset; if (milliseconds) { mom._d.setTime(+mom._d + milliseconds * isAdding); } if (days) { rawSetter(mom, 'Date', rawGetter(mom, 'Date') + days * isAdding); } if (months) { rawMonthSetter(mom, rawGetter(mom, 'Month') + months * isAdding); } if (updateOffset) { moment.updateOffset(mom, days || months); } } // check if is an array function isArray(input) { return Object.prototype.toString.call(input) === '[object Array]'; } function isDate(input) { return Object.prototype.toString.call(input) === '[object Date]' || input instanceof Date; } // compare two arrays, return the number of differences function compareArrays(array1, array2, dontConvert) { var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), diffs = 0, i; for (i = 0; i < len; i++) { if ((dontConvert && array1[i] !== array2[i]) || (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { diffs++; } } return diffs + lengthDiff; } function normalizeUnits(units) { if (units) { var lowered = units.toLowerCase().replace(/(.)s$/, '$1'); units = unitAliases[units] || camelFunctions[lowered] || lowered; } return units; } function normalizeObjectUnits(inputObject) { var normalizedInput = {}, normalizedProp, prop; for (prop in inputObject) { if (inputObject.hasOwnProperty(prop)) { normalizedProp = normalizeUnits(prop); if (normalizedProp) { normalizedInput[normalizedProp] = inputObject[prop]; } } } return normalizedInput; } function makeList(field) { var count, setter; if (field.indexOf('week') === 0) { count = 7; setter = 'day'; } else if (field.indexOf('month') === 0) { count = 12; setter = 'month'; } else { return; } moment[field] = function (format, index) { var i, getter, method = moment.fn._lang[field], results = []; if (typeof format === 'number') { index = format; format = undefined; } getter = function (i) { var m = moment().utc().set(setter, i); return method.call(moment.fn._lang, m, format || ''); }; if (index != null) { return getter(index); } else { for (i = 0; i < count; i++) { results.push(getter(i)); } return results; } }; } function toInt(argumentForCoercion) { var coercedNumber = +argumentForCoercion, value = 0; if (coercedNumber !== 0 && isFinite(coercedNumber)) { if (coercedNumber >= 0) { value = Math.floor(coercedNumber); } else { value = Math.ceil(coercedNumber); } } return value; } function daysInMonth(year, month) { return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); } function weeksInYear(year, dow, doy) { return weekOfYear(moment([year, 11, 31 + dow - doy]), dow, doy).week; } function daysInYear(year) { return isLeapYear(year) ? 366 : 365; } function isLeapYear(year) { return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; } function checkOverflow(m) { var overflow; if (m._a && m._pf.overflow === -2) { overflow = m._a[MONTH] < 0 || m._a[MONTH] > 11 ? MONTH : m._a[DATE] < 1 || m._a[DATE] > daysInMonth(m._a[YEAR], m._a[MONTH]) ? DATE : m._a[HOUR] < 0 || m._a[HOUR] > 23 ? HOUR : m._a[MINUTE] < 0 || m._a[MINUTE] > 59 ? MINUTE : m._a[SECOND] < 0 || m._a[SECOND] > 59 ? SECOND : m._a[MILLISECOND] < 0 || m._a[MILLISECOND] > 999 ? MILLISECOND : -1; if (m._pf._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { overflow = DATE; } m._pf.overflow = overflow; } } function isValid(m) { if (m._isValid == null) { m._isValid = !isNaN(m._d.getTime()) && m._pf.overflow < 0 && !m._pf.empty && !m._pf.invalidMonth && !m._pf.nullInput && !m._pf.invalidFormat && !m._pf.userInvalidated; if (m._strict) { m._isValid = m._isValid && m._pf.charsLeftOver === 0 && m._pf.unusedTokens.length === 0; } } return m._isValid; } function normalizeLanguage(key) { return key ? key.toLowerCase().replace('_', '-') : key; } // Return a moment from input, that is local/utc/zone equivalent to model. function makeAs(input, model) { return model._isUTC ? moment(input).zone(model._offset || 0) : moment(input).local(); } /************************************ Languages ************************************/ extend(Language.prototype, { set : function (config) { var prop, i; for (i in config) { prop = config[i]; if (typeof prop === 'function') { this[i] = prop; } else { this['_' + i] = prop; } } }, _months : "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), months : function (m) { return this._months[m.month()]; }, _monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), monthsShort : function (m) { return this._monthsShort[m.month()]; }, monthsParse : function (monthName) { var i, mom, regex; if (!this._monthsParse) { this._monthsParse = []; } for (i = 0; i < 12; i++) { // make the regex if we don't have it already if (!this._monthsParse[i]) { mom = moment.utc([2000, i]); regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); } // test the regex if (this._monthsParse[i].test(monthName)) { return i; } } }, _weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), weekdays : function (m) { return this._weekdays[m.day()]; }, _weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), weekdaysShort : function (m) { return this._weekdaysShort[m.day()]; }, _weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), weekdaysMin : function (m) { return this._weekdaysMin[m.day()]; }, weekdaysParse : function (weekdayName) { var i, mom, regex; if (!this._weekdaysParse) { this._weekdaysParse = []; } for (i = 0; i < 7; i++) { // make the regex if we don't have it already if (!this._weekdaysParse[i]) { mom = moment([2000, 1]).day(i); regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); } // test the regex if (this._weekdaysParse[i].test(weekdayName)) { return i; } } }, _longDateFormat : { LT : "h:mm A", L : "MM/DD/YYYY", LL : "MMMM D YYYY", LLL : "MMMM D YYYY LT", LLLL : "dddd, MMMM D YYYY LT" }, longDateFormat : function (key) { var output = this._longDateFormat[key]; if (!output && this._longDateFormat[key.toUpperCase()]) { output = this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (val) { return val.slice(1); }); this._longDateFormat[key] = output; } return output; }, isPM : function (input) { // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays // Using charAt should be more compatible. return ((input + '').toLowerCase().charAt(0) === 'p'); }, _meridiemParse : /[ap]\.?m?\.?/i, meridiem : function (hours, minutes, isLower) { if (hours > 11) { return isLower ? 'pm' : 'PM'; } else { return isLower ? 'am' : 'AM'; } }, _calendar : { sameDay : '[Today at] LT', nextDay : '[Tomorrow at] LT', nextWeek : 'dddd [at] LT', lastDay : '[Yesterday at] LT', lastWeek : '[Last] dddd [at] LT', sameElse : 'L' }, calendar : function (key, mom) { var output = this._calendar[key]; return typeof output === 'function' ? output.apply(mom) : output; }, _relativeTime : { future : "in %s", past : "%s ago", s : "a few seconds", m : "a minute", mm : "%d minutes", h : "an hour", hh : "%d hours", d : "a day", dd : "%d days", M : "a month", MM : "%d months", y : "a year", yy : "%d years" }, relativeTime : function (number, withoutSuffix, string, isFuture) { var output = this._relativeTime[string]; return (typeof output === 'function') ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); }, pastFuture : function (diff, output) { var format = this._relativeTime[diff > 0 ? 'future' : 'past']; return typeof format === 'function' ? format(output) : format.replace(/%s/i, output); }, ordinal : function (number) { return this._ordinal.replace("%d", number); }, _ordinal : "%d", preparse : function (string) { return string; }, postformat : function (string) { return string; }, week : function (mom) { return weekOfYear(mom, this._week.dow, this._week.doy).week; }, _week : { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 1st is the first week of the year. }, _invalidDate: 'Invalid date', invalidDate: function () { return this._invalidDate; } }); // Loads a language definition into the `languages` cache. The function // takes a key and optionally values. If not in the browser and no values // are provided, it will load the language file module. As a convenience, // this function also returns the language values. function loadLang(key, values) { values.abbr = key; if (!languages[key]) { languages[key] = new Language(); } languages[key].set(values); return languages[key]; } // Remove a language from the `languages` cache. Mostly useful in tests. function unloadLang(key) { delete languages[key]; } // Determines which language definition to use and returns it. // // With no parameters, it will return the global language. If you // pass in a language key, such as 'en', it will return the // definition for 'en', so long as 'en' has already been loaded using // moment.lang. function getLangDefinition(key) { var i = 0, j, lang, next, split, get = function (k) { if (!languages[k] && hasModule) { try { require('./lang/' + k); } catch (e) { } } return languages[k]; }; if (!key) { return moment.fn._lang; } if (!isArray(key)) { //short-circuit everything else lang = get(key); if (lang) { return lang; } key = [key]; } //pick the language from the array //try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each //substring from most specific to least, but move to the next array item if it's a more specific variant than the current root while (i < key.length) { split = normalizeLanguage(key[i]).split('-'); j = split.length; next = normalizeLanguage(key[i + 1]); next = next ? next.split('-') : null; while (j > 0) { lang = get(split.slice(0, j).join('-')); if (lang) { return lang; } if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { //the next array item is better than a shallower substring of this one break; } j--; } i++; } return moment.fn._lang; } /************************************ Formatting ************************************/ function removeFormattingTokens(input) { if (input.match(/\[[\s\S]/)) { return input.replace(/^\[|\]$/g, ""); } return input.replace(/\\/g, ""); } function makeFormatFunction(format) { var array = format.match(formattingTokens), i, length; for (i = 0, length = array.length; i < length; i++) { if (formatTokenFunctions[array[i]]) { array[i] = formatTokenFunctions[array[i]]; } else { array[i] = removeFormattingTokens(array[i]); } } return function (mom) { var output = ""; for (i = 0; i < length; i++) { output += array[i] instanceof Function ? array[i].call(mom, format) : array[i]; } return output; }; } // format date using native date object function formatMoment(m, format) { if (!m.isValid()) { return m.lang().invalidDate(); } format = expandFormat(format, m.lang()); if (!formatFunctions[format]) { formatFunctions[format] = makeFormatFunction(format); } return formatFunctions[format](m); } function expandFormat(format, lang) { var i = 5; function replaceLongDateFormatTokens(input) { return lang.longDateFormat(input) || input; } localFormattingTokens.lastIndex = 0; while (i >= 0 && localFormattingTokens.test(format)) { format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); localFormattingTokens.lastIndex = 0; i -= 1; } return format; } /************************************ Parsing ************************************/ // get the regex to find the next token function getParseRegexForToken(token, config) { var a, strict = config._strict; switch (token) { case 'Q': return parseTokenOneDigit; case 'DDDD': return parseTokenThreeDigits; case 'YYYY': case 'GGGG': case 'gggg': return strict ? parseTokenFourDigits : parseTokenOneToFourDigits; case 'Y': case 'G': case 'g': return parseTokenSignedNumber; case 'YYYYYY': case 'YYYYY': case 'GGGGG': case 'ggggg': return strict ? parseTokenSixDigits : parseTokenOneToSixDigits; case 'S': if (strict) { return parseTokenOneDigit; } /* falls through */ case 'SS': if (strict) { return parseTokenTwoDigits; } /* falls through */ case 'SSS': if (strict) { return parseTokenThreeDigits; } /* falls through */ case 'DDD': return parseTokenOneToThreeDigits; case 'MMM': case 'MMMM': case 'dd': case 'ddd': case 'dddd': return parseTokenWord; case 'a': case 'A': return getLangDefinition(config._l)._meridiemParse; case 'X': return parseTokenTimestampMs; case 'Z': case 'ZZ': return parseTokenTimezone; case 'T': return parseTokenT; case 'SSSS': return parseTokenDigits; case 'MM': case 'DD': case 'YY': case 'GG': case 'gg': case 'HH': case 'hh': case 'mm': case 'ss': case 'ww': case 'WW': return strict ? parseTokenTwoDigits : parseTokenOneOrTwoDigits; case 'M': case 'D': case 'd': case 'H': case 'h': case 'm': case 's': case 'w': case 'W': case 'e': case 'E': return parseTokenOneOrTwoDigits; case 'Do': return parseTokenOrdinal; default : a = new RegExp(regexpEscape(unescapeFormat(token.replace('\\', '')), "i")); return a; } } function timezoneMinutesFromString(string) { string = string || ""; var possibleTzMatches = (string.match(parseTokenTimezone) || []), tzChunk = possibleTzMatches[possibleTzMatches.length - 1] || [], parts = (tzChunk + '').match(parseTimezoneChunker) || ['-', 0, 0], minutes = +(parts[1] * 60) + toInt(parts[2]); return parts[0] === '+' ? -minutes : minutes; } // function to convert string input to date function addTimeToArrayFromToken(token, input, config) { var a, datePartArray = config._a; switch (token) { // QUARTER case 'Q': if (input != null) { datePartArray[MONTH] = (toInt(input) - 1) * 3; } break; // MONTH case 'M' : // fall through to MM case 'MM' : if (input != null) { datePartArray[MONTH] = toInt(input) - 1; } break; case 'MMM' : // fall through to MMMM case 'MMMM' : a = getLangDefinition(config._l).monthsParse(input); // if we didn't find a month name, mark the date as invalid. if (a != null) { datePartArray[MONTH] = a; } else { config._pf.invalidMonth = input; } break; // DAY OF MONTH case 'D' : // fall through to DD case 'DD' : if (input != null) { datePartArray[DATE] = toInt(input); } break; case 'Do' : if (input != null) { datePartArray[DATE] = toInt(parseInt(input, 10)); } break; // DAY OF YEAR case 'DDD' : // fall through to DDDD case 'DDDD' : if (input != null) { config._dayOfYear = toInt(input); } break; // YEAR case 'YY' : datePartArray[YEAR] = moment.parseTwoDigitYear(input); break; case 'YYYY' : case 'YYYYY' : case 'YYYYYY' : datePartArray[YEAR] = toInt(input); break; // AM / PM case 'a' : // fall through to A case 'A' : config._isPm = getLangDefinition(config._l).isPM(input); break; // 24 HOUR case 'H' : // fall through to hh case 'HH' : // fall through to hh case 'h' : // fall through to hh case 'hh' : datePartArray[HOUR] = toInt(input); break; // MINUTE case 'm' : // fall through to mm case 'mm' : datePartArray[MINUTE] = toInt(input); break; // SECOND case 's' : // fall through to ss case 'ss' : datePartArray[SECOND] = toInt(input); break; // MILLISECOND case 'S' : case 'SS' : case 'SSS' : case 'SSSS' : datePartArray[MILLISECOND] = toInt(('0.' + input) * 1000); break; // UNIX TIMESTAMP WITH MS case 'X': config._d = new Date(parseFloat(input) * 1000); break; // TIMEZONE case 'Z' : // fall through to ZZ case 'ZZ' : config._useUTC = true; config._tzm = timezoneMinutesFromString(input); break; case 'w': case 'ww': case 'W': case 'WW': case 'd': case 'dd': case 'ddd': case 'dddd': case 'e': case 'E': token = token.substr(0, 1); /* falls through */ case 'gg': case 'gggg': case 'GG': case 'GGGG': case 'GGGGG': token = token.substr(0, 2); if (input) { config._w = config._w || {}; config._w[token] = input; } break; } } // convert an array to a date. // the array should mirror the parameters below // note: all values past the year are optional and will default to the lowest possible value. // [year, month, day , hour, minute, second, millisecond] function dateFromConfig(config) { var i, date, input = [], currentDate, yearToUse, fixYear, w, temp, lang, weekday, week; if (config._d) { return; } currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { fixYear = function (val) { var intVal = parseInt(val, 10); return val ? (val.length < 3 ? (intVal > 68 ? 1900 + intVal : 2000 + intVal) : intVal) : (config._a[YEAR] == null ? moment().weekYear() : config._a[YEAR]); }; w = config._w; if (w.GG != null || w.W != null || w.E != null) { temp = dayOfYearFromWeeks(fixYear(w.GG), w.W || 1, w.E, 4, 1); } else { lang = getLangDefinition(config._l); weekday = w.d != null ? parseWeekday(w.d, lang) : (w.e != null ? parseInt(w.e, 10) + lang._week.dow : 0); week = parseInt(w.w, 10) || 1; //if we're parsing 'd', then the low day numbers may be next week if (w.d != null && weekday < lang._week.dow) { week++; } temp = dayOfYearFromWeeks(fixYear(w.gg), week, weekday, lang._week.doy, lang._week.dow); } config._a[YEAR] = temp.year; config._dayOfYear = temp.dayOfYear; } //if the day of the year is set, figure out what it is if (config._dayOfYear) { yearToUse = config._a[YEAR] == null ? currentDate[YEAR] : config._a[YEAR]; if (config._dayOfYear > daysInYear(yearToUse)) { config._pf._overflowDayOfYear = true; } date = makeUTCDate(yearToUse, 0, config._dayOfYear); config._a[MONTH] = date.getUTCMonth(); config._a[DATE] = date.getUTCDate(); } // Default to current date. // * if no year, month, day of month are given, default to today // * if day of month is given, default month and year // * if month is given, default only year // * if year is given, don't default anything for (i = 0; i < 3 && config._a[i] == null; ++i) { config._a[i] = input[i] = currentDate[i]; } // Zero out whatever was not defaulted, including time for (; i < 7; i++) { config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; } // add the offsets to the time to be parsed so that we can have a clean array for checking isValid input[HOUR] += toInt((config._tzm || 0) / 60); input[MINUTE] += toInt((config._tzm || 0) % 60); config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input); } function dateFromObject(config) { var normalizedInput; if (config._d) { return; } normalizedInput = normalizeObjectUnits(config._i); config._a = [ normalizedInput.year, normalizedInput.month, normalizedInput.day, normalizedInput.hour, normalizedInput.minute, normalizedInput.second, normalizedInput.millisecond ]; dateFromConfig(config); } function currentDateArray(config) { var now = new Date(); if (config._useUTC) { return [ now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate() ]; } else { return [now.getFullYear(), now.getMonth(), now.getDate()]; } } // date from string and format string function makeDateFromStringAndFormat(config) { config._a = []; config._pf.empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` var lang = getLangDefinition(config._l), string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0; tokens = expandFormat(config._f, lang).match(formattingTokens) || []; for (i = 0; i < tokens.length; i++) { token = tokens[i]; parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; if (parsedInput) { skipped = string.substr(0, string.indexOf(parsedInput)); if (skipped.length > 0) { config._pf.unusedInput.push(skipped); } string = string.slice(string.indexOf(parsedInput) + parsedInput.length); totalParsedInputLength += parsedInput.length; } // don't parse if it's not a known token if (formatTokenFunctions[token]) { if (parsedInput) { config._pf.empty = false; } else { config._pf.unusedTokens.push(token); } addTimeToArrayFromToken(token, parsedInput, config); } else if (config._strict && !parsedInput) { config._pf.unusedTokens.push(token); } } // add remaining unparsed input length to the string config._pf.charsLeftOver = stringLength - totalParsedInputLength; if (string.length > 0) { config._pf.unusedInput.push(string); } // handle am pm if (config._isPm && config._a[HOUR] < 12) { config._a[HOUR] += 12; } // if is 12 am, change hours to 0 if (config._isPm === false && config._a[HOUR] === 12) { config._a[HOUR] = 0; } dateFromConfig(config); checkOverflow(config); } function unescapeFormat(s) { return s.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { return p1 || p2 || p3 || p4; }); } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript function regexpEscape(s) { return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); } // date from string and array of format strings function makeDateFromStringAndArray(config) { var tempConfig, bestMoment, scoreToBeat, i, currentScore; if (config._f.length === 0) { config._pf.invalidFormat = true; config._d = new Date(NaN); return; } for (i = 0; i < config._f.length; i++) { currentScore = 0; tempConfig = extend({}, config); tempConfig._pf = defaultParsingFlags(); tempConfig._f = config._f[i]; makeDateFromStringAndFormat(tempConfig); if (!isValid(tempConfig)) { continue; } // if there is any input that was not parsed add a penalty for that format currentScore += tempConfig._pf.charsLeftOver; //or tokens currentScore += tempConfig._pf.unusedTokens.length * 10; tempConfig._pf.score = currentScore; if (scoreToBeat == null || currentScore < scoreToBeat) { scoreToBeat = currentScore; bestMoment = tempConfig; } } extend(config, bestMoment || tempConfig); } // date from iso format function makeDateFromString(config) { var i, l, string = config._i, match = isoRegex.exec(string); if (match) { config._pf.iso = true; for (i = 0, l = isoDates.length; i < l; i++) { if (isoDates[i][1].exec(string)) { // match[5] should be "T" or undefined config._f = isoDates[i][0] + (match[6] || " "); break; } } for (i = 0, l = isoTimes.length; i < l; i++) { if (isoTimes[i][1].exec(string)) { config._f += isoTimes[i][0]; break; } } if (string.match(parseTokenTimezone)) { config._f += "Z"; } makeDateFromStringAndFormat(config); } else { moment.createFromInputFallback(config); } } function makeDateFromInput(config) { var input = config._i, matched = aspNetJsonRegex.exec(input); if (input === undefined) { config._d = new Date(); } else if (matched) { config._d = new Date(+matched[1]); } else if (typeof input === 'string') { makeDateFromString(config); } else if (isArray(input)) { config._a = input.slice(0); dateFromConfig(config); } else if (isDate(input)) { config._d = new Date(+input); } else if (typeof(input) === 'object') { dateFromObject(config); } else if (typeof(input) === 'number') { // from milliseconds config._d = new Date(input); } else { moment.createFromInputFallback(config); } } function makeDate(y, m, d, h, M, s, ms) { //can't just apply() to create a date: //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply var date = new Date(y, m, d, h, M, s, ms); //the date constructor doesn't accept years < 1970 if (y < 1970) { date.setFullYear(y); } return date; } function makeUTCDate(y) { var date = new Date(Date.UTC.apply(null, arguments)); if (y < 1970) { date.setUTCFullYear(y); } return date; } function parseWeekday(input, language) { if (typeof input === 'string') { if (!isNaN(input)) { input = parseInt(input, 10); } else { input = language.weekdaysParse(input); if (typeof input !== 'number') { return null; } } } return input; } /************************************ Relative Time ************************************/ // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize function substituteTimeAgo(string, number, withoutSuffix, isFuture, lang) { return lang.relativeTime(number || 1, !!withoutSuffix, string, isFuture); } function relativeTime(milliseconds, withoutSuffix, lang) { var seconds = round(Math.abs(milliseconds) / 1000), minutes = round(seconds / 60), hours = round(minutes / 60), days = round(hours / 24), years = round(days / 365), args = seconds < 45 && ['s', seconds] || minutes === 1 && ['m'] || minutes < 45 && ['mm', minutes] || hours === 1 && ['h'] || hours < 22 && ['hh', hours] || days === 1 && ['d'] || days <= 25 && ['dd', days] || days <= 45 && ['M'] || days < 345 && ['MM', round(days / 30)] || years === 1 && ['y'] || ['yy', years]; args[2] = withoutSuffix; args[3] = milliseconds > 0; args[4] = lang; return substituteTimeAgo.apply({}, args); } /************************************ Week of Year ************************************/ // firstDayOfWeek 0 = sun, 6 = sat // the day of the week that starts the week // (usually sunday or monday) // firstDayOfWeekOfYear 0 = sun, 6 = sat // the first week is the week that contains the first // of this day of the week // (eg. ISO weeks use thursday (4)) function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) { var end = firstDayOfWeekOfYear - firstDayOfWeek, daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(), adjustedMoment; if (daysToDayOfWeek > end) { daysToDayOfWeek -= 7; } if (daysToDayOfWeek < end - 7) { daysToDayOfWeek += 7; } adjustedMoment = moment(mom).add('d', daysToDayOfWeek); return { week: Math.ceil(adjustedMoment.dayOfYear() / 7), year: adjustedMoment.year() }; } //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) { var d = makeUTCDate(year, 0, 1).getUTCDay(), daysToAdd, dayOfYear; weekday = weekday != null ? weekday : firstDayOfWeek; daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0) - (d < firstDayOfWeek ? 7 : 0); dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1; return { year: dayOfYear > 0 ? year : year - 1, dayOfYear: dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear }; } /************************************ Top Level Functions ************************************/ function makeMoment(config) { var input = config._i, format = config._f; if (input === null || (format === undefined && input === '')) { return moment.invalid({nullInput: true}); } if (typeof input === 'string') { config._i = input = getLangDefinition().preparse(input); } if (moment.isMoment(input)) { config = cloneMoment(input); config._d = new Date(+input._d); } else if (format) { if (isArray(format)) { makeDateFromStringAndArray(config); } else { makeDateFromStringAndFormat(config); } } else { makeDateFromInput(config); } return new Moment(config); } moment = function (input, format, lang, strict) { var c; if (typeof(lang) === "boolean") { strict = lang; lang = undefined; } // object construction must be done this way. // https://github.com/moment/moment/issues/1423 c = {}; c._isAMomentObject = true; c._i = input; c._f = format; c._l = lang; c._strict = strict; c._isUTC = false; c._pf = defaultParsingFlags(); return makeMoment(c); }; moment.suppressDeprecationWarnings = false; moment.createFromInputFallback = deprecate( "moment construction falls back to js Date. This is " + "discouraged and will be removed in upcoming major " + "release. Please refer to " + "https://github.com/moment/moment/issues/1407 for more info.", function (config) { config._d = new Date(config._i); }); // creating with utc moment.utc = function (input, format, lang, strict) { var c; if (typeof(lang) === "boolean") { strict = lang; lang = undefined; } // object construction must be done this way. // https://github.com/moment/moment/issues/1423 c = {}; c._isAMomentObject = true; c._useUTC = true; c._isUTC = true; c._l = lang; c._i = input; c._f = format; c._strict = strict; c._pf = defaultParsingFlags(); return makeMoment(c).utc(); }; // creating with unix timestamp (in seconds) moment.unix = function (input) { return moment(input * 1000); }; // duration moment.duration = function (input, key) { var duration = input, // matching against regexp is expensive, do it on demand match = null, sign, ret, parseIso; if (moment.isDuration(input)) { duration = { ms: input._milliseconds, d: input._days, M: input._months }; } else if (typeof input === 'number') { duration = {}; if (key) { duration[key] = input; } else { duration.milliseconds = input; } } else if (!!(match = aspNetTimeSpanJsonRegex.exec(input))) { sign = (match[1] === "-") ? -1 : 1; duration = { y: 0, d: toInt(match[DATE]) * sign, h: toInt(match[HOUR]) * sign, m: toInt(match[MINUTE]) * sign, s: toInt(match[SECOND]) * sign, ms: toInt(match[MILLISECOND]) * sign }; } else if (!!(match = isoDurationRegex.exec(input))) { sign = (match[1] === "-") ? -1 : 1; parseIso = function (inp) { // We'd normally use ~~inp for this, but unfortunately it also // converts floats to ints. // inp may be undefined, so careful calling replace on it. var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it return (isNaN(res) ? 0 : res) * sign; }; duration = { y: parseIso(match[2]), M: parseIso(match[3]), d: parseIso(match[4]), h: parseIso(match[5]), m: parseIso(match[6]), s: parseIso(match[7]), w: parseIso(match[8]) }; } ret = new Duration(duration); if (moment.isDuration(input) && input.hasOwnProperty('_lang')) { ret._lang = input._lang; } return ret; }; // version number moment.version = VERSION; // default format moment.defaultFormat = isoFormat; // Plugins that add properties should also add the key here (null value), // so we can properly clone ourselves. moment.momentProperties = momentProperties; // This function will be called whenever a moment is mutated. // It is intended to keep the offset in sync with the timezone. moment.updateOffset = function () {}; // This function will load languages and then set the global language. If // no arguments are passed in, it will simply return the current global // language key. moment.lang = function (key, values) { var r; if (!key) { return moment.fn._lang._abbr; } if (values) { loadLang(normalizeLanguage(key), values); } else if (values === null) { unloadLang(key); key = 'en'; } else if (!languages[key]) { getLangDefinition(key); } r = moment.duration.fn._lang = moment.fn._lang = getLangDefinition(key); return r._abbr; }; // returns language data moment.langData = function (key) { if (key && key._lang && key._lang._abbr) { key = key._lang._abbr; } return getLangDefinition(key); }; // compare moment object moment.isMoment = function (obj) { return obj instanceof Moment || (obj != null && obj.hasOwnProperty('_isAMomentObject')); }; // for typechecking Duration objects moment.isDuration = function (obj) { return obj instanceof Duration; }; for (i = lists.length - 1; i >= 0; --i) { makeList(lists[i]); } moment.normalizeUnits = function (units) { return normalizeUnits(units); }; moment.invalid = function (flags) { var m = moment.utc(NaN); if (flags != null) { extend(m._pf, flags); } else { m._pf.userInvalidated = true; } return m; }; moment.parseZone = function () { return moment.apply(null, arguments).parseZone(); }; moment.parseTwoDigitYear = function (input) { return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); }; /************************************ Moment Prototype ************************************/ extend(moment.fn = Moment.prototype, { clone : function () { return moment(this); }, valueOf : function () { return +this._d + ((this._offset || 0) * 60000); }, unix : function () { return Math.floor(+this / 1000); }, toString : function () { return this.clone().lang('en').format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ"); }, toDate : function () { return this._offset ? new Date(+this) : this._d; }, toISOString : function () { var m = moment(this).utc(); if (0 < m.year() && m.year() <= 9999) { return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); } else { return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); } }, toArray : function () { var m = this; return [ m.year(), m.month(), m.date(), m.hours(), m.minutes(), m.seconds(), m.milliseconds() ]; }, isValid : function () { return isValid(this); }, isDSTShifted : function () { if (this._a) { return this.isValid() && compareArrays(this._a, (this._isUTC ? moment.utc(this._a) : moment(this._a)).toArray()) > 0; } return false; }, parsingFlags : function () { return extend({}, this._pf); }, invalidAt: function () { return this._pf.overflow; }, utc : function () { return this.zone(0); }, local : function () { this.zone(0); this._isUTC = false; return this; }, format : function (inputString) { var output = formatMoment(this, inputString || moment.defaultFormat); return this.lang().postformat(output); }, add : function (input, val) { var dur; // switch args to support add('s', 1) and add(1, 's') if (typeof input === 'string') { dur = moment.duration(+val, input); } else { dur = moment.duration(input, val); } addOrSubtractDurationFromMoment(this, dur, 1); return this; }, subtract : function (input, val) { var dur; // switch args to support subtract('s', 1) and subtract(1, 's') if (typeof input === 'string') { dur = moment.duration(+val, input); } else { dur = moment.duration(input, val); } addOrSubtractDurationFromMoment(this, dur, -1); return this; }, diff : function (input, units, asFloat) { var that = makeAs(input, this), zoneDiff = (this.zone() - that.zone()) * 6e4, diff, output; units = normalizeUnits(units); if (units === 'year' || units === 'month') { // average number of days in the months in the given dates diff = (this.daysInMonth() + that.daysInMonth()) * 432e5; // 24 * 60 * 60 * 1000 / 2 // difference in months output = ((this.year() - that.year()) * 12) + (this.month() - that.month()); // adjust by taking difference in days, average number of days // and dst in the given months. output += ((this - moment(this).startOf('month')) - (that - moment(that).startOf('month'))) / diff; // same as above but with zones, to negate all dst output -= ((this.zone() - moment(this).startOf('month').zone()) - (that.zone() - moment(that).startOf('month').zone())) * 6e4 / diff; if (units === 'year') { output = output / 12; } } else { diff = (this - that); output = units === 'second' ? diff / 1e3 : // 1000 units === 'minute' ? diff / 6e4 : // 1000 * 60 units === 'hour' ? diff / 36e5 : // 1000 * 60 * 60 units === 'day' ? (diff - zoneDiff) / 864e5 : // 1000 * 60 * 60 * 24, negate dst units === 'week' ? (diff - zoneDiff) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst diff; } return asFloat ? output : absRound(output); }, from : function (time, withoutSuffix) { return moment.duration(this.diff(time)).lang(this.lang()._abbr).humanize(!withoutSuffix); }, fromNow : function (withoutSuffix) { return this.from(moment(), withoutSuffix); }, calendar : function () { // We want to compare the start of today, vs this. // Getting start-of-today depends on whether we're zone'd or not. var sod = makeAs(moment(), this).startOf('day'), diff = this.diff(sod, 'days', true), format = diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; return this.format(this.lang().calendar(format, this)); }, isLeapYear : function () { return isLeapYear(this.year()); }, isDST : function () { return (this.zone() < this.clone().month(0).zone() || this.zone() < this.clone().month(5).zone()); }, day : function (input) { var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); if (input != null) { input = parseWeekday(input, this.lang()); return this.add({ d : input - day }); } else { return day; } }, month : makeAccessor('Month', true), startOf: function (units) { units = normalizeUnits(units); // the following switch intentionally omits break keywords // to utilize falling through the cases. switch (units) { case 'year': this.month(0); /* falls through */ case 'quarter': case 'month': this.date(1); /* falls through */ case 'week': case 'isoWeek': case 'day': this.hours(0); /* falls through */ case 'hour': this.minutes(0); /* falls through */ case 'minute': this.seconds(0); /* falls through */ case 'second': this.milliseconds(0); /* falls through */ } // weeks are a special case if (units === 'week') { this.weekday(0); } else if (units === 'isoWeek') { this.isoWeekday(1); } // quarters are also special if (units === 'quarter') { this.month(Math.floor(this.month() / 3) * 3); } return this; }, endOf: function (units) { units = normalizeUnits(units); return this.startOf(units).add((units === 'isoWeek' ? 'week' : units), 1).subtract('ms', 1); }, isAfter: function (input, units) { units = typeof units !== 'undefined' ? units : 'millisecond'; return +this.clone().startOf(units) > +moment(input).startOf(units); }, isBefore: function (input, units) { units = typeof units !== 'undefined' ? units : 'millisecond'; return +this.clone().startOf(units) < +moment(input).startOf(units); }, isSame: function (input, units) { units = units || 'ms'; return +this.clone().startOf(units) === +makeAs(input, this).startOf(units); }, min: function (other) { other = moment.apply(null, arguments); return other < this ? this : other; }, max: function (other) { other = moment.apply(null, arguments); return other > this ? this : other; }, // keepTime = true means only change the timezone, without affecting // the local hour. So 5:31:26 +0300 --[zone(2, true)]--> 5:31:26 +0200 // It is possible that 5:31:26 doesn't exist int zone +0200, so we // adjust the time as needed, to be valid. // // Keeping the time actually adds/subtracts (one hour) // from the actual represented time. That is why we call updateOffset // a second time. In case it wants us to change the offset again // _changeInProgress == true case, then we have to adjust, because // there is no such time in the given timezone. zone : function (input, keepTime) { var offset = this._offset || 0; if (input != null) { if (typeof input === "string") { input = timezoneMinutesFromString(input); } if (Math.abs(input) < 16) { input = input * 60; } this._offset = input; this._isUTC = true; if (offset !== input) { if (!keepTime || this._changeInProgress) { addOrSubtractDurationFromMoment(this, moment.duration(offset - input, 'm'), 1, false); } else if (!this._changeInProgress) { this._changeInProgress = true; moment.updateOffset(this, true); this._changeInProgress = null; } } } else { return this._isUTC ? offset : this._d.getTimezoneOffset(); } return this; }, zoneAbbr : function () { return this._isUTC ? "UTC" : ""; }, zoneName : function () { return this._isUTC ? "Coordinated Universal Time" : ""; }, parseZone : function () { if (this._tzm) { this.zone(this._tzm); } else if (typeof this._i === 'string') { this.zone(this._i); } return this; }, hasAlignedHourOffset : function (input) { if (!input) { input = 0; } else { input = moment(input).zone(); } return (this.zone() - input) % 60 === 0; }, daysInMonth : function () { return daysInMonth(this.year(), this.month()); }, dayOfYear : function (input) { var dayOfYear = round((moment(this).startOf('day') - moment(this).startOf('year')) / 864e5) + 1; return input == null ? dayOfYear : this.add("d", (input - dayOfYear)); }, quarter : function (input) { return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); }, weekYear : function (input) { var year = weekOfYear(this, this.lang()._week.dow, this.lang()._week.doy).year; return input == null ? year : this.add("y", (input - year)); }, isoWeekYear : function (input) { var year = weekOfYear(this, 1, 4).year; return input == null ? year : this.add("y", (input - year)); }, week : function (input) { var week = this.lang().week(this); return input == null ? week : this.add("d", (input - week) * 7); }, isoWeek : function (input) { var week = weekOfYear(this, 1, 4).week; return input == null ? week : this.add("d", (input - week) * 7); }, weekday : function (input) { var weekday = (this.day() + 7 - this.lang()._week.dow) % 7; return input == null ? weekday : this.add("d", input - weekday); }, isoWeekday : function (input) { // behaves the same as moment#day except // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) // as a setter, sunday should belong to the previous week. return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7); }, isoWeeksInYear : function () { return weeksInYear(this.year(), 1, 4); }, weeksInYear : function () { var weekInfo = this._lang._week; return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); }, get : function (units) { units = normalizeUnits(units); return this[units](); }, set : function (units, value) { units = normalizeUnits(units); if (typeof this[units] === 'function') { this[units](value); } return this; }, // If passed a language key, it will set the language for this // instance. Otherwise, it will return the language configuration // variables for this instance. lang : function (key) { if (key === undefined) { return this._lang; } else { this._lang = getLangDefinition(key); return this; } } }); function rawMonthSetter(mom, value) { var dayOfMonth; // TODO: Move this out of here! if (typeof value === 'string') { value = mom.lang().monthsParse(value); // TODO: Another silent failure? if (typeof value !== 'number') { return mom; } } dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); return mom; } function rawGetter(mom, unit) { return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit](); } function rawSetter(mom, unit, value) { if (unit === 'Month') { return rawMonthSetter(mom, value); } else { return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); } } function makeAccessor(unit, keepTime) { return function (value) { if (value != null) { rawSetter(this, unit, value); moment.updateOffset(this, keepTime); return this; } else { return rawGetter(this, unit); } }; } moment.fn.millisecond = moment.fn.milliseconds = makeAccessor('Milliseconds', false); moment.fn.second = moment.fn.seconds = makeAccessor('Seconds', false); moment.fn.minute = moment.fn.minutes = makeAccessor('Minutes', false); // Setting the hour should keep the time, because the user explicitly // specified which hour he wants. So trying to maintain the same hour (in // a new timezone) makes sense. Adding/subtracting hours does not follow // this rule. moment.fn.hour = moment.fn.hours = makeAccessor('Hours', true); // moment.fn.month is defined separately moment.fn.date = makeAccessor('Date', true); moment.fn.dates = deprecate("dates accessor is deprecated. Use date instead.", makeAccessor('Date', true)); moment.fn.year = makeAccessor('FullYear', true); moment.fn.years = deprecate("years accessor is deprecated. Use year instead.", makeAccessor('FullYear', true)); // add plural methods moment.fn.days = moment.fn.day; moment.fn.months = moment.fn.month; moment.fn.weeks = moment.fn.week; moment.fn.isoWeeks = moment.fn.isoWeek; moment.fn.quarters = moment.fn.quarter; // add aliased format methods moment.fn.toJSON = moment.fn.toISOString; /************************************ Duration Prototype ************************************/ extend(moment.duration.fn = Duration.prototype, { _bubble : function () { var milliseconds = this._milliseconds, days = this._days, months = this._months, data = this._data, seconds, minutes, hours, years; // The following code bubbles up values, see the tests for // examples of what that means. data.milliseconds = milliseconds % 1000; seconds = absRound(milliseconds / 1000); data.seconds = seconds % 60; minutes = absRound(seconds / 60); data.minutes = minutes % 60; hours = absRound(minutes / 60); data.hours = hours % 24; days += absRound(hours / 24); data.days = days % 30; months += absRound(days / 30); data.months = months % 12; years = absRound(months / 12); data.years = years; }, weeks : function () { return absRound(this.days() / 7); }, valueOf : function () { return this._milliseconds + this._days * 864e5 + (this._months % 12) * 2592e6 + toInt(this._months / 12) * 31536e6; }, humanize : function (withSuffix) { var difference = +this, output = relativeTime(difference, !withSuffix, this.lang()); if (withSuffix) { output = this.lang().pastFuture(difference, output); } return this.lang().postformat(output); }, add : function (input, val) { // supports only 2.0-style add(1, 's') or add(moment) var dur = moment.duration(input, val); this._milliseconds += dur._milliseconds; this._days += dur._days; this._months += dur._months; this._bubble(); return this; }, subtract : function (input, val) { var dur = moment.duration(input, val); this._milliseconds -= dur._milliseconds; this._days -= dur._days; this._months -= dur._months; this._bubble(); return this; }, get : function (units) { units = normalizeUnits(units); return this[units.toLowerCase() + 's'](); }, as : function (units) { units = normalizeUnits(units); return this['as' + units.charAt(0).toUpperCase() + units.slice(1) + 's'](); }, lang : moment.fn.lang, toIsoString : function () { // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js var years = Math.abs(this.years()), months = Math.abs(this.months()), days = Math.abs(this.days()), hours = Math.abs(this.hours()), minutes = Math.abs(this.minutes()), seconds = Math.abs(this.seconds() + this.milliseconds() / 1000); if (!this.asSeconds()) { // this is the same as C#'s (Noda) and python (isodate)... // but not other JS (goog.date) return 'P0D'; } return (this.asSeconds() < 0 ? '-' : '') + 'P' + (years ? years + 'Y' : '') + (months ? months + 'M' : '') + (days ? days + 'D' : '') + ((hours || minutes || seconds) ? 'T' : '') + (hours ? hours + 'H' : '') + (minutes ? minutes + 'M' : '') + (seconds ? seconds + 'S' : ''); } }); function makeDurationGetter(name) { moment.duration.fn[name] = function () { return this._data[name]; }; } function makeDurationAsGetter(name, factor) { moment.duration.fn['as' + name] = function () { return +this / factor; }; } for (i in unitMillisecondFactors) { if (unitMillisecondFactors.hasOwnProperty(i)) { makeDurationAsGetter(i, unitMillisecondFactors[i]); makeDurationGetter(i.toLowerCase()); } } makeDurationAsGetter('Weeks', 6048e5); moment.duration.fn.asMonths = function () { return (+this - this.years() * 31536e6) / 2592e6 + this.years() * 12; }; /************************************ Default Lang ************************************/ // Set default language, other languages will inherit from English. moment.lang('en', { ordinal : function (number) { var b = number % 10, output = (toInt(number % 100 / 10) === 1) ? 'th' : (b === 1) ? 'st' : (b === 2) ? 'nd' : (b === 3) ? 'rd' : 'th'; return number + output; } }); /* EMBED_LANGUAGES */ /************************************ Exposing Moment ************************************/ function makeGlobal(shouldDeprecate) { /*global ender:false */ if (typeof ender !== 'undefined') { return; } oldGlobalMoment = globalScope.moment; if (shouldDeprecate) { globalScope.moment = deprecate( "Accessing Moment through the global scope is " + "deprecated, and will be removed in an upcoming " + "release.", moment); } else { globalScope.moment = moment; } } // CommonJS module is defined if (hasModule) { module.exports = moment; } else if (typeof define === "function" && define.amd) { define("moment", function (require, exports, module) { if (module.config && module.config() && module.config().noGlobal === true) { // release the global variable globalScope.moment = oldGlobalMoment; } return moment; }); makeGlobal(true); } else { makeGlobal(); } }).call(this); },{}],5:[function(require,module,exports){ /** * Copyright 2012 Craig Campbell * * 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. * * Mousetrap is a simple keyboard shortcut library for Javascript with * no external dependencies * * @version 1.1.2 * @url craig.is/killing/mice */ /** * mapping of special keycodes to their corresponding keys * * everything in this dictionary cannot use keypress events * so it has to be here to map to the correct keycodes for * keyup/keydown events * * @type {Object} */ var _MAP = { 8: 'backspace', 9: 'tab', 13: 'enter', 16: 'shift', 17: 'ctrl', 18: 'alt', 20: 'capslock', 27: 'esc', 32: 'space', 33: 'pageup', 34: 'pagedown', 35: 'end', 36: 'home', 37: 'left', 38: 'up', 39: 'right', 40: 'down', 45: 'ins', 46: 'del', 91: 'meta', 93: 'meta', 224: 'meta' }, /** * mapping for special characters so they can support * * this dictionary is only used incase you want to bind a * keyup or keydown event to one of these keys * * @type {Object} */ _KEYCODE_MAP = { 106: '*', 107: '+', 109: '-', 110: '.', 111 : '/', 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\', 221: ']', 222: '\'' }, /** * this is a mapping of keys that require shift on a US keypad * back to the non shift equivelents * * this is so you can use keyup events with these keys * * note that this will only work reliably on US keyboards * * @type {Object} */ _SHIFT_MAP = { '~': '`', '!': '1', '@': '2', '#': '3', '$': '4', '%': '5', '^': '6', '&': '7', '*': '8', '(': '9', ')': '0', '_': '-', '+': '=', ':': ';', '\"': '\'', '<': ',', '>': '.', '?': '/', '|': '\\' }, /** * this is a list of special strings you can use to map * to modifier keys when you specify your keyboard shortcuts * * @type {Object} */ _SPECIAL_ALIASES = { 'option': 'alt', 'command': 'meta', 'return': 'enter', 'escape': 'esc' }, /** * variable to store the flipped version of _MAP from above * needed to check if we should use keypress or not when no action * is specified * * @type {Object|undefined} */ _REVERSE_MAP, /** * a list of all the callbacks setup via Mousetrap.bind() * * @type {Object} */ _callbacks = {}, /** * direct map of string combinations to callbacks used for trigger() * * @type {Object} */ _direct_map = {}, /** * keeps track of what level each sequence is at since multiple * sequences can start out with the same sequence * * @type {Object} */ _sequence_levels = {}, /** * variable to store the setTimeout call * * @type {null|number} */ _reset_timer, /** * temporary state where we will ignore the next keyup * * @type {boolean|string} */ _ignore_next_keyup = false, /** * are we currently inside of a sequence? * type of action ("keyup" or "keydown" or "keypress") or false * * @type {boolean|string} */ _inside_sequence = false; /** * loop through the f keys, f1 to f19 and add them to the map * programatically */ for (var i = 1; i < 20; ++i) { _MAP[111 + i] = 'f' + i; } /** * loop through to map numbers on the numeric keypad */ for (i = 0; i <= 9; ++i) { _MAP[i + 96] = i; } /** * cross browser add event method * * @param {Element|HTMLDocument} object * @param {string} type * @param {Function} callback * @returns void */ function _addEvent(object, type, callback) { if (object.addEventListener) { return object.addEventListener(type, callback, false); } object.attachEvent('on' + type, callback); } /** * takes the event and returns the key character * * @param {Event} e * @return {string} */ function _characterFromEvent(e) { // for keypress events we should return the character as is if (e.type == 'keypress') { return String.fromCharCode(e.which); } // for non keypress events the special maps are needed if (_MAP[e.which]) { return _MAP[e.which]; } if (_KEYCODE_MAP[e.which]) { return _KEYCODE_MAP[e.which]; } // if it is not in the special map return String.fromCharCode(e.which).toLowerCase(); } /** * should we stop this event before firing off callbacks * * @param {Event} e * @return {boolean} */ function _stop(e) { var element = e.target || e.srcElement, tag_name = element.tagName; // if the element has the class "mousetrap" then no need to stop if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) { return false; } // stop for input, select, and textarea return tag_name == 'INPUT' || tag_name == 'SELECT' || tag_name == 'TEXTAREA' || (element.contentEditable && element.contentEditable == 'true'); } /** * checks if two arrays are equal * * @param {Array} modifiers1 * @param {Array} modifiers2 * @returns {boolean} */ function _modifiersMatch(modifiers1, modifiers2) { return modifiers1.sort().join(',') === modifiers2.sort().join(','); } /** * resets all sequence counters except for the ones passed in * * @param {Object} do_not_reset * @returns void */ function _resetSequences(do_not_reset) { do_not_reset = do_not_reset || {}; var active_sequences = false, key; for (key in _sequence_levels) { if (do_not_reset[key]) { active_sequences = true; continue; } _sequence_levels[key] = 0; } if (!active_sequences) { _inside_sequence = false; } } /** * finds all callbacks that match based on the keycode, modifiers, * and action * * @param {string} character * @param {Array} modifiers * @param {string} action * @param {boolean=} remove - should we remove any matches * @param {string=} combination * @returns {Array} */ function _getMatches(character, modifiers, action, remove, combination) { var i, callback, matches = []; // if there are no events related to this keycode if (!_callbacks[character]) { return []; } // if a modifier key is coming up on its own we should allow it if (action == 'keyup' && _isModifier(character)) { modifiers = [character]; } // loop through all callbacks for the key that was pressed // and see if any of them match for (i = 0; i < _callbacks[character].length; ++i) { callback = _callbacks[character][i]; // if this is a sequence but it is not at the right level // then move onto the next match if (callback.seq && _sequence_levels[callback.seq] != callback.level) { continue; } // if the action we are looking for doesn't match the action we got // then we should keep going if (action != callback.action) { continue; } // if this is a keypress event that means that we need to only // look at the character, otherwise check the modifiers as // well if (action == 'keypress' || _modifiersMatch(modifiers, callback.modifiers)) { // remove is used so if you change your mind and call bind a // second time with a new function the first one is overwritten if (remove && callback.combo == combination) { _callbacks[character].splice(i, 1); } matches.push(callback); } } return matches; } /** * takes a key event and figures out what the modifiers are * * @param {Event} e * @returns {Array} */ function _eventModifiers(e) { var modifiers = []; if (e.shiftKey) { modifiers.push('shift'); } if (e.altKey) { modifiers.push('alt'); } if (e.ctrlKey) { modifiers.push('ctrl'); } if (e.metaKey) { modifiers.push('meta'); } return modifiers; } /** * actually calls the callback function * * if your callback function returns false this will use the jquery * convention - prevent default and stop propogation on the event * * @param {Function} callback * @param {Event} e * @returns void */ function _fireCallback(callback, e) { if (callback(e) === false) { if (e.preventDefault) { e.preventDefault(); } if (e.stopPropagation) { e.stopPropagation(); } e.returnValue = false; e.cancelBubble = true; } } /** * handles a character key event * * @param {string} character * @param {Event} e * @returns void */ function _handleCharacter(character, e) { // if this event should not happen stop here if (_stop(e)) { return; } var callbacks = _getMatches(character, _eventModifiers(e), e.type), i, do_not_reset = {}, processed_sequence_callback = false; // loop through matching callbacks for this key event for (i = 0; i < callbacks.length; ++i) { // fire for all sequence callbacks // this is because if for example you have multiple sequences // bound such as "g i" and "g t" they both need to fire the // callback for matching g cause otherwise you can only ever // match the first one if (callbacks[i].seq) { processed_sequence_callback = true; // keep a list of which sequences were matches for later do_not_reset[callbacks[i].seq] = 1; _fireCallback(callbacks[i].callback, e); continue; } // if there were no sequence matches but we are still here // that means this is a regular match so we should fire that if (!processed_sequence_callback && !_inside_sequence) { _fireCallback(callbacks[i].callback, e); } } // if you are inside of a sequence and the key you are pressing // is not a modifier key then we should reset all sequences // that were not matched by this key event if (e.type == _inside_sequence && !_isModifier(character)) { _resetSequences(do_not_reset); } } /** * handles a keydown event * * @param {Event} e * @returns void */ function _handleKey(e) { // normalize e.which for key events // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion e.which = typeof e.which == "number" ? e.which : e.keyCode; var character = _characterFromEvent(e); // no character found then stop if (!character) { return; } if (e.type == 'keyup' && _ignore_next_keyup == character) { _ignore_next_keyup = false; return; } _handleCharacter(character, e); } /** * determines if the keycode specified is a modifier key or not * * @param {string} key * @returns {boolean} */ function _isModifier(key) { return key == 'shift' || key == 'ctrl' || key == 'alt' || key == 'meta'; } /** * called to set a 1 second timeout on the specified sequence * * this is so after each key press in the sequence you have 1 second * to press the next key before you have to start over * * @returns void */ function _resetSequenceTimer() { clearTimeout(_reset_timer); _reset_timer = setTimeout(_resetSequences, 1000); } /** * reverses the map lookup so that we can look for specific keys * to see what can and can't use keypress * * @return {Object} */ function _getReverseMap() { if (!_REVERSE_MAP) { _REVERSE_MAP = {}; for (var key in _MAP) { // pull out the numeric keypad from here cause keypress should // be able to detect the keys from the character if (key > 95 && key < 112) { continue; } if (_MAP.hasOwnProperty(key)) { _REVERSE_MAP[_MAP[key]] = key; } } } return _REVERSE_MAP; } /** * picks the best action based on the key combination * * @param {string} key - character for key * @param {Array} modifiers * @param {string=} action passed in */ function _pickBestAction(key, modifiers, action) { // if no action was picked in we should try to pick the one // that we think would work best for this key if (!action) { action = _getReverseMap()[key] ? 'keydown' : 'keypress'; } // modifier keys don't work as expected with keypress, // switch to keydown if (action == 'keypress' && modifiers.length) { action = 'keydown'; } return action; } /** * binds a key sequence to an event * * @param {string} combo - combo specified in bind call * @param {Array} keys * @param {Function} callback * @param {string=} action * @returns void */ function _bindSequence(combo, keys, callback, action) { // start off by adding a sequence level record for this combination // and setting the level to 0 _sequence_levels[combo] = 0; // if there is no action pick the best one for the first key // in the sequence if (!action) { action = _pickBestAction(keys[0], []); } /** * callback to increase the sequence level for this sequence and reset * all other sequences that were active * * @param {Event} e * @returns void */ var _increaseSequence = function(e) { _inside_sequence = action; ++_sequence_levels[combo]; _resetSequenceTimer(); }, /** * wraps the specified callback inside of another function in order * to reset all sequence counters as soon as this sequence is done * * @param {Event} e * @returns void */ _callbackAndReset = function(e) { _fireCallback(callback, e); // we should ignore the next key up if the action is key down // or keypress. this is so if you finish a sequence and // release the key the final key will not trigger a keyup if (action !== 'keyup') { _ignore_next_keyup = _characterFromEvent(e); } // weird race condition if a sequence ends with the key // another sequence begins with setTimeout(_resetSequences, 10); }, i; // loop through keys one at a time and bind the appropriate callback // function. for any key leading up to the final one it should // increase the sequence. after the final, it should reset all sequences for (i = 0; i < keys.length; ++i) { _bindSingle(keys[i], i < keys.length - 1 ? _increaseSequence : _callbackAndReset, action, combo, i); } } /** * binds a single keyboard combination * * @param {string} combination * @param {Function} callback * @param {string=} action * @param {string=} sequence_name - name of sequence if part of sequence * @param {number=} level - what part of the sequence the command is * @returns void */ function _bindSingle(combination, callback, action, sequence_name, level) { // make sure multiple spaces in a row become a single space combination = combination.replace(/\s+/g, ' '); var sequence = combination.split(' '), i, key, keys, modifiers = []; // if this pattern is a sequence of keys then run through this method // to reprocess each pattern one key at a time if (sequence.length > 1) { return _bindSequence(combination, sequence, callback, action); } // take the keys from this pattern and figure out what the actual // pattern is all about keys = combination === '+' ? ['+'] : combination.split('+'); for (i = 0; i < keys.length; ++i) { key = keys[i]; // normalize key names if (_SPECIAL_ALIASES[key]) { key = _SPECIAL_ALIASES[key]; } // if this is not a keypress event then we should // be smart about using shift keys // this will only work for US keyboards however if (action && action != 'keypress' && _SHIFT_MAP[key]) { key = _SHIFT_MAP[key]; modifiers.push('shift'); } // if this key is a modifier then add it to the list of modifiers if (_isModifier(key)) { modifiers.push(key); } } // depending on what the key combination is // we will try to pick the best event for it action = _pickBestAction(key, modifiers, action); // make sure to initialize array if this is the first time // a callback is added for this key if (!_callbacks[key]) { _callbacks[key] = []; } // remove an existing match if there is one _getMatches(key, modifiers, action, !sequence_name, combination); // add this call back to the array // if it is a sequence put it at the beginning // if not put it at the end // // this is important because the way these are processed expects // the sequence ones to come first _callbacks[key][sequence_name ? 'unshift' : 'push']({ callback: callback, modifiers: modifiers, action: action, seq: sequence_name, level: level, combo: combination }); } /** * binds multiple combinations to the same callback * * @param {Array} combinations * @param {Function} callback * @param {string|undefined} action * @returns void */ function _bindMultiple(combinations, callback, action) { for (var i = 0; i < combinations.length; ++i) { _bindSingle(combinations[i], callback, action); } } // start! _addEvent(document, 'keypress', _handleKey); _addEvent(document, 'keydown', _handleKey); _addEvent(document, 'keyup', _handleKey); var mousetrap = { /** * binds an event to mousetrap * * can be a single key, a combination of keys separated with +, * a comma separated list of keys, an array of keys, or * a sequence of keys separated by spaces * * be sure to list the modifier keys first to make sure that the * correct key ends up getting bound (the last key in the pattern) * * @param {string|Array} keys * @param {Function} callback * @param {string=} action - 'keypress', 'keydown', or 'keyup' * @returns void */ bind: function(keys, callback, action) { _bindMultiple(keys instanceof Array ? keys : [keys], callback, action); _direct_map[keys + ':' + action] = callback; return this; }, /** * unbinds an event to mousetrap * * the unbinding sets the callback function of the specified key combo * to an empty function and deletes the corresponding key in the * _direct_map dict. * * the keycombo+action has to be exactly the same as * it was defined in the bind method * * TODO: actually remove this from the _callbacks dictionary instead * of binding an empty function * * @param {string|Array} keys * @param {string} action * @returns void */ unbind: function(keys, action) { if (_direct_map[keys + ':' + action]) { delete _direct_map[keys + ':' + action]; this.bind(keys, function() {}, action); } return this; }, /** * triggers an event that has already been bound * * @param {string} keys * @param {string=} action * @returns void */ trigger: function(keys, action) { _direct_map[keys + ':' + action](); return this; }, /** * resets the library back to its initial state. this is useful * if you want to clear out the current keyboard shortcuts and bind * new ones - for example if you switch to another page * * @returns void */ reset: function() { _callbacks = {}; _direct_map = {}; return this; } }; module.exports = mousetrap; },{}]},{},[1]) (1) });
ajax/libs/angular.js/0.9.14/angular-scenario.min.js
arasmussen/cdnjs
/*! * jQuery JavaScript Library v1.4.2 * http://jquery.com/ * * Copyright 2010, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2010, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Sat Feb 13 22:33:48 2010 -0500 */ (function(aM,C){var a=function(aY,aZ){return new a.fn.init(aY,aZ)},n=aM.jQuery,R=aM.$,ab=aM.document,X,P=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,aW=/^.[^:#\[\.,]*$/,ax=/\S/,M=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,e=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,b=navigator.userAgent,u,K=false,ad=[],aG,at=Object.prototype.toString,ap=Object.prototype.hasOwnProperty,g=Array.prototype.push,F=Array.prototype.slice,s=Array.prototype.indexOf;a.fn=a.prototype={init:function(aY,a1){var a0,a2,aZ,a3;if(!aY){return this}if(aY.nodeType){this.context=this[0]=aY;this.length=1;return this}if(aY==="body"&&!a1){this.context=ab;this[0]=ab.body;this.selector="body";this.length=1;return this}if(typeof aY==="string"){a0=P.exec(aY);if(a0&&(a0[1]||!a1)){if(a0[1]){a3=(a1?a1.ownerDocument||a1:ab);aZ=e.exec(aY);if(aZ){if(a.isPlainObject(a1)){aY=[ab.createElement(aZ[1])];a.fn.attr.call(aY,a1,true)}else{aY=[a3.createElement(aZ[1])]}}else{aZ=J([a0[1]],[a3]);aY=(aZ.cacheable?aZ.fragment.cloneNode(true):aZ.fragment).childNodes}return a.merge(this,aY)}else{a2=ab.getElementById(a0[2]);if(a2){if(a2.id!==a0[2]){return X.find(aY)}this.length=1;this[0]=a2}this.context=ab;this.selector=aY;return this}}else{if(!a1&&/^\w+$/.test(aY)){this.selector=aY;this.context=ab;aY=ab.getElementsByTagName(aY);return a.merge(this,aY)}else{if(!a1||a1.jquery){return(a1||X).find(aY)}else{return a(a1).find(aY)}}}}else{if(a.isFunction(aY)){return X.ready(aY)}}if(aY.selector!==C){this.selector=aY.selector;this.context=aY.context}return a.makeArray(aY,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(aY){return aY==null?this.toArray():(aY<0?this.slice(aY)[0]:this[aY])},pushStack:function(aZ,a1,aY){var a0=a();if(a.isArray(aZ)){g.apply(a0,aZ)}else{a.merge(a0,aZ)}a0.prevObject=this;a0.context=this.context;if(a1==="find"){a0.selector=this.selector+(this.selector?" ":"")+aY}else{if(a1){a0.selector=this.selector+"."+a1+"("+aY+")"}}return a0},each:function(aZ,aY){return a.each(this,aZ,aY)},ready:function(aY){a.bindReady();if(a.isReady){aY.call(ab,a)}else{if(ad){ad.push(aY)}}return this},eq:function(aY){return aY===-1?this.slice(aY):this.slice(aY,+aY+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(aY){return this.pushStack(a.map(this,function(a0,aZ){return aY.call(a0,aZ,a0)}))},end:function(){return this.prevObject||a(null)},push:g,sort:[].sort,splice:[].splice};a.fn.init.prototype=a.fn;a.extend=a.fn.extend=function(){var a3=arguments[0]||{},a2=1,a1=arguments.length,a5=false,a6,a0,aY,aZ;if(typeof a3==="boolean"){a5=a3;a3=arguments[1]||{};a2=2}if(typeof a3!=="object"&&!a.isFunction(a3)){a3={}}if(a1===a2){a3=this;--a2}for(;a2<a1;a2++){if((a6=arguments[a2])!=null){for(a0 in a6){aY=a3[a0];aZ=a6[a0];if(a3===aZ){continue}if(a5&&aZ&&(a.isPlainObject(aZ)||a.isArray(aZ))){var a4=aY&&(a.isPlainObject(aY)||a.isArray(aY))?aY:a.isArray(aZ)?[]:{};a3[a0]=a.extend(a5,a4,aZ)}else{if(aZ!==C){a3[a0]=aZ}}}}}return a3};a.extend({noConflict:function(aY){aM.$=R;if(aY){aM.jQuery=n}return a},isReady:false,ready:function(){if(!a.isReady){if(!ab.body){return setTimeout(a.ready,13)}a.isReady=true;if(ad){var aZ,aY=0;while((aZ=ad[aY++])){aZ.call(ab,a)}ad=null}if(a.fn.triggerHandler){a(ab).triggerHandler("ready")}}},bindReady:function(){if(K){return}K=true;if(ab.readyState==="complete"){return a.ready()}if(ab.addEventListener){ab.addEventListener("DOMContentLoaded",aG,false);aM.addEventListener("load",a.ready,false)}else{if(ab.attachEvent){ab.attachEvent("onreadystatechange",aG);aM.attachEvent("onload",a.ready);var aY=false;try{aY=aM.frameElement==null}catch(aZ){}if(ab.documentElement.doScroll&&aY){x()}}}},isFunction:function(aY){return at.call(aY)==="[object Function]"},isArray:function(aY){return at.call(aY)==="[object Array]"},isPlainObject:function(aZ){if(!aZ||at.call(aZ)!=="[object Object]"||aZ.nodeType||aZ.setInterval){return false}if(aZ.constructor&&!ap.call(aZ,"constructor")&&!ap.call(aZ.constructor.prototype,"isPrototypeOf")){return false}var aY;for(aY in aZ){}return aY===C||ap.call(aZ,aY)},isEmptyObject:function(aZ){for(var aY in aZ){return false}return true},error:function(aY){throw aY},parseJSON:function(aY){if(typeof aY!=="string"||!aY){return null}aY=a.trim(aY);if(/^[\],:{}\s]*$/.test(aY.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return aM.JSON&&aM.JSON.parse?aM.JSON.parse(aY):(new Function("return "+aY))()}else{a.error("Invalid JSON: "+aY)}},noop:function(){},globalEval:function(a0){if(a0&&ax.test(a0)){var aZ=ab.getElementsByTagName("head")[0]||ab.documentElement,aY=ab.createElement("script");aY.type="text/javascript";if(a.support.scriptEval){aY.appendChild(ab.createTextNode(a0))}else{aY.text=a0}aZ.insertBefore(aY,aZ.firstChild);aZ.removeChild(aY)}},nodeName:function(aZ,aY){return aZ.nodeName&&aZ.nodeName.toUpperCase()===aY.toUpperCase()},each:function(a1,a5,a0){var aZ,a2=0,a3=a1.length,aY=a3===C||a.isFunction(a1);if(a0){if(aY){for(aZ in a1){if(a5.apply(a1[aZ],a0)===false){break}}}else{for(;a2<a3;){if(a5.apply(a1[a2++],a0)===false){break}}}}else{if(aY){for(aZ in a1){if(a5.call(a1[aZ],aZ,a1[aZ])===false){break}}}else{for(var a4=a1[0];a2<a3&&a5.call(a4,a2,a4)!==false;a4=a1[++a2]){}}}return a1},trim:function(aY){return(aY||"").replace(M,"")},makeArray:function(a0,aZ){var aY=aZ||[];if(a0!=null){if(a0.length==null||typeof a0==="string"||a.isFunction(a0)||(typeof a0!=="function"&&a0.setInterval)){g.call(aY,a0)}else{a.merge(aY,a0)}}return aY},inArray:function(a0,a1){if(a1.indexOf){return a1.indexOf(a0)}for(var aY=0,aZ=a1.length;aY<aZ;aY++){if(a1[aY]===a0){return aY}}return -1},merge:function(a2,a0){var a1=a2.length,aZ=0;if(typeof a0.length==="number"){for(var aY=a0.length;aZ<aY;aZ++){a2[a1++]=a0[aZ]}}else{while(a0[aZ]!==C){a2[a1++]=a0[aZ++]}}a2.length=a1;return a2},grep:function(aZ,a3,aY){var a0=[];for(var a1=0,a2=aZ.length;a1<a2;a1++){if(!aY!==!a3(aZ[a1],a1)){a0.push(aZ[a1])}}return a0},map:function(aZ,a4,aY){var a0=[],a3;for(var a1=0,a2=aZ.length;a1<a2;a1++){a3=a4(aZ[a1],a1,aY);if(a3!=null){a0[a0.length]=a3}}return a0.concat.apply([],a0)},guid:1,proxy:function(a0,aZ,aY){if(arguments.length===2){if(typeof aZ==="string"){aY=a0;a0=aY[aZ];aZ=C}else{if(aZ&&!a.isFunction(aZ)){aY=aZ;aZ=C}}}if(!aZ&&a0){aZ=function(){return a0.apply(aY||this,arguments)}}if(a0){aZ.guid=a0.guid=a0.guid||aZ.guid||a.guid++}return aZ},uaMatch:function(aZ){aZ=aZ.toLowerCase();var aY=/(webkit)[ \/]([\w.]+)/.exec(aZ)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(aZ)||/(msie) ([\w.]+)/.exec(aZ)||!/compatible/.test(aZ)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(aZ)||[];return{browser:aY[1]||"",version:aY[2]||"0"}},browser:{}});u=a.uaMatch(b);if(u.browser){a.browser[u.browser]=true;a.browser.version=u.version}if(a.browser.webkit){a.browser.safari=true}if(s){a.inArray=function(aY,aZ){return s.call(aZ,aY)}}X=a(ab);if(ab.addEventListener){aG=function(){ab.removeEventListener("DOMContentLoaded",aG,false);a.ready()}}else{if(ab.attachEvent){aG=function(){if(ab.readyState==="complete"){ab.detachEvent("onreadystatechange",aG);a.ready()}}}}function x(){if(a.isReady){return}try{ab.documentElement.doScroll("left")}catch(aY){setTimeout(x,1);return}a.ready()}function aV(aY,aZ){if(aZ.src){a.ajax({url:aZ.src,async:false,dataType:"script"})}else{a.globalEval(aZ.text||aZ.textContent||aZ.innerHTML||"")}if(aZ.parentNode){aZ.parentNode.removeChild(aZ)}}function an(aY,a6,a4,a0,a3,a5){var aZ=aY.length;if(typeof a6==="object"){for(var a1 in a6){an(aY,a1,a6[a1],a0,a3,a4)}return aY}if(a4!==C){a0=!a5&&a0&&a.isFunction(a4);for(var a2=0;a2<aZ;a2++){a3(aY[a2],a6,a0?a4.call(aY[a2],a2,a3(aY[a2],a6)):a4,a5)}return aY}return aZ?a3(aY[0],a6):C}function aP(){return(new Date).getTime()}(function(){a.support={};var a4=ab.documentElement,a3=ab.createElement("script"),aY=ab.createElement("div"),aZ="script"+aP();aY.style.display="none";aY.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var a6=aY.getElementsByTagName("*"),a5=aY.getElementsByTagName("a")[0];if(!a6||!a6.length||!a5){return}a.support={leadingWhitespace:aY.firstChild.nodeType===3,tbody:!aY.getElementsByTagName("tbody").length,htmlSerialize:!!aY.getElementsByTagName("link").length,style:/red/.test(a5.getAttribute("style")),hrefNormalized:a5.getAttribute("href")==="/a",opacity:/^0.55$/.test(a5.style.opacity),cssFloat:!!a5.style.cssFloat,checkOn:aY.getElementsByTagName("input")[0].value==="on",optSelected:ab.createElement("select").appendChild(ab.createElement("option")).selected,parentNode:aY.removeChild(aY.appendChild(ab.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};a3.type="text/javascript";try{a3.appendChild(ab.createTextNode("window."+aZ+"=1;"))}catch(a1){}a4.insertBefore(a3,a4.firstChild);if(aM[aZ]){a.support.scriptEval=true;delete aM[aZ]}try{delete a3.test}catch(a1){a.support.deleteExpando=false}a4.removeChild(a3);if(aY.attachEvent&&aY.fireEvent){aY.attachEvent("onclick",function a7(){a.support.noCloneEvent=false;aY.detachEvent("onclick",a7)});aY.cloneNode(true).fireEvent("onclick")}aY=ab.createElement("div");aY.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var a0=ab.createDocumentFragment();a0.appendChild(aY.firstChild);a.support.checkClone=a0.cloneNode(true).cloneNode(true).lastChild.checked;a(function(){var a8=ab.createElement("div");a8.style.width=a8.style.paddingLeft="1px";ab.body.appendChild(a8);a.boxModel=a.support.boxModel=a8.offsetWidth===2;ab.body.removeChild(a8).style.display="none";a8=null});var a2=function(a8){var ba=ab.createElement("div");a8="on"+a8;var a9=(a8 in ba);if(!a9){ba.setAttribute(a8,"return;");a9=typeof ba[a8]==="function"}ba=null;return a9};a.support.submitBubbles=a2("submit");a.support.changeBubbles=a2("change");a4=a3=aY=a6=a5=null})();a.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var aI="jQuery"+aP(),aH=0,aT={};a.extend({cache:{},expando:aI,noData:{embed:true,object:true,applet:true},data:function(a0,aZ,a2){if(a0.nodeName&&a.noData[a0.nodeName.toLowerCase()]){return}a0=a0==aM?aT:a0;var a3=a0[aI],aY=a.cache,a1;if(!a3&&typeof aZ==="string"&&a2===C){return null}if(!a3){a3=++aH}if(typeof aZ==="object"){a0[aI]=a3;a1=aY[a3]=a.extend(true,{},aZ)}else{if(!aY[a3]){a0[aI]=a3;aY[a3]={}}}a1=aY[a3];if(a2!==C){a1[aZ]=a2}return typeof aZ==="string"?a1[aZ]:a1},removeData:function(a0,aZ){if(a0.nodeName&&a.noData[a0.nodeName.toLowerCase()]){return}a0=a0==aM?aT:a0;var a2=a0[aI],aY=a.cache,a1=aY[a2];if(aZ){if(a1){delete a1[aZ];if(a.isEmptyObject(a1)){a.removeData(a0)}}}else{if(a.support.deleteExpando){delete a0[a.expando]}else{if(a0.removeAttribute){a0.removeAttribute(a.expando)}}delete aY[a2]}}});a.fn.extend({data:function(aY,a0){if(typeof aY==="undefined"&&this.length){return a.data(this[0])}else{if(typeof aY==="object"){return this.each(function(){a.data(this,aY)})}}var a1=aY.split(".");a1[1]=a1[1]?"."+a1[1]:"";if(a0===C){var aZ=this.triggerHandler("getData"+a1[1]+"!",[a1[0]]);if(aZ===C&&this.length){aZ=a.data(this[0],aY)}return aZ===C&&a1[1]?this.data(a1[0]):aZ}else{return this.trigger("setData"+a1[1]+"!",[a1[0],a0]).each(function(){a.data(this,aY,a0)})}},removeData:function(aY){return this.each(function(){a.removeData(this,aY)})}});a.extend({queue:function(aZ,aY,a1){if(!aZ){return}aY=(aY||"fx")+"queue";var a0=a.data(aZ,aY);if(!a1){return a0||[]}if(!a0||a.isArray(a1)){a0=a.data(aZ,aY,a.makeArray(a1))}else{a0.push(a1)}return a0},dequeue:function(a1,a0){a0=a0||"fx";var aY=a.queue(a1,a0),aZ=aY.shift();if(aZ==="inprogress"){aZ=aY.shift()}if(aZ){if(a0==="fx"){aY.unshift("inprogress")}aZ.call(a1,function(){a.dequeue(a1,a0)})}}});a.fn.extend({queue:function(aY,aZ){if(typeof aY!=="string"){aZ=aY;aY="fx"}if(aZ===C){return a.queue(this[0],aY)}return this.each(function(a1,a2){var a0=a.queue(this,aY,aZ);if(aY==="fx"&&a0[0]!=="inprogress"){a.dequeue(this,aY)}})},dequeue:function(aY){return this.each(function(){a.dequeue(this,aY)})},delay:function(aZ,aY){aZ=a.fx?a.fx.speeds[aZ]||aZ:aZ;aY=aY||"fx";return this.queue(aY,function(){var a0=this;setTimeout(function(){a.dequeue(a0,aY)},aZ)})},clearQueue:function(aY){return this.queue(aY||"fx",[])}});var ao=/[\n\t]/g,S=/\s+/,av=/\r/g,aQ=/href|src|style/,d=/(button|input)/i,z=/(button|input|object|select|textarea)/i,j=/^(a|area)$/i,I=/radio|checkbox/;a.fn.extend({attr:function(aY,aZ){return an(this,aY,aZ,true,a.attr)},removeAttr:function(aY,aZ){return this.each(function(){a.attr(this,aY,"");if(this.nodeType===1){this.removeAttribute(aY)}})},addClass:function(a5){if(a.isFunction(a5)){return this.each(function(a8){var a7=a(this);a7.addClass(a5.call(this,a8,a7.attr("class")))})}if(a5&&typeof a5==="string"){var aY=(a5||"").split(S);for(var a1=0,a0=this.length;a1<a0;a1++){var aZ=this[a1];if(aZ.nodeType===1){if(!aZ.className){aZ.className=a5}else{var a2=" "+aZ.className+" ",a4=aZ.className;for(var a3=0,a6=aY.length;a3<a6;a3++){if(a2.indexOf(" "+aY[a3]+" ")<0){a4+=" "+aY[a3]}}aZ.className=a.trim(a4)}}}}return this},removeClass:function(a3){if(a.isFunction(a3)){return this.each(function(a7){var a6=a(this);a6.removeClass(a3.call(this,a7,a6.attr("class")))})}if((a3&&typeof a3==="string")||a3===C){var a4=(a3||"").split(S);for(var a0=0,aZ=this.length;a0<aZ;a0++){var a2=this[a0];if(a2.nodeType===1&&a2.className){if(a3){var a1=(" "+a2.className+" ").replace(ao," ");for(var a5=0,aY=a4.length;a5<aY;a5++){a1=a1.replace(" "+a4[a5]+" "," ")}a2.className=a.trim(a1)}else{a2.className=""}}}}return this},toggleClass:function(a1,aZ){var a0=typeof a1,aY=typeof aZ==="boolean";if(a.isFunction(a1)){return this.each(function(a3){var a2=a(this);a2.toggleClass(a1.call(this,a3,a2.attr("class"),aZ),aZ)})}return this.each(function(){if(a0==="string"){var a4,a3=0,a2=a(this),a5=aZ,a6=a1.split(S);while((a4=a6[a3++])){a5=aY?a5:!a2.hasClass(a4);a2[a5?"addClass":"removeClass"](a4)}}else{if(a0==="undefined"||a0==="boolean"){if(this.className){a.data(this,"__className__",this.className)}this.className=this.className||a1===false?"":a.data(this,"__className__")||""}}})},hasClass:function(aY){var a1=" "+aY+" ";for(var a0=0,aZ=this.length;a0<aZ;a0++){if((" "+this[a0].className+" ").replace(ao," ").indexOf(a1)>-1){return true}}return false},val:function(a5){if(a5===C){var aZ=this[0];if(aZ){if(a.nodeName(aZ,"option")){return(aZ.attributes.value||{}).specified?aZ.value:aZ.text}if(a.nodeName(aZ,"select")){var a3=aZ.selectedIndex,a6=[],a7=aZ.options,a2=aZ.type==="select-one";if(a3<0){return null}for(var a0=a2?a3:0,a4=a2?a3+1:a7.length;a0<a4;a0++){var a1=a7[a0];if(a1.selected){a5=a(a1).val();if(a2){return a5}a6.push(a5)}}return a6}if(I.test(aZ.type)&&!a.support.checkOn){return aZ.getAttribute("value")===null?"on":aZ.value}return(aZ.value||"").replace(av,"")}return C}var aY=a.isFunction(a5);return this.each(function(ba){var a9=a(this),bb=a5;if(this.nodeType!==1){return}if(aY){bb=a5.call(this,ba,a9.val())}if(typeof bb==="number"){bb+=""}if(a.isArray(bb)&&I.test(this.type)){this.checked=a.inArray(a9.val(),bb)>=0}else{if(a.nodeName(this,"select")){var a8=a.makeArray(bb);a("option",this).each(function(){this.selected=a.inArray(a(this).val(),a8)>=0});if(!a8.length){this.selectedIndex=-1}}else{this.value=bb}}})}});a.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(aZ,aY,a4,a7){if(!aZ||aZ.nodeType===3||aZ.nodeType===8){return C}if(a7&&aY in a.attrFn){return a(aZ)[aY](a4)}var a0=aZ.nodeType!==1||!a.isXMLDoc(aZ),a3=a4!==C;aY=a0&&a.props[aY]||aY;if(aZ.nodeType===1){var a2=aQ.test(aY);if(aY==="selected"&&!a.support.optSelected){var a5=aZ.parentNode;if(a5){a5.selectedIndex;if(a5.parentNode){a5.parentNode.selectedIndex}}}if(aY in aZ&&a0&&!a2){if(a3){if(aY==="type"&&d.test(aZ.nodeName)&&aZ.parentNode){a.error("type property can't be changed")}aZ[aY]=a4}if(a.nodeName(aZ,"form")&&aZ.getAttributeNode(aY)){return aZ.getAttributeNode(aY).nodeValue}if(aY==="tabIndex"){var a6=aZ.getAttributeNode("tabIndex");return a6&&a6.specified?a6.value:z.test(aZ.nodeName)||j.test(aZ.nodeName)&&aZ.href?0:C}return aZ[aY]}if(!a.support.style&&a0&&aY==="style"){if(a3){aZ.style.cssText=""+a4}return aZ.style.cssText}if(a3){aZ.setAttribute(aY,""+a4)}var a1=!a.support.hrefNormalized&&a0&&a2?aZ.getAttribute(aY,2):aZ.getAttribute(aY);return a1===null?C:a1}return a.style(aZ,aY,a4)}});var aC=/\.(.*)$/,A=function(aY){return aY.replace(/[^\w\s\.\|`]/g,function(aZ){return"\\"+aZ})};a.event={add:function(a1,a5,ba,a3){if(a1.nodeType===3||a1.nodeType===8){return}if(a1.setInterval&&(a1!==aM&&!a1.frameElement)){a1=aM}var aZ,a9;if(ba.handler){aZ=ba;ba=aZ.handler}if(!ba.guid){ba.guid=a.guid++}var a6=a.data(a1);if(!a6){return}var bb=a6.events=a6.events||{},a4=a6.handle,a4;if(!a4){a6.handle=a4=function(){return typeof a!=="undefined"&&!a.event.triggered?a.event.handle.apply(a4.elem,arguments):C}}a4.elem=a1;a5=a5.split(" ");var a8,a2=0,aY;while((a8=a5[a2++])){a9=aZ?a.extend({},aZ):{handler:ba,data:a3};if(a8.indexOf(".")>-1){aY=a8.split(".");a8=aY.shift();a9.namespace=aY.slice(0).sort().join(".")}else{aY=[];a9.namespace=""}a9.type=a8;a9.guid=ba.guid;var a0=bb[a8],a7=a.event.special[a8]||{};if(!a0){a0=bb[a8]=[];if(!a7.setup||a7.setup.call(a1,a3,aY,a4)===false){if(a1.addEventListener){a1.addEventListener(a8,a4,false)}else{if(a1.attachEvent){a1.attachEvent("on"+a8,a4)}}}}if(a7.add){a7.add.call(a1,a9);if(!a9.handler.guid){a9.handler.guid=ba.guid}}a0.push(a9);a.event.global[a8]=true}a1=null},global:{},remove:function(bd,a8,aZ,a4){if(bd.nodeType===3||bd.nodeType===8){return}var bg,a3,a5,bb=0,a1,a6,a9,a2,a7,aY,bf,bc=a.data(bd),a0=bc&&bc.events;if(!bc||!a0){return}if(a8&&a8.type){aZ=a8.handler;a8=a8.type}if(!a8||typeof a8==="string"&&a8.charAt(0)==="."){a8=a8||"";for(a3 in a0){a.event.remove(bd,a3+a8)}return}a8=a8.split(" ");while((a3=a8[bb++])){bf=a3;aY=null;a1=a3.indexOf(".")<0;a6=[];if(!a1){a6=a3.split(".");a3=a6.shift();a9=new RegExp("(^|\\.)"+a.map(a6.slice(0).sort(),A).join("\\.(?:.*\\.)?")+"(\\.|$)")}a7=a0[a3];if(!a7){continue}if(!aZ){for(var ba=0;ba<a7.length;ba++){aY=a7[ba];if(a1||a9.test(aY.namespace)){a.event.remove(bd,bf,aY.handler,ba);a7.splice(ba--,1)}}continue}a2=a.event.special[a3]||{};for(var ba=a4||0;ba<a7.length;ba++){aY=a7[ba];if(aZ.guid===aY.guid){if(a1||a9.test(aY.namespace)){if(a4==null){a7.splice(ba--,1)}if(a2.remove){a2.remove.call(bd,aY)}}if(a4!=null){break}}}if(a7.length===0||a4!=null&&a7.length===1){if(!a2.teardown||a2.teardown.call(bd,a6)===false){ag(bd,a3,bc.handle)}bg=null;delete a0[a3]}}if(a.isEmptyObject(a0)){var be=bc.handle;if(be){be.elem=null}delete bc.events;delete bc.handle;if(a.isEmptyObject(bc)){a.removeData(bd)}}},trigger:function(aY,a2,a0){var a7=aY.type||aY,a1=arguments[3];if(!a1){aY=typeof aY==="object"?aY[aI]?aY:a.extend(a.Event(a7),aY):a.Event(a7);if(a7.indexOf("!")>=0){aY.type=a7=a7.slice(0,-1);aY.exclusive=true}if(!a0){aY.stopPropagation();if(a.event.global[a7]){a.each(a.cache,function(){if(this.events&&this.events[a7]){a.event.trigger(aY,a2,this.handle.elem)}})}}if(!a0||a0.nodeType===3||a0.nodeType===8){return C}aY.result=C;aY.target=a0;a2=a.makeArray(a2);a2.unshift(aY)}aY.currentTarget=a0;var a3=a.data(a0,"handle");if(a3){a3.apply(a0,a2)}var a8=a0.parentNode||a0.ownerDocument;try{if(!(a0&&a0.nodeName&&a.noData[a0.nodeName.toLowerCase()])){if(a0["on"+a7]&&a0["on"+a7].apply(a0,a2)===false){aY.result=false}}}catch(a5){}if(!aY.isPropagationStopped()&&a8){a.event.trigger(aY,a2,a8,true)}else{if(!aY.isDefaultPrevented()){var a4=aY.target,aZ,a9=a.nodeName(a4,"a")&&a7==="click",a6=a.event.special[a7]||{};if((!a6._default||a6._default.call(a0,aY)===false)&&!a9&&!(a4&&a4.nodeName&&a.noData[a4.nodeName.toLowerCase()])){try{if(a4[a7]){aZ=a4["on"+a7];if(aZ){a4["on"+a7]=null}a.event.triggered=true;a4[a7]()}}catch(a5){}if(aZ){a4["on"+a7]=aZ}a.event.triggered=false}}}},handle:function(aY){var a6,a0,aZ,a1,a7;aY=arguments[0]=a.event.fix(aY||aM.event);aY.currentTarget=this;a6=aY.type.indexOf(".")<0&&!aY.exclusive;if(!a6){aZ=aY.type.split(".");aY.type=aZ.shift();a1=new RegExp("(^|\\.)"+aZ.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}var a7=a.data(this,"events"),a0=a7[aY.type];if(a7&&a0){a0=a0.slice(0);for(var a3=0,a2=a0.length;a3<a2;a3++){var a5=a0[a3];if(a6||a1.test(a5.namespace)){aY.handler=a5.handler;aY.data=a5.data;aY.handleObj=a5;var a4=a5.handler.apply(this,arguments);if(a4!==C){aY.result=a4;if(a4===false){aY.preventDefault();aY.stopPropagation()}}if(aY.isImmediatePropagationStopped()){break}}}}return aY.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a1){if(a1[aI]){return a1}var aZ=a1;a1=a.Event(aZ);for(var a0=this.props.length,a3;a0;){a3=this.props[--a0];a1[a3]=aZ[a3]}if(!a1.target){a1.target=a1.srcElement||ab}if(a1.target.nodeType===3){a1.target=a1.target.parentNode}if(!a1.relatedTarget&&a1.fromElement){a1.relatedTarget=a1.fromElement===a1.target?a1.toElement:a1.fromElement}if(a1.pageX==null&&a1.clientX!=null){var a2=ab.documentElement,aY=ab.body;a1.pageX=a1.clientX+(a2&&a2.scrollLeft||aY&&aY.scrollLeft||0)-(a2&&a2.clientLeft||aY&&aY.clientLeft||0);a1.pageY=a1.clientY+(a2&&a2.scrollTop||aY&&aY.scrollTop||0)-(a2&&a2.clientTop||aY&&aY.clientTop||0)}if(!a1.which&&((a1.charCode||a1.charCode===0)?a1.charCode:a1.keyCode)){a1.which=a1.charCode||a1.keyCode}if(!a1.metaKey&&a1.ctrlKey){a1.metaKey=a1.ctrlKey}if(!a1.which&&a1.button!==C){a1.which=(a1.button&1?1:(a1.button&2?3:(a1.button&4?2:0)))}return a1},guid:100000000,proxy:a.proxy,special:{ready:{setup:a.bindReady,teardown:a.noop},live:{add:function(aY){a.event.add(this,aY.origType,a.extend({},aY,{handler:V}))},remove:function(aZ){var aY=true,a0=aZ.origType.replace(aC,"");a.each(a.data(this,"events").live||[],function(){if(a0===this.origType.replace(aC,"")){aY=false;return false}});if(aY){a.event.remove(this,aZ.origType,V)}}},beforeunload:{setup:function(a0,aZ,aY){if(this.setInterval){this.onbeforeunload=aY}return false},teardown:function(aZ,aY){if(this.onbeforeunload===aY){this.onbeforeunload=null}}}}};var ag=ab.removeEventListener?function(aZ,aY,a0){aZ.removeEventListener(aY,a0,false)}:function(aZ,aY,a0){aZ.detachEvent("on"+aY,a0)};a.Event=function(aY){if(!this.preventDefault){return new a.Event(aY)}if(aY&&aY.type){this.originalEvent=aY;this.type=aY.type}else{this.type=aY}this.timeStamp=aP();this[aI]=true};function aR(){return false}function f(){return true}a.Event.prototype={preventDefault:function(){this.isDefaultPrevented=f;var aY=this.originalEvent;if(!aY){return}if(aY.preventDefault){aY.preventDefault()}aY.returnValue=false},stopPropagation:function(){this.isPropagationStopped=f;var aY=this.originalEvent;if(!aY){return}if(aY.stopPropagation){aY.stopPropagation()}aY.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=f;this.stopPropagation()},isDefaultPrevented:aR,isPropagationStopped:aR,isImmediatePropagationStopped:aR};var Q=function(aZ){var aY=aZ.relatedTarget;try{while(aY&&aY!==this){aY=aY.parentNode}if(aY!==this){aZ.type=aZ.data;a.event.handle.apply(this,arguments)}}catch(a0){}},ay=function(aY){aY.type=aY.data;a.event.handle.apply(this,arguments)};a.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(aZ,aY){a.event.special[aZ]={setup:function(a0){a.event.add(this,aY,a0&&a0.selector?ay:Q,aZ)},teardown:function(a0){a.event.remove(this,aY,a0&&a0.selector?ay:Q)}}});if(!a.support.submitBubbles){a.event.special.submit={setup:function(aZ,aY){if(this.nodeName.toLowerCase()!=="form"){a.event.add(this,"click.specialSubmit",function(a2){var a1=a2.target,a0=a1.type;if((a0==="submit"||a0==="image")&&a(a1).closest("form").length){return aA("submit",this,arguments)}});a.event.add(this,"keypress.specialSubmit",function(a2){var a1=a2.target,a0=a1.type;if((a0==="text"||a0==="password")&&a(a1).closest("form").length&&a2.keyCode===13){return aA("submit",this,arguments)}})}else{return false}},teardown:function(aY){a.event.remove(this,".specialSubmit")}}}if(!a.support.changeBubbles){var aq=/textarea|input|select/i,aS,i=function(aZ){var aY=aZ.type,a0=aZ.value;if(aY==="radio"||aY==="checkbox"){a0=aZ.checked}else{if(aY==="select-multiple"){a0=aZ.selectedIndex>-1?a.map(aZ.options,function(a1){return a1.selected}).join("-"):""}else{if(aZ.nodeName.toLowerCase()==="select"){a0=aZ.selectedIndex}}}return a0},O=function O(a0){var aY=a0.target,aZ,a1;if(!aq.test(aY.nodeName)||aY.readOnly){return}aZ=a.data(aY,"_change_data");a1=i(aY);if(a0.type!=="focusout"||aY.type!=="radio"){a.data(aY,"_change_data",a1)}if(aZ===C||a1===aZ){return}if(aZ!=null||a1){a0.type="change";return a.event.trigger(a0,arguments[1],aY)}};a.event.special.change={filters:{focusout:O,click:function(a0){var aZ=a0.target,aY=aZ.type;if(aY==="radio"||aY==="checkbox"||aZ.nodeName.toLowerCase()==="select"){return O.call(this,a0)}},keydown:function(a0){var aZ=a0.target,aY=aZ.type;if((a0.keyCode===13&&aZ.nodeName.toLowerCase()!=="textarea")||(a0.keyCode===32&&(aY==="checkbox"||aY==="radio"))||aY==="select-multiple"){return O.call(this,a0)}},beforeactivate:function(aZ){var aY=aZ.target;a.data(aY,"_change_data",i(aY))}},setup:function(a0,aZ){if(this.type==="file"){return false}for(var aY in aS){a.event.add(this,aY+".specialChange",aS[aY])}return aq.test(this.nodeName)},teardown:function(aY){a.event.remove(this,".specialChange");return aq.test(this.nodeName)}};aS=a.event.special.change.filters}function aA(aZ,a0,aY){aY[0].type=aZ;return a.event.handle.apply(a0,aY)}if(ab.addEventListener){a.each({focus:"focusin",blur:"focusout"},function(a0,aY){a.event.special[aY]={setup:function(){this.addEventListener(a0,aZ,true)},teardown:function(){this.removeEventListener(a0,aZ,true)}};function aZ(a1){a1=a.event.fix(a1);a1.type=aY;return a.event.handle.call(this,a1)}})}a.each(["bind","one"],function(aZ,aY){a.fn[aY]=function(a5,a6,a4){if(typeof a5==="object"){for(var a2 in a5){this[aY](a2,a6,a5[a2],a4)}return this}if(a.isFunction(a6)){a4=a6;a6=C}var a3=aY==="one"?a.proxy(a4,function(a7){a(this).unbind(a7,a3);return a4.apply(this,arguments)}):a4;if(a5==="unload"&&aY!=="one"){this.one(a5,a6,a4)}else{for(var a1=0,a0=this.length;a1<a0;a1++){a.event.add(this[a1],a5,a3,a6)}}return this}});a.fn.extend({unbind:function(a2,a1){if(typeof a2==="object"&&!a2.preventDefault){for(var a0 in a2){this.unbind(a0,a2[a0])}}else{for(var aZ=0,aY=this.length;aZ<aY;aZ++){a.event.remove(this[aZ],a2,a1)}}return this},delegate:function(aY,aZ,a1,a0){return this.live(aZ,a1,a0,aY)},undelegate:function(aY,aZ,a0){if(arguments.length===0){return this.unbind("live")}else{return this.die(aZ,null,a0,aY)}},trigger:function(aY,aZ){return this.each(function(){a.event.trigger(aY,aZ,this)})},triggerHandler:function(aY,a0){if(this[0]){var aZ=a.Event(aY);aZ.preventDefault();aZ.stopPropagation();a.event.trigger(aZ,a0,this[0]);return aZ.result}},toggle:function(a0){var aY=arguments,aZ=1;while(aZ<aY.length){a.proxy(a0,aY[aZ++])}return this.click(a.proxy(a0,function(a1){var a2=(a.data(this,"lastToggle"+a0.guid)||0)%aZ;a.data(this,"lastToggle"+a0.guid,a2+1);a1.preventDefault();return aY[a2].apply(this,arguments)||false}))},hover:function(aY,aZ){return this.mouseenter(aY).mouseleave(aZ||aY)}});var aw={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};a.each(["live","die"],function(aZ,aY){a.fn[aY]=function(a7,a4,a9,a2){var a8,a5=0,a6,a1,ba,a3=a2||this.selector,a0=a2?this:a(this.context);if(a.isFunction(a4)){a9=a4;a4=C}a7=(a7||"").split(" ");while((a8=a7[a5++])!=null){a6=aC.exec(a8);a1="";if(a6){a1=a6[0];a8=a8.replace(aC,"")}if(a8==="hover"){a7.push("mouseenter"+a1,"mouseleave"+a1);continue}ba=a8;if(a8==="focus"||a8==="blur"){a7.push(aw[a8]+a1);a8=a8+a1}else{a8=(aw[a8]||a8)+a1}if(aY==="live"){a0.each(function(){a.event.add(this,m(a8,a3),{data:a4,selector:a3,handler:a9,origType:a8,origHandler:a9,preType:ba})})}else{a0.unbind(m(a8,a3),a9)}}return this}});function V(aY){var a8,aZ=[],bb=[],a7=arguments,ba,a6,a9,a1,a3,a5,a2,a4,bc=a.data(this,"events");if(aY.liveFired===this||!bc||!bc.live||aY.button&&aY.type==="click"){return}aY.liveFired=this;var a0=bc.live.slice(0);for(a3=0;a3<a0.length;a3++){a9=a0[a3];if(a9.origType.replace(aC,"")===aY.type){bb.push(a9.selector)}else{a0.splice(a3--,1)}}a6=a(aY.target).closest(bb,aY.currentTarget);for(a5=0,a2=a6.length;a5<a2;a5++){for(a3=0;a3<a0.length;a3++){a9=a0[a3];if(a6[a5].selector===a9.selector){a1=a6[a5].elem;ba=null;if(a9.preType==="mouseenter"||a9.preType==="mouseleave"){ba=a(aY.relatedTarget).closest(a9.selector)[0]}if(!ba||ba!==a1){aZ.push({elem:a1,handleObj:a9})}}}}for(a5=0,a2=aZ.length;a5<a2;a5++){a6=aZ[a5];aY.currentTarget=a6.elem;aY.data=a6.handleObj.data;aY.handleObj=a6.handleObj;if(a6.handleObj.origHandler.apply(a6.elem,a7)===false){a8=false;break}}return a8}function m(aZ,aY){return"live."+(aZ&&aZ!=="*"?aZ+".":"")+aY.replace(/\./g,"`").replace(/ /g,"&")}a.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").split(" "),function(aZ,aY){a.fn[aY]=function(a0){return a0?this.bind(aY,a0):this.trigger(aY)};if(a.attrFn){a.attrFn[aY]=true}});if(aM.attachEvent&&!aM.addEventListener){aM.attachEvent("onunload",function(){for(var aZ in a.cache){if(a.cache[aZ].handle){try{a.event.remove(a.cache[aZ].handle.elem)}catch(aY){}}}}); /*! * Sizzle CSS Selector Engine - v1.0 * Copyright 2009, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ }(function(){var a9=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,ba=0,bc=Object.prototype.toString,a4=false,a3=true;[0,0].sort(function(){a3=false;return 0});var a0=function(bl,bg,bo,bp){bo=bo||[];var br=bg=bg||ab;if(bg.nodeType!==1&&bg.nodeType!==9){return[]}if(!bl||typeof bl!=="string"){return bo}var bm=[],bi,bt,bw,bh,bk=true,bj=a1(bg),bq=bl;while((a9.exec(""),bi=a9.exec(bq))!==null){bq=bi[3];bm.push(bi[1]);if(bi[2]){bh=bi[3];break}}if(bm.length>1&&a5.exec(bl)){if(bm.length===2&&a6.relative[bm[0]]){bt=bd(bm[0]+bm[1],bg)}else{bt=a6.relative[bm[0]]?[bg]:a0(bm.shift(),bg);while(bm.length){bl=bm.shift();if(a6.relative[bl]){bl+=bm.shift()}bt=bd(bl,bt)}}}else{if(!bp&&bm.length>1&&bg.nodeType===9&&!bj&&a6.match.ID.test(bm[0])&&!a6.match.ID.test(bm[bm.length-1])){var bs=a0.find(bm.shift(),bg,bj);bg=bs.expr?a0.filter(bs.expr,bs.set)[0]:bs.set[0]}if(bg){var bs=bp?{expr:bm.pop(),set:a8(bp)}:a0.find(bm.pop(),bm.length===1&&(bm[0]==="~"||bm[0]==="+")&&bg.parentNode?bg.parentNode:bg,bj);bt=bs.expr?a0.filter(bs.expr,bs.set):bs.set;if(bm.length>0){bw=a8(bt)}else{bk=false}while(bm.length){var bv=bm.pop(),bu=bv;if(!a6.relative[bv]){bv=""}else{bu=bm.pop()}if(bu==null){bu=bg}a6.relative[bv](bw,bu,bj)}}else{bw=bm=[]}}if(!bw){bw=bt}if(!bw){a0.error(bv||bl)}if(bc.call(bw)==="[object Array]"){if(!bk){bo.push.apply(bo,bw)}else{if(bg&&bg.nodeType===1){for(var bn=0;bw[bn]!=null;bn++){if(bw[bn]&&(bw[bn]===true||bw[bn].nodeType===1&&a7(bg,bw[bn]))){bo.push(bt[bn])}}}else{for(var bn=0;bw[bn]!=null;bn++){if(bw[bn]&&bw[bn].nodeType===1){bo.push(bt[bn])}}}}}else{a8(bw,bo)}if(bh){a0(bh,br,bo,bp);a0.uniqueSort(bo)}return bo};a0.uniqueSort=function(bh){if(bb){a4=a3;bh.sort(bb);if(a4){for(var bg=1;bg<bh.length;bg++){if(bh[bg]===bh[bg-1]){bh.splice(bg--,1)}}}}return bh};a0.matches=function(bg,bh){return a0(bg,null,null,bh)};a0.find=function(bn,bg,bo){var bm,bk;if(!bn){return[]}for(var bj=0,bi=a6.order.length;bj<bi;bj++){var bl=a6.order[bj],bk;if((bk=a6.leftMatch[bl].exec(bn))){var bh=bk[1];bk.splice(1,1);if(bh.substr(bh.length-1)!=="\\"){bk[1]=(bk[1]||"").replace(/\\/g,"");bm=a6.find[bl](bk,bg,bo);if(bm!=null){bn=bn.replace(a6.match[bl],"");break}}}}if(!bm){bm=bg.getElementsByTagName("*")}return{set:bm,expr:bn}};a0.filter=function(br,bq,bu,bk){var bi=br,bw=[],bo=bq,bm,bg,bn=bq&&bq[0]&&a1(bq[0]);while(br&&bq.length){for(var bp in a6.filter){if((bm=a6.leftMatch[bp].exec(br))!=null&&bm[2]){var bh=a6.filter[bp],bv,bt,bj=bm[1];bg=false;bm.splice(1,1);if(bj.substr(bj.length-1)==="\\"){continue}if(bo===bw){bw=[]}if(a6.preFilter[bp]){bm=a6.preFilter[bp](bm,bo,bu,bw,bk,bn);if(!bm){bg=bv=true}else{if(bm===true){continue}}}if(bm){for(var bl=0;(bt=bo[bl])!=null;bl++){if(bt){bv=bh(bt,bm,bl,bo);var bs=bk^!!bv;if(bu&&bv!=null){if(bs){bg=true}else{bo[bl]=false}}else{if(bs){bw.push(bt);bg=true}}}}}if(bv!==C){if(!bu){bo=bw}br=br.replace(a6.match[bp],"");if(!bg){return[]}break}}}if(br===bi){if(bg==null){a0.error(br)}else{break}}bi=br}return bo};a0.error=function(bg){throw"Syntax error, unrecognized expression: "+bg};var a6=a0.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(bg){return bg.getAttribute("href")}},relative:{"+":function(bm,bh){var bj=typeof bh==="string",bl=bj&&!/\W/.test(bh),bn=bj&&!bl;if(bl){bh=bh.toLowerCase()}for(var bi=0,bg=bm.length,bk;bi<bg;bi++){if((bk=bm[bi])){while((bk=bk.previousSibling)&&bk.nodeType!==1){}bm[bi]=bn||bk&&bk.nodeName.toLowerCase()===bh?bk||false:bk===bh}}if(bn){a0.filter(bh,bm,true)}},">":function(bm,bh){var bk=typeof bh==="string";if(bk&&!/\W/.test(bh)){bh=bh.toLowerCase();for(var bi=0,bg=bm.length;bi<bg;bi++){var bl=bm[bi];if(bl){var bj=bl.parentNode;bm[bi]=bj.nodeName.toLowerCase()===bh?bj:false}}}else{for(var bi=0,bg=bm.length;bi<bg;bi++){var bl=bm[bi];if(bl){bm[bi]=bk?bl.parentNode:bl.parentNode===bh}}if(bk){a0.filter(bh,bm,true)}}},"":function(bj,bh,bl){var bi=ba++,bg=be;if(typeof bh==="string"&&!/\W/.test(bh)){var bk=bh=bh.toLowerCase();bg=aY}bg("parentNode",bh,bi,bj,bk,bl)},"~":function(bj,bh,bl){var bi=ba++,bg=be;if(typeof bh==="string"&&!/\W/.test(bh)){var bk=bh=bh.toLowerCase();bg=aY}bg("previousSibling",bh,bi,bj,bk,bl)}},find:{ID:function(bh,bi,bj){if(typeof bi.getElementById!=="undefined"&&!bj){var bg=bi.getElementById(bh[1]);return bg?[bg]:[]}},NAME:function(bi,bl){if(typeof bl.getElementsByName!=="undefined"){var bh=[],bk=bl.getElementsByName(bi[1]);for(var bj=0,bg=bk.length;bj<bg;bj++){if(bk[bj].getAttribute("name")===bi[1]){bh.push(bk[bj])}}return bh.length===0?null:bh}},TAG:function(bg,bh){return bh.getElementsByTagName(bg[1])}},preFilter:{CLASS:function(bj,bh,bi,bg,bm,bn){bj=" "+bj[1].replace(/\\/g,"")+" ";if(bn){return bj}for(var bk=0,bl;(bl=bh[bk])!=null;bk++){if(bl){if(bm^(bl.className&&(" "+bl.className+" ").replace(/[\t\n]/g," ").indexOf(bj)>=0)){if(!bi){bg.push(bl)}}else{if(bi){bh[bk]=false}}}}return false},ID:function(bg){return bg[1].replace(/\\/g,"")},TAG:function(bh,bg){return bh[1].toLowerCase()},CHILD:function(bg){if(bg[1]==="nth"){var bh=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(bg[2]==="even"&&"2n"||bg[2]==="odd"&&"2n+1"||!/\D/.test(bg[2])&&"0n+"+bg[2]||bg[2]);bg[2]=(bh[1]+(bh[2]||1))-0;bg[3]=bh[3]-0}bg[0]=ba++;return bg},ATTR:function(bk,bh,bi,bg,bl,bm){var bj=bk[1].replace(/\\/g,"");if(!bm&&a6.attrMap[bj]){bk[1]=a6.attrMap[bj]}if(bk[2]==="~="){bk[4]=" "+bk[4]+" "}return bk},PSEUDO:function(bk,bh,bi,bg,bl){if(bk[1]==="not"){if((a9.exec(bk[3])||"").length>1||/^\w/.test(bk[3])){bk[3]=a0(bk[3],null,null,bh)}else{var bj=a0.filter(bk[3],bh,bi,true^bl);if(!bi){bg.push.apply(bg,bj)}return false}}else{if(a6.match.POS.test(bk[0])||a6.match.CHILD.test(bk[0])){return true}}return bk},POS:function(bg){bg.unshift(true);return bg}},filters:{enabled:function(bg){return bg.disabled===false&&bg.type!=="hidden"},disabled:function(bg){return bg.disabled===true},checked:function(bg){return bg.checked===true},selected:function(bg){bg.parentNode.selectedIndex;return bg.selected===true},parent:function(bg){return !!bg.firstChild},empty:function(bg){return !bg.firstChild},has:function(bi,bh,bg){return !!a0(bg[3],bi).length},header:function(bg){return/h\d/i.test(bg.nodeName)},text:function(bg){return"text"===bg.type},radio:function(bg){return"radio"===bg.type},checkbox:function(bg){return"checkbox"===bg.type},file:function(bg){return"file"===bg.type},password:function(bg){return"password"===bg.type},submit:function(bg){return"submit"===bg.type},image:function(bg){return"image"===bg.type},reset:function(bg){return"reset"===bg.type},button:function(bg){return"button"===bg.type||bg.nodeName.toLowerCase()==="button"},input:function(bg){return/input|select|textarea|button/i.test(bg.nodeName)}},setFilters:{first:function(bh,bg){return bg===0},last:function(bi,bh,bg,bj){return bh===bj.length-1},even:function(bh,bg){return bg%2===0},odd:function(bh,bg){return bg%2===1},lt:function(bi,bh,bg){return bh<bg[3]-0},gt:function(bi,bh,bg){return bh>bg[3]-0},nth:function(bi,bh,bg){return bg[3]-0===bh},eq:function(bi,bh,bg){return bg[3]-0===bh}},filter:{PSEUDO:function(bm,bi,bj,bn){var bh=bi[1],bk=a6.filters[bh];if(bk){return bk(bm,bj,bi,bn)}else{if(bh==="contains"){return(bm.textContent||bm.innerText||aZ([bm])||"").indexOf(bi[3])>=0}else{if(bh==="not"){var bl=bi[3];for(var bj=0,bg=bl.length;bj<bg;bj++){if(bl[bj]===bm){return false}}return true}else{a0.error("Syntax error, unrecognized expression: "+bh)}}}},CHILD:function(bg,bj){var bm=bj[1],bh=bg;switch(bm){case"only":case"first":while((bh=bh.previousSibling)){if(bh.nodeType===1){return false}}if(bm==="first"){return true}bh=bg;case"last":while((bh=bh.nextSibling)){if(bh.nodeType===1){return false}}return true;case"nth":var bi=bj[2],bp=bj[3];if(bi===1&&bp===0){return true}var bl=bj[0],bo=bg.parentNode;if(bo&&(bo.sizcache!==bl||!bg.nodeIndex)){var bk=0;for(bh=bo.firstChild;bh;bh=bh.nextSibling){if(bh.nodeType===1){bh.nodeIndex=++bk}}bo.sizcache=bl}var bn=bg.nodeIndex-bp;if(bi===0){return bn===0}else{return(bn%bi===0&&bn/bi>=0)}}},ID:function(bh,bg){return bh.nodeType===1&&bh.getAttribute("id")===bg},TAG:function(bh,bg){return(bg==="*"&&bh.nodeType===1)||bh.nodeName.toLowerCase()===bg},CLASS:function(bh,bg){return(" "+(bh.className||bh.getAttribute("class"))+" ").indexOf(bg)>-1},ATTR:function(bl,bj){var bi=bj[1],bg=a6.attrHandle[bi]?a6.attrHandle[bi](bl):bl[bi]!=null?bl[bi]:bl.getAttribute(bi),bm=bg+"",bk=bj[2],bh=bj[4];return bg==null?bk==="!=":bk==="="?bm===bh:bk==="*="?bm.indexOf(bh)>=0:bk==="~="?(" "+bm+" ").indexOf(bh)>=0:!bh?bm&&bg!==false:bk==="!="?bm!==bh:bk==="^="?bm.indexOf(bh)===0:bk==="$="?bm.substr(bm.length-bh.length)===bh:bk==="|="?bm===bh||bm.substr(0,bh.length+1)===bh+"-":false},POS:function(bk,bh,bi,bl){var bg=bh[2],bj=a6.setFilters[bg];if(bj){return bj(bk,bi,bh,bl)}}}};var a5=a6.match.POS;for(var a2 in a6.match){a6.match[a2]=new RegExp(a6.match[a2].source+/(?![^\[]*\])(?![^\(]*\))/.source);a6.leftMatch[a2]=new RegExp(/(^(?:.|\r|\n)*?)/.source+a6.match[a2].source.replace(/\\(\d+)/g,function(bh,bg){return"\\"+(bg-0+1)}))}var a8=function(bh,bg){bh=Array.prototype.slice.call(bh,0);if(bg){bg.push.apply(bg,bh);return bg}return bh};try{Array.prototype.slice.call(ab.documentElement.childNodes,0)[0].nodeType}catch(bf){a8=function(bk,bj){var bh=bj||[];if(bc.call(bk)==="[object Array]"){Array.prototype.push.apply(bh,bk)}else{if(typeof bk.length==="number"){for(var bi=0,bg=bk.length;bi<bg;bi++){bh.push(bk[bi])}}else{for(var bi=0;bk[bi];bi++){bh.push(bk[bi])}}}return bh}}var bb;if(ab.documentElement.compareDocumentPosition){bb=function(bh,bg){if(!bh.compareDocumentPosition||!bg.compareDocumentPosition){if(bh==bg){a4=true}return bh.compareDocumentPosition?-1:1}var bi=bh.compareDocumentPosition(bg)&4?-1:bh===bg?0:1;if(bi===0){a4=true}return bi}}else{if("sourceIndex" in ab.documentElement){bb=function(bh,bg){if(!bh.sourceIndex||!bg.sourceIndex){if(bh==bg){a4=true}return bh.sourceIndex?-1:1}var bi=bh.sourceIndex-bg.sourceIndex;if(bi===0){a4=true}return bi}}else{if(ab.createRange){bb=function(bj,bh){if(!bj.ownerDocument||!bh.ownerDocument){if(bj==bh){a4=true}return bj.ownerDocument?-1:1}var bi=bj.ownerDocument.createRange(),bg=bh.ownerDocument.createRange();bi.setStart(bj,0);bi.setEnd(bj,0);bg.setStart(bh,0);bg.setEnd(bh,0);var bk=bi.compareBoundaryPoints(Range.START_TO_END,bg);if(bk===0){a4=true}return bk}}}}function aZ(bg){var bh="",bj;for(var bi=0;bg[bi];bi++){bj=bg[bi];if(bj.nodeType===3||bj.nodeType===4){bh+=bj.nodeValue}else{if(bj.nodeType!==8){bh+=aZ(bj.childNodes)}}}return bh}(function(){var bh=ab.createElement("div"),bi="script"+(new Date).getTime();bh.innerHTML="<a name='"+bi+"'/>";var bg=ab.documentElement;bg.insertBefore(bh,bg.firstChild);if(ab.getElementById(bi)){a6.find.ID=function(bk,bl,bm){if(typeof bl.getElementById!=="undefined"&&!bm){var bj=bl.getElementById(bk[1]);return bj?bj.id===bk[1]||typeof bj.getAttributeNode!=="undefined"&&bj.getAttributeNode("id").nodeValue===bk[1]?[bj]:C:[]}};a6.filter.ID=function(bl,bj){var bk=typeof bl.getAttributeNode!=="undefined"&&bl.getAttributeNode("id");return bl.nodeType===1&&bk&&bk.nodeValue===bj}}bg.removeChild(bh);bg=bh=null})();(function(){var bg=ab.createElement("div");bg.appendChild(ab.createComment(""));if(bg.getElementsByTagName("*").length>0){a6.find.TAG=function(bh,bl){var bk=bl.getElementsByTagName(bh[1]);if(bh[1]==="*"){var bj=[];for(var bi=0;bk[bi];bi++){if(bk[bi].nodeType===1){bj.push(bk[bi])}}bk=bj}return bk}}bg.innerHTML="<a href='#'></a>";if(bg.firstChild&&typeof bg.firstChild.getAttribute!=="undefined"&&bg.firstChild.getAttribute("href")!=="#"){a6.attrHandle.href=function(bh){return bh.getAttribute("href",2)}}bg=null})();if(ab.querySelectorAll){(function(){var bg=a0,bi=ab.createElement("div");bi.innerHTML="<p class='TEST'></p>";if(bi.querySelectorAll&&bi.querySelectorAll(".TEST").length===0){return}a0=function(bm,bl,bj,bk){bl=bl||ab;if(!bk&&bl.nodeType===9&&!a1(bl)){try{return a8(bl.querySelectorAll(bm),bj)}catch(bn){}}return bg(bm,bl,bj,bk)};for(var bh in bg){a0[bh]=bg[bh]}bi=null})()}(function(){var bg=ab.createElement("div");bg.innerHTML="<div class='test e'></div><div class='test'></div>";if(!bg.getElementsByClassName||bg.getElementsByClassName("e").length===0){return}bg.lastChild.className="e";if(bg.getElementsByClassName("e").length===1){return}a6.order.splice(1,0,"CLASS");a6.find.CLASS=function(bh,bi,bj){if(typeof bi.getElementsByClassName!=="undefined"&&!bj){return bi.getElementsByClassName(bh[1])}};bg=null})();function aY(bh,bm,bl,bp,bn,bo){for(var bj=0,bi=bp.length;bj<bi;bj++){var bg=bp[bj];if(bg){bg=bg[bh];var bk=false;while(bg){if(bg.sizcache===bl){bk=bp[bg.sizset];break}if(bg.nodeType===1&&!bo){bg.sizcache=bl;bg.sizset=bj}if(bg.nodeName.toLowerCase()===bm){bk=bg;break}bg=bg[bh]}bp[bj]=bk}}}function be(bh,bm,bl,bp,bn,bo){for(var bj=0,bi=bp.length;bj<bi;bj++){var bg=bp[bj];if(bg){bg=bg[bh];var bk=false;while(bg){if(bg.sizcache===bl){bk=bp[bg.sizset];break}if(bg.nodeType===1){if(!bo){bg.sizcache=bl;bg.sizset=bj}if(typeof bm!=="string"){if(bg===bm){bk=true;break}}else{if(a0.filter(bm,[bg]).length>0){bk=bg;break}}}bg=bg[bh]}bp[bj]=bk}}}var a7=ab.compareDocumentPosition?function(bh,bg){return !!(bh.compareDocumentPosition(bg)&16)}:function(bh,bg){return bh!==bg&&(bh.contains?bh.contains(bg):true)};var a1=function(bg){var bh=(bg?bg.ownerDocument||bg:0).documentElement;return bh?bh.nodeName!=="HTML":false};var bd=function(bg,bn){var bj=[],bk="",bl,bi=bn.nodeType?[bn]:bn;while((bl=a6.match.PSEUDO.exec(bg))){bk+=bl[0];bg=bg.replace(a6.match.PSEUDO,"")}bg=a6.relative[bg]?bg+"*":bg;for(var bm=0,bh=bi.length;bm<bh;bm++){a0(bg,bi[bm],bj)}return a0.filter(bk,bj)};a.find=a0;a.expr=a0.selectors;a.expr[":"]=a.expr.filters;a.unique=a0.uniqueSort;a.text=aZ;a.isXMLDoc=a1;a.contains=a7;return;aM.Sizzle=a0})();var N=/Until$/,Y=/^(?:parents|prevUntil|prevAll)/,aL=/,/,F=Array.prototype.slice;var ai=function(a1,a0,aY){if(a.isFunction(a0)){return a.grep(a1,function(a3,a2){return !!a0.call(a3,a2,a3)===aY})}else{if(a0.nodeType){return a.grep(a1,function(a3,a2){return(a3===a0)===aY})}else{if(typeof a0==="string"){var aZ=a.grep(a1,function(a2){return a2.nodeType===1});if(aW.test(a0)){return a.filter(a0,aZ,!aY)}else{a0=a.filter(a0,aZ)}}}}return a.grep(a1,function(a3,a2){return(a.inArray(a3,a0)>=0)===aY})};a.fn.extend({find:function(aY){var a0=this.pushStack("","find",aY),a3=0;for(var a1=0,aZ=this.length;a1<aZ;a1++){a3=a0.length;a.find(aY,this[a1],a0);if(a1>0){for(var a4=a3;a4<a0.length;a4++){for(var a2=0;a2<a3;a2++){if(a0[a2]===a0[a4]){a0.splice(a4--,1);break}}}}}return a0},has:function(aZ){var aY=a(aZ);return this.filter(function(){for(var a1=0,a0=aY.length;a1<a0;a1++){if(a.contains(this,aY[a1])){return true}}})},not:function(aY){return this.pushStack(ai(this,aY,false),"not",aY)},filter:function(aY){return this.pushStack(ai(this,aY,true),"filter",aY)},is:function(aY){return !!aY&&a.filter(aY,this).length>0},closest:function(a7,aY){if(a.isArray(a7)){var a4=[],a6=this[0],a3,a2={},a0;if(a6&&a7.length){for(var a1=0,aZ=a7.length;a1<aZ;a1++){a0=a7[a1];if(!a2[a0]){a2[a0]=a.expr.match.POS.test(a0)?a(a0,aY||this.context):a0}}while(a6&&a6.ownerDocument&&a6!==aY){for(a0 in a2){a3=a2[a0];if(a3.jquery?a3.index(a6)>-1:a(a6).is(a3)){a4.push({selector:a0,elem:a6});delete a2[a0]}}a6=a6.parentNode}}return a4}var a5=a.expr.match.POS.test(a7)?a(a7,aY||this.context):null;return this.map(function(a8,a9){while(a9&&a9.ownerDocument&&a9!==aY){if(a5?a5.index(a9)>-1:a(a9).is(a7)){return a9}a9=a9.parentNode}return null})},index:function(aY){if(!aY||typeof aY==="string"){return a.inArray(this[0],aY?a(aY):this.parent().children())}return a.inArray(aY.jquery?aY[0]:aY,this)},add:function(aY,aZ){var a1=typeof aY==="string"?a(aY,aZ||this.context):a.makeArray(aY),a0=a.merge(this.get(),a1);return this.pushStack(y(a1[0])||y(a0[0])?a0:a.unique(a0))},andSelf:function(){return this.add(this.prevObject)}});function y(aY){return !aY||!aY.parentNode||aY.parentNode.nodeType===11}a.each({parent:function(aZ){var aY=aZ.parentNode;return aY&&aY.nodeType!==11?aY:null},parents:function(aY){return a.dir(aY,"parentNode")},parentsUntil:function(aZ,aY,a0){return a.dir(aZ,"parentNode",a0)},next:function(aY){return a.nth(aY,2,"nextSibling")},prev:function(aY){return a.nth(aY,2,"previousSibling")},nextAll:function(aY){return a.dir(aY,"nextSibling")},prevAll:function(aY){return a.dir(aY,"previousSibling")},nextUntil:function(aZ,aY,a0){return a.dir(aZ,"nextSibling",a0)},prevUntil:function(aZ,aY,a0){return a.dir(aZ,"previousSibling",a0)},siblings:function(aY){return a.sibling(aY.parentNode.firstChild,aY)},children:function(aY){return a.sibling(aY.firstChild)},contents:function(aY){return a.nodeName(aY,"iframe")?aY.contentDocument||aY.contentWindow.document:a.makeArray(aY.childNodes)}},function(aY,aZ){a.fn[aY]=function(a2,a0){var a1=a.map(this,aZ,a2);if(!N.test(aY)){a0=a2}if(a0&&typeof a0==="string"){a1=a.filter(a0,a1)}a1=this.length>1?a.unique(a1):a1;if((this.length>1||aL.test(a0))&&Y.test(aY)){a1=a1.reverse()}return this.pushStack(a1,aY,F.call(arguments).join(","))}});a.extend({filter:function(a0,aY,aZ){if(aZ){a0=":not("+a0+")"}return a.find.matches(a0,aY)},dir:function(a0,aZ,a2){var aY=[],a1=a0[aZ];while(a1&&a1.nodeType!==9&&(a2===C||a1.nodeType!==1||!a(a1).is(a2))){if(a1.nodeType===1){aY.push(a1)}a1=a1[aZ]}return aY},nth:function(a2,aY,a0,a1){aY=aY||1;var aZ=0;for(;a2;a2=a2[a0]){if(a2.nodeType===1&&++aZ===aY){break}}return a2},sibling:function(a0,aZ){var aY=[];for(;a0;a0=a0.nextSibling){if(a0.nodeType===1&&a0!==aZ){aY.push(a0)}}return aY}});var T=/ jQuery\d+="(?:\d+|null)"/g,Z=/^\s+/,H=/(<([\w:]+)[^>]*?)\/>/g,al=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,c=/<([\w:]+)/,t=/<tbody/i,L=/<|&#?\w+;/,E=/<script|<object|<embed|<option|<style/i,l=/checked\s*(?:[^=]|=\s*.checked.)/i,p=function(aZ,a0,aY){return al.test(aY)?aZ:a0+"></"+aY+">"},ac={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};ac.optgroup=ac.option;ac.tbody=ac.tfoot=ac.colgroup=ac.caption=ac.thead;ac.th=ac.td;if(!a.support.htmlSerialize){ac._default=[1,"div<div>","</div>"]}a.fn.extend({text:function(aY){if(a.isFunction(aY)){return this.each(function(a0){var aZ=a(this);aZ.text(aY.call(this,a0,aZ.text()))})}if(typeof aY!=="object"&&aY!==C){return this.empty().append((this[0]&&this[0].ownerDocument||ab).createTextNode(aY))}return a.text(this)},wrapAll:function(aY){if(a.isFunction(aY)){return this.each(function(a0){a(this).wrapAll(aY.call(this,a0))})}if(this[0]){var aZ=a(aY,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){aZ.insertBefore(this[0])}aZ.map(function(){var a0=this;while(a0.firstChild&&a0.firstChild.nodeType===1){a0=a0.firstChild}return a0}).append(this)}return this},wrapInner:function(aY){if(a.isFunction(aY)){return this.each(function(aZ){a(this).wrapInner(aY.call(this,aZ))})}return this.each(function(){var aZ=a(this),a0=aZ.contents();if(a0.length){a0.wrapAll(aY)}else{aZ.append(aY)}})},wrap:function(aY){return this.each(function(){a(this).wrapAll(aY)})},unwrap:function(){return this.parent().each(function(){if(!a.nodeName(this,"body")){a(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(aY){if(this.nodeType===1){this.appendChild(aY)}})},prepend:function(){return this.domManip(arguments,true,function(aY){if(this.nodeType===1){this.insertBefore(aY,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(aZ){this.parentNode.insertBefore(aZ,this)})}else{if(arguments.length){var aY=a(arguments[0]);aY.push.apply(aY,this.toArray());return this.pushStack(aY,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(aZ){this.parentNode.insertBefore(aZ,this.nextSibling)})}else{if(arguments.length){var aY=this.pushStack(this,"after",arguments);aY.push.apply(aY,a(arguments[0]).toArray());return aY}}},remove:function(aY,a1){for(var aZ=0,a0;(a0=this[aZ])!=null;aZ++){if(!aY||a.filter(aY,[a0]).length){if(!a1&&a0.nodeType===1){a.cleanData(a0.getElementsByTagName("*"));a.cleanData([a0])}if(a0.parentNode){a0.parentNode.removeChild(a0)}}}return this},empty:function(){for(var aY=0,aZ;(aZ=this[aY])!=null;aY++){if(aZ.nodeType===1){a.cleanData(aZ.getElementsByTagName("*"))}while(aZ.firstChild){aZ.removeChild(aZ.firstChild)}}return this},clone:function(aZ){var aY=this.map(function(){if(!a.support.noCloneEvent&&!a.isXMLDoc(this)){var a1=this.outerHTML,a0=this.ownerDocument;if(!a1){var a2=a0.createElement("div");a2.appendChild(this.cloneNode(true));a1=a2.innerHTML}return a.clean([a1.replace(T,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(Z,"")],a0)[0]}else{return this.cloneNode(true)}});if(aZ===true){q(this,aY);q(this.find("*"),aY.find("*"))}return aY},html:function(a0){if(a0===C){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(T,""):null}else{if(typeof a0==="string"&&!E.test(a0)&&(a.support.leadingWhitespace||!Z.test(a0))&&!ac[(c.exec(a0)||["",""])[1].toLowerCase()]){a0=a0.replace(H,p);try{for(var aZ=0,aY=this.length;aZ<aY;aZ++){if(this[aZ].nodeType===1){a.cleanData(this[aZ].getElementsByTagName("*"));this[aZ].innerHTML=a0}}}catch(a1){this.empty().append(a0)}}else{if(a.isFunction(a0)){this.each(function(a4){var a3=a(this),a2=a3.html();a3.empty().append(function(){return a0.call(this,a4,a2)})})}else{this.empty().append(a0)}}}return this},replaceWith:function(aY){if(this[0]&&this[0].parentNode){if(a.isFunction(aY)){return this.each(function(a1){var a0=a(this),aZ=a0.html();a0.replaceWith(aY.call(this,a1,aZ))})}if(typeof aY!=="string"){aY=a(aY).detach()}return this.each(function(){var a0=this.nextSibling,aZ=this.parentNode;a(this).remove();if(a0){a(a0).before(aY)}else{a(aZ).append(aY)}})}else{return this.pushStack(a(a.isFunction(aY)?aY():aY),"replaceWith",aY)}},detach:function(aY){return this.remove(aY,true)},domManip:function(a4,a9,a8){var a1,a2,a7=a4[0],aZ=[],a3,a6;if(!a.support.checkClone&&arguments.length===3&&typeof a7==="string"&&l.test(a7)){return this.each(function(){a(this).domManip(a4,a9,a8,true)})}if(a.isFunction(a7)){return this.each(function(bb){var ba=a(this);a4[0]=a7.call(this,bb,a9?ba.html():C);ba.domManip(a4,a9,a8)})}if(this[0]){a6=a7&&a7.parentNode;if(a.support.parentNode&&a6&&a6.nodeType===11&&a6.childNodes.length===this.length){a1={fragment:a6}}else{a1=J(a4,this,aZ)}a3=a1.fragment;if(a3.childNodes.length===1){a2=a3=a3.firstChild}else{a2=a3.firstChild}if(a2){a9=a9&&a.nodeName(a2,"tr");for(var a0=0,aY=this.length;a0<aY;a0++){a8.call(a9?a5(this[a0],a2):this[a0],a0>0||a1.cacheable||this.length>1?a3.cloneNode(true):a3)}}if(aZ.length){a.each(aZ,aV)}}return this;function a5(ba,bb){return a.nodeName(ba,"table")?(ba.getElementsByTagName("tbody")[0]||ba.appendChild(ba.ownerDocument.createElement("tbody"))):ba}}});function q(a0,aY){var aZ=0;aY.each(function(){if(this.nodeName!==(a0[aZ]&&a0[aZ].nodeName)){return}var a5=a.data(a0[aZ++]),a4=a.data(this,a5),a1=a5&&a5.events;if(a1){delete a4.handle;a4.events={};for(var a3 in a1){for(var a2 in a1[a3]){a.event.add(this,a3,a1[a3][a2],a1[a3][a2].data)}}}})}function J(a3,a1,aZ){var a2,aY,a0,a4=(a1&&a1[0]?a1[0].ownerDocument||a1[0]:ab);if(a3.length===1&&typeof a3[0]==="string"&&a3[0].length<512&&a4===ab&&!E.test(a3[0])&&(a.support.checkClone||!l.test(a3[0]))){aY=true;a0=a.fragments[a3[0]];if(a0){if(a0!==1){a2=a0}}}if(!a2){a2=a4.createDocumentFragment();a.clean(a3,a4,a2,aZ)}if(aY){a.fragments[a3[0]]=a0?a2:1}return{fragment:a2,cacheable:aY}}a.fragments={};a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(aY,aZ){a.fn[aY]=function(a0){var a3=[],a6=a(a0),a5=this.length===1&&this[0].parentNode;if(a5&&a5.nodeType===11&&a5.childNodes.length===1&&a6.length===1){a6[aZ](this[0]);return this}else{for(var a4=0,a1=a6.length;a4<a1;a4++){var a2=(a4>0?this.clone(true):this).get();a.fn[aZ].apply(a(a6[a4]),a2);a3=a3.concat(a2)}return this.pushStack(a3,aY,a6.selector)}}});a.extend({clean:function(a0,a2,a9,a4){a2=a2||ab;if(typeof a2.createElement==="undefined"){a2=a2.ownerDocument||a2[0]&&a2[0].ownerDocument||ab}var ba=[];for(var a8=0,a3;(a3=a0[a8])!=null;a8++){if(typeof a3==="number"){a3+=""}if(!a3){continue}if(typeof a3==="string"&&!L.test(a3)){a3=a2.createTextNode(a3)}else{if(typeof a3==="string"){a3=a3.replace(H,p);var bb=(c.exec(a3)||["",""])[1].toLowerCase(),a1=ac[bb]||ac._default,a7=a1[0],aZ=a2.createElement("div");aZ.innerHTML=a1[1]+a3+a1[2];while(a7--){aZ=aZ.lastChild}if(!a.support.tbody){var aY=t.test(a3),a6=bb==="table"&&!aY?aZ.firstChild&&aZ.firstChild.childNodes:a1[1]==="<table>"&&!aY?aZ.childNodes:[];for(var a5=a6.length-1;a5>=0;--a5){if(a.nodeName(a6[a5],"tbody")&&!a6[a5].childNodes.length){a6[a5].parentNode.removeChild(a6[a5])}}}if(!a.support.leadingWhitespace&&Z.test(a3)){aZ.insertBefore(a2.createTextNode(Z.exec(a3)[0]),aZ.firstChild)}a3=aZ.childNodes}}if(a3.nodeType){ba.push(a3)}else{ba=a.merge(ba,a3)}}if(a9){for(var a8=0;ba[a8];a8++){if(a4&&a.nodeName(ba[a8],"script")&&(!ba[a8].type||ba[a8].type.toLowerCase()==="text/javascript")){a4.push(ba[a8].parentNode?ba[a8].parentNode.removeChild(ba[a8]):ba[a8])}else{if(ba[a8].nodeType===1){ba.splice.apply(ba,[a8+1,0].concat(a.makeArray(ba[a8].getElementsByTagName("script"))))}a9.appendChild(ba[a8])}}}return ba},cleanData:function(aZ){var a2,a0,aY=a.cache,a5=a.event.special,a4=a.support.deleteExpando;for(var a3=0,a1;(a1=aZ[a3])!=null;a3++){a0=a1[a.expando];if(a0){a2=aY[a0];if(a2.events){for(var a6 in a2.events){if(a5[a6]){a.event.remove(a1,a6)}else{ag(a1,a6,a2.handle)}}}if(a4){delete a1[a.expando]}else{if(a1.removeAttribute){a1.removeAttribute(a.expando)}}delete aY[a0]}}}});var ar=/z-?index|font-?weight|opacity|zoom|line-?height/i,U=/alpha\([^)]*\)/,aa=/opacity=([^)]*)/,ah=/float/i,az=/-([a-z])/ig,v=/([A-Z])/g,aO=/^-?\d+(?:px)?$/i,aU=/^-?\d/,aK={position:"absolute",visibility:"hidden",display:"block"},W=["Left","Right"],aE=["Top","Bottom"],ak=ab.defaultView&&ab.defaultView.getComputedStyle,aN=a.support.cssFloat?"cssFloat":"styleFloat",k=function(aY,aZ){return aZ.toUpperCase()};a.fn.css=function(aY,aZ){return an(this,aY,aZ,true,function(a1,a0,a2){if(a2===C){return a.curCSS(a1,a0)}if(typeof a2==="number"&&!ar.test(a0)){a2+="px"}a.style(a1,a0,a2)})};a.extend({style:function(a2,aZ,a3){if(!a2||a2.nodeType===3||a2.nodeType===8){return C}if((aZ==="width"||aZ==="height")&&parseFloat(a3)<0){a3=C}var a1=a2.style||a2,a4=a3!==C;if(!a.support.opacity&&aZ==="opacity"){if(a4){a1.zoom=1;var aY=parseInt(a3,10)+""==="NaN"?"":"alpha(opacity="+a3*100+")";var a0=a1.filter||a.curCSS(a2,"filter")||"";a1.filter=U.test(a0)?a0.replace(U,aY):aY}return a1.filter&&a1.filter.indexOf("opacity=")>=0?(parseFloat(aa.exec(a1.filter)[1])/100)+"":""}if(ah.test(aZ)){aZ=aN}aZ=aZ.replace(az,k);if(a4){a1[aZ]=a3}return a1[aZ]},css:function(a1,aZ,a3,aY){if(aZ==="width"||aZ==="height"){var a5,a0=aK,a4=aZ==="width"?W:aE;function a2(){a5=aZ==="width"?a1.offsetWidth:a1.offsetHeight;if(aY==="border"){return}a.each(a4,function(){if(!aY){a5-=parseFloat(a.curCSS(a1,"padding"+this,true))||0}if(aY==="margin"){a5+=parseFloat(a.curCSS(a1,"margin"+this,true))||0}else{a5-=parseFloat(a.curCSS(a1,"border"+this+"Width",true))||0}})}if(a1.offsetWidth!==0){a2()}else{a.swap(a1,a0,a2)}return Math.max(0,Math.round(a5))}return a.curCSS(a1,aZ,a3)},curCSS:function(a4,aZ,a0){var a7,aY=a4.style,a1;if(!a.support.opacity&&aZ==="opacity"&&a4.currentStyle){a7=aa.test(a4.currentStyle.filter||"")?(parseFloat(RegExp.$1)/100)+"":"";return a7===""?"1":a7}if(ah.test(aZ)){aZ=aN}if(!a0&&aY&&aY[aZ]){a7=aY[aZ]}else{if(ak){if(ah.test(aZ)){aZ="float"}aZ=aZ.replace(v,"-$1").toLowerCase();var a6=a4.ownerDocument.defaultView;if(!a6){return null}var a8=a6.getComputedStyle(a4,null);if(a8){a7=a8.getPropertyValue(aZ)}if(aZ==="opacity"&&a7===""){a7="1"}}else{if(a4.currentStyle){var a3=aZ.replace(az,k);a7=a4.currentStyle[aZ]||a4.currentStyle[a3];if(!aO.test(a7)&&aU.test(a7)){var a2=aY.left,a5=a4.runtimeStyle.left;a4.runtimeStyle.left=a4.currentStyle.left;aY.left=a3==="fontSize"?"1em":(a7||0);a7=aY.pixelLeft+"px";aY.left=a2;a4.runtimeStyle.left=a5}}}}return a7},swap:function(a1,a0,a2){var aY={};for(var aZ in a0){aY[aZ]=a1.style[aZ];a1.style[aZ]=a0[aZ]}a2.call(a1);for(var aZ in a0){a1.style[aZ]=aY[aZ]}}});if(a.expr&&a.expr.filters){a.expr.filters.hidden=function(a1){var aZ=a1.offsetWidth,aY=a1.offsetHeight,a0=a1.nodeName.toLowerCase()==="tr";return aZ===0&&aY===0&&!a0?true:aZ>0&&aY>0&&!a0?false:a.curCSS(a1,"display")==="none"};a.expr.filters.visible=function(aY){return !a.expr.filters.hidden(aY)}}var af=aP(),aJ=/<script(.|\s)*?\/script>/gi,o=/select|textarea/i,aB=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,r=/=\?(&|$)/,D=/\?/,aX=/(\?|&)_=.*?(&|$)/,B=/^(\w+:)?\/\/([^\/?#]+)/,h=/%20/g,w=a.fn.load;a.fn.extend({load:function(a0,a3,a4){if(typeof a0!=="string"){return w.call(this,a0)}else{if(!this.length){return this}}var a2=a0.indexOf(" ");if(a2>=0){var aY=a0.slice(a2,a0.length);a0=a0.slice(0,a2)}var a1="GET";if(a3){if(a.isFunction(a3)){a4=a3;a3=null}else{if(typeof a3==="object"){a3=a.param(a3,a.ajaxSettings.traditional);a1="POST"}}}var aZ=this;a.ajax({url:a0,type:a1,dataType:"html",data:a3,complete:function(a6,a5){if(a5==="success"||a5==="notmodified"){aZ.html(aY?a("<div />").append(a6.responseText.replace(aJ,"")).find(aY):a6.responseText)}if(a4){aZ.each(a4,[a6.responseText,a5,a6])}}});return this},serialize:function(){return a.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?a.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||o.test(this.nodeName)||aB.test(this.type))}).map(function(aY,aZ){var a0=a(this).val();return a0==null?null:a.isArray(a0)?a.map(a0,function(a2,a1){return{name:aZ.name,value:a2}}):{name:aZ.name,value:a0}}).get()}});a.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(aY,aZ){a.fn[aZ]=function(a0){return this.bind(aZ,a0)}});a.extend({get:function(aY,a0,a1,aZ){if(a.isFunction(a0)){aZ=aZ||a1;a1=a0;a0=null}return a.ajax({type:"GET",url:aY,data:a0,success:a1,dataType:aZ})},getScript:function(aY,aZ){return a.get(aY,null,aZ,"script")},getJSON:function(aY,aZ,a0){return a.get(aY,aZ,a0,"json")},post:function(aY,a0,a1,aZ){if(a.isFunction(a0)){aZ=aZ||a1;a1=a0;a0={}}return a.ajax({type:"POST",url:aY,data:a0,success:a1,dataType:aZ})},ajaxSetup:function(aY){a.extend(a.ajaxSettings,aY)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:aM.XMLHttpRequest&&(aM.location.protocol!=="file:"||!aM.ActiveXObject)?function(){return new aM.XMLHttpRequest()}:function(){try{return new aM.ActiveXObject("Microsoft.XMLHTTP")}catch(aY){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(bd){var a8=a.extend(true,{},a.ajaxSettings,bd);var bi,bc,bh,bj=bd&&bd.context||a8,a0=a8.type.toUpperCase();if(a8.data&&a8.processData&&typeof a8.data!=="string"){a8.data=a.param(a8.data,a8.traditional)}if(a8.dataType==="jsonp"){if(a0==="GET"){if(!r.test(a8.url)){a8.url+=(D.test(a8.url)?"&":"?")+(a8.jsonp||"callback")+"=?"}}else{if(!a8.data||!r.test(a8.data)){a8.data=(a8.data?a8.data+"&":"")+(a8.jsonp||"callback")+"=?"}}a8.dataType="json"}if(a8.dataType==="json"&&(a8.data&&r.test(a8.data)||r.test(a8.url))){bi=a8.jsonpCallback||("jsonp"+af++);if(a8.data){a8.data=(a8.data+"").replace(r,"="+bi+"$1")}a8.url=a8.url.replace(r,"="+bi+"$1");a8.dataType="script";aM[bi]=aM[bi]||function(bk){bh=bk;a3();a6();aM[bi]=C;try{delete aM[bi]}catch(bl){}if(a1){a1.removeChild(bf)}}}if(a8.dataType==="script"&&a8.cache===null){a8.cache=false}if(a8.cache===false&&a0==="GET"){var aY=aP();var bg=a8.url.replace(aX,"$1_="+aY+"$2");a8.url=bg+((bg===a8.url)?(D.test(a8.url)?"&":"?")+"_="+aY:"")}if(a8.data&&a0==="GET"){a8.url+=(D.test(a8.url)?"&":"?")+a8.data}if(a8.global&&!a.active++){a.event.trigger("ajaxStart")}var bb=B.exec(a8.url),a2=bb&&(bb[1]&&bb[1]!==location.protocol||bb[2]!==location.host);if(a8.dataType==="script"&&a0==="GET"&&a2){var a1=ab.getElementsByTagName("head")[0]||ab.documentElement;var bf=ab.createElement("script");bf.src=a8.url;if(a8.scriptCharset){bf.charset=a8.scriptCharset}if(!bi){var ba=false;bf.onload=bf.onreadystatechange=function(){if(!ba&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){ba=true;a3();a6();bf.onload=bf.onreadystatechange=null;if(a1&&bf.parentNode){a1.removeChild(bf)}}}}a1.insertBefore(bf,a1.firstChild);return C}var a5=false;var a4=a8.xhr();if(!a4){return}if(a8.username){a4.open(a0,a8.url,a8.async,a8.username,a8.password)}else{a4.open(a0,a8.url,a8.async)}try{if(a8.data||bd&&bd.contentType){a4.setRequestHeader("Content-Type",a8.contentType)}if(a8.ifModified){if(a.lastModified[a8.url]){a4.setRequestHeader("If-Modified-Since",a.lastModified[a8.url])}if(a.etag[a8.url]){a4.setRequestHeader("If-None-Match",a.etag[a8.url])}}if(!a2){a4.setRequestHeader("X-Requested-With","XMLHttpRequest")}a4.setRequestHeader("Accept",a8.dataType&&a8.accepts[a8.dataType]?a8.accepts[a8.dataType]+", */*":a8.accepts._default)}catch(be){}if(a8.beforeSend&&a8.beforeSend.call(bj,a4,a8)===false){if(a8.global&&!--a.active){a.event.trigger("ajaxStop")}a4.abort();return false}if(a8.global){a9("ajaxSend",[a4,a8])}var a7=a4.onreadystatechange=function(bk){if(!a4||a4.readyState===0||bk==="abort"){if(!a5){a6()}a5=true;if(a4){a4.onreadystatechange=a.noop}}else{if(!a5&&a4&&(a4.readyState===4||bk==="timeout")){a5=true;a4.onreadystatechange=a.noop;bc=bk==="timeout"?"timeout":!a.httpSuccess(a4)?"error":a8.ifModified&&a.httpNotModified(a4,a8.url)?"notmodified":"success";var bm;if(bc==="success"){try{bh=a.httpData(a4,a8.dataType,a8)}catch(bl){bc="parsererror";bm=bl}}if(bc==="success"||bc==="notmodified"){if(!bi){a3()}}else{a.handleError(a8,a4,bc,bm)}a6();if(bk==="timeout"){a4.abort()}if(a8.async){a4=null}}}};try{var aZ=a4.abort;a4.abort=function(){if(a4){aZ.call(a4)}a7("abort")}}catch(be){}if(a8.async&&a8.timeout>0){setTimeout(function(){if(a4&&!a5){a7("timeout")}},a8.timeout)}try{a4.send(a0==="POST"||a0==="PUT"||a0==="DELETE"?a8.data:null)}catch(be){a.handleError(a8,a4,null,be);a6()}if(!a8.async){a7()}function a3(){if(a8.success){a8.success.call(bj,bh,bc,a4)}if(a8.global){a9("ajaxSuccess",[a4,a8])}}function a6(){if(a8.complete){a8.complete.call(bj,a4,bc)}if(a8.global){a9("ajaxComplete",[a4,a8])}if(a8.global&&!--a.active){a.event.trigger("ajaxStop")}}function a9(bl,bk){(a8.context?a(a8.context):a.event).trigger(bl,bk)}return a4},handleError:function(aZ,a1,aY,a0){if(aZ.error){aZ.error.call(aZ.context||aZ,a1,aY,a0)}if(aZ.global){(aZ.context?a(aZ.context):a.event).trigger("ajaxError",[a1,aZ,a0])}},active:0,httpSuccess:function(aZ){try{return !aZ.status&&location.protocol==="file:"||(aZ.status>=200&&aZ.status<300)||aZ.status===304||aZ.status===1223||aZ.status===0}catch(aY){}return false},httpNotModified:function(a1,aY){var a0=a1.getResponseHeader("Last-Modified"),aZ=a1.getResponseHeader("Etag");if(a0){a.lastModified[aY]=a0}if(aZ){a.etag[aY]=aZ}return a1.status===304||a1.status===0},httpData:function(a3,a1,a0){var aZ=a3.getResponseHeader("content-type")||"",aY=a1==="xml"||!a1&&aZ.indexOf("xml")>=0,a2=aY?a3.responseXML:a3.responseText;if(aY&&a2.documentElement.nodeName==="parsererror"){a.error("parsererror")}if(a0&&a0.dataFilter){a2=a0.dataFilter(a2,a1)}if(typeof a2==="string"){if(a1==="json"||!a1&&aZ.indexOf("json")>=0){a2=a.parseJSON(a2)}else{if(a1==="script"||!a1&&aZ.indexOf("javascript")>=0){a.globalEval(a2)}}}return a2},param:function(aY,a1){var aZ=[];if(a1===C){a1=a.ajaxSettings.traditional}if(a.isArray(aY)||aY.jquery){a.each(aY,function(){a3(this.name,this.value)})}else{for(var a2 in aY){a0(a2,aY[a2])}}return aZ.join("&").replace(h,"+");function a0(a4,a5){if(a.isArray(a5)){a.each(a5,function(a7,a6){if(a1||/\[\]$/.test(a4)){a3(a4,a6)}else{a0(a4+"["+(typeof a6==="object"||a.isArray(a6)?a7:"")+"]",a6)}})}else{if(!a1&&a5!=null&&typeof a5==="object"){a.each(a5,function(a7,a6){a0(a4+"["+a7+"]",a6)})}else{a3(a4,a5)}}}function a3(a4,a5){a5=a.isFunction(a5)?a5():a5;aZ[aZ.length]=encodeURIComponent(a4)+"="+encodeURIComponent(a5)}}});var G={},ae=/toggle|show|hide/,au=/^([+-]=)?([\d+-.]+)(.*)$/,aF,aj=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];a.fn.extend({show:function(aZ,a7){if(aZ||aZ===0){return this.animate(aD("show",3),aZ,a7)}else{for(var a4=0,a1=this.length;a4<a1;a4++){var aY=a.data(this[a4],"olddisplay");this[a4].style.display=aY||"";if(a.css(this[a4],"display")==="none"){var a6=this[a4].nodeName,a5;if(G[a6]){a5=G[a6]}else{var a0=a("<"+a6+" />").appendTo("body");a5=a0.css("display");if(a5==="none"){a5="block"}a0.remove();G[a6]=a5}a.data(this[a4],"olddisplay",a5)}}for(var a3=0,a2=this.length;a3<a2;a3++){this[a3].style.display=a.data(this[a3],"olddisplay")||""}return this}},hide:function(a3,a4){if(a3||a3===0){return this.animate(aD("hide",3),a3,a4)}else{for(var a2=0,aZ=this.length;a2<aZ;a2++){var aY=a.data(this[a2],"olddisplay");if(!aY&&aY!=="none"){a.data(this[a2],"olddisplay",a.css(this[a2],"display"))}}for(var a1=0,a0=this.length;a1<a0;a1++){this[a1].style.display="none"}return this}},_toggle:a.fn.toggle,toggle:function(a0,aZ){var aY=typeof a0==="boolean";if(a.isFunction(a0)&&a.isFunction(aZ)){this._toggle.apply(this,arguments)}else{if(a0==null||aY){this.each(function(){var a1=aY?a0:a(this).is(":hidden");a(this)[a1?"show":"hide"]()})}else{this.animate(aD("toggle",3),a0,aZ)}}return this},fadeTo:function(aY,a0,aZ){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:a0},aY,aZ)},animate:function(a2,aZ,a1,a0){var aY=a.speed(aZ,a1,a0);if(a.isEmptyObject(a2)){return this.each(aY.complete)}return this[aY.queue===false?"each":"queue"](function(){var a5=a.extend({},aY),a7,a6=this.nodeType===1&&a(this).is(":hidden"),a3=this;for(a7 in a2){var a4=a7.replace(az,k);if(a7!==a4){a2[a4]=a2[a7];delete a2[a7];a7=a4}if(a2[a7]==="hide"&&a6||a2[a7]==="show"&&!a6){return a5.complete.call(this)}if((a7==="height"||a7==="width")&&this.style){a5.display=a.css(this,"display");a5.overflow=this.style.overflow}if(a.isArray(a2[a7])){(a5.specialEasing=a5.specialEasing||{})[a7]=a2[a7][1];a2[a7]=a2[a7][0]}}if(a5.overflow!=null){this.style.overflow="hidden"}a5.curAnim=a.extend({},a2);a.each(a2,function(a9,bd){var bc=new a.fx(a3,a5,a9);if(ae.test(bd)){bc[bd==="toggle"?a6?"show":"hide":bd](a2)}else{var bb=au.exec(bd),be=bc.cur(true)||0;if(bb){var a8=parseFloat(bb[2]),ba=bb[3]||"px";if(ba!=="px"){a3.style[a9]=(a8||1)+ba;be=((a8||1)/bc.cur(true))*be;a3.style[a9]=be+ba}if(bb[1]){a8=((bb[1]==="-="?-1:1)*a8)+be}bc.custom(be,a8,ba)}else{bc.custom(be,bd,"")}}});return true})},stop:function(aZ,aY){var a0=a.timers;if(aZ){this.queue([])}this.each(function(){for(var a1=a0.length-1;a1>=0;a1--){if(a0[a1].elem===this){if(aY){a0[a1](true)}a0.splice(a1,1)}}});if(!aY){this.dequeue()}return this}});a.each({slideDown:aD("show",1),slideUp:aD("hide",1),slideToggle:aD("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(aY,aZ){a.fn[aY]=function(a0,a1){return this.animate(aZ,a0,a1)}});a.extend({speed:function(a0,a1,aZ){var aY=a0&&typeof a0==="object"?a0:{complete:aZ||!aZ&&a1||a.isFunction(a0)&&a0,duration:a0,easing:aZ&&a1||a1&&!a.isFunction(a1)&&a1};aY.duration=a.fx.off?0:typeof aY.duration==="number"?aY.duration:a.fx.speeds[aY.duration]||a.fx.speeds._default;aY.old=aY.complete;aY.complete=function(){if(aY.queue!==false){a(this).dequeue()}if(a.isFunction(aY.old)){aY.old.call(this)}};return aY},easing:{linear:function(a0,a1,aY,aZ){return aY+aZ*a0},swing:function(a0,a1,aY,aZ){return((-Math.cos(a0*Math.PI)/2)+0.5)*aZ+aY}},timers:[],fx:function(aZ,aY,a0){this.options=aY;this.elem=aZ;this.prop=a0;if(!aY.orig){aY.orig={}}}});a.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(a.fx.step[this.prop]||a.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(aZ){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var aY=parseFloat(a.css(this.elem,this.prop,aZ));return aY&&aY>-10000?aY:parseFloat(a.curCSS(this.elem,this.prop))||0},custom:function(a2,a1,a0){this.startTime=aP();this.start=a2;this.end=a1;this.unit=a0||this.unit||"px";this.now=this.start;this.pos=this.state=0;var aY=this;function aZ(a3){return aY.step(a3)}aZ.elem=this.elem;if(aZ()&&a.timers.push(aZ)&&!aF){aF=setInterval(a.fx.tick,13)}},show:function(){this.options.orig[this.prop]=a.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());a(this.elem).show()},hide:function(){this.options.orig[this.prop]=a.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a1){var a6=aP(),a2=true;if(a1||a6>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var a3 in this.options.curAnim){if(this.options.curAnim[a3]!==true){a2=false}}if(a2){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;var a0=a.data(this.elem,"olddisplay");this.elem.style.display=a0?a0:this.options.display;if(a.css(this.elem,"display")==="none"){this.elem.style.display="block"}}if(this.options.hide){a(this.elem).hide()}if(this.options.hide||this.options.show){for(var aY in this.options.curAnim){a.style(this.elem,aY,this.options.orig[aY])}}this.options.complete.call(this.elem)}return false}else{var aZ=a6-this.startTime;this.state=aZ/this.options.duration;var a4=this.options.specialEasing&&this.options.specialEasing[this.prop];var a5=this.options.easing||(a.easing.swing?"swing":"linear");this.pos=a.easing[a4||a5](this.state,aZ,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};a.extend(a.fx,{tick:function(){var aZ=a.timers;for(var aY=0;aY<aZ.length;aY++){if(!aZ[aY]()){aZ.splice(aY--,1)}}if(!aZ.length){a.fx.stop()}},stop:function(){clearInterval(aF);aF=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(aY){a.style(aY.elem,"opacity",aY.now)},_default:function(aY){if(aY.elem.style&&aY.elem.style[aY.prop]!=null){aY.elem.style[aY.prop]=(aY.prop==="width"||aY.prop==="height"?Math.max(0,aY.now):aY.now)+aY.unit}else{aY.elem[aY.prop]=aY.now}}}});if(a.expr&&a.expr.filters){a.expr.filters.animated=function(aY){return a.grep(a.timers,function(aZ){return aY===aZ.elem}).length}}function aD(aZ,aY){var a0={};a.each(aj.concat.apply([],aj.slice(0,aY)),function(){a0[this]=aZ});return a0}if("getBoundingClientRect" in ab.documentElement){a.fn.offset=function(a7){var a0=this[0];if(a7){return this.each(function(a8){a.offset.setOffset(this,a7,a8)})}if(!a0||!a0.ownerDocument){return null}if(a0===a0.ownerDocument.body){return a.offset.bodyOffset(a0)}var a2=a0.getBoundingClientRect(),a6=a0.ownerDocument,a3=a6.body,aY=a6.documentElement,a1=aY.clientTop||a3.clientTop||0,a4=aY.clientLeft||a3.clientLeft||0,a5=a2.top+(self.pageYOffset||a.support.boxModel&&aY.scrollTop||a3.scrollTop)-a1,aZ=a2.left+(self.pageXOffset||a.support.boxModel&&aY.scrollLeft||a3.scrollLeft)-a4;return{top:a5,left:aZ}}}else{a.fn.offset=function(a9){var a3=this[0];if(a9){return this.each(function(ba){a.offset.setOffset(this,a9,ba)})}if(!a3||!a3.ownerDocument){return null}if(a3===a3.ownerDocument.body){return a.offset.bodyOffset(a3)}a.offset.initialize();var a0=a3.offsetParent,aZ=a3,a8=a3.ownerDocument,a6,a1=a8.documentElement,a4=a8.body,a5=a8.defaultView,aY=a5?a5.getComputedStyle(a3,null):a3.currentStyle,a7=a3.offsetTop,a2=a3.offsetLeft;while((a3=a3.parentNode)&&a3!==a4&&a3!==a1){if(a.offset.supportsFixedPosition&&aY.position==="fixed"){break}a6=a5?a5.getComputedStyle(a3,null):a3.currentStyle;a7-=a3.scrollTop;a2-=a3.scrollLeft;if(a3===a0){a7+=a3.offsetTop;a2+=a3.offsetLeft;if(a.offset.doesNotAddBorder&&!(a.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(a3.nodeName))){a7+=parseFloat(a6.borderTopWidth)||0;a2+=parseFloat(a6.borderLeftWidth)||0}aZ=a0,a0=a3.offsetParent}if(a.offset.subtractsBorderForOverflowNotVisible&&a6.overflow!=="visible"){a7+=parseFloat(a6.borderTopWidth)||0;a2+=parseFloat(a6.borderLeftWidth)||0}aY=a6}if(aY.position==="relative"||aY.position==="static"){a7+=a4.offsetTop;a2+=a4.offsetLeft}if(a.offset.supportsFixedPosition&&aY.position==="fixed"){a7+=Math.max(a1.scrollTop,a4.scrollTop);a2+=Math.max(a1.scrollLeft,a4.scrollLeft)}return{top:a7,left:a2}}}a.offset={initialize:function(){var aY=ab.body,aZ=ab.createElement("div"),a2,a4,a3,a5,a0=parseFloat(a.curCSS(aY,"marginTop",true))||0,a1="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.extend(aZ.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});aZ.innerHTML=a1;aY.insertBefore(aZ,aY.firstChild);a2=aZ.firstChild;a4=a2.firstChild;a5=a2.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(a4.offsetTop!==5);this.doesAddBorderForTableAndCells=(a5.offsetTop===5);a4.style.position="fixed",a4.style.top="20px";this.supportsFixedPosition=(a4.offsetTop===20||a4.offsetTop===15);a4.style.position=a4.style.top="";a2.style.overflow="hidden",a2.style.position="relative";this.subtractsBorderForOverflowNotVisible=(a4.offsetTop===-5);this.doesNotIncludeMarginInBodyOffset=(aY.offsetTop!==a0);aY.removeChild(aZ);aY=aZ=a2=a4=a3=a5=null;a.offset.initialize=a.noop},bodyOffset:function(aY){var a0=aY.offsetTop,aZ=aY.offsetLeft;a.offset.initialize();if(a.offset.doesNotIncludeMarginInBodyOffset){a0+=parseFloat(a.curCSS(aY,"marginTop",true))||0;aZ+=parseFloat(a.curCSS(aY,"marginLeft",true))||0}return{top:a0,left:aZ}},setOffset:function(a3,aZ,a0){if(/static/.test(a.curCSS(a3,"position"))){a3.style.position="relative"}var a2=a(a3),a5=a2.offset(),aY=parseInt(a.curCSS(a3,"top",true),10)||0,a4=parseInt(a.curCSS(a3,"left",true),10)||0;if(a.isFunction(aZ)){aZ=aZ.call(a3,a0,a5)}var a1={top:(aZ.top-a5.top)+aY,left:(aZ.left-a5.left)+a4};if("using" in aZ){aZ.using.call(a3,a1)}else{a2.css(a1)}}};a.fn.extend({position:function(){if(!this[0]){return null}var a0=this[0],aZ=this.offsetParent(),a1=this.offset(),aY=/^body|html$/i.test(aZ[0].nodeName)?{top:0,left:0}:aZ.offset();a1.top-=parseFloat(a.curCSS(a0,"marginTop",true))||0;a1.left-=parseFloat(a.curCSS(a0,"marginLeft",true))||0;aY.top+=parseFloat(a.curCSS(aZ[0],"borderTopWidth",true))||0;aY.left+=parseFloat(a.curCSS(aZ[0],"borderLeftWidth",true))||0;return{top:a1.top-aY.top,left:a1.left-aY.left}},offsetParent:function(){return this.map(function(){var aY=this.offsetParent||ab.body;while(aY&&(!/^body|html$/i.test(aY.nodeName)&&a.css(aY,"position")==="static")){aY=aY.offsetParent}return aY})}});a.each(["Left","Top"],function(aZ,aY){var a0="scroll"+aY;a.fn[a0]=function(a3){var a1=this[0],a2;if(!a1){return null}if(a3!==C){return this.each(function(){a2=am(this);if(a2){a2.scrollTo(!aZ?a3:a(a2).scrollLeft(),aZ?a3:a(a2).scrollTop())}else{this[a0]=a3}})}else{a2=am(a1);return a2?("pageXOffset" in a2)?a2[aZ?"pageYOffset":"pageXOffset"]:a.support.boxModel&&a2.document.documentElement[a0]||a2.document.body[a0]:a1[a0]}}});function am(aY){return("scrollTo" in aY&&aY.document)?aY:aY.nodeType===9?aY.defaultView||aY.parentWindow:false}a.each(["Height","Width"],function(aZ,aY){var a0=aY.toLowerCase();a.fn["inner"+aY]=function(){return this[0]?a.css(this[0],a0,false,"padding"):null};a.fn["outer"+aY]=function(a1){return this[0]?a.css(this[0],a0,false,a1?"margin":"border"):null};a.fn[a0]=function(a1){var a2=this[0];if(!a2){return a1==null?null:this}if(a.isFunction(a1)){return this.each(function(a4){var a3=a(this);a3[a0](a1.call(this,a4,a3[a0]()))})}return("scrollTo" in a2&&a2.document)?a2.document.compatMode==="CSS1Compat"&&a2.document.documentElement["client"+aY]||a2.document.body["client"+aY]:(a2.nodeType===9)?Math.max(a2.documentElement["client"+aY],a2.body["scroll"+aY],a2.documentElement["scroll"+aY],a2.body["offset"+aY],a2.documentElement["offset"+aY]):a1===C?a.css(a2,a0):this.css(a0,typeof a1==="string"?a1:a1+"px")}});aM.jQuery=aM.$=a})(window);(function(b5,u){var cl=b5.jQuery.noConflict(true);if(typeof u.getAttribute==s){u.getAttribute=function(){}}var av=function(dc){return cv(dc)?dc.toLowerCase():dc};var bU=function(dc){return cv(dc)?dc.toUpperCase():dc};var aM=function(dc){return cv(dc)?dc.replace(/[A-Z]/g,function(dd){return L(dd.charCodeAt(0)|32)}):dc};var cq=function(dc){return cv(dc)?dc.replace(/[a-z]/g,function(dd){return L(dd.charCodeAt(0)&~32)}):dc};if("i"!=="I".toLowerCase()){av=aM;bU=cq}function L(dc){return String.fromCharCode(dc)}var bJ="$element",ak="$update",b3="$scope",br="$validate",X="angular",bd="array",cm="boolean",bL="console",bm="date",aU="display",cU="element",bK="function",aq="length",ae="name",b="none",cW="noop",y="null",cu="number",aY="object",V="string",aH="value",aJ="selected",s="undefined",a="ng-exception",l="ng-validation-error",q="noop",by=-99999,aw=-1000,ct=99999,aV={FIRST:by,LAST:ct,WATCH:aw},c2=b5.Error,aA=parseInt((/msie (\d+)/.exec(av(navigator.userAgent))||[])[1],10),cx,cO,am=[].slice,G=[].push,cY=b5[bL]?bQ(b5[bL],b5[bL]["error"]||k):k,aK=b5[X]||(b5[X]={}),ao=bx(aK,"markup"),v=bx(aK,"attrMarkup"),af=bx(aK,"directive"),F=bx(aK,"widget",av),aS=bx(aK,"validator"),cJ=bx(aK,"filter"),m=bx(aK,"formatter"),bB=bx(aK,"service"),bs=bx(aK,"callbacks"),t,ai=/^(|.*\/)angular(-.*?)?(\.min)?.js(\?[^#]*)?(#(.*))?$/,bI=24;function bg(df,de,dd){var dc;if(df){if(J(df)){for(dc in df){if(dc!="prototype"&&dc!=aq&&dc!=ae&&df.hasOwnProperty(dc)){de.call(dd,df[dc],dc)}}}else{if(df.forEach&&df.forEach!==bg){df.forEach(de,dd)}else{if(c9(df)&&a4(df.length)){for(dc=0;dc<df.length;dc++){de.call(dd,df[dc],dc)}}else{for(dc in df){de.call(dd,df[dc],dc)}}}}}return df}function I(dh,df,de){var dg=[];for(var dd in dh){dg.push(dd)}dg.sort();for(var dc=0;dc<dg.length;dc++){df.call(de,dh[dg[dc]],dg[dc])}return dg}function bl(dc){if(dc instanceof c2){if(dc.stack){dc=dc.stack}else{if(dc.sourceURL){dc=dc.message+"\n"+dc.sourceURL+":"+dc.line}}}return dc}function ck(dc){bg(arguments,function(dd){if(dd!==dc){bg(dd,function(df,de){dc[de]=df})}});return dc}function ci(dd,dc){return ck(new (ck(function(){},{prototype:dd}))(),dc)}function k(){}function aO(dc){return dc}function cG(dc){return function(){return dc}}function bx(de,dd,dc){var df;return de[dd]||(df=de[dd]=function(dg,dh,di){dg=(dc||aO)(dg);if(cK(dh)){df[dg]=ck(dh,di||{})}return df[dg]})}function bM(dc){return typeof dc==s}function cK(dc){return typeof dc!=s}function c9(dc){return dc!=null&&typeof dc==aY}function cv(dc){return typeof dc==V}function a4(dc){return typeof dc==cu}function aE(dc){return dc instanceof Date}function bj(dc){return dc instanceof Array}function J(dc){return typeof dc==bK}function bn(dc){return dc&&dc.document&&dc.location&&dc.alert&&dc.setInterval}function bp(dc){return typeof dc==cm}function w(dc){return t(dc)=="#text"}function aC(dc){return cv(dc)?dc.replace(/^\s*/,"").replace(/\s*$/,""):dc}function bV(dc){return dc&&(dc.nodeName||(dc.bind&&dc.find))}function a7(dd,de){this.html=dd;this.get=av(de)=="unsafe"?cG(dd):function dc(){var df=[];a0(dd,bf(df));return df.join("")}}if(aA){t=function(dc){dc=dc.nodeName?dc:dc[0];return(dc.scopeName&&dc.scopeName!="HTML")?bU(dc.scopeName+":"+dc.nodeName):dc.nodeName}}else{t=function(dc){return dc.nodeName?dc.nodeName:dc[0].nodeName}}function a1(dd){var df=dd[0].getBoundingClientRect(),de=(df.width||(df.right||0-df.left||0)),dc=(df.height||(df.bottom||0-df.top||0));return de>0&&dc>0}function aQ(df,de,dd){var dc=[];bg(df,function(di,dg,dh){dc.push(de.call(dd,di,dg,dh))});return dc}function aD(df,dc){var de=0,dd;if(bj(df)||cv(df)){return df.length}else{if(c9(df)){for(dd in df){if(!dc||df.hasOwnProperty(dd)){de++}}}}return de}function x(de,dd){for(var dc=0;dc<de.length;dc++){if(dd===de[dc]){return true}}return false}function c6(de,dd){for(var dc=0;dc<de.length;dc++){if(dd===de[dc]){return dc}}return -1}function ch(dc){if(dc){switch(dc.nodeName){case"OPTION":case"PRE":case"TITLE":return true}}return false}function bE(df,dc){if(!dc){dc=df;if(df){if(bj(df)){dc=bE(df,[])}else{if(aE(df)){dc=new Date(df.getTime())}else{if(c9(df)){dc=bE(df,{})}}}}}else{if(bj(df)){while(dc.length){dc.pop()}for(var de=0;de<df.length;de++){dc.push(bE(df[de]))}}else{bg(dc,function(dh,dg){delete dc[dg]});for(var dd in df){dc[dd]=bE(df[dd])}}}return dc}function r(di,dh){if(di==dh){return true}if(di===null||dh===null){return false}var dg=typeof di,de=typeof dh,df,dd,dc;if(dg==de&&dg=="object"){if(di instanceof Array){if((df=di.length)==dh.length){for(dd=0;dd<df;dd++){if(!r(di[dd],dh[dd])){return false}}return true}}else{dc={};for(dd in di){if(dd.charAt(0)!=="$"&&!J(di[dd])&&!r(di[dd],dh[dd])){return false}dc[dd]=true}for(dd in dh){if(!dc[dd]&&dd.charAt(0)!=="$"&&!J(dh[dd])){return false}}return true}}return false}function aa(dd,dc){if(ch(dd)){if(aA){dd.innerText=dc}else{dd.textContent=dc}}else{dd.innerHTML=dc}}function bX(dd){var dc=dd&&dd[0]&&dd[0].nodeName;return dc&&dc.charAt(0)!="#"&&!x(["TR","COL","COLGROUP","TBODY","THEAD","TFOOT"],dc)}function cc(dd,df,dc){var de;while(!bX(dd)){de=dd.parent();if(de.length){dd=dd.parent()}else{return}}if(dd[0]["$NG_ERROR"]!==dc){dd[0]["$NG_ERROR"]=dc;if(dc){dd.addClass(df);dd.attr(df,dc.message||dc)}else{dd.removeClass(df);dd.removeAttr(df)}}}function bo(de,dd,dc){return de.concat(am.call(dd,dc,dd.length))}function bQ(dd,de){var dc=arguments.length>2?am.call(arguments,2,arguments.length):[];if(typeof de==bK&&!(de instanceof RegExp)){return dc.length?function(){return arguments.length?de.apply(dd,dc.concat(am.call(arguments,0,arguments.length))):de.apply(dd,dc)}:function(){return arguments.length?de.apply(dd,arguments):de.call(dd)}}else{return de}}function cD(dd){if(dd&&dd.length!==0){var dc=av(""+dd);dd=!(dc=="f"||dc=="0"||dc=="false"||dc=="no"||dc=="n"||dc=="[]")}else{dd=false}return dd}function bv(df,dg){for(var dc in df){var de=dg[dc];var dd=typeof de;if(dd==s){dg[dc]=W(cz(df[dc]))}else{if(dd=="object"&&de.constructor!=K&&dc.substring(0,1)!="$"){bv(df[dc],de)}}}}function bc(dc){return new bk(ao,v,af,F).compile(dc)}function ap(df){var de={},dc,dd;bg((df||"").split("&"),function(dg){if(dg){dc=dg.split("=");dd=unescape(dc[0]);de[dd]=cK(dc[1])?unescape(dc[1]):true}});return de}function T(dd){var dc=[];bg(dd,function(df,de){dc.push(escape(de)+(df===true?"":"="+escape(df)))});return dc.length?dc.join("&"):""}function aF(dc){return al(dc,true).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function al(dd,dc){return encodeURIComponent(dd).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace((dc?null:/%20/g),"+")}function bG(de,dd){var dh=de.autobind;if(dh){var df=cv(dh)?dd.getElementById(dh):dd,dg=bc(df)(b7({"$config":de})),dc=dg.$service("$browser");if(de.css){dc.addCss(de.base_url+de.css)}else{if(aA<8){dc.addJs(de.base_url+de.ie_compat,de.ie_compat_id)}}}}function bT(dd,dg){aZ();var dc=dd.getElementsByTagName("script"),df;dg=ck({ie_compat_id:"ng-ie-compat"},dg);for(var de=0;de<dc.length;de++){df=(dc[de].src||"").match(ai);if(df){dg.base_url=df[1];dg.ie_compat=df[1]+"angular-ie-compat"+(df[2]||"")+".js";ck(dg,ap(df[6]));be(cx(dc[de]),function(di,dh){if(/^ng:/.exec(dh)){dh=dh.substring(3).replace(/-/g,"_");di=di||true;dg[dh]=di}})}}return dg}function aZ(){cO=b5.jQuery;if(cO){cx=cO;ck(cO.fn,{scope:N.scope})}else{cx=c3}aK.element=cx}function j(dc,de,df){if(!dc){var dd=new c2("Argument '"+(de||"?")+"' is "+(df||"required"));if(b5.console){b5.console.log(dd.stack)}throw dd}}function h(dc,dd){j(J(dc,dd,"not a function"))}var K=[].constructor;function cz(de,dd){var dc=[];b4(dc,de,dd?"\n ":null,[]);return dc.join("")}function W(dd,dc){if(!cv(dd)){return dd}var dh,dg,di;try{if(dc&&b5.JSON&&b5.JSON.parse){dh=JSON.parse(dd);return de(dh)}dg=Y(dd,true);di=dg.primary();dg.assertAllConsumed();return di()}catch(df){cY("fromJson error: ",dd,df);throw df}function de(dj){if(cv(dj)&&dj.length===bI){return az.toDate(dj)}else{if(bj(dj)||c9(dj)){bg(dj,function(dl,dk){dj[dk]=de(dl)})}}return dj}}aK.toJson=cz;aK.fromJson=W;function b4(dd,df,di,dj){if(c9(df)){if(df===b5){dd.push("WINDOW");return}if(df===u){dd.push("DOCUMENT");return}if(x(dj,df)){dd.push("RECURSION");return}dj.push(df)}if(df===null){dd.push(y)}else{if(df instanceof RegExp){dd.push(aK.String["quoteUnicode"](df.toString()))}else{if(J(df)){return}else{if(bp(df)){dd.push(""+df)}else{if(a4(df)){if(isNaN(df)){dd.push(y)}else{dd.push(""+df)}}else{if(cv(df)){return dd.push(aK.String["quoteUnicode"](df))}else{if(c9(df)){if(bj(df)){dd.push("[");var dh=df.length;var dr=false;for(var dg=0;dg<dh;dg++){var dn=df[dg];if(dr){dd.push(",")}if(!(dn instanceof RegExp)&&(J(dn)||bM(dn))){dd.push(y)}else{b4(dd,dn,di,dj)}dr=true}dd.push("]")}else{if(aE(df)){dd.push(aK.String["quoteUnicode"](aK.Date["toString"](df)))}else{dd.push("{");if(di){dd.push(di)}var dq=false;var dp=di?di+" ":false;var dm=[];for(var de in df){if(df[de]===undefined){continue}dm.push(de)}dm.sort();for(var dc=0;dc<dm.length;dc++){var dl=dm[dc];var dk=df[dl];if(typeof dk!=bK){if(dq){dd.push(",");if(di){dd.push(di)}}dd.push(aK.String["quote"](dl));dd.push(":");b4(dd,dk,dp,dj);dq=true}}dd.push("}")}}}}}}}}}if(c9(df)){dj.pop()}}function cN(dc){this.paths=[];this.children=[];this.inits=[];this.priority=dc;this.newScope=false}cN.prototype={attach:function(dc,dd){var de={};this.collectInits(dc,de,dd);I(de,function(df){bg(df,function(dg){dg()})})},collectInits:function(de,dh,dk){var dg=dh[this.priority],di=dk;if(!dg){dh[this.priority]=dg=[]}if(this.newScope){di=b7(dk);dk.$onEval(di.$eval);de.data(b3,di)}bg(this.inits,function(dm){dg.push(function(){di.$tryEval(function(){return di.$service(dm,di,de)},de)})});var df,dj=de[0].childNodes,dd=this.children,dl=this.paths,dc=dl.length;for(df=0;df<dc;df++){dd[df].collectInits(cx(dj[dl[df]]),dh,di)}},addInit:function(dc){if(dc){this.inits.push(dc)}},addChild:function(dc,dd){if(dd){this.paths.push(dc);this.children.push(dd)}},empty:function(){return this.inits.length===0&&this.paths.length===0}};function bk(dc,dd,df,de){this.markup=dc;this.attrMarkup=dd;this.directives=df;this.widgets=de}bk.prototype={compile:function(dg){dg=cx(dg);var dc=0,df,de=dg.parent();if(de&&de[0]){de=de[0];for(var dd=0;dd<de.childNodes.length;dd++){if(de.childNodes[dd]==dg[0]){dc=dd}}}df=this.templatize(dg,dc,0)||new cN();return function(dj,dh){var di=dh?N.clone.call(dg):dg;dj=dj||b7();di.data(b3,dj);dj.$element=di;(dh||k)(di,dj);df.attach(di,dj);dj.$eval();return dj}},templatize:function(di,dd,dn){var ds=this,dj,dm,de=ds.directives,dl=true,df=true,dt=t(di),dh=dt.indexOf(":")>0?av(dt).replace(":","-"):"",dr,dq={compile:bQ(ds,ds.compile),descend:function(du){if(cK(du)){dl=du}return dl},directives:function(du){if(cK(du)){df=du}return df},scope:function(du){if(cK(du)){dr.newScope=dr.newScope||du}return dr.newScope}};try{dn=di.attr("ng:eval-order")||dn||0}catch(dk){dn=dn||0}di.addClass(dh);if(cv(dn)){dn=aV[bU(dn)]||parseInt(dn,10)}dr=new cN(dn);be(di,function(dv,du){if(!dj){if(dj=ds.widgets("@"+du)){di.addClass("ng-attr-widget");dj=bQ(dq,dj,dv,di)}}});if(!dj){if(dj=ds.widgets(dt)){if(dh){di.addClass("ng-widget")}dj=bQ(dq,dj,di)}}if(dj){dl=false;df=false;var dp=di.parent();dr.addInit(dj.call(dq,di));if(dp&&dp[0]){di=cx(dp[0].childNodes[dd])}}if(dl){for(var dg=0,dc=di[0].childNodes;dg<dc.length;dg++){if(w(dc[dg])){bg(ds.markup,function(du){if(dg<dc.length){var dv=cx(dc[dg]);du.call(dq,dv.text(),dv,di)}})}}}if(df){be(di,function(dv,du){bg(ds.attrMarkup,function(dw){dw.call(dq,dv,du,di)})});be(di,function(dv,du){dm=de[du];if(dm){di.addClass("ng-directive");dr.addInit((de[du]).call(dq,dv,di))}})}if(dl){a8(di,function(dv,du){dr.addChild(du,ds.templatize(dv,du,dn))})}return dr.empty()?null:dr}};function a8(dd,de){var dc,dg=dd[0].childNodes||[],df;for(dc=0;dc<dg.length;dc++){if(!w(df=dg[dc])){de(cx(df),dc)}}}function be(dd,dh){var de,dk=dd[0].attributes||[],dj,dg,dc,di,df={};for(de=0;de<dk.length;de++){dg=dk[de];dc=dg.name;di=dg.value;if(aA&&dc=="href"){di=decodeURIComponent(dd[0].getAttribute(dc,2))}df[dc]=di}I(df,dh)}function b2(dk,dl,di){if(!dl){return dk}var dd=dl.split(".");var dj;var dc=dk;var df=dd.length;for(var de=0;de<df;de++){dj=dd[de];if(!dj.match(/^[\$\w][\$\w\d]*$/)){throw"Expression '"+dl+"' is not a valid expression for accesing variables."}if(dk){dc=dk;dk=dk[dj]}if(bM(dk)&&dj.charAt(0)=="$"){var dg=aK.Global["typeOf"](dc);dg=aK[dg.charAt(0).toUpperCase()+dg.substring(1)];var dh=dg?dg[[dj.substring(1)]]:undefined;if(dh){dk=bQ(dc,dh,dc);return dk}}}if(!di&&J(dk)){return bQ(dc,dk)}return dk}function cp(dc,di,dh){var dg=di.split(".");for(var df=0;dg.length>1;df++){var de=dg.shift();var dd=dc[de];if(!dd){dd={};dc[de]=dd}dc=dd}dc[dg.shift()]=dh;return dh}var aI=0,cV={},aW={},c5={};bg(("abstract,boolean,break,byte,case,catch,char,class,const,continue,debugger,default,delete,do,double,else,enum,export,extends,false,final,finally,float,for,function,goto,if,implements,import,ininstanceof,intinterface,long,native,new,null,package,private,protected,public,return,short,static,super,switch,synchronized,this,throw,throws,transient,true,try,typeof,var,volatile,void,undefined,while,with").split(/,/),function(dc){c5[dc]=true});function cC(de){var dc=cV[de];if(dc){return dc}var dd="var l, fn, t;\n";bg(de.split("."),function(dg){dg=(c5[dg])?'["'+dg+'"]':"."+dg;dd+="if(!s) return s;\nl=s;\ns=s"+dg+';\nif(typeof s=="function" && !(s instanceof RegExp)) s = function(){ return l'+dg+".apply(l, arguments); };\n";if(dg.charAt(1)=="$"){var df=dg.substr(2);dd+='if(!s) {\n t = angular.Global.typeOf(l);\n fn = (angular[t.charAt(0).toUpperCase() + t.substring(1)]||{})["'+df+'"];\n if (fn) s = function(){ return fn.apply(l, [l].concat(Array.prototype.slice.call(arguments, 0, arguments.length))); };\n}\n'}});dd+="return s;";dc=Function("s",dd);dc.toString=function(){return dd};return cV[de]=dc}function bC(df){if(typeof df===bK){return df}var dc=aW[df];if(!dc){var dd=Y(df);var de=dd.statements();dd.assertAllConsumed();dc=aW[df]=ck(function(){return de(this)},{fnSelf:de})}return dc}function ax(dd,dc){cc(dd,a,cK(dc)?bl(dc):dc)}function b7(dg,di,dd){function df(){}dg=df.prototype=(dg||{});var dc=new df();var dh={sorted:[]};var dj,de;ck(dc,{"this":dc,$id:(aI++),$parent:dg,$bind:bQ(dc,bQ,dc),$get:bQ(dc,b2,dc),$set:bQ(dc,cp,dc),$eval:function(dr){var dq=typeof dr;var dn,dm;var dl,ds;var dk;var dp;if(dq==s){for(dn=0,dm=dh.sorted.length;dn<dm;dn++){for(dk=dh.sorted[dn],ds=dk.length,dl=0;dl<ds;dl++){dc.$tryEval(dk[dl].fn,dk[dl].handler)}}}else{if(dq===bK){return dr.call(dc)}else{if(dq==="string"){return bC(dr).call(dc)}}}},$tryEval:function(dn,dk){var dl=typeof dn;try{if(dl==bK){return dn.call(dc)}else{if(dl=="string"){return bC(dn).call(dc)}}}catch(dm){if(dj){dj.error(dm)}if(J(dk)){dk(dm)}else{if(dk){ax(dk,dm)}else{if(J(de)){de(dm)}}}}},$watch:function(dq,dp,dl,dk){var dr=bC(dq),dn=dr.call(dc);dp=bC(dp);function dm(du){var dt=dr.call(dc),ds=dn;if(du||ds!==dt){dn=dt;dc.$tryEval(function(){return dp.call(dc,dt,ds)},dl)}}dc.$onEval(aw,dm);if(bM(dk)){dk=true}if(dk){dm(true)}},$onEval:function(dl,dn,dk){if(!a4(dl)){dk=dn;dn=dl;dl=0}var dm=dh[dl];if(!dm){dm=dh[dl]=[];dm.priority=dl;dh.sorted.push(dm);dh.sorted.sort(function(dq,dp){return dq.priority-dp.priority})}dm.push({fn:bC(dn),handler:dk})},$become:function(dk){if(J(dk)){dc.constructor=dk;bg(dk.prototype,function(dm,dl){dc[dl]=bQ(dc,dm)});dc.$service.apply(dc,bo([dk,dc],arguments,1));if(J(dk.prototype.init)){dc.init()}}},$new:function(dk){var dl=b7(dc);dl.$become.apply(dc,bo([dk],arguments,1));dc.$onEval(dl.$eval);return dl}});if(!dg.$root){dc.$root=dc;dc.$parent=dc;(dc.$service=ca(dc,di,dd))()}dj=dc.$service("$log");de=dc.$service("$exceptionHandler");return dc}function ca(dd,df,dc){df=df||bB;dc=dc||{};dd=dd||{};return function de(dj,di,dg){var dh,dk;if(cv(dj)){if(!(dj in dc)){dk=df[dj];if(!dk){throw"Unknown provider for '"+dj+"'."}dc[dj]=de(dk,dd)}dh=dc[dj]}else{if(bj(dj)){dh=[];bg(dj,function(dl){dh.push(de(dl))})}else{if(J(dj)){dh=de(bF(dj));dh=dj.apply(di,bo(dh,arguments,2))}else{if(c9(dj)){bg(df,function(dm,dl){if(dm.$eager){de(dl)}if(dm.$creation){throw new c2("Failed to register service '"+dl+"': $creation property is unsupported. Use $eager:true or see release notes.")}})}else{dh=de(dd)}}}}return dh}}function cM(dc,dd){return ck(dd,{$inject:dc})}function a6(dc){return cM(["$updateView"],dc)}function cy(dd,df,de,dc){bB(dd,df,{$inject:de,$eager:dc})}var p=/^function\s*[^\(]*\(([^\)]*)\)/;var A=/,/;var cr=/^\s*(((\$?).+?)(_?))\s*$/;var z=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;function bF(de){h(de);if(!de.$inject){var dc=de.$inject=[];var dd=de.toString().replace(z,"");var df=dd.match(p);bg(df[1].split(A),function(dg){dg.replace(cr,function(dj,di,dl,dk,dh){j(dc,di,"after non-injectable arg");if(dk||dh){dc.push(dl)}else{dc=null}})})}return de.$inject}var P={"null":function(dc){return null},"true":function(dc){return true},"false":function(dc){return false},$undefined:k,"+":function(de,dd,dc){return(cK(dd)?dd:0)+(cK(dc)?dc:0)},"-":function(de,dd,dc){return(cK(dd)?dd:0)-(cK(dc)?dc:0)},"*":function(de,dd,dc){return dd*dc},"/":function(de,dd,dc){return dd/dc},"%":function(de,dd,dc){return dd%dc},"^":function(de,dd,dc){return dd^dc},"=":k,"==":function(de,dd,dc){return dd==dc},"!=":function(de,dd,dc){return dd!=dc},"<":function(de,dd,dc){return dd<dc},">":function(de,dd,dc){return dd>dc},"<=":function(de,dd,dc){return dd<=dc},">=":function(de,dd,dc){return dd>=dc},"&&":function(de,dd,dc){return dd&&dc},"||":function(de,dd,dc){return dd||dc},"&":function(de,dd,dc){return dd&dc},"|":function(de,dd,dc){return dc(de,dd)},"!":function(dd,dc){return !dc}};var Z={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'};function bz(dq,df){var dv=df?bI:-1,ds=[],dk,dj=0,dx=[],dn,dz=":";while(dj<dq.length){dn=dq.charAt(dj);if(di("\"'")){dd(dn)}else{if(dr(dn)||di(".")&&dr(du())){de()}else{if(dt(dn)){dp();if(dm("{,")&&dx[0]=="{"&&(dk=ds[ds.length-1])){dk.json=dk.text.indexOf(".")==-1}}else{if(di("(){}[].,;:")){ds.push({index:dj,text:dn,json:(dm(":[,")&&di("{["))||di("}]:,")});if(di("{[")){dx.unshift(dn)}if(di("}]")){dx.shift()}dj++}else{if(dh(dn)){dj++;continue}else{var dc=dn+du(),dl=P[dn],dw=P[dc];if(dw){ds.push({index:dj,text:dc,fn:dw});dj+=2}else{if(dl){ds.push({index:dj,text:dn,fn:dl,json:dm("[,:")&&di("+-")});dj+=1}else{dy("Unexpected next character ",dj,dj+1)}}}}}}}dz=dn}return ds;function di(dA){return dA.indexOf(dn)!=-1}function dm(dA){return dA.indexOf(dz)!=-1}function du(){return dj+1<dq.length?dq.charAt(dj+1):false}function dr(dA){return"0"<=dA&&dA<="9"}function dh(dA){return dA==" "||dA=="\r"||dA=="\t"||dA=="\n"||dA=="\v"||dA=="\u00A0"}function dt(dA){return"a"<=dA&&dA<="z"||"A"<=dA&&dA<="Z"||"_"==dA||dA=="$"}function dg(dA){return dA=="-"||dA=="+"||dr(dA)}function dy(dB,dC,dA){dA=dA||dj;throw c2("Lexer Error: "+dB+" at column"+(cK(dC)?"s "+dC+"-"+dj+" ["+dq.substring(dC,dA)+"]":" "+dA)+" in expression ["+dq+"].")}function de(){var dC="";var dD=dj;while(dj<dq.length){var dB=av(dq.charAt(dj));if(dB=="."||dr(dB)){dC+=dB}else{var dA=du();if(dB=="e"&&dg(dA)){dC+=dB}else{if(dg(dB)&&dA&&dr(dA)&&dC.charAt(dC.length-1)=="e"){dC+=dB}else{if(dg(dB)&&(!dA||!dr(dA))&&dC.charAt(dC.length-1)=="e"){dy("Invalid exponent")}else{break}}}}dj++}dC=1*dC;ds.push({index:dD,text:dC,json:true,fn:function(){return dC}})}function dp(){var dC="";var dD=dj;var dB;while(dj<dq.length){var dA=dq.charAt(dj);if(dA=="."||dt(dA)||dr(dA)){dC+=dA}else{break}dj++}dB=P[dC];ds.push({index:dD,text:dC,json:dB,fn:dB||ck(cC(dC),{assign:function(dE,dF){return cp(dE,dC,dF)}})})}function dd(dA){var dH=dj;dj++;var dB="";var dC=dA;var dF=false;while(dj<dq.length){var dD=dq.charAt(dj);dC+=dD;if(dF){if(dD=="u"){var dE=dq.substring(dj+1,dj+5);if(!dE.match(/[\da-f]{4}/i)){dy("Invalid unicode escape [\\u"+dE+"]")}dj+=4;dB+=String.fromCharCode(parseInt(dE,16))}else{var dG=Z[dD];if(dG){dB+=dG}else{dB+=dD}}dF=false}else{if(dD=="\\"){dF=true}else{if(dD==dA){dj++;ds.push({index:dH,text:dC,string:dB,json:true,fn:function(){return(dB.length==dv)?aK.String["toDate"](dB):dB}});return}else{dB+=dD}}}dj++}dy("Unterminated quote",dH)}}function Y(dF,dQ){var du=cG(0),dK=bz(dF,dQ),dv=dR,dL=dO,dD=df,dN=dS,dw=dH,dn=dz,dg=dt,dc=dI;if(dQ){dv=dO;dD=dN=dw=dL=dn=dg=dc=function(){dr("is not valid json",{text:dF,index:0})}}return{assertAllConsumed:dA,assignable:dL,primary:dx,statements:di,validator:dT,formatter:dj,filter:dM,watch:dy};function dr(dX,dW){throw c2("Parse Error: Token '"+dW.text+"' "+dX+" at column "+(dW.index+1)+" of expression ["+dF+"] starting at ["+dF.substring(dW.index)+"].")}function dk(){if(dK.length===0){throw c2("Unexpected end of expression: "+dF)}return dK[0]}function dm(d1,d0,dZ,dY){if(dK.length>0){var dX=dK[0];var dW=dX.text;if(dW==d1||dW==d0||dW==dZ||dW==dY||(!d1&&!d0&&!dZ&&!dY)){return dX}}return false}function de(d0,dZ,dY,dX){var dW=dm(d0,dZ,dY,dX);if(dW){if(dQ&&!dW.json){index=dW.index;dr("is not valid json",dW)}dK.shift();this.currentToken=dW;return dW}return false}function dC(dW){if(!de(dW)){dr("is unexpected, expecting ["+dW+"]",dm())}}function ds(dX,dW){return function(dY){return dX(dY,dW(dY))}}function dU(dY,dX,dW){return function(dZ){return dX(dZ,dY(dZ),dW(dZ))}}function dq(){return dK.length>0}function dA(){if(dK.length!==0){dr("is extra token not part of expression",dK[0])}}function di(){var dW=[];while(true){if(dK.length>0&&!dm("}",")",";","]")){dW.push(dn())}if(!de(";")){return function(dX){var d0;for(var dY=0;dY<dW.length;dY++){var dZ=dW[dY];if(dZ){d0=dZ(dX)}}return d0}}}}function dz(){var dX=dE();var dW;while(true){if((dW=de("|"))){dX=dU(dX,dW.fn,dM())}else{return dX}}}function dM(){return dc(cJ)}function dT(){return dc(aS)}function dj(){var dX=de();var dW=m[dX.text];var dZ=[];if(!dW){dr("is not a valid formatter.",dX)}while(true){if((dX=de(":"))){dZ.push(dE())}else{return cG({format:dY(dW.format),parse:dY(dW.parse)})}}function dY(d0){return function(d2,d1){var d3=[d1];for(var d4=0;d4<dZ.length;d4++){d3.push(dZ[d4](d2))}return d0.apply(d2,d3)}}}function dI(dY){var dZ=dg(dY);var dW=[];var dX;while(true){if((dX=de(":"))){dW.push(dE())}else{var d0=function(d2,d1){var d3=[d1];for(var d4=0;d4<dW.length;d4++){d3.push(dW[d4](d2))}return dZ.apply(d2,d3)};return function(){return d0}}}}function dE(){return dv()}function dR(){var dY=dO();var dX;var dW;if(dW=de("=")){if(!dY.assign){dr("implies assignment but ["+dF.substring(0,dW.index)+"] can not be assigned to",dW)}dX=dO();return function(dZ){return dY.assign(dZ,dX(dZ))}}else{return dY}}function dO(){var dX=dp();var dW;while(true){if((dW=de("||"))){dX=dU(dX,dW.fn,dp())}else{return dX}}}function dp(){var dX=dh();var dW;if((dW=de("&&"))){dX=dU(dX,dW.fn,dp())}return dX}function dh(){var dX=dG();var dW;if((dW=de("==","!="))){dX=dU(dX,dW.fn,dh())}return dX}function dG(){var dX=dJ();var dW;if(dW=de("<",">","<=",">=")){dX=dU(dX,dW.fn,dG())}return dX}function dJ(){var dX=dd();var dW;while(dW=de("+","-")){dX=dU(dX,dW.fn,dd())}return dX}function dd(){var dX=dB();var dW;while(dW=de("*","/","%")){dX=dU(dX,dW.fn,dB())}return dX}function dB(){var dW;if(de("+")){return dx()}else{if(dW=de("-")){return dU(du,dW.fn,dB())}else{if(dW=de("!")){return ds(dW.fn,dB())}else{return dx()}}}}function dt(d1){var d0=de();var dZ=d0.text.split(".");var dW=d1;var dY;for(var dX=0;dX<dZ.length;dX++){dY=dZ[dX];if(dW){dW=dW[dY]}}if(typeof dW!=bK){dr("should be a function",d0)}return dW}function dx(){var dY;if(de("(")){var dZ=dn();dC(")");dY=dZ}else{if(de("[")){dY=dl()}else{if(de("{")){dY=dP()}else{var dW=de();dY=dW.fn;if(!dY){dr("not a primary expression",dW)}}}}var dX;while(dX=de("(","[",".")){if(dX.text==="("){dY=dD(dY)}else{if(dX.text==="["){dY=dw(dY)}else{if(dX.text==="."){dY=dN(dY)}else{dr("IMPOSSIBLE")}}}}return dY}function dS(dX){var dY=de().text;var dW=cC(dY);return ck(function(dZ){return dW(dX(dZ))},{assign:function(dZ,d0){return cp(dX(dZ),dY,d0)}})}function dH(dX){var dW=dE();dC("]");return ck(function(dY){var d0=dX(dY);var dZ=dW(dY);return(d0)?d0[dZ]:undefined},{assign:function(dY,dZ){return dX(dY)[dW(dY)]=dZ}})}function df(dX){var dW=[];if(dk().text!=")"){do{dW.push(dE())}while(de(","))}dC(")");return function(dZ){var d0=[];for(var d1=0;d1<dW.length;d1++){d0.push(dW[d1](dZ))}var dY=dX(dZ)||k;return dY.apply?dY.apply(dZ,d0):dY(d0[0],d0[1],d0[2],d0[3],d0[4])}}function dl(){var dW=[];if(dk().text!="]"){do{dW.push(dE())}while(de(","))}dC("]");return function(dX){var dZ=[];for(var dY=0;dY<dW.length;dY++){dZ.push(dW[dY](dX))}return dZ}}function dP(){var dW=[];if(dk().text!="}"){do{var dY=de(),dX=dY.string||dY.text;dC(":");var dZ=dE();dW.push({key:dX,value:dZ})}while(de(","))}dC("}");return function(d0){var d1={};for(var d2=0;d2<dW.length;d2++){var d4=dW[d2];var d3=d4.value(d0);d1[d4.key]=d3}return d1}}function dy(){var dW=[];while(dq()){dW.push(dV());if(!de(";")){dA()}}dA();return function(dX){for(var dY=0;dY<dW.length;dY++){var dZ=dW[dY](dX);dX.addListener(dZ.name,dZ.fn)}}}function dV(){var dW=de().text;dC(":");var dX;if(dk().text=="{"){dC("{");dX=di();dC("}")}else{dX=dE()}return function(dY){return{name:dW,fn:dX}}}}function b9(dd,de){this.template=dd=dd+"#";this.defaults=de||{};var dc=this.urlParams={};bg(dd.split(/\W/),function(df){if(df&&dd.match(new RegExp(":"+df+"\\W"))){dc[df]=true}})}b9.prototype={url:function(dg){var dd=this,de=this.template,dc;dg=dg||{};bg(this.urlParams,function(di,dh){dc=aF(dg[dh]||dd.defaults[dh]||"");de=de.replace(new RegExp(":"+dh+"(\\W)"),dc+"$1")});de=de.replace(/\/?#$/,"");var df=[];I(dg,function(di,dh){if(!dd.urlParams[dh]){df.push(al(dh)+"="+al(di))}});de=de.replace(/\/*$/,"");return de+(df.length?"?"+df.join("&"):"")}};function bZ(dc){this.xhr=dc}bZ.DEFAULT_ACTIONS={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:true},remove:{method:"DELETE"},"delete":{method:"DELETE"}};bZ.prototype={route:function(df,dg,di){var dd=this;var dc=new b9(df);di=ck({},bZ.DEFAULT_ACTIONS,di);function de(dk){var dj={};bg(dg||{},function(dm,dl){dj[dl]=dm.charAt&&dm.charAt(0)=="@"?b2(dk,dm.substr(1)):dm});return dj}function dh(dj){bE(dj||{},this)}bg(di,function(dl,dk){var dj=dl.method=="POST"||dl.method=="PUT";dh[dk]=function(dn,dm,dt){var dr={};var dq;var ds=k;switch(arguments.length){case 3:ds=dt;case 2:if(J(dm)){ds=dm}else{dr=dn;dq=dm;break}case 1:if(J(dn)){ds=dn}else{if(dj){dq=dn}else{dr=dn}}break;case 0:break;default:throw"Expected between 0-3 arguments [params, data, callback], got "+arguments.length+" arguments."}var dp=this instanceof dh?this:(dl.isArray?[]:new dh(dq));dd.xhr(dl.method,dc.url(ck({},dl.params||{},de(dq),dr)),dq,function(dv,dw,du){if(dv==200){if(dw){if(dl.isArray){dp.length=0;bg(dw,function(dx){dp.push(new dh(dx))})}else{bE(dw,dp)}}(ds||k)(dp)}else{throw {status:dv,response:dw,message:dv+": "+dw}}},dl.verifyCache);return dp};dh.bind=function(dm){return dd.route(df,ck({},dg,dm),di)};dh.prototype["$"+dk]=function(dn,dm){var dq=de(this);var dr=k;switch(arguments.length){case 2:dq=dn;dr=dm;case 1:if(typeof dn==bK){dr=dn}else{dq=dn}case 0:break;default:throw"Expected between 1-2 arguments [params, callback], got "+arguments.length+" arguments."}var dp=dj?this:undefined;dh[dk].call(this,dq,dp,dr)}});return dh}};var R=b5.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(de){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(dd){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(dc){}throw new c2("This browser does not support XMLHttpRequest.")};var cL={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"};function aX(dm,dp,dl,dk,dt){var dr=this,dq=dm.location,dj=dm.setTimeout;dr.isMock=false;var dg=0;var di=0;var ds=[];function dn(du){try{du.apply(null,am.call(arguments,1))}finally{di--;if(di===0){while(ds.length){try{ds.pop()()}catch(dv){dt.error(dv)}}}}}dr.xhr=function(dB,dv,dw,dA,dz){di++;if(av(dB)=="json"){var dx=("angular_"+Math.random()+"_"+(dg++)).replace(/\d\./,"");var du=cx("<script>").attr({type:"text/javascript",src:dv.replace("JSON_CALLBACK",dx)});dm[dx]=function(dC){dm[dx]=undefined;du.remove();dn(dA,200,dC)};dl.append(du)}else{var dy=new dk();dy.open(dB,dv,true);bg(ck(cL,dz||{}),function(dD,dC){if(dD){dy.setRequestHeader(dC,dD)}});dy.onreadystatechange=function(){if(dy.readyState==4){dn(dA,dy.status||200,dy.responseText)}};dy.send(dw||"")}};dr.notifyWhenNoOutstandingRequests=function(du){if(di===0){du()}else{ds.push(du)}};var df=[];dr.poll=function(){bg(df,function(du){du()})};dr.addPollFn=function(du){df.push(du);return du};dr.startPoller=function(dv,dw){(function du(){dr.poll();dw(du,dv)})()};dr.setUrl=function(dv){var du=dq.href;if(!du.match(/#/)){du+="#"}if(!dv.match(/#/)){dv+="#"}dq.href=dv};dr.getUrl=function(){return dq.href};dr.onHashChange=function(dv){if("onhashchange" in dm){cx(dm).bind("hashchange",dv)}else{var du=dr.getUrl();dr.addPollFn(function(){if(du!=dr.getUrl()){dv();du=dr.getUrl()}})}return dv};var dc=dp[0];var de={};var dd="";dr.cookies=function(dw,dz){var dB,du,dy,dx,dA,dv;if(dw){if(dz===undefined){dc.cookie=escape(dw)+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT"}else{if(cv(dz)){dc.cookie=escape(dw)+"="+escape(dz);dB=dw.length+dz.length+1;if(dB>4096){dt.warn("Cookie '"+dw+"' possibly not set or overflowed because it was too large ("+dB+" > 4096 bytes)!")}if(de.length>20){dt.warn("Cookie '"+dw+"' possibly not set or overflowed because too many cookies were already set ("+de.length+" > 20 )")}}}}else{if(dc.cookie!==dd){dd=dc.cookie;du=dd.split("; ");de={};for(dx=0;dx<du.length;dx++){dy=du[dx];dv=dy.indexOf("=");if(dv>0){de[unescape(dy.substring(0,dv))]=unescape(dy.substring(dv+1))}}}return de}};dr.defer=function(dv,du){di++;dj(function(){dn(dv)},du||0)};var dh=k;dr.hover=function(du){dh=du};dr.bind=function(){dp.bind("mouseover",function(du){dh(cx(aA?du.srcElement:du.target),true);return true});dp.bind("mouseleave mouseout click dblclick keypress keyup",function(du){dh(cx(du.target),false);return true})};dr.addCss=function(du){var dv=cx(dc.createElement("link"));dv.attr("rel","stylesheet");dv.attr("type","text/css");dv.attr("href",du);dl.append(dv)};dr.addJs=function(dw,dv){var du=cx(dc.createElement("script"));du.attr("type","text/javascript");du.attr("src",dw);if(dv){du.attr("id",dv)}dl.append(du)}}var cj=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,o=/^<\s*\/\s*([\w:-]+)[^>]*>/,cH=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,cP=/^</,f=/^<\s*\//,aL=/<!--(.*?)-->/g,b6=/<!\[CDATA\[(.*?)]]>/g,bN=/^((ftp|https?):\/\/|mailto:|#)/,bq=/([^\#-~| |!])/g;var a5=cX("area,br,col,hr,img");var ce=cX("address,blockquote,center,dd,del,dir,div,dl,dt,hr,ins,li,map,menu,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul");var au=cX("a,abbr,acronym,b,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var");var Q=cX("colgroup,dd,dt,li,p,td,tfoot,th,thead,tr");var b0=cX("script,style");var bH=ck({},a5,ce,au,Q);var c1=cX("background,href,longdesc,src,usemap");var bi=ck({},c1,cX("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,span,start,summary,target,title,type,valign,value,vspace,width"));function a0(dd,dl){var dg,dh,de,di=[],dj=dd;di.last=function(){return di[di.length-1]};while(dd){dh=true;if(!di.last()||!b0[di.last()]){if(dd.indexOf("<!--")===0){dg=dd.indexOf("-->");if(dg>=0){if(dl.comment){dl.comment(dd.substring(4,dg))}dd=dd.substring(dg+3);dh=false}}else{if(f.test(dd)){de=dd.match(o);if(de){dd=dd.substring(de[0].length);de[0].replace(o,df);dh=false}}else{if(cP.test(dd)){de=dd.match(cj);if(de){dd=dd.substring(de[0].length);de[0].replace(cj,dc);dh=false}}}}if(dh){dg=dd.indexOf("<");var dk=dg<0?dd:dd.substring(0,dg);dd=dg<0?"":dd.substring(dg);if(dl.chars){dl.chars(ah(dk))}}}else{dd=dd.replace(new RegExp("(.*)<\\s*\\/\\s*"+di.last()+"[^>]*>","i"),function(dm,dn){dn=dn.replace(aL,"$1").replace(b6,"$1");if(dl.chars){dl.chars(ah(dn))}return""});df("",di.last())}if(dd==dj){throw"Parse Error: "+dd}dj=dd}df();function dc(dm,dq,dr,dn){dq=av(dq);if(ce[dq]){while(di.last()&&au[di.last()]){df("",di.last())}}if(Q[dq]&&di.last()==dq){df("",dq)}dn=a5[dq]||!!dn;if(!dn){di.push(dq)}var dp={};dr.replace(cH,function(dv,du,dt,dx,ds){var dw=dt||dx||ds||"";dp[du]=ah(dw)});if(dl.start){dl.start(dq,dp,dn)}}function df(dm,dp){var dq=0,dn;dp=av(dp);if(dp){for(dq=di.length-1;dq>=0;dq--){if(di[dq]==dp){break}}}if(dq>=0){for(dn=di.length-1;dn>=dq;dn--){if(dl.end){dl.end(di[dn])}}di.length=dq}}}function cX(df){var de={},dc=df.split(","),dd;for(dd=0;dd<dc.length;dd++){de[dc[dd]]=true}return de}var D=u.createElement("pre");function ah(dc){D.innerHTML=dc.replace(/</g,"&lt;");return D.innerText||D.textContent||""}function aN(dc){return dc.replace(/&/g,"&amp;").replace(bq,function(dd){return"&#"+dd.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function bf(dd){var de=false;var dc=bQ(dd,dd.push);return{start:function(df,dh,dg){df=av(df);if(!de&&b0[df]){de=df}if(!de&&bH[df]==true){dc("<");dc(df);bg(dh,function(dj,di){var dk=av(di);if(bi[dk]==true&&(c1[dk]!==true||dj.match(bN))){dc(" ");dc(di);dc('="');dc(aN(dj));dc('"')}});dc(dg?"/>":">")}},end:function(df){df=av(df);if(!de&&bH[df]==true){dc("</");dc(df);dc(">")}if(df==de){de=false}},chars:function(df){if(!de){dc(aN(df))}}}}var co={},cS="ng-"+new Date().getTime(),ar=1,b1=(b5.document.addEventListener?function(dc,de,dd){dc.addEventListener(de,dd,false)}:function(dc,de,dd){dc.attachEvent("on"+de,dd)}),ag=(b5.document.removeEventListener?function(dc,de,dd){dc.removeEventListener(de,dd,false)}:function(dc,de,dd){dc.detachEvent("on"+de,dd)});function cs(){return(ar++)}function cn(de){var dh={},df=de[0].style,dg,dc,dd;if(typeof df.length=="number"){for(dd=0;dd<df.length;dd++){dc=df[dd];dh[dc]=df[dc]}}else{for(dc in df){dg=df[dc];if(1*dc!=dc&&dc!="cssText"&&dg&&typeof dg=="string"&&dg!="false"){dh[dc]=dg}}}return dh}if(aA){ck(bD.prototype,{text:function(dc){var dd=this[0];if(dd.nodeType==3){if(cK(dc)){dd.nodeValue=dc}return dd.nodeValue}else{if(cK(dc)){dd.innerText=dc}return dd.innerText}}})}function c3(dc){if(cv(dc)&&dc.charAt(0)!="<"){throw new c2("selectors not implemented")}return new bD(dc)}function bD(dc){if(dc instanceof bD){return dc}else{if(cv(dc)){var dd=u.createElement("div");dd.innerHTML="<div>&nbsp;</div>"+dc;dd.removeChild(dd.firstChild);cT(this,dd.childNodes);this.remove()}else{cT(this,dc)}}}function aG(dc){return dc.cloneNode(true)}function cF(de){a3(de);for(var dd=0,dc=de.childNodes||[];dd<dc.length;dd++){cF(dc[dd])}}function a3(dd){var de=dd[cS],dc=co[de];if(dc){bg(dc.bind||{},function(dg,df){ag(dd,df,dg)});delete co[de];dd[cS]=undefined}}function aT(de,dd,df){var dg=de[cS],dc=co[dg||-1];if(cK(df)){if(!dc){de[cS]=dg=cs();dc=co[dg]={}}dc[dd]=df}else{return dc?dc[dd]:null}}function cB(de,dc,dd){var df=" "+dc+" ";return((" "+de.className+" ").replace(/[\n\t]/g," ").indexOf(df)>-1)}function aB(dd,dc){dd.className=aC((" "+dd.className+" ").replace(/[\n\t]/g," ").replace(" "+dc+" ",""))}function cf(dd,dc){if(!cB(dd,dc)){dd.className=aC(dd.className+" "+dc)}}function cT(dc,de){if(de){de=(!de.nodeName&&cK(de.length)&&!bn(de))?de:[de];for(var dd=0;dd<de.length;dd++){dc.push(de[dd])}}}var N=bD.prototype={ready:function(dd){var de=false;function dc(){if(de){return}de=true;dd()}this.bind("DOMContentLoaded",dc);c3(b5).bind("load",dc)},toString:function(){var dc=[];bg(this,function(dd){dc.push(""+dd)});return"["+dc.join(", ")+"]"},length:0,push:G,sort:[].sort,splice:[].splice};bg({data:aT,scope:function(dc){var dd;while(dc&&!(dd=cx(dc).data(b3))){dc=dc.parentNode}return dd},removeAttr:function(dd,dc){dd.removeAttribute(dc)},hasClass:cB,css:function(dd,dc,de){if(cK(de)){dd.style[dc]=de}else{return dd.style[dc]}},attr:function(dd,dc,de){if(cK(de)){dd.setAttribute(dc,de)}else{if(dd.getAttribute){return dd.getAttribute(dc,2)}}},text:ck(aA?function(dc,dd){if(dc.nodeType==3){if(bM(dd)){return dc.nodeValue}dc.nodeValue=dd}else{if(bM(dd)){return dc.innerText}dc.innerText=dd}}:function(dc,dd){if(bM(dd)){return dc.textContent}dc.textContent=dd},{$dv:""}),val:function(dc,dd){if(bM(dd)){return dc.value}dc.value=dd},html:function(dd,de){if(bM(de)){return dd.innerHTML}for(var dc=0,df=dd.childNodes;dc<df.length;dc++){cF(df[dc])}dd.innerHTML=de}},function(dd,dc){bD.prototype[dc]=function(df,de){var dh,dg;if((dd.length==2?df:de)===undefined){if(c9(df)){for(dh=0;dh<this.length;dh++){for(dg in df){dd(this[dh],dg,df[dg])}}return this}else{if(this.length){return dd(this[0],df,de)}}}else{for(dh=0;dh<this.length;dh++){dd(this[dh],df,de)}return this}return dd.$dv}});bg({removeData:a3,dealoc:cF,bind:function(dd,df,de){var dg=aT(dd,"bind"),dc;if(!dg){aT(dd,"bind",dg={})}bg(df.split(" "),function(dh){dc=dg[dh];if(!dc){dg[dh]=dc=function(di){if(!di.preventDefault){di.preventDefault=function(){di.returnValue=false}}if(!di.stopPropagation){di.stopPropagation=function(){di.cancelBubble=true}}bg(dc.fns,function(dj){dj.call(dd,di)})};dc.fns=[];b1(dd,dh,dc)}dc.fns.push(de)})},replaceWith:function(dd,df){var dc,de=dd.parentNode;cF(dd);bg(new bD(df),function(dg){if(dc){de.insertBefore(dg,dc.nextSibling)}else{de.replaceChild(dg,dd)}dc=dg})},children:function(dd){var dc=[];bg(dd.childNodes,function(de){if(de.nodeName!="#text"){dc.push(de)}});return dc},append:function(dc,dd){bg(new bD(dd),function(de){if(dc.nodeType===1){dc.appendChild(de)}})},remove:function(dc){cF(dc);var dd=dc.parentNode;if(dd){dd.removeChild(dc)}},after:function(dd,df){var dc=dd,de=dd.parentNode;bg(new bD(df),function(dg){de.insertBefore(dg,dc.nextSibling);dc=dg})},addClass:cf,removeClass:aB,toggleClass:function(dd,dc,de){if(bM(de)){de=!cB(dd,dc)}(de?cf:aB)(dd,dc)},parent:function(dc){var dd=dc.parentNode;return dd&&dd.nodeType!==11?dd:null},next:function(dc){return dc.nextSibling},find:function(dd,dc){return dd.getElementsByTagName(dc)},clone:aG},function(dd,dc){bD.prototype[dc]=function(df,de){var dh;for(var dg=0;dg<this.length;dg++){if(dh==undefined){dh=dd(this[dg],df,de);if(dh!==undefined){dh=cx(dh)}}else{cT(dh,dd(this[dg],df,de))}}return dh==undefined?this:dh}});var a9={typeOf:function(dd){if(dd===null){return y}var dc=typeof dd;if(dc==aY){if(dd instanceof Array){return bd}if(aE(dd)){return bm}if(dd.nodeType==1){return cU}}return dc}};var c8={copy:bE,size:aD,equals:r};var bt={extend:ck};var S={indexOf:c6,sum:function(dh,dg){var de=aK.Function["compile"](dg);var dd=0;for(var dc=0;dc<dh.length;dc++){var df=1*de(dh[dc]);if(!isNaN(df)){dd+=df}}return dd},remove:function(de,dd){var dc=c6(de,dd);if(dc>=0){de.splice(dc,1)}return dd},filter:function(dj,di){var de=[];de.check=function(dl){for(var dk=0;dk<de.length;dk++){if(!de[dk](dl)){return false}}return true};var dg=function(dm,dn){if(dn.charAt(0)==="!"){return !dg(dm,dn.substr(1))}switch(typeof dm){case"boolean":case"number":case"string":return(""+dm).toLowerCase().indexOf(dn)>-1;case"object":for(var dl in dm){if(dl.charAt(0)!=="$"&&dg(dm[dl],dn)){return true}}return false;case"array":for(var dk=0;dk<dm.length;dk++){if(dg(dm[dk],dn)){return true}}return false;default:return false}};switch(typeof di){case"boolean":case"number":case"string":di={$:di};case"object":for(var df in di){if(df=="$"){(function(){var dk=(""+di[df]).toLowerCase();if(!dk){return}de.push(function(dl){return dg(dl,dk)})})()}else{(function(){var dk=df;var dl=(""+di[df]).toLowerCase();if(!dl){return}de.push(function(dm){return dg(b2(dm,dk),dl)})})()}}break;case bK:de.push(di);break;default:return dj}var dd=[];for(var dc=0;dc<dj.length;dc++){var dh=dj[dc];if(de.check(dh)){dd.push(dh)}}return dd},add:function(dd,dc){dd.push(bM(dc)?{}:dc);return dd},count:function(df,de){if(!de){return df.length}var dc=aK.Function["compile"](de),dd=0;bg(df,function(dg){if(dc(dg)){dd++}});return dd},orderBy:function(dj,di,dg){di=bj(di)?di:[di];di=aQ(di,function(dl){var dm=false,dk=dl||aO;if(cv(dl)){if((dl.charAt(0)=="+"||dl.charAt(0)=="-")){dm=dl.charAt(0)=="-";dl=dl.substring(1)}dk=bC(dl).fnSelf}return dd(function(dp,dn){return dh(dk(dp),dk(dn))},dm)});var df=[];for(var de=0;de<dj.length;de++){df.push(dj[de])}return df.sort(dd(dc,dg));function dc(dn,dm){for(var dl=0;dl<di.length;dl++){var dk=di[dl](dn,dm);if(dk!==0){return dk}}return 0}function dd(dk,dl){return cD(dl)?function(dn,dm){return dk(dm,dn)}:dk}function dh(dn,dm){var dl=typeof dn;var dk=typeof dm;if(dl==dk){if(dl=="string"){dn=dn.toLowerCase()}if(dl=="string"){dm=dm.toLowerCase()}if(dn===dm){return 0}return dn<dm?-1:1}else{return dl<dk?-1:1}}},limitTo:function(dg,dc){dc=parseInt(dc,10);var dd=[],de,df;if(dc>0){de=0;df=dc}else{de=dg.length+dc;df=dg.length}for(;de<df;de++){dd.push(dg[de])}return dd}};var bh=/^(\d{4})-(\d\d)-(\d\d)(?:T(\d\d)(?:\:(\d\d)(?:\:(\d\d)(?:\.(\d{3}))?)?)?Z)?$/;var az={quote:function(dc){return'"'+dc.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v")+'"'},quoteUnicode:function(dc){var dh=aK.String["quote"](dc);var dg=[];for(var dd=0;dd<dh.length;dd++){var de=dh.charCodeAt(dd);if(de<128){dg.push(dh.charAt(dd))}else{var df="000"+de.toString(16);dg.push("\\u"+df.substring(df.length-4))}}return dg.join("")},toDate:function(de){var dd;if(cv(de)&&(dd=de.match(bh))){var dc=new Date(0);dc.setUTCFullYear(dd[1],dd[2]-1,dd[3]);dc.setUTCHours(dd[4]||0,dd[5]||0,dd[6]||0,dd[7]||0);return dc}return de}};var an={toString:function(dc){return !dc?dc:dc.toISOString?dc.toISOString():cA(dc.getUTCFullYear(),4)+"-"+cA(dc.getUTCMonth()+1,2)+"-"+cA(dc.getUTCDate(),2)+"T"+cA(dc.getUTCHours(),2)+":"+cA(dc.getUTCMinutes(),2)+":"+cA(dc.getUTCSeconds(),2)+"."+cA(dc.getUTCMilliseconds(),3)+"Z"}};var B={compile:function(dc){if(J(dc)){return dc}else{if(dc){return bC(dc).fnSelf}else{return aO}}}};function O(dd,dc){aK[dd]=aK[dd]||{};bg(dc,function(de){ck(aK[dd],de)})}O("Global",[a9]);O("Collection",[a9,c8]);O("Array",[a9,c8,S]);O("Object",[a9,c8,bt]);O("String",[a9,az]);O("Date",[a9,an]);aK.Date["toString"]=an.toString;O("Function",[a9,c8,B]);cJ.currency=function(dc){this.$element.toggleClass("ng-format-negative",dc<0);return"$"+cJ.number.apply(this,[dc,2])};cJ.number=function(df,dc){if(isNaN(df)||!isFinite(df)){return""}dc=typeof dc==s?2:dc;var dd=df<0;df=Math.abs(df);var di=Math.pow(10,dc);var dk=""+Math.round(df*di);var dj=dk.substring(0,dk.length-dc);dj=dj||"0";var de=dk.substring(dk.length-dc);dk=dd?"-":"";for(var dh=0;dh<dj.length;dh++){if((dj.length-dh)%3===0&&dh!==0){dk+=","}dk+=dj.charAt(dh)}if(dc>0){for(var dg=de.length;dg<dc;dg++){de+="0"}dk+="."+de.substring(0,dc)}return dk};function cA(dd,de,dc){var df="";if(dd<0){df="-";dd=-dd}dd=""+dd;while(dd.length<de){dd="0"+dd}if(dc){dd=dd.substr(dd.length-de)}return df+dd}function bA(dd,de,df,dc){return function(dg){var dh=dg["get"+dd]();if(df>0||dh>-df){dh+=df}if(dh===0&&df==-12){dh=12}return cA(dh,de,dc)}}var bR={yyyy:bA("FullYear",4),yy:bA("FullYear",2,0,true),MM:bA("Month",2,1),M:bA("Month",1,1),dd:bA("Date",2),d:bA("Date",1),HH:bA("Hours",2),H:bA("Hours",1),hh:bA("Hours",2,-12),h:bA("Hours",1,-12),mm:bA("Minutes",2),m:bA("Minutes",1),ss:bA("Seconds",2),s:bA("Seconds",1),a:function(dc){return dc.getHours()<12?"am":"pm"},Z:function(dc){var dd=dc.getTimezoneOffset();return cA(dd/60,2)+cA(Math.abs(dd%60),2)}};var ay=/([^yMdHhmsaZ]*)(y+|M+|d+|H+|h+|m+|s+|a|Z)(.*)/;var cE=/^\d+$/;cJ.date=function(dd,dg){if(cv(dd)){if(cE.test(dd)){dd=parseInt(dd,10)}else{dd=az.toDate(dd)}}if(a4(dd)){dd=new Date(dd)}if(!aE(dd)){return dd}var dh=dd.toLocaleDateString(),de;if(dg&&cv(dg)){dh="";var df=[],dc;while(dg){dc=ay.exec(dg);if(dc){df=bo(df,dc,1);dg=df.pop()}else{df.push(dg);dg=null}}bg(df,function(di){de=bR[di];dh+=de?de(dd):di})}return dh};cJ.json=function(dc){this.$element.addClass("ng-monospace");return cz(dc,true)};cJ.lowercase=av;cJ.uppercase=bU;cJ.html=function(dc,dd){return new a7(dc,dd)};cJ.linky=function(dj){if(!dj){return dj}var dc=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}\<\>]/;var df;var de=dj;var dh=[];var di=bf(dh);var dd;var dg;while(df=de.match(dc)){dd=df[0];if(df[2]==df[3]){dd="mailto:"+dd}dg=df.index;di.chars(de.substr(0,dg));di.start("a",{href:dd});di.chars(df[0].replace(/^mailto:/,""));di.end("a");de=de.substring(dg+df[0].length)}di.chars(de);return new a7(dh.join(""))};function bb(dc,dd){return{format:dc,parse:dd||dc}}function H(dc){return(cK(dc)&&dc!==null)?""+dc:dc}var a2=/^\s*[-+]?\d*(\.\d*)?\s*$/;m.noop=bb(aO,aO);m.json=bb(cz,function(dc){return W(dc||"null")});m["boolean"]=bb(H,cD);m.number=bb(H,function(dc){if(dc==null||a2.exec(dc)){return dc===null||dc===""?null:1*dc}else{throw"Not a number"}});m.list=bb(function(dc){return dc?dc.join(", "):dc},function(dd){var dc=[];bg((dd||"").split(","),function(de){de=aC(de);if(de){dc.push(de)}});return dc});m.trim=bb(function(dc){return dc?aC(""+dc):""});m.index=bb(function(dc,dd){return""+c6(dd||[],dc)},function(dc,dd){return(dd||[])[dc]});ck(aS,{noop:function(){return null},regexp:function(dd,dc,de){if(!dd.match(dc)){return de||"Value does not match expected format "+dc+"."}else{return null}},number:function(df,de,dc){var dd=1*df;if(dd==df){if(typeof de!=s&&dd<de){return"Value can not be less than "+de+"."}if(typeof de!=s&&dd>dc){return"Value can not be greater than "+dc+"."}return null}else{return"Not a number"}},integer:function(df,dd,dc){var de=aS.number(df,dd,dc);if(de){return de}if(!(""+df).match(/^\s*[\d+]*\s*$/)||df!=Math.round(df)){return"Not a whole number"}return null},date:function(de){var dc=/^(\d\d?)\/(\d\d?)\/(\d\d\d\d)$/.exec(de);var dd=dc?new Date(dc[3],dc[1]-1,dc[2]):0;return(dd&&dd.getFullYear()==dc[3]&&dd.getMonth()==dc[1]-1&&dd.getDate()==dc[2])?null:"Value is not a date. (Expecting format: 12/31/2009)."},email:function(dc){if(dc.match(/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/)){return null}return"Email needs to be in [email protected] format."},phone:function(dc){if(dc.match(/^1\(\d\d\d\)\d\d\d-\d\d\d\d$/)){return null}if(dc.match(/^\+\d{2,3} (\(\d{1,5}\))?[\d ]+\d$/)){return null}return"Phone number needs to be in 1(987)654-3210 format in North America or +999 (123) 45678 906 internationaly."},url:function(dc){if(dc.match(/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/)){return null}return"URL needs to be in http://server[:port]/path format."},json:function(dc){try{W(dc);return null}catch(dd){return dd.toString()}},asynchronous:function(df,dj,dd){if(!df){return}var dh=this;var dg=dh.$element;var de=dg.data("$asyncValidator");if(!de){dg.data("$asyncValidator",de={inputs:{}})}de.current=df;var dc=de.inputs[df],di=dh.$service("$invalidWidgets");if(!dc){de.inputs[df]=dc={inFlight:true};di.markInvalid(dh.$element);dg.addClass("ng-input-indicator-wait");dj(df,function(dk,dl){dc.response=dl;dc.error=dk;dc.inFlight=false;if(de.current==df){dg.removeClass("ng-input-indicator-wait");di.markValid(dg)}dg.data(br)();dh.$service("$updateView")()})}else{if(dc.inFlight){di.markInvalid(dh.$element)}else{(dd||k)(dc.response)}}return dc.error}});cy("$cookieStore",function(dc){return{get:function(dd){return W(dc[dd])},put:function(dd,de){dc[dd]=cz(de)},remove:function(dd){delete dc[dd]}}},["$cookies"]);cy("$cookies",function(dd){var dg=this,dh={},de={},dc,di=false;dd.addPollFn(function(){var dj=dd.cookies();if(dc!=dj){dc=dj;bE(dj,de);bE(dj,dh);if(di){dg.$eval()}}})();di=true;this.$onEval(ct,df);return dh;function df(){var dk,dl,dm,dj;for(dk in de){if(bM(dh[dk])){dd.cookies(dk,undefined)}}for(dk in dh){dl=dh[dk];if(!cv(dl)){if(cK(de[dk])){dh[dk]=de[dk]}else{delete dh[dk]}}else{if(dl!==de[dk]){dd.cookies(dk,dl);dj=true}}}if(dj){dj=false;dm=dd.cookies();for(dk in dh){if(dh[dk]!==dm[dk]){if(bM(dm[dk])){delete dh[dk]}else{dh[dk]=dm[dk]}dj=true}}}}},["$browser"]);cy("$defer",function(dc,dd,de){return function(dg,df){dc.defer(function(){try{dg()}catch(dh){dd(dh)}finally{de()}},df)}},["$browser","$exceptionHandler","$updateView"]);cy("$document",function(dc){return cx(dc.document)},["$window"]);var bS;cy("$exceptionHandler",bS=function(dc){return function(dd){dc.error(dd)}},["$log"]);cy("$hover",function(dh,dd){var dj,df=this,dg,di=300,de=10,dc=cx(dd[0].body);dh.hover(function(dn,dl){if(dl&&(dg=dn.attr(a)||dn.attr(l))){if(!dj){dj={callout:cx('<div id="ng-callout"></div>'),arrow:cx("<div></div>"),title:cx('<div class="ng-title"></div>'),content:cx('<div class="ng-content"></div>')};dj.callout.append(dj.arrow);dj.callout.append(dj.title);dj.callout.append(dj.content);dc.append(dj.callout)}var dk=dc[0].getBoundingClientRect(),dm=dn[0].getBoundingClientRect(),dp=dk.right-dm.right-de;dj.title.text(dn.hasClass("ng-exception")?"EXCEPTION:":"Validation error...");dj.content.text(dg);if(dp<di){dj.arrow.addClass("ng-arrow-right");dj.arrow.css({left:(di+1)+"px"});dj.callout.css({position:"fixed",left:(dm.left-de-di-4)+"px",top:(dm.top-3)+"px",width:di+"px"})}else{dj.arrow.addClass("ng-arrow-left");dj.callout.css({position:"fixed",left:(dm.right+de)+"px",top:(dm.top-3)+"px",width:di+"px"})}}else{if(dj){dj.callout.remove();dj=null}}})},["$browser","$document"],true);cy("$invalidWidgets",function(){var dd=[];dd.markValid=function(df){var de=c6(dd,df);if(de!=-1){dd.splice(de,1)}};dd.markInvalid=function(df){var de=c6(dd,df);if(de===-1){dd.push(df)}};dd.visible=function(){var de=0;bg(dd,function(df){de=de+(a1(df)?1:0)});return de};this.$onEval(ct,function(){for(var de=0;de<dd.length;){var df=dd[de];if(dc(df[0])){dd.splice(de,1);if(df.dealoc){df.dealoc()}}else{de++}}});function dc(df){if(df==b5.document){return false}var de=df.parentNode;return !de||dc(de)}return dd});var M=/^(file|ftp|http|https):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,E=/^([^\?]*)?(\?([^\?]*))?$/,cR={http:80,https:443,ftp:21};cy("$location",function(dn){var dm=this,dj={update:de,updateHash:dg},df={};dn.onHashChange(function(){de(dn.getUrl());bE(dj,df);dm.$eval()})();this.$onEval(by,di);this.$onEval(ct,dh);return dj;function de(dp){if(cv(dp)){ck(dj,dl(dp))}else{if(cK(dp.hash)){ck(dp,cv(dp.hash)?dd(dp.hash):dp.hash)}ck(dj,dp);if(cK(dp.hashPath||dp.hashSearch)){dj.hash=dc(dj)}dj.href=dk(dj)}}function dg(dr,dp){var dq={};if(cv(dr)){dq.hashPath=dr;dq.hashSearch=dp||{}}else{dq.hashSearch=dr}dq.hash=dc(dq);de({hash:dq})}function di(){if(!r(dj,df)){if(dj.href!=df.href){de(dj.href);return}if(dj.hash!=df.hash){var dp=dd(dj.hash);dg(dp.hashPath,dp.hashSearch)}else{dj.hash=dc(dj);dj.href=dk(dj)}de(dj.href)}}function dh(){di();if(dn.getUrl()!=dj.href){dn.setUrl(dj.href);bE(dj,df)}}function dk(dr){var dq=T(dr.search);var dp=(dr.port==cR[dr.protocol]?null:dr.port);return dr.protocol+"://"+dr.host+(dp?":"+dp:"")+dr.path+(dq?"?"+dq:"")+(dr.hash?"#"+dr.hash:"")}function dc(dq){var dp=T(dq.hashSearch);return escape(dq.hashPath).replace(/%21/gi,"!").replace(/%3A/gi,":").replace(/%24/gi,"$")+(dp?"?"+dp:"")}function dl(dp){var dr={};var dq=M.exec(dp);if(dq){dr.href=dp.replace(/#$/,"");dr.protocol=dq[1];dr.host=dq[3]||"";dr.port=dq[5]||cR[dr.protocol]||null;dr.path=dq[6]||"";dr.search=ap(dq[8]);dr.hash=dq[10]||"";ck(dr,dd(dr.hash))}return dr}function dd(dr){var dq={};var dp=E.exec(dr);if(dp){dq.hash=dr;dq.hashPath=unescape(dp[1]||"");dq.hashSearch=ap(dp[3])}return dq}},["$browser"]);var aj;cy("$log",aj=function(dd){return{log:dc("log"),warn:dc("warn"),info:dc("info"),error:dc("error")};function dc(df){var de=dd.console||{};var dg=de[df]||de.log||k;if(dg.apply){return function(){var dh=[];bg(arguments,function(di){dh.push(bl(di))});return dg.apply(de,dh)}}else{return dg}}},["$window"]);cy("$resource",function(dc){var dd=new bZ(dc);return bQ(dd,dd.route)},["$xhr.cache"]);cy("$route",function(dk,df){var dl={},dg=[],de=dd,di=this,dc=0,dj={routes:dl,onChange:function(dm){dg.push(dm);return dm},parent:function(dm){if(dm){di=dm}},when:function(dn,dp){if(bM(dn)){return dl}var dm=dl[dn];if(!dm){dm=dl[dn]={}}if(dp){ck(dm,dp)}dc++;return dm},otherwise:function(dm){dj.when(null,dm)},reload:function(){dc++}};function dd(dn,dm,dr){var dq="^"+dm.replace(/[\.\\\(\)\^\$]/g,"$1")+"$",ds=[],dt={};bg(dm.split(/\W/),function(dv){if(dv){var du=new RegExp(":"+dv+"([\\W])");if(dq.match(du)){dq=dq.replace(du,"([^/]*)$1");ds.push(dv)}}});var dp=dn.match(new RegExp(dq));if(dp){bg(ds,function(dv,du){dt[dv]=dp[du+1]});if(dr){this.$set(dr,dt)}}return dp?dt:null}function dh(){var dn,dm,dq,dr,dp,ds;dj.current=null;bg(dl,function(dt,du){if(!dq){if(dq=de(dk.hashPath,du)){dm=dt}}});dm=dm||dl[null];if(dm){if(dm.redirectTo){if(cv(dm.redirectTo)){ds={hashPath:"",hashSearch:ck({},dk.hashSearch,dq)};bg(dm.redirectTo.split(":"),function(du,dt){if(dt==0){ds.hashPath+=du}else{dr=du.match(/(\w+)(.*)/);dp=dr[1];ds.hashPath+=dq[dp]||dk.hashSearch[dp];ds.hashPath+=dr[2]||"";delete ds.hashSearch[dp]}})}else{ds={hash:dm.redirectTo(dq,dk.hash,dk.hashPath,dk.hashSearch)}}dk.update(ds);df();return}dn=b7(di);dj.current=ck({},dm,{scope:dn,params:ck({},dk.hashSearch,dq)})}bg(dg,di.$tryEval);if(dn){dn.$become(dj.current.controller)}}this.$watch(function(){return dc+dk.hash},dh);return dj},["$location","$updateView"]);function db(dc){var dd=this;var de;function df(){de=false;dd.$eval()}return dc.isMock?df:function(){if(!de){de=true;dc.defer(df,db.delay)}}}db.delay=25;cy("$updateView",db,["$browser"]);cy("$window",bQ(b5,aO,b5));cy("$xhr.bulk",function(dd,dc,dg){var dh=[],df=this;function de(dm,di,dj,dl){if(J(dj)){dl=dj;dj=null}var dk;bg(de.urls,function(dn){if(J(dn.match)?dn.match(di):dn.match.exec(di)){dk=dn}});if(dk){if(!dk.requests){dk.requests=[]}dk.requests.push({method:dm,url:di,data:dj,callback:dl})}else{dd(dm,di,dj,dl)}}de.urls={};de.flush=function(di){bg(de.urls,function(dj,dk){var dl=dj.requests;if(dl&&dl.length){dj.requests=[];dj.callbacks=[];dd("POST",dk,{requests:dl},function(dn,dm){bg(dm,function(dp,dq){try{if(dp.status==200){(dl[dq].callback||k)(dp.status,dp.response)}else{dc(dl[dq],dp)}}catch(dr){dg.error(dr)}});(di||k)()});df.$eval()}})};this.$onEval(ct,de.flush);return de},["$xhr","$xhr.error","$log"]);cy("$xhr.cache",function(dc,df,dg){var dh={},de=this;function dd(dq,di,dj,dp,dn,dk){if(J(dj)){dp=dj;dj=null}if(dq=="GET"){var dm,dl;if(dl=dd.data[di]){if(dk){dp(200,bE(dl.value))}else{df(function(){dp(200,bE(dl.value))})}if(!dn){return}}if(dm=dh[di]){dm.callbacks.push(dp)}else{dh[di]={callbacks:[dp]};dd.delegate(dq,di,dj,function(dr,ds){if(dr==200){dd.data[di]={value:ds}}var dt=dh[di].callbacks;delete dh[di];bg(dt,function(dv){try{(dv||k)(dr,bE(ds))}catch(du){dg.error(du)}})})}}else{dd.data={};dd.delegate(dq,di,dj,dp)}}dd.data={};dd.delegate=dc;return dd},["$xhr.bulk","$defer","$log"]);cy("$xhr.error",function(dc){return function(de,dd){dc.error("ERROR: XHR: "+de.url,de,dd)}},["$log"]);cy("$xhr",function(dd,dc,df,de){return function(dj,dg,dh,di){if(J(dh)){di=dh;dh=null}if(dh&&c9(dh)){dh=cz(dh)}dd.xhr(dj,dg,dh,function(dl,dk){try{if(cv(dk)){if(dk.match(/^\)\]\}',\n/)){dk=dk.substr(6)}if(/^\s*[\[\{]/.exec(dk)&&/[\}\]]\s*$/.exec(dk)){dk=W(dk,true)}}if(200<=dl&&dl<300){di(dl,dk)}else{dc({method:dj,url:dg,data:dh,callback:di},{status:dl,body:dk})}}catch(dm){df.error(dm)}finally{de()}},{"X-XSRF-TOKEN":dd.cookies()["XSRF-TOKEN"]})}},["$browser","$xhr.error","$log","$updateView"]);af("ng:init",function(dc){return function(dd){this.$tryEval(dc,dd)}});af("ng:controller",function(dc){this.scope(true);return function(de){var dd=b2(b5,dc,true)||b2(this,dc,true);if(!dd){throw"Can not find '"+dc+"' controller."}if(!J(dd)){throw"Reference '"+dc+"' is not a class."}this.$become(dd)}});af("ng:eval",function(dc){return function(dd){this.$onEval(dc,dd)}});af("ng:bind",function(dd,dc){dc.addClass("ng-binding");return function(df){var de=k,dg=k;this.$onEval(function(){var di,dm,dj,dk,dl,dh=this.hasOwnProperty(bJ)?this.$element:undefined;this.$element=df;dm=this.$tryEval(dd,function(dn){di=bl(dn)});this.$element=dh;if(dk=(dm instanceof a7)){dm=(dj=dm).html}if(de===dm&&dg==di){return}dl=bV(dm);if(!dk&&!dl&&c9(dm)){dm=cz(dm,true)}if(dm!=de||di!=dg){de=dm;dg=di;cc(df,a,di);if(di){dm=di}if(dk){df.html(dj.get())}else{if(dl){df.html("");df.append(dm)}else{df.text(dm==undefined?"":dm)}}}},df)}});var bO={};function da(dd){var dc=bO[dd];if(!dc){var de=[];bg(ba(dd),function(dg){var df=c0(dg);de.push(df?function(di){var dh,dj=this.$tryEval(df,function(dk){dh=cz(dk)});cc(di,a,dh);return dh?dh:dj}:function(){return dg})});bO[dd]=dc=function(dj,di){var dl=[],df=this,dg=this.hasOwnProperty(bJ)?df.$element:undefined;df.$element=dj;for(var dh=0;dh<de.length;dh++){var dk=de[dh].call(df,dj);if(bV(dk)){dk=""}else{if(c9(dk)){dk=cz(dk,di)}}dl.push(dk)}df.$element=dg;return dl.join("")}}return dc}af("ng:bind-template",function(dd,dc){dc.addClass("ng-binding");var de=da(dd);return function(dg){var df;this.$onEval(function(){var dh=de.call(this,dg,true);if(dh!=df){dg.text(dh);df=dh}},dg)}});var e={disabled:"disabled",readonly:"readOnly",checked:"checked",selected:"selected"};af("ng:bind-attr",function(dc){return function(df){var de={};var dd=df.data(ak)||k;this.$onEval(function(){var dg=this.$eval(dc),di=k;for(var dh in dg){var dk=da(dg[dh]).call(this,df),dj=e[av(dh)];if(de[dh]!==dk){de[dh]=dk;if(dj){if(cD(dk)){df.attr(dj,dj);df.attr("ng-"+dj,dk)}else{df.removeAttr(dj);df.removeAttr("ng-"+dj)}(df.data(br)||k)()}else{df.attr(dh,dk)}di=dd}}di()},df)}});af("ng:click",function(dd,dc){return a6(function(dg,df){var de=this;df.bind("click",function(dh){de.$tryEval(dd,df);dg();dh.stopPropagation()})})});af("ng:submit",function(dd,dc){return a6(function(dg,df){var de=this;df.bind("submit",function(dh){de.$tryEval(dd,df);dg();dh.preventDefault()})})});function bP(dc){return function(df,dd){var de=dd[0].className+" ";return function(dg){this.$onEval(function(){if(dc(this.$index)){var dh=this.$eval(df);if(bj(dh)){dh=dh.join(" ")}dg[0].className=aC(de+dh)}},dg)}}}af("ng:class",bP(function(){return true}));af("ng:class-odd",bP(function(dc){return dc%2===0}));af("ng:class-even",bP(function(dc){return dc%2===1}));af("ng:show",function(dd,dc){return function(de){this.$onEval(function(){de.css(aU,cD(this.$eval(dd))?"":b)},de)}});af("ng:hide",function(dd,dc){return function(de){this.$onEval(function(){de.css(aU,cD(this.$eval(dd))?b:"")},de)}});af("ng:style",function(dd,dc){return function(de){var df=cn(de);this.$onEval(function(){var dh=this.$eval(dd)||{},dg,di={};for(dg in dh){if(df[dg]===undefined){df[dg]=""}di[dg]=dh[dg]}for(dg in df){di[dg]=di[dg]||df[dg]}de.css(di)},de)}});function ba(dd){var de=[];var df=0;var dc;while((dc=dd.indexOf("{{",df))>-1){if(df<dc){de.push(dd.substr(df,dc-df))}df=dc;dc=dd.indexOf("}}",dc);dc=dc<0?dd.length:dc+2;de.push(dd.substr(df,dc-df));df=dc}if(df!=dd.length){de.push(dd.substr(df,dd.length-df))}return de.length===0?[dd]:de}function c0(dc){var dd=dc.replace(/\n/gm," ").match(/^\{\{(.*)\}\}$/);return dd?dd[1]:null}function cZ(dc){return dc.length>1||c0(dc[0])!==null}ao("{{}}",function(dg,df,dc){var di=ba(dg),dd=this;if(cZ(di)){if(ch(dc[0])){dc.attr("ng:bind-template",dg)}else{var de=df,dh;bg(ba(dg),function(dl){var dk=c0(dl);if(dk){dh=cx("<span>");dh.attr("ng:bind",dk)}else{dh=cx(u.createTextNode(dl))}if(aA&&dl.charAt(0)==" "){dh=cx("<span>&nbsp;</span>");var dj=dh.html();dh.text(dl.substr(1));dh.html(dj+dh.html())}de.after(dh);de=dh});df.remove()}}});ao("option",function(de,dd,dc){if(av(t(dc))=="option"){if(aA<=7){a0(dc[0].outerHTML,{start:function(df,dg){if(bM(dg.value)){dc.attr("value",de)}}})}else{if(dc[0].getAttribute("value")==null){dc.attr("value",de)}}}});var bW="ng:bind-attr";var aP={"ng:src":"src","ng:href":"href"};v("{{}}",function(df,dd,de){if(af(dd)||af("@"+dd)){return}if(aA&&dd=="src"){df=decodeURI(df)}var dg=ba(df),dc;if(cZ(dg)){de.removeAttr(dd);dc=W(de.attr(bW)||"{}");dc[aP[dd]||dd]=df;de.attr(bW,cz(dc))}});function bY(de,dd){var df=dd.attr("name");var dc;if(df){dc=Y(df).assignable().assign;if(!dc){throw new c2("Expression '"+df+"' is not assignable.")}return{get:function(){return de.$eval(df)},set:function(dg){if(dg!==undefined){return de.$tryEval(function(){dc(de,dg)},dd)}}}}}function bw(df,de){var dc=bY(df,de),dg=de.attr("ng:format")||q,dd=b8(dg);if(dc){return{get:function(){return dd.format(df,dc.get())},set:function(dh){return dc.set(dd.parse(df,dh))}}}}function d(dc){return Y(dc).validator()()}function b8(dc){return Y(dc).formatter()()}function cd(dn,dg){var de=dg.attr("ng:validate")||q,dd=d(de),dc=dg.attr("ng:required"),dp=dg.attr("ng:format")||q,dm=b8(dp),dl,df,di,dh,dk=dn.$service("$invalidWidgets")||{markValid:k,markInvalid:k};if(!dd){throw"Validator named '"+de+"' not found."}dl=dm.format;df=dm.parse;if(dc){dn.$watch(dc,function(dq){dh=dq;dj()})}else{dh=dc===""}dg.data(br,dj);return{get:function(){if(di){cc(dg,l,null)}try{var dq=df(dn,dg.val());dj();return dq}catch(dr){di=dr;cc(dg,l,dr)}},set:function(dr){var dq=dg.val(),ds=dl(dn,dr);if(dq!=ds){dg.val(ds||"")}dj()}};function dj(){var ds=aC(dg.val());if(dg[0].disabled||dg[0].readOnly){cc(dg,l,null);dk.markValid(dg)}else{var dr,dq=ci(dn,{$element:dg});dr=dh&&!ds?"Required":(ds?dd(dq,ds):null);cc(dg,l,dr);di=dr;if(dr){dk.markInvalid(dg)}else{dk.markValid(dg)}}}}function aR(dd,dc){var df=dc[0],de=df.value;return{get:function(){return !!df.checked},set:function(dg){df.checked=cD(dg)}}}function c7(dd,dc){var de=dc[0];return{get:function(){return de.checked?de.value:null},set:function(df){de.checked=df==de.value}}}function cQ(de,dd){var df=dd.attr("ng:format")||q,dc=b8(df);return{get:function(){var dg=[];bg(dd[0].options,function(dh){if(dh.selected){dg.push(dc.parse(de,dh.value))}});return dg},set:function(dg){var dh={};bg(dg,function(di){dh[dc.format(de,di)]=true});bg(dd[0].options,function(di){di.selected=dh[di.value]})}}}function U(){return{get:k,set:k}}var bu=cb("keydown change",bY,cd,g(),true),cg=cb("click",U,U,k),c4={text:bu,textarea:bu,hidden:bu,password:bu,button:cg,submit:cg,reset:cg,image:cg,checkbox:cb("click",bw,aR,g(false)),radio:cb("click",bw,c7,cI),"select-one":cb("change",bY,cd,g(null)),"select-multiple":cb("change",bY,cQ,g([]))};function g(dc){return function(de,dd){var df=dd.get();if(!df&&cK(dc)){df=bE(dc)}if(bM(de.get())&&cK(df)){de.set(df)}}}function cI(df,dc,dg){var de=df.get(),dh=dc.get(),dd=dg[0];dd.checked=false;dd.name=this.$id+"@"+dd.name;if(bM(de)){df.set(de=null)}if(de==null&&dh!==null){df.set(dh)}dc.set(de)}function cb(de,dd,dc,df,dg){return cM(["$updateView","$defer"],function(dp,dm,dk){var dl=this,dj=dd(dl,dk),dh=dc(dl,dk),dn=dk.attr("ng:change")||"",di;if(dj){df.call(dl,dj,dh,dk);this.$eval(dk.attr("ng:init")||"");dk.bind(de,function(dr){function dq(){var ds=dh.get();if(!dg||ds!=di){dj.set(ds);di=dj.get();dl.$tryEval(dn,dk);dp()}}dr.type=="keydown"?dm(dq):dq()});dl.$watch(dj.get,function(dq){if(di!==dq){dh.set(di=dq)}})}})}function ad(dc){this.directives(true);this.descend(true);return c4[av(dc[0].type)]||k}F("input",ad);F("textarea",ad);F("button",ad);F("select",function(dc){this.descend(true);return ad.call(this,dc)});F("option",function(){this.descend(true);this.directives(true);return function(de){var dj=de.parent();var dd=dj[0].type=="select-multiple";var dk=dj.scope();var df=bY(dk,dj);if(!df){return}var dc=bw(dk,dj);var dh=dd?cQ(dk,dj):cd(dk,dj);var di=de.attr(aH);var dg=de.attr("ng-"+aJ);de.data(ak,dd?function(){dh.set(df.get())}:function(){var dn=de.attr(aH);var dm=de.attr("ng-"+aJ);var dl=df.get();if(dg!=dm||di!=dn){dg=dm;di=dn;if(dm||!dl==null||dl==undefined){dc.set(dn)}if(dn==dl){dh.set(di)}}})}});F("ng:include",function(de){var df=this,dd=de.attr("src"),dg=de.attr("scope")||"",dc=de[0].getAttribute("onload")||"";if(de[0]["ng:compiled"]){this.descend(true);this.directives(true)}else{de[0]["ng:compiled"]=true;return ck(function(dm,dj){var dl=this,dh;var dn=0;var dk=false;function di(){dn++}this.$watch(dd,di);this.$watch(dg,di);dl.$onEval(function(){if(dh&&!dk){dk=true;try{dh.$eval()}finally{dk=false}}});this.$watch(function(){return dn},function(){var dq=this.$eval(dd),dp=this.$eval(dg);if(dq){dm("GET",dq,null,function(ds,dr){dj.html(dr);dh=dp||b7(dl);df.compile(dj)(dh);dl.$eval(dc)},false,true)}else{dh=null;dj.html("")}})},{$inject:["$xhr.cache"]})}});var n=F("ng:switch",function(dg){var dh=this,df=dg.attr("on"),dj=(dg.attr("using")||"equals"),dc=dj.split(":"),dd=n[dc.shift()],de=dg.attr("change")||"",di=[];if(!dd){throw"Using expression '"+dj+"' unknown."}if(!df){throw"Missing 'on' attribute."}a8(dg,function(dm){var dk=dm.attr("ng:switch-when");var dl={change:de,element:dm,template:dh.compile(dm)};if(cv(dk)){dl.when=function(dp,dq){var dn=[dq,dk];bg(dc,function(dr){dn.push(dr)});return dd.apply(dp,dn)};di.unshift(dl)}else{if(cv(dm.attr("ng:switch-default"))){dl.when=cG(true);di.push(dl)}}});bg(di,function(dk){dk.element.remove()});dg.html("");return function(dl){var dm=this,dk;this.$watch(df,function(dp){var dn=false;dl.html("");dk=b7(dm);bg(di,function(dq){if(!dn&&dq.when(dk,dp)){dn=true;dk.$tryEval(dq.change,dl);dq.template(dk,function(dr){dl.append(dr)})}})});dm.$onEval(function(){if(dk){dk.$eval()}})}},{equals:function(dd,dc){return""+dd==dc}});F("a",function(){this.descend(true);this.directives(true);return function(dc){if(dc.attr("href")===""){dc.bind("click",function(dd){dd.preventDefault()})}}});F("@ng:repeat",function(de,dc){dc.removeAttr("ng:repeat");dc.replaceWith(cx("<!-- ng:repeat: "+de+" --!>"));var dd=this.compile(dc);return function(dl){var di=de.match(/^\s*(.+)\s+in\s+(.*)\s*$/),df,dm,dg,dk;if(!di){throw c2("Expected ng:repeat in form of 'item in collection' but got '"+de+"'.")}df=di[1];dm=di[2];di=df.match(/^([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\)$/);if(!di){throw c2("'item' in 'item in collection' should be identifier or (key, value) but got '"+keyValue+"'.")}dg=di[3]||di[1];dk=di[2];var dj=[],dh=this;this.$onEval(function(){var dr=0,dp=dj.length,dw=dl,dq=this.$tryEval(dm,dl),dv=aD(dq,true),ds=(dc[0].nodeName!="OPTION")?u.createDocumentFragment():null,dn,dt,du;for(du in dq){if(dq.hasOwnProperty(du)){if(dr<dp){dt=dj[dr];dt[dg]=dq[du];if(dk){dt[dk]=du}dw=dt.$element;dt.$eval()}else{dt=b7(dh);dt[dg]=dq[du];if(dk){dt[dk]=du}dt.$index=dr;dt.$position=dr==0?"first":(dr==dv-1?"last":"middle");dj.push(dt);dd(dt,function(dx){dx.attr("ng:repeat-index",dr);if(ds){ds.appendChild(dx[0]);dn=true}else{dw.after(dx);dw=dx}})}dr++}}if(dn){dw.after(cx(ds))}while(dj.length>dr){dj.pop().$element.remove()}},dl)}});F("@ng:non-bindable",k);F("ng:view",function(dc){var dd=this;if(!dc[0]["ng:compiled"]){dc[0]["ng:compiled"]=true;return cM(["$xhr.cache","$route"],function(de,di,dg){var dh=this,df;di.onChange(function(){var dj;if(di.current){dj=di.current.template;df=di.current.scope}if(dj){de("GET",dj,null,function(dl,dk){dg.html(dk);dd.compile(dg)(df)},false,true)}else{dg.html("")}})();dh.$onEval(function(){if(df){df.$eval()}})})}else{this.descend(true);this.directives(true)}});var cw;bB("$browser",function(dd){if(!cw){cw=new aX(b5,cx(b5.document),cx(b5.document.body),R,dd);var dc=cw.addPollFn;cw.addPollFn=function(){cw.addPollFn=dc;cw.startPoller(100,function(de,df){setTimeout(de,df)});return dc.apply(cw,arguments)};cw.bind()}return cw},{$inject:["$log"]});ck(aK,{element:cx,compile:bc,scope:b7,copy:bE,extend:ck,equals:r,forEach:bg,injector:ca,noop:k,bind:bQ,toJson:cz,fromJson:W,identity:aO,isUndefined:bM,isDefined:cK,isString:cv,isFunction:J,isObject:c9,isNumber:a4,isArray:bj});aZ();aK.scenario=aK.scenario||{};aK.scenario.output=aK.scenario.output||function(dc,dd){aK.scenario.output[dc]=dd};aK.scenario.dsl=aK.scenario.dsl||function(dc,dd){aK.scenario.dsl[dc]=function(){function de(dk,di){var dg=dk.apply(this,di);if(aK.isFunction(dg)||dg instanceof aK.scenario.Future){return dg}var dh=this;var dj=aK.extend({},dg);aK.forEach(dj,function(dm,dl){if(aK.isFunction(dm)){dj[dl]=function(){return de.call(dh,dm,arguments)}}else{dj[dl]=dm}});return dj}var df=dd.apply(this,arguments);return function(){return de.call(this,df,arguments)}}};aK.scenario.matcher=aK.scenario.matcher||function(dc,dd){aK.scenario.matcher[dc]=function(df){var dg="expect "+this.future.name+" ";if(this.inverse){dg+="not "}var de=this;this.addFuture(dg+dc+" "+aK.toJson(df),function(dh){var di;de.actual=de.future.value;if((de.inverse&&dd.call(de,df))||(!de.inverse&&!dd.call(de,df))){di="expected "+aK.toJson(df)+" but was "+aK.toJson(de.actual)}dh(di)})}};function i(dh,dg){var de=b5.location.href;var dc=cl(u.body);var dd=[];if(dg.scenario_output){dd=dg.scenario_output.split(",")}aK.forEach(aK.scenario.output,function(dl,dj){if(!dd.length||c6(dd,dj)!=-1){var dk=dc.append("<div></div>").find("div:last");dk.attr("id",dj);dl.call({},dk,dh)}});if(!/^http/.test(de)&&!/^https/.test(de)){dc.append('<p id="system-error"></p>');dc.find("#system-error").text("Scenario runner must be run using http or https. The protocol "+de.split(":")[0]+":// is not supported.");return}var di=dc.append('<div id="application"></div>').find("#application");var df=new aK.scenario.Application(di);dh.on("RunnerEnd",function(){di.css("display","none");di.find("iframe").attr("src","about:blank")});dh.on("RunnerError",function(dj){if(b5.console){console.log(ab(dj))}else{alert(dj)}});dh.run(df)}function ac(dg,df,dd){var de=0;function dc(di,dh){if(dh&&dh>de){de=dh}if(di||de>=dg.length){dd(di)}else{try{df(dg[de++],dc)}catch(dj){dd(dj)}}}dc()}function ab(dd,de){de=de||5;var df=dd.toString();if(dd.stack){var dc=dd.stack.split("\n");if(dc[0].indexOf(df)===-1){de++;dc.unshift(dd.message)}df=dc.slice(0,de).join("\n")}return df}function C(dd){var dc=new c2();return function(){var de=(dc.stack||"").split("\n")[dd];if(de){if(de.indexOf("@")!==-1){de=de.substring(de.indexOf("@")+1)}else{de=de.substring(de.indexOf("(")+1).replace(")","")}}return de||""}}function c(dc,dd){if(dc&&!dc.nodeName){dc=dc[0]}if(!dc){return}if(!dd){dd={text:"change",textarea:"change",hidden:"change",password:"change",button:"click",submit:"click",reset:"click",image:"click",checkbox:"click",radio:"click","select-one":"change","select-multiple":"change"}[dc.type]||"click"}if(av(t(dc))=="option"){dc.parentNode.value=dc.value;dc=dc.parentNode;dd="change"}if(aA){switch(dc.type){case"radio":case"checkbox":dc.checked=!dc.checked;break}dc.style.posLeft;dc.fireEvent("on"+dd);if(av(dc.type)=="submit"){while(dc){if(av(dc.nodeName)=="form"){dc.fireEvent("onsubmit");break}dc=dc.parentNode}}}else{var de=u.createEvent("MouseEvents");de.initMouseEvent(dd,true,true,b5,0,0,0,0,0,false,false,false,false,0,dc);dc.dispatchEvent(de)}}(function(dd){var dc=dd.trigger;dd.trigger=function(de){if(/(click|change|keydown)/.test(de)){return this.each(function(df,dg){c(dg,de)})}return dc.apply(this,arguments)}})(cl.fn);cl.fn.bindings=function(dd){function de(dg,df){return df instanceof RegExp?df.test(dg):dg&&dg.indexOf(df)>=0}var dc=[];this.find(".ng-binding:visible").each(function(){var df=new cl(this);if(!aK.isDefined(dd)||de(df.attr("ng:bind"),dd)||de(df.attr("ng:bind-template"),dd)){if(df.is("input, textarea")){dc.push(df.val())}else{dc.push(df.html())}}});return dc};aK.scenario.Application=function(dc){this.context=dc;dc.append('<h2>Current URL: <a href="about:blank">None</a></h2><div id="test-frames"></div>')};aK.scenario.Application.prototype.getFrame_=function(){return this.context.find("#test-frames iframe:last")};aK.scenario.Application.prototype.getWindow_=function(){var dc=this.getFrame_().attr("contentWindow");if(!dc){throw"Frame window is not accessible."}return dc};aK.scenario.Application.prototype.checkUrlStatus_=function(dd,de){var dc=this;cl.ajax({url:dd,type:"HEAD",complete:function(df){if(df.status<200||df.status>=300){if(!df.status){de.call(dc,"Sandbox Error: Cannot access "+dd)}else{de.call(dc,df.status+" "+df.statusText)}}else{de.call(dc)}}})};aK.scenario.Application.prototype.navigateTo=function(dd,de,dg){var dc=this;var df=this.getFrame_();dg=dg||function(dh){throw dh};if(dd==="about:blank"){dg("Sandbox Error: Navigating to about:blank is not allowed.")}else{if(dd.charAt(0)==="#"){dd=df.attr("src").split("#")[0]+dd;df.attr("src",dd);this.executeAction(de)}else{df.css("display","none").attr("src","about:blank");this.checkUrlStatus_(dd,function(dh){if(dh){return dg(dh)}dc.context.find("#test-frames").append("<iframe>");df=this.getFrame_();df.load(function(){df.unbind();try{dc.executeAction(de)}catch(di){dg(di)}}).attr("src",dd)})}}this.context.find("> h2 a").attr("href",dd).text(dd)};aK.scenario.Application.prototype.executeAction=function(de){var dd=this;var df=this.getWindow_();if(!df.document){throw"Sandbox Error: Application document not accessible."}if(!df.angular){return de.call(this,df,cl(df.document))}var dc=df.angular.service.$browser();dc.poll();dc.notifyWhenNoOutstandingRequests(function(){de.call(dd,df,cl(df.document))})};aK.scenario.Describe=function(dd,df){this.only=df&&df.only;this.beforeEachFns=[];this.afterEachFns=[];this.its=[];this.children=[];this.name=dd;this.parent=df;this.id=aK.scenario.Describe.id++;var dc=this.beforeEachFns;this.setupBefore=function(){if(df){df.setupBefore.call(this)}aK.forEach(dc,function(dg){dg.call(this)},this)};var de=this.afterEachFns;this.setupAfter=function(){aK.forEach(de,function(dg){dg.call(this)},this);if(df){df.setupAfter.call(this)}}};aK.scenario.Describe.id=0;aK.scenario.Describe.prototype.beforeEach=function(dc){this.beforeEachFns.push(dc)};aK.scenario.Describe.prototype.afterEach=function(dc){this.afterEachFns.push(dc)};aK.scenario.Describe.prototype.describe=function(dd,dc){var de=new aK.scenario.Describe(dd,this);this.children.push(de);dc.call(de)};aK.scenario.Describe.prototype.ddescribe=function(dd,dc){var de=new aK.scenario.Describe(dd,this);de.only=true;this.children.push(de);dc.call(de)};aK.scenario.Describe.prototype.xdescribe=aK.noop;aK.scenario.Describe.prototype.it=function(dd,dc){this.its.push({definition:this,only:this.only,name:dd,before:this.setupBefore,body:dc,after:this.setupAfter})};aK.scenario.Describe.prototype.iit=function(dd,dc){this.it.apply(this,arguments);this.its[this.its.length-1].only=true};aK.scenario.Describe.prototype.xit=aK.noop;aK.scenario.Describe.prototype.getSpecs=function(){var dd=arguments[0]||[];aK.forEach(this.children,function(de){de.getSpecs(dd)});aK.forEach(this.its,function(de){dd.push(de)});var dc=[];aK.forEach(dd,function(de){if(de.only){dc.push(de)}});return(dc.length&&dc)||dd};aK.scenario.Future=function(dd,de,dc){this.name=dd;this.behavior=de;this.fulfilled=false;this.value=undefined;this.parser=aK.identity;this.line=dc||function(){return""}};aK.scenario.Future.prototype.execute=function(dd){var dc=this;this.behavior(function(df,de){dc.fulfilled=true;if(de){try{de=dc.parser(de)}catch(dg){df=dg}}dc.value=df||de;dd(df,de)})};aK.scenario.Future.prototype.parsedWith=function(dc){this.parser=dc;return this};aK.scenario.Future.prototype.fromJson=function(){return this.parsedWith(aK.fromJson)};aK.scenario.Future.prototype.toJson=function(){return this.parsedWith(aK.toJson)};aK.scenario.ObjectModel=function(de){var dd=this;this.specMap={};this.value={name:"",children:{}};de.on("SpecBegin",function(df){var dg=dd.value;aK.forEach(dd.getDefinitionPath(df),function(dh){if(!dg.children[dh.name]){dg.children[dh.name]={id:dh.id,name:dh.name,children:{},specs:{}}}dg=dg.children[dh.name]});dd.specMap[df.id]=dg.specs[df.name]=new aK.scenario.ObjectModel.Spec(df.id,df.name)});de.on("SpecError",function(df,dg){var dh=dd.getSpec(df.id);dh.status="error";dh.error=dg});de.on("SpecEnd",function(df){var dg=dd.getSpec(df.id);dc(dg)});de.on("StepBegin",function(df,dh){var dg=dd.getSpec(df.id);dg.steps.push(new aK.scenario.ObjectModel.Step(dh.name))});de.on("StepEnd",function(df,dh){var dg=dd.getSpec(df.id);if(dg.getLastStep().name!==dh.name){throw"Events fired in the wrong order. Step names don' match."}dc(dg.getLastStep())});de.on("StepFailure",function(df,dj,dg){var dh=dd.getSpec(df.id);var di=dh.getLastStep();di.error=dg;if(!dh.status){dh.status=di.status="failure"}});de.on("StepError",function(df,dj,dg){var dh=dd.getSpec(df.id);var di=dh.getLastStep();dh.status="error";di.status="error";di.error=dg});function dc(df){df.endTime=new Date().getTime();df.duration=df.endTime-df.startTime;df.status=df.status||"success"}};aK.scenario.ObjectModel.prototype.getDefinitionPath=function(dc){var de=[];var dd=dc.definition;while(dd&&dd.name){de.unshift(dd);dd=dd.parent}return de};aK.scenario.ObjectModel.prototype.getSpec=function(dc){return this.specMap[dc]};aK.scenario.ObjectModel.Spec=function(dd,dc){this.id=dd;this.name=dc;this.startTime=new Date().getTime();this.steps=[]};aK.scenario.ObjectModel.Spec.prototype.addStep=function(dc){var dd=new aK.scenario.ObjectModel.Step(dc);this.steps.push(dd);return dd};aK.scenario.ObjectModel.Spec.prototype.getLastStep=function(){return this.steps[this.steps.length-1]};aK.scenario.ObjectModel.Step=function(dc){this.name=dc;this.startTime=new Date().getTime()};aK.scenario.Describe=function(dd,df){this.only=df&&df.only;this.beforeEachFns=[];this.afterEachFns=[];this.its=[];this.children=[];this.name=dd;this.parent=df;this.id=aK.scenario.Describe.id++;var dc=this.beforeEachFns;this.setupBefore=function(){if(df){df.setupBefore.call(this)}aK.forEach(dc,function(dg){dg.call(this)},this)};var de=this.afterEachFns;this.setupAfter=function(){aK.forEach(de,function(dg){dg.call(this)},this);if(df){df.setupAfter.call(this)}}};aK.scenario.Describe.id=0;aK.scenario.Describe.prototype.beforeEach=function(dc){this.beforeEachFns.push(dc)};aK.scenario.Describe.prototype.afterEach=function(dc){this.afterEachFns.push(dc)};aK.scenario.Describe.prototype.describe=function(dd,dc){var de=new aK.scenario.Describe(dd,this);this.children.push(de);dc.call(de)};aK.scenario.Describe.prototype.ddescribe=function(dd,dc){var de=new aK.scenario.Describe(dd,this);de.only=true;this.children.push(de);dc.call(de)};aK.scenario.Describe.prototype.xdescribe=aK.noop;aK.scenario.Describe.prototype.it=function(dd,dc){this.its.push({definition:this,only:this.only,name:dd,before:this.setupBefore,body:dc,after:this.setupAfter})};aK.scenario.Describe.prototype.iit=function(dd,dc){this.it.apply(this,arguments);this.its[this.its.length-1].only=true};aK.scenario.Describe.prototype.xit=aK.noop;aK.scenario.Describe.prototype.getSpecs=function(){var dd=arguments[0]||[];aK.forEach(this.children,function(de){de.getSpecs(dd)});aK.forEach(this.its,function(de){dd.push(de)});var dc=[];aK.forEach(dd,function(de){if(de.only){dc.push(de)}});return(dc.length&&dc)||dd};aK.scenario.Runner=function(dc){this.listeners=[];this.$window=dc;this.rootDescribe=new aK.scenario.Describe();this.currentDescribe=this.rootDescribe;this.api={it:this.it,iit:this.iit,xit:aK.noop,describe:this.describe,ddescribe:this.ddescribe,xdescribe:aK.noop,beforeEach:this.beforeEach,afterEach:this.afterEach};aK.forEach(this.api,aK.bind(this,function(de,dd){this.$window[dd]=aK.bind(this,de)}))};aK.scenario.Runner.prototype.emit=function(dd){var dc=this;var de=Array.prototype.slice.call(arguments,1);dd=dd.toLowerCase();if(!this.listeners[dd]){return}aK.forEach(this.listeners[dd],function(df){df.apply(dc,de)})};aK.scenario.Runner.prototype.on=function(dc,dd){dc=dc.toLowerCase();this.listeners[dc]=this.listeners[dc]||[];this.listeners[dc].push(dd)};aK.scenario.Runner.prototype.describe=function(de,dc){var dd=this;this.currentDescribe.describe(de,function(){var df=dd.currentDescribe;dd.currentDescribe=this;try{dc.call(this)}finally{dd.currentDescribe=df}})};aK.scenario.Runner.prototype.ddescribe=function(de,dc){var dd=this;this.currentDescribe.ddescribe(de,function(){var df=dd.currentDescribe;dd.currentDescribe=this;try{dc.call(this)}finally{dd.currentDescribe=df}})};aK.scenario.Runner.prototype.it=function(dd,dc){this.currentDescribe.it(dd,dc)};aK.scenario.Runner.prototype.iit=function(dd,dc){this.currentDescribe.iit(dd,dc)};aK.scenario.Runner.prototype.beforeEach=function(dc){this.currentDescribe.beforeEach(dc)};aK.scenario.Runner.prototype.afterEach=function(dc){this.currentDescribe.afterEach(dc)};aK.scenario.Runner.prototype.createSpecRunner_=function(dc){return dc.$new(aK.scenario.SpecRunner)};aK.scenario.Runner.prototype.run=function(dd){var dc=this;var de=aK.scope(this);de.application=dd;this.emit("RunnerBegin");ac(this.rootDescribe.getSpecs(),function(df,di){var dg={};var dh=dc.createSpecRunner_(de);aK.forEach(aK.scenario.dsl,function(dk,dj){dg[dj]=dk.call(de)});aK.forEach(aK.scenario.dsl,function(dk,dj){dc.$window[dj]=function(){var dl=C(3);var dm=aK.scope(dh);dm.dsl={};aK.forEach(dg,function(dp,dn){dm.dsl[dn]=function(){return dg[dn].apply(dm,arguments)}});dm.addFuture=function(){Array.prototype.push.call(arguments,dl);return aK.scenario.SpecRunner.prototype.addFuture.apply(dm,arguments)};dm.addFutureAction=function(){Array.prototype.push.call(arguments,dl);return aK.scenario.SpecRunner.prototype.addFutureAction.apply(dm,arguments)};return dm.dsl[dj].apply(dm,arguments)}});dh.run(df,di)},function(df){if(df){dc.emit("RunnerError",df)}dc.emit("RunnerEnd")})};aK.scenario.SpecRunner=function(){this.futures=[];this.afterIndex=0};aK.scenario.SpecRunner.prototype.run=function(dd,df){var dc=this;this.spec=dd;this.emit("SpecBegin",dd);try{dd.before.call(this);dd.body.call(this);this.afterIndex=this.futures.length;dd.after.call(this)}catch(de){this.emit("SpecError",dd,de);this.emit("SpecEnd",dd);df();return}var dg=function(di,dh){if(dc.error){return dh()}dc.error=true;dh(null,dc.afterIndex)};ac(this.futures,function(dh,di){dc.step=dh;dc.emit("StepBegin",dd,dh);try{dh.execute(function(dk){if(dk){dc.emit("StepFailure",dd,dh,dk);dc.emit("StepEnd",dd,dh);return dg(dk,di)}dc.emit("StepEnd",dd,dh);dc.$window.setTimeout(function(){di()},0)})}catch(dj){dc.emit("StepError",dd,dh,dj);dc.emit("StepEnd",dd,dh);dg(dj,di)}},function(dh){if(dh){dc.emit("SpecError",dd,dh)}dc.emit("SpecEnd",dd);dc.$window.setTimeout(function(){df()},0)})};aK.scenario.SpecRunner.prototype.addFuture=function(de,df,dd){var dc=new aK.scenario.Future(de,aK.bind(this,df),dd);this.futures.push(dc);return dc};aK.scenario.SpecRunner.prototype.addFutureAction=function(de,df,dc){var dd=this;return this.addFuture(de,function(dg){this.application.executeAction(function(dj,di){di.elements=function(dl){var dm=Array.prototype.slice.call(arguments,1);dl=(dd.selector||"")+" "+(dl||"");dl=cl.trim(dl)||"*";aK.forEach(dm,function(dp,dn){dl=dl.replace("$"+(dn+1),dp)});var dk=di.find(dl);if(!dk.length){throw {type:"selector",message:"Selector "+dl+" did not match any elements."}}return dk};try{df.call(dd,dj,di,dg)}catch(dh){if(dh.type&&dh.type==="selector"){dg(dh.message)}else{throw dh}}})},dc)};aK.scenario.dsl("wait",function(){return function(){return this.addFuture("waiting for you to resume",function(dc){this.emit("InteractiveWait",this.spec,this.step);this.$window.resume=function(){dc()}})}});aK.scenario.dsl("pause",function(){return function(dc){return this.addFuture("pause for "+dc+" seconds",function(dd){this.$window.setTimeout(function(){dd(null,dc*1000)},dc*1000)})}});aK.scenario.dsl("browser",function(){var dc={};dc.navigateTo=function(de,df){var dd=this.application;return this.addFuture("browser navigate to '"+de+"'",function(dg){if(df){de=df.call(this,de)}dd.navigateTo(de,function(){dg(null,de)},dg)})};dc.reload=function(){var dd=this.application;return this.addFutureAction("browser reload",function(dh,dg,de){var df=dh.location.href;dd.navigateTo(df,function(){de(null,df)},de)})};dc.location=function(){var dd={};dd.href=function(){return this.addFutureAction("browser url",function(dg,df,de){de(null,dg.location.href)})};dd.hash=function(){return this.addFutureAction("browser url hash",function(dg,df,de){de(null,dg.location.hash.replace("#",""))})};dd.path=function(){return this.addFutureAction("browser url path",function(dg,df,de){de(null,dg.location.pathname)})};dd.search=function(){return this.addFutureAction("browser url search",function(dg,df,de){de(null,dg.angular.scope().$location.search)})};dd.hashSearch=function(){return this.addFutureAction("browser url hash search",function(dg,df,de){de(null,dg.angular.scope().$location.hashSearch)})};dd.hashPath=function(){return this.addFutureAction("browser url hash path",function(dg,df,de){de(null,dg.angular.scope().$location.hashPath)})};return dd};return function(dd){return dc}});aK.scenario.dsl("expect",function(){var dc=aK.extend({},aK.scenario.matcher);dc.not=function(){this.inverse=true;return dc};return function(dd){this.future=dd;return dc}});aK.scenario.dsl("using",function(){return function(dc,dd){this.selector=cl.trim((this.selector||"")+" "+dc);if(aK.isString(dd)&&dd.length){this.label=dd+" ( "+this.selector+" )"}else{this.label=this.selector}return this.dsl}});aK.scenario.dsl("binding",function(){return function(dc){return this.addFutureAction("select binding '"+dc+"'",function(dg,df,dd){var de=df.elements().bindings(dc);if(!de.length){return dd("Binding selector '"+dc+"' did not match.")}dd(null,de[0])})}});aK.scenario.dsl("input",function(){var dc={};dc.enter=function(dd){return this.addFutureAction("input '"+this.name+"' enter '"+dd+"'",function(dh,dg,de){var df=dg.elements(':input[name="$1"]',this.name);df.val(dd);df.trigger("change");de()})};dc.check=function(){return this.addFutureAction("checkbox '"+this.name+"' toggle",function(dg,df,dd){var de=df.elements(':checkbox[name="$1"]',this.name);de.trigger("click");dd()})};dc.select=function(dd){return this.addFutureAction("radio button '"+this.name+"' toggle '"+dd+"'",function(dh,dg,de){var df=dg.elements(':radio[name$="@$1"][value="$2"]',this.name,dd);df.trigger("click");de()})};return function(dd){this.name=dd;return dc}});aK.scenario.dsl("repeater",function(){var dc={};dc.count=function(){return this.addFutureAction("repeater '"+this.label+"' count",function(dg,df,dd){try{dd(null,df.elements().length)}catch(de){dd(null,0)}})};dc.column=function(dd){return this.addFutureAction("repeater '"+this.label+"' column '"+dd+"'",function(dg,df,de){de(null,df.elements().bindings(dd))})};dc.row=function(dd){return this.addFutureAction("repeater '"+this.label+"' row '"+dd+"'",function(di,dh,de){var df=[];var dg=dh.elements().slice(dd,dd+1);if(!dg.length){return de("row "+dd+" out of bounds")}de(null,dg.bindings())})};return function(dd,de){this.dsl.using(dd,de);return dc}});aK.scenario.dsl("select",function(){var dc={};dc.option=function(dd){return this.addFutureAction("select '"+this.name+"' option '"+dd+"'",function(dh,dg,df){var de=dg.elements('select[name="$1"]',this.name);de.val(dd);de.trigger("change");df()})};dc.options=function(){var dd=arguments;return this.addFutureAction("select '"+this.name+"' options '"+dd+"'",function(dh,dg,df){var de=dg.elements('select[multiple][name="$1"]',this.name);de.val(dd);de.trigger("change");df()})};return function(dd){this.name=dd;return dc}});aK.scenario.dsl("element",function(){var dc=["attr","css"];var de=["val","text","html","height","innerHeight","outerHeight","width","innerWidth","outerWidth","position","scrollLeft","scrollTop","offset"];var dd={};dd.count=function(){return this.addFutureAction("element '"+this.label+"' count",function(di,dh,df){try{df(null,dh.elements().length)}catch(dg){df(null,0)}})};dd.click=function(){return this.addFutureAction("element '"+this.label+"' click",function(dj,di,df){var dh=di.elements();var dg=dh.attr("href");dh.trigger("click");if(dg&&dh[0].nodeName.toUpperCase()==="A"){this.application.navigateTo(dg,function(){df()},df)}else{df()}})};dd.query=function(df){return this.addFutureAction("element "+this.label+" custom query",function(di,dh,dg){df.call(this,dh.elements(),dg)})};aK.forEach(dc,function(df){dd[df]=function(dg,di){var dh="element '"+this.label+"' get "+df+" '"+dg+"'";if(aK.isDefined(di)){dh="element '"+this.label+"' set "+df+" '"+dg+"' to '"+di+"'"}return this.addFutureAction(dh,function(dm,dl,dj){var dk=dl.elements();dj(null,dk[df].call(dk,dg,di))})}});aK.forEach(de,function(df){dd[df]=function(dh){var dg="element '"+this.label+"' "+df;if(aK.isDefined(dh)){dg="element '"+this.label+"' set "+df+" to '"+dh+"'"}return this.addFutureAction(dg,function(dl,dk,di){var dj=dk.elements();di(null,dj[df].call(dj,dh))})}});return function(df,dg){this.dsl.using(df,dg);return dd}});aK.scenario.matcher("toEqual",function(dc){return aK.equals(this.actual,dc)});aK.scenario.matcher("toBe",function(dc){return this.actual===dc});aK.scenario.matcher("toBeDefined",function(){return aK.isDefined(this.actual)});aK.scenario.matcher("toBeTruthy",function(){return this.actual});aK.scenario.matcher("toBeFalsy",function(){return !this.actual});aK.scenario.matcher("toMatch",function(dc){return new RegExp(dc).test(this.actual)});aK.scenario.matcher("toBeNull",function(){return this.actual===null});aK.scenario.matcher("toContain",function(dc){return x(this.actual,dc)});aK.scenario.matcher("toBeLessThan",function(dc){return this.actual<dc});aK.scenario.matcher("toBeGreaterThan",function(dc){return this.actual>dc});aK.scenario.output("html",function(df,dh){var de=new aK.scenario.ObjectModel(dh);df.append('<div id="header"> <h1><span class="angular">&lt;angular/&gt;</span>: Scenario Test Runner</h1> <ul id="status-legend" class="status-display"> <li class="status-error">0 Errors</li> <li class="status-failure">0 Failures</li> <li class="status-success">0 Passed</li> </ul></div><div id="specs"> <div class="test-children"></div></div>');dh.on("InteractiveWait",function(di,dj){var dk=de.getSpec(di.id).getLastStep().ui;dk.find(".test-title").html('waiting for you to <a href="javascript:resume()">resume</a>.')});dh.on("SpecBegin",function(di){var dj=dg(di);dj.find("> .tests").append('<li class="status-pending test-it"></li>');dj=dj.find("> .tests li:last");dj.append('<div class="test-info"> <p class="test-title"> <span class="timer-result"></span> <span class="test-name"></span> </p></div><div class="scrollpane"> <ol class="test-actions"></ol></div>');dj.find("> .test-info .test-name").text(di.name);dj.find("> .test-info").click(function(){var dl=dj.find("> .scrollpane");var dm=dl.find("> .test-actions");var dk=df.find("> .test-info .test-name");if(dm.find(":visible").length){dm.hide();dk.removeClass("open").addClass("closed")}else{dm.show();dl.attr("scrollTop",dl.attr("scrollHeight"));dk.removeClass("closed").addClass("open")}});de.getSpec(di.id).ui=dj});dh.on("SpecError",function(di,dj){var dk=de.getSpec(di.id).ui;dk.append("<pre></pre>");dk.find("> pre").text(ab(dj))});dh.on("SpecEnd",function(di){di=de.getSpec(di.id);di.ui.removeClass("status-pending");di.ui.addClass("status-"+di.status);di.ui.find("> .test-info .timer-result").text(di.duration+"ms");if(di.status==="success"){di.ui.find("> .test-info .test-name").addClass("closed");di.ui.find("> .scrollpane .test-actions").hide()}dd(di.status)});dh.on("StepBegin",function(di,dk){di=de.getSpec(di.id);dk=di.getLastStep();di.ui.find("> .scrollpane .test-actions").append('<li class="status-pending"></li>');dk.ui=di.ui.find("> .scrollpane .test-actions li:last");dk.ui.append('<div class="timer-result"></div><div class="test-title"></div>');dk.ui.find("> .test-title").text(dk.name);var dj=dk.ui.parents(".scrollpane");dj.attr("scrollTop",dj.attr("scrollHeight"))});dh.on("StepFailure",function(di,dk,dj){var dl=de.getSpec(di.id).getLastStep().ui;dc(dl,dk.line,dj)});dh.on("StepError",function(di,dk,dj){var dl=de.getSpec(di.id).getLastStep().ui;dc(dl,dk.line,dj)});dh.on("StepEnd",function(di,dk){di=de.getSpec(di.id);dk=di.getLastStep();dk.ui.find(".timer-result").text(dk.duration+"ms");dk.ui.removeClass("status-pending");dk.ui.addClass("status-"+dk.status);var dj=di.ui.find("> .scrollpane");dj.attr("scrollTop",dj.attr("scrollHeight"))});function dg(di){var dj=df.find("#specs");aK.forEach(de.getDefinitionPath(di),function(dk){var dl="describe-"+dk.id;if(!df.find("#"+dl).length){dj.find("> .test-children").append('<div class="test-describe" id="'+dl+'"> <h2></h2> <div class="test-children"></div> <ul class="tests"></ul></div>');df.find("#"+dl).find("> h2").text("describe: "+dk.name)}dj=df.find("#"+dl)});return df.find("#describe-"+di.definition.id)}function dd(di){var dj=df.find("#status-legend .status-"+di);var dl=dj.text().split(" ");var dk=(dl[0]*1)+1;dj.text(dk+" "+dl[1])}function dc(dk,di,dj){dk.find(".test-title").append("<pre></pre>");var dl=cl.trim(di()+"\n\n"+ab(dj));dk.find(".test-title pre:last").text(dl)}});aK.scenario.output("json",function(dd,de){var dc=new aK.scenario.ObjectModel(de);de.on("RunnerEnd",function(){dd.text(aK.toJson(dc.value))})});aK.scenario.output("xml",function(dd,df){var dc=new aK.scenario.ObjectModel(df);var dg=function(dh){return new dd.init(dh)};df.on("RunnerEnd",function(){var dh=dg("<scenario></scenario>");dd.append(dh);de(dh,dc.value)});function de(dj,dh){aK.forEach(dh.children,function(dl){var dk=dg("<describe></describe>");dk.attr("id",dl.id);dk.attr("name",dl.name);dj.append(dk);de(dk,dl)});var di=dg("<its></its>");dj.append(di);aK.forEach(dh.specs,function(dk){var dl=dg("<it></it>");dl.attr("id",dk.id);dl.attr("name",dk.name);dl.attr("duration",dk.duration);dl.attr("status",dk.status);di.append(dl);aK.forEach(dk.steps,function(dp){var dn=dg("<step></step>");dn.attr("name",dp.name);dn.attr("duration",dp.duration);dn.attr("status",dp.status);dl.append(dn);if(dp.error){var dm=dg("<error></error");dn.append(dm);dm.text(ab(dn.error))}})})}});aK.scenario.output("object",function(dc,dd){dd.$window.$result=new aK.scenario.ObjectModel(dd).value});var at=new aK.scenario.Runner(b5);c3(u).ready(function(){i(at,bT(u))})})(window,document);angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";\n\n.ng-format-negative {\n color: red;\n}\n\n.ng-exception {\n border: 2px solid #FF0000;\n font-family: "Courier New", Courier, monospace;\n font-size: smaller;\n white-space: pre;\n}\n\n.ng-validation-error {\n border: 2px solid #FF0000;\n}\n\n\n/*****************\n * TIP\n *****************/\n#ng-callout {\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n font-size: 13px;\n font-weight: normal;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n vertical-align: baseline;\n background: transparent;\n text-decoration: none;\n}\n\n#ng-callout .ng-arrow-left{\n background-image: url("data:image/gif;base64,R0lGODlhCwAXAKIAAMzMzO/v7/f39////////wAAAAAAAAAAACH5BAUUAAQALAAAAAALABcAAAMrSLoc/AG8FeUUIN+sGebWAnbKSJodqqlsOxJtqYooU9vvk+vcJIcTkg+QAAA7");\n background-repeat: no-repeat;\n background-position: left top;\n position: absolute;\n z-index:101;\n left:-12px;\n height:23px;\n width:10px;\n top:-3px;\n}\n\n#ng-callout .ng-arrow-right{\n background-image: url("data:image/gif;base64,R0lGODlhCwAXAKIAAMzMzO/v7/f39////////wAAAAAAAAAAACH5BAUUAAQALAAAAAALABcAAAMrCLTcoM29yN6k9socs91e5X3EyJloipYrO4ohTMqA0Fn2XVNswJe+H+SXAAA7");\n background-repeat: no-repeat;\n background-position: left top;\n position: absolute;\n z-index:101;\n height:23px;\n width:11px;\n top:-2px;\n}\n\n#ng-callout {\n position: absolute;\n z-index:100;\n border: 2px solid #CCCCCC;\n background-color: #fff;\n}\n\n#ng-callout .ng-content{\n padding:10px 10px 10px 10px;\n color:#333333;\n}\n\n#ng-callout .ng-title{\n background-color: #CCCCCC;\n text-align: left;\n padding-left: 8px;\n padding-bottom: 5px;\n padding-top: 2px;\n font-weight:bold;\n}\n\n\n/*****************\n * indicators\n *****************/\n.ng-input-indicator-wait {\n background-image: url("data:image/png;base64,R0lGODlhEAAQAPQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+vhQUFJycnAQEBDY2NmhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlWDgrNRIwnO4UKBXDufzQvDMaoSDBgFb886MiQadgNABAokfCwzBA8LCg0Egl8jAggGAA1kBIA1BAYzlyILczULC2UhACH5BAkKAAAALAAAAAAQABAAAAV2ICACAmlAZTmOREEIyUEQjLKKxPHADhEvqxlgcGgkGI1DYSVAIAWMx+lwSKkICJ0QsHi9RgKBwnVTiRQQgwF4I4UFDQQEwi6/3YSGWRRmjhEETAJfIgMFCnAKM0KDV4EEEAQLiF18TAYNXDaSe3x6mjidN1s3IQAh+QQJCgAAACwAAAAAEAAQAAAFeCAgAgLZDGU5jgRECEUiCI+yioSDwDJyLKsXoHFQxBSHAoAAFBhqtMJg8DgQBgfrEsJAEAg4YhZIEiwgKtHiMBgtpg3wbUZXGO7kOb1MUKRFMysCChAoggJCIg0GC2aNe4gqQldfL4l/Ag1AXySJgn5LcoE3QXI3IQAh+QQJCgAAACwAAAAAEAAQAAAFdiAgAgLZNGU5joQhCEjxIssqEo8bC9BRjy9Ag7GILQ4QEoE0gBAEBcOpcBA0DoxSK/e8LRIHn+i1cK0IyKdg0VAoljYIg+GgnRrwVS/8IAkICyosBIQpBAMoKy9dImxPhS+GKkFrkX+TigtLlIyKXUF+NjagNiEAIfkECQoAAAAsAAAAABAAEAAABWwgIAICaRhlOY4EIgjH8R7LKhKHGwsMvb4AAy3WODBIBBKCsYA9TjuhDNDKEVSERezQEL0WrhXucRUQGuik7bFlngzqVW9LMl9XWvLdjFaJtDFqZ1cEZUB0dUgvL3dgP4WJZn4jkomWNpSTIyEAIfkECQoAAAAsAAAAABAAEAAABX4gIAICuSxlOY6CIgiD8RrEKgqGOwxwUrMlAoSwIzAGpJpgoSDAGifDY5kopBYDlEpAQBwevxfBtRIUGi8xwWkDNBCIwmC9Vq0aiQQDQuK+VgQPDXV9hCJjBwcFYU5pLwwHXQcMKSmNLQcIAExlbH8JBwttaX0ABAcNbWVbKyEAIfkECQoAAAAsAAAAABAAEAAABXkgIAICSRBlOY7CIghN8zbEKsKoIjdFzZaEgUBHKChMJtRwcWpAWoWnifm6ESAMhO8lQK0EEAV3rFopIBCEcGwDKAqPh4HUrY4ICHH1dSoTFgcHUiZjBhAJB2AHDykpKAwHAwdzf19KkASIPl9cDgcnDkdtNwiMJCshACH5BAkKAAAALAAAAAAQABAAAAV3ICACAkkQZTmOAiosiyAoxCq+KPxCNVsSMRgBsiClWrLTSWFoIQZHl6pleBh6suxKMIhlvzbAwkBWfFWrBQTxNLq2RG2yhSUkDs2b63AYDAoJXAcFRwADeAkJDX0AQCsEfAQMDAIPBz0rCgcxky0JRWE1AmwpKyEAIfkECQoAAAAsAAAAABAAEAAABXkgIAICKZzkqJ4nQZxLqZKv4NqNLKK2/Q4Ek4lFXChsg5ypJjs1II3gEDUSRInEGYAw6B6zM4JhrDAtEosVkLUtHA7RHaHAGJQEjsODcEg0FBAFVgkQJQ1pAwcDDw8KcFtSInwJAowCCA6RIwqZAgkPNgVpWndjdyohACH5BAkKAAAALAAAAAAQABAAAAV5ICACAimc5KieLEuUKvm2xAKLqDCfC2GaO9eL0LABWTiBYmA06W6kHgvCqEJiAIJiu3gcvgUsscHUERm+kaCxyxa+zRPk0SgJEgfIvbAdIAQLCAYlCj4DBw0IBQsMCjIqBAcPAooCBg9pKgsJLwUFOhCZKyQDA3YqIQAh+QQJCgAAACwAAAAAEAAQAAAFdSAgAgIpnOSonmxbqiThCrJKEHFbo8JxDDOZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQJCgAAACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==");\n background-position: right;\n background-repeat: no-repeat;\n}\n</style>');angular.element(document).find("head").append("<style type=\"text/css\">@charset \"UTF-8\";\n/* CSS Document */\n\n/** Structure */\nbody {\n font-family: Arial, sans-serif;\n margin: 0;\n font-size: 14px;\n}\n\n#system-error {\n font-size: 1.5em;\n text-align: center;\n}\n\n#json, #xml {\n display: none;\n}\n\n#header {\n position: fixed;\n width: 100%;\n}\n\n#specs {\n padding-top: 50px;\n}\n\n#header .angular {\n font-family: Courier New, monospace;\n font-weight: bold;\n}\n\n#header h1 {\n font-weight: normal;\n float: left;\n font-size: 30px;\n line-height: 30px;\n margin: 0;\n padding: 10px 10px;\n height: 30px;\n}\n\n#application h2,\n#specs h2 {\n margin: 0;\n padding: 0.5em;\n font-size: 1.1em;\n}\n\n#status-legend {\n margin-top: 10px;\n margin-right: 10px;\n}\n\n#header,\n#application,\n.test-info,\n.test-actions li {\n overflow: hidden;\n}\n\n#application {\n margin: 10px;\n}\n\n#application iframe {\n width: 100%;\n height: 758px;\n}\n\n#application .popout {\n float: right;\n}\n\n#application iframe {\n border: none;\n}\n\n.tests li,\n.test-actions li,\n.test-it li,\n.test-it ol,\n.status-display {\n list-style-type: none;\n}\n\n.tests,\n.test-it ol,\n.status-display {\n margin: 0;\n padding: 0;\n}\n\n.test-info {\n margin-left: 1em;\n margin-top: 0.5em;\n border-radius: 8px 0 0 8px;\n -webkit-border-radius: 8px 0 0 8px;\n -moz-border-radius: 8px 0 0 8px;\n cursor: pointer;\n}\n\n.test-info:hover .test-name {\n text-decoration: underline;\n}\n\n.test-info .closed:before {\n content: '\\25b8\\00A0';\n}\n\n.test-info .open:before {\n content: '\\25be\\00A0';\n font-weight: bold;\n}\n\n.test-it ol {\n margin-left: 2.5em;\n}\n\n.status-display,\n.status-display li {\n float: right;\n}\n\n.status-display li {\n padding: 5px 10px;\n}\n\n.timer-result,\n.test-title {\n display: inline-block;\n margin: 0;\n padding: 4px;\n}\n\n.test-actions .test-title,\n.test-actions .test-result {\n display: table-cell;\n padding-left: 0.5em;\n padding-right: 0.5em;\n}\n\n.test-actions {\n display: table;\n}\n\n.test-actions li {\n display: table-row;\n}\n\n.timer-result {\n width: 4em;\n padding: 0 10px;\n text-align: right;\n font-family: monospace;\n}\n\n.test-it pre,\n.test-actions pre {\n clear: left;\n color: black;\n margin-left: 6em;\n}\n\n.test-describe {\n padding-bottom: 0.5em;\n}\n\n.test-describe .test-describe {\n margin: 5px 5px 10px 2em;\n}\n\n.test-actions .status-pending .test-title:before {\n content: '\\00bb\\00A0';\n}\n\n.scrollpane {\n max-height: 20em;\n overflow: auto;\n}\n\n/** Colors */\n\n#header {\n background-color: #F2C200;\n}\n\n#specs h2 {\n border-top: 2px solid #BABAD1;\n}\n\n#specs h2,\n#application h2 {\n background-color: #efefef;\n}\n\n#application {\n border: 1px solid #BABAD1;\n}\n\n.test-describe .test-describe {\n border-left: 1px solid #BABAD1;\n border-right: 1px solid #BABAD1;\n border-bottom: 1px solid #BABAD1;\n}\n\n.status-display {\n border: 1px solid #777;\n}\n\n.status-display .status-pending,\n.status-pending .test-info {\n background-color: #F9EEBC;\n}\n\n.status-display .status-success,\n.status-success .test-info {\n background-color: #B1D7A1;\n}\n\n.status-display .status-failure,\n.status-failure .test-info {\n background-color: #FF8286;\n}\n\n.status-display .status-error,\n.status-error .test-info {\n background-color: black;\n color: white;\n}\n\n.test-actions .status-success .test-title {\n color: #30B30A;\n}\n\n.test-actions .status-failure .test-title {\n color: #DF0000;\n}\n\n.test-actions .status-error .test-title {\n color: black;\n}\n\n.test-actions .timer-result {\n color: #888;\n}\n</style>");
admin/client/components/List/ListFiltersAdd.js
Tangcuyu/keystone
import React from 'react'; import ReactDOM from 'react-dom'; import Transition from 'react-addons-css-transition-group'; import classnames from 'classnames'; import CurrentListStore from '../../stores/CurrentListStore'; import ListFiltersAddForm from './ListFiltersAddForm'; import Popout from '../Popout'; import PopoutList from '../Popout/PopoutList'; import { Button, FormField, FormInput, InputGroup } from 'elemental'; var ListFiltersAdd = React.createClass({ displayName: 'ListFiltersAdd', propTypes: { className: React.PropTypes.string.isRequired, maxHeight: React.PropTypes.number, }, getDefaultProps () { return { maxHeight: 360, }; }, getInitialState () { return { innerHeight: 0, isOpen: false, searchString: '', selectedField: false, ...this.getStateFromStore(), }; }, componentDidMount () { CurrentListStore.addChangeListener(this.updateStateFromStore); }, componentWillReceiveProps (nextProps) { this.setState({ isOpen: nextProps.isOpen }); }, componentWillUnmount () { CurrentListStore.removeChangeListener(this.updateStateFromStore); }, getStateFromStore () { return { activeFilters: CurrentListStore.getActiveFilters(), availableFilters: CurrentListStore.getAvailableFilters(), }; }, updateStateFromStore () { this.setState(this.getStateFromStore()); }, updateSearch (e) { this.setState({ searchString: e.target.value }); }, openPopout () { this.setState({ isOpen: true }, this.focusSearch); }, closePopout () { this.setState({ isOpen: false, selectedField: false, searchString: '', innerHeight: 0 }); }, setPopoutHeight (height) { this.setState({ innerHeight: Math.min(this.props.maxHeight, height) }); }, navigateBack () { this.setState({ selectedField: false, searchString: '', innerHeight: 0, }, this.focusSearch); }, focusSearch () { ReactDOM.findDOMNode(this.refs.search).focus(); }, selectField (field) { this.setState({ selectedField: field, }); }, applyFilter (value) { CurrentListStore.setFilter(this.state.selectedField.path, value); this.closePopout(); }, renderList () { const activeFilterFields = this.state.activeFilters.map(obj => obj.field); const activeFilterPaths = activeFilterFields.map(obj => obj.path); const { availableFilters, searchString } = this.state; let filteredFilters = availableFilters; if (searchString) { filteredFilters = filteredFilters .filter(filter => filter.type !== 'heading') .filter(filter => new RegExp(searchString).test(filter.field.label.toLowerCase())); } var popoutList = filteredFilters.map((el, i) => { if (el.type === 'heading') { return <PopoutList.Heading key={'heading_' + i}>{el.content}</PopoutList.Heading>; } var filterIsActive = activeFilterPaths.length && (activeFilterPaths.indexOf(el.field.path) > -1); return ( <PopoutList.Item key={'item_' + el.field.path} icon={filterIsActive ? 'check' : 'chevron-right'} iconHover={filterIsActive ? 'check' : 'chevron-right'} isSelected={!!filterIsActive} label={el.field.label} onClick={() => { this.selectField(el.field); }} /> ); }); return ( <Popout.Pane onLayout={this.setPopoutHeight} key="list"> <Popout.Body> <FormField style={{ borderBottom: '1px dashed rgba(0,0,0,0.1)', paddingBottom: '1em' }}> <FormInput ref="search" value={this.state.searchString} onChange={this.updateSearch} placeholder="Find a filter..." /> </FormField> {popoutList} </Popout.Body> </Popout.Pane> ); }, renderForm () { return ( <Popout.Pane onLayout={this.setPopoutHeight} key="form"> <ListFiltersAddForm field={this.state.selectedField} onApply={this.applyFilter} onCancel={this.closePopout} onBack={this.navigateBack} maxHeight={this.props.maxHeight} onHeightChange={this.setPopoutHeight} /> </Popout.Pane> ); }, render () { const { selectedField } = this.state; const popoutBodyStyle = this.state.innerHeight ? { height: this.state.innerHeight } : null; const popoutPanesClassname = classnames('Popout__panes', { 'Popout__scrollable-area': !selectedField, }); return ( <InputGroup.Section className={this.props.className}> <Button id="listHeaderFilterButton" isActive={this.state.isOpen} onClick={this.state.isOpen ? this.closePopout : this.openPopout}> <span className={this.props.className + '__icon octicon octicon-eye'} /> <span className={this.props.className + '__label'}>Filter</span> <span className="disclosure-arrow" /> </Button> <Popout isOpen={this.state.isOpen} onCancel={this.closePopout} relativeToID="listHeaderFilterButton"> <Popout.Header leftAction={selectedField ? this.navigateBack : null} leftIcon={selectedField ? 'chevron-left' : null} title={selectedField ? selectedField.label : 'Filter'} transitionDirection={selectedField ? 'next' : 'prev'} /> <Transition style={popoutBodyStyle} className={popoutPanesClassname} transitionName={selectedField ? 'Popout__pane-next' : 'Popout__pane-prev'} component="div"> {selectedField ? this.renderForm() : this.renderList()} </Transition> </Popout> </InputGroup.Section> ); }, }); module.exports = ListFiltersAdd;
test/Tests.js
DanGrund/Daily-Bullet
import React from 'react'; import {expect, assert} from 'chai'; import { shallow, mount, render } from 'enzyme'; import sinon from 'sinon'; import jsdom from 'jsdom-global/register'; import Main from '../lib/Components/Main'; import TaskItem from '../lib/Components/TaskItem'; import DailyList from '../lib/Components/DailyList'; import IdeaInput from '../lib/Components/IdeaInput'; // import filterTasks from './helpers/filterTasks'; import SearchBar from '../lib/Components/SearchBar'; // import Login from './helpers/Login'; describe('<Main />', () => { it('should render a <div>', () => { const wrapper = shallow(<Main />) assert.equal(wrapper.type(), 'div'); }); it('should render one <IdeaInput /> component if a user is logged in', () => { const wrapper = shallow(<Main />) wrapper.setState({ user: {displayName: "Lauren Pesce"}}) it('should have a state of tasks that is an empty array', () => { const wrapper = shallow(<Main />) expect(wrapper.state().tasks).to.deep.equal([]); }); it('should have a state of searchTasks that is an empty string', () => { const wrapper = shallow(<Main />) expect(wrapper.state().searchTasks).to.deep.equal(''); }); it('should have a state of user that is null', () => { const wrapper = shallow(<Main />) expect(wrapper.state().user).to.deep.equal(null); }); it('should render a login screen', () => { let wrapper = shallow(<Main />); expect(wrapper.find('Login')).to.have.length(1); expect(wrapper.text()).to.equal('Please Log In<Login />'); }); it('should call componentDidMount', () => { sinon.spy(Main.prototype, 'componentDidMount'); const wrapper = mount(<Main />); expect(Main.prototype.componentDidMount.calledOnce).to.equal(true); }); it.skip('should call handleSearch', () => { sinon.spy(Main.prototype, 'handleSearch'); const wrapper = mount(<Main />); expect(Main.prototype.handleSearch.called).to.equal(true); }); it.skip('should have multiple components',() =>{ const user = {email:"[email protected]"} const tasks = [{firebaseId:'-Ka4DLhUcPqjsEUr3923', id: 1483998849935, title: "sdfsdfsdf"}] const wrapper = mount(<Main />) wrapper.state().user = user wrapper.state().tasks = tasks wrapper.update(); expect(wrapper.find('DailyList').length).to.equal(1); expect(wrapper.find('IdeaInput').length).to.equal(1); expect(wrapper.find('SearchBar').length).to.equal(1); }); }); describe('<IdeaInput />', () => { it('should render a <div>', () => { const wrapper = shallow(<IdeaInput />) assert.equal(wrapper.type(), 'div'); }); it.skip('should have a state of newTask that is an empty object with a value of an empty string', () => { const wrapper = shallow(<IdeaInput />) expect(wrapper.state.newTask).to.deep.equal({value: ''}) }); it('should change state of newTask on onChange', () => { const wrapper = mount(<IdeaInput/>); const input = wrapper.find('.journalInput'); input.simulate('change', {target: { value: 'alligator' }}); expect(wrapper.state('newTask').value).to.equal('alligator'); }) }); describe('<DailyList />', () => { it.skip('should render a <div>', () => { const wrapper = shallow(<DailyList />) assert.equal(wrapper.type(), 'div'); }); it.skip('should render a <ul>', () => { const wrapper = shallow(<DailyList />) assert.equal(wrapper.type(), 'ul'); }); }); describe('<SearchBar />', () => { it('should render an <input>', () => { const wrapper = shallow(<SearchBar />) assert.equal(wrapper.type(), 'input'); }); }); describe('<TaskItem />', () => { it('renders a div elements', () => { const wrapper = shallow(<TaskItem />) assert.equal(wrapper.type(), 'div'); }); }); });
src/FixedDataTableRoot.js
MalucoMarinero/fixed-data-table-backup
/** * Copyright (c) 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 FixedDataTableRoot */ "use strict"; if (__DEV__) { var ExecutionEnvironment = require('ExecutionEnvironment'); if (ExecutionEnvironment.canUseDOM && window.top === window.self) { if (!Object.assign) { console.error( 'FixedDataTable expected an ES6 compatible `Object.assign` polyfill.' ); } } } var FixedDataTable = require('FixedDataTable.react'); var FixedDataTableColumn = require('FixedDataTableColumn.react'); var FixedDataTableColumnGroup = require('FixedDataTableColumnGroup.react'); var FixedDataTableRoot = { Column: FixedDataTableColumn, ColumnGroup: FixedDataTableColumnGroup, Table: FixedDataTable, }; FixedDataTableRoot.version = '0.1.1'; module.exports = FixedDataTableRoot;
ajax/libs/omniscient/3.0.0/omniscient.min.js
keicheng/cdnjs
/** * Omniscient.js v2.1.0 * Authors: @torgeir,@mikaelbr ***************************************/ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.omniscient=e()}}(function(){return function e(t,n,r){function o(i,f){if(!n[i]){if(!t[i]){var s="function"==typeof require&&require;if(!f&&s)return s(i,!0);if(u)return u(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var a=n[i]={exports:{}};t[i][0].call(a.exports,function(e){var n=t[i][1][e];return o(n?n:e)},a,a.exports,e,t,n,r)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(e,t){function n(e,t,n){var r=s(e,t,n),o=c(r.mixins),u={displayName:r.displayName,mixins:r.mixins,render:function(){return C&&C.call(this,"render"),r.render.call(this,this.props,this.props.statics)}};o&&(u.statics=o,a(r.mixins));var i=j.createClass(u),f=function(e,t){var n=x(arguments).filter(j.isValidElement);return"object"==typeof e&&(t=e,e=void 0),t||(t={}),d(t)&&(t={cursor:t}),e&&(t.key=e),n.length&&(t.children=n),j.createElement(i,t)};return f.jsx=i,o&&(f=l(f,o)),f}function r(e,n){var r=t.exports.isEqualState,s=m(b(g,v)),c=h(o(e),s),a=h(o(this.props),s),l=Object.keys(c),p=Object.keys(a);return p.length!==l.length?(C&&C.call(this,"shouldComponentUpdate => true (number of cursors differ)"),!0):u(p,a,c)?(C&&C.call(this,"shouldComponentUpdate => true (cursors have different keys)"),!0):i(a,c)?(C&&C.call(this,"shouldComponentUpdate => true (cursors have changed)"),!0):r(this.state,n)?f(a,c)?(C&&C.call(this,"shouldComponentUpdate => true (properties have changed)"),!0):(C&&C.call(this,"shouldComponentUpdate => false"),!1):(C&&C.call(this,"shouldComponentUpdate => true (state has changed)"),!0)}function o(e){return e?d(e)?{_dummy_key:e}:"object"!=typeof e?{_dummy_key:e}:e:{}}function u(e,t,n){return!e.every(function(e){return"undefined"!=typeof t[e]&&"undefined"!=typeof n[e]})}function i(e,n){e=h(e,d),n=h(n,d);var r=t.exports.isEqualCursor;for(var o in e)if(!r(e[o],n[o]))return!0;return!1}function f(e,t){e=h(e,m(d)),t=h(t,m(d));for(var n in e)if(!k(e[n],t[n]))return!0;return!1}function s(e,n,r){if("function"==typeof e&&(r=e,n=[],e=void 0),"object"==typeof e&&"function"==typeof n&&(r=n,n=e,e=void 0),"string"==typeof e&&"function"==typeof n&&(r=n,n=[]),Array.isArray(n)||(n=[n]),!p(n)){var o={shouldComponentUpdate:t.exports.shouldComponentUpdate};n=[o].concat(n)}return{displayName:e,mixins:n,render:r}}function c(e){var t=e.filter(function(e){return!!e.statics});if(!t.length)return void 0;var n={};return t.forEach(function(e){n=l(n,e.statics)}),n}function a(e){e.filter(function(e){return!!e.statics}).forEach(function(e){delete e.statics})}function l(e,t){for(key in t)t.hasOwnProperty(key)&&!e[key]&&(e[key]=t[key]);return e}function p(e){return!!e.filter(function(e){return!!e.shouldComponentUpdate}).length}function d(e){return e&&("function"==typeof e.deref||"function"==typeof e.__deref)}function y(e){return d(e)?"function"==typeof e.deref?e.deref():e.__deref():e}function h(e,t){var n,r={};for(n in e)t(e[n],n)&&(r[n]=e[n]);return r}function m(e){return function(){return!e.apply(e,arguments)}}function g(e,t){return"statics"===t}function v(e,t){return"children"===t}function b(e,t){return function(){return e.apply(null,arguments)||t.apply(null,arguments)}}function x(e){return Array.prototype.slice.call(e)}var j=window.React,k=e("deep-equal");t.exports=n,t.exports.shouldComponentUpdate=r,t.exports.isEqualState=function(){return k.apply(this,arguments)},t.exports.isEqualCursor=function(e,t){return y(e)===y(t)},t.exports.isCursor=d;var C;t.exports.debug=function(e){var t=new RegExp(e||".*");C=function(e){var n=this._currentElement&&this._currentElement.key?" key="+this._currentElement.key:"",r=this.constructor.displayName,o=r+n;(n||r)&&t.test(o)&&console.debug("<"+o+">: "+e)}}},{"deep-equal":2,react:void 0}],2:[function(e,t){function n(e){return null===e||void 0===e}function r(e){return e&&"object"==typeof e&&"number"==typeof e.length?"function"!=typeof e.copy||"function"!=typeof e.slice?!1:e.length>0&&"number"!=typeof e[0]?!1:!0:!1}function o(e,t,o){var c,a;if(n(e)||n(t))return!1;if(e.prototype!==t.prototype)return!1;if(f(e))return f(t)?(e=u.call(e),t=u.call(t),s(e,t,o)):!1;if(r(e)){if(!r(t))return!1;if(e.length!==t.length)return!1;for(c=0;c<e.length;c++)if(e[c]!==t[c])return!1;return!0}try{var l=i(e),p=i(t)}catch(d){return!1}if(l.length!=p.length)return!1;for(l.sort(),p.sort(),c=l.length-1;c>=0;c--)if(l[c]!=p[c])return!1;for(c=l.length-1;c>=0;c--)if(a=l[c],!s(e[a],t[a],o))return!1;return!0}var u=Array.prototype.slice,i=e("./lib/keys.js"),f=e("./lib/is_arguments.js"),s=t.exports=function(e,t,n){return n||(n={}),e===t?!0:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:o(e,t,n)}},{"./lib/is_arguments.js":3,"./lib/keys.js":4}],3:[function(e,t,n){function r(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function o(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}var u="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();n=t.exports=u?r:o,n.supported=r,n.unsupported=o},{}],4:[function(e,t,n){function r(e){var t=[];for(var n in e)t.push(n);return t}n=t.exports="function"==typeof Object.keys?Object.keys:r,n.shim=r},{}]},{},[1])(1)});
src/main/resources/static/bower_components/jqwidgets/demos/react/app/chart/defaultfunctionality/app.js
dhawal9035/WebPLP
import React from 'react'; import ReactDOM from 'react-dom'; import JqxChart from '../../../jqwidgets-react/react_jqxchart.js'; class App extends React.Component { render () { let source = { datatype: "csv", datafields: [ { name: 'Date' }, { name: 'S&P 500' }, { name: 'NASDAQ' } ], url: '../sampledata/nasdaq_vs_sp500.txt' }; let dataAdapter = new $.jqx.dataAdapter(source, { async: false, autoBind: true, loadError: (xhr, status, error) => { alert('Error loading "' + source.url + '" : ' + error); } }); let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; let padding = { left: 10, top: 5, right: 10, bottom: 5 }; let titlePadding = { left: 50, top: 0, right: 0, bottom: 10 }; let xAxis = { dataField: 'Date', formatFunction: function (value) { return value.getDate() + '-' + months[value.getMonth()] + '-' + value.getFullYear(); }, type: 'date', baseUnit: 'month', valuesOnTicks: true, minValue: '01-01-2014', maxValue: '01-01-2015', tickMarks: { visible: true, interval: 1, color: '#BCBCBC' }, unitInterval: 1, gridLines: { visible: true, interval: 3, color: '#BCBCBC' }, labels: { angle: -45, rotationPoint: 'topright', offset: { x: 0, y: -25 } } }; let valueAxis = { visible: true, title: { text: 'Daily Closing Price<br>' }, tickMarks: { color: '#BCBCBC' } }; let seriesGroups = [ { type: 'line', series: [ { dataField: 'S&P 500', displayText: 'S&P 500' }, { dataField: 'NASDAQ', displayText: 'NASDAQ' } ] } ]; return ( <JqxChart style={{ width:850, height:500 }} title={"U.S. Stock Market Index Performance"} description={"NASDAQ Composite compared to S&P 500"} showLegend={true} enableAnimations={true} padding={padding} titlePadding={titlePadding} source={dataAdapter} xAxis={xAxis} valueAxis={valueAxis} colorScheme={'scheme04'} seriesGroups={seriesGroups} /> ) } } //Render our App Component to the desirable element ReactDOM.render(<App />, document.getElementById('app'));
src/moodycons.js
dhunninghake/react-moodycons
import React from 'react'; import icons from './icons'; const Moodycon = ({ name = 'grinning', width = 50, height = 50, fill = 'currentColor' }) => ( <svg role='img' width={width} height={height} fill={fill} viewBox='0 0 25 25' aria-labelledby={name} xmlns='http://www.w3.org/2000/svg'> <title id={name}> {name} icon </title> <path d={icons[name]}/> </svg> ); export { icons, Moodycon };
actor-apps/app-web/src/app/components/modals/create-group/ContactItem.react.js
jiguoling/actor-platform
import React from 'react'; import AvatarItem from 'components/common/AvatarItem.react'; class ContactItem extends React.Component { static propTypes = { contact: React.PropTypes.object, onToggle: React.PropTypes.func } constructor(props) { super(props); this.onToggle = this.onToggle.bind(this); this.state = { isSelected: false }; } onToggle() { const isSelected = !this.state.isSelected; this.setState({ isSelected: isSelected }); this.props.onToggle(this.props.contact, isSelected); } render() { let contact = this.props.contact; let icon; if (this.state.isSelected) { icon = 'check_box'; } else { icon = 'check_box_outline_blank'; } return ( <li className="contacts__list__item row"> <AvatarItem image={contact.avatar} placeholder={contact.placeholder} size="small" title={contact.name}/> <div className="col-xs"> <span className="title"> {contact.name} </span> </div> <div className="controls"> <a className="material-icons" onClick={this.onToggle}>{icon}</a> </div> </li> ); } } export default ContactItem;
packages/bundle/src/adaptiveCards/Attachment/AdaptiveCardAttachment.js
billba/botchat
import PropTypes from 'prop-types'; import React from 'react'; import AdaptiveCardContent from './AdaptiveCardContent'; const AdaptiveCardAttachment = ({ attachment: { content }, disabled }) => ( <AdaptiveCardContent content={content} disabled={disabled} /> ); export default AdaptiveCardAttachment; AdaptiveCardAttachment.defaultProps = { disabled: undefined }; AdaptiveCardAttachment.propTypes = { attachment: PropTypes.shape({ content: PropTypes.any.isRequired }).isRequired, disabled: PropTypes.bool };
fields/types/file/FileColumn.js
michaelerobertsjr/keystone
import React from 'react'; import ItemsTableCell from '../../components/ItemsTableCell'; import ItemsTableValue from '../../components/ItemsTableValue'; var LocalFileColumn = React.createClass({ renderValue: function () { var value = this.props.data.fields[this.props.col.path]; if (!value || !value.filename) return; return value.filename; }, render: function () { var value = this.props.data.fields[this.props.col.path]; var href = value && value.url ? value.url : null; var label = value && value.filename ? value.filename : null; return ( <ItemsTableCell href={href} padded interior field={this.props.col.type}> <ItemsTableValue>{label}</ItemsTableValue> </ItemsTableCell> ); }, }); module.exports = LocalFileColumn;
docs/src/pages/guides/interoperability/StyledComponentsPortal.js
kybarg/material-ui
import React from 'react'; import styled from 'styled-components'; import Button from '@material-ui/core/Button'; import Menu from '@material-ui/core/Menu'; import MenuItem from '@material-ui/core/MenuItem'; const StyledMenu = styled(({ className, ...props }) => ( <Menu {...props} classes={{ paper: className }} /> ))` box-shadow: none; border: 1px solid #d3d4d5; li { padding-top: 8px; padding-bottom: 8px; } `; function StyledComponentsPortal() { const [anchorEl, setAnchorEl] = React.useState(null); const handleClick = event => { setAnchorEl(event.currentTarget); }; const handleClose = () => { setAnchorEl(null); }; return ( <div> <Button aria-owns={anchorEl ? 'simple-menu' : undefined} aria-haspopup="true" variant="contained" color="primary" onClick={handleClick} > Open Menu </Button> <StyledMenu id="simple-menu" anchorEl={anchorEl} open={Boolean(anchorEl)} onClose={handleClose} getContentAnchorEl={null} anchorOrigin={{ vertical: 'bottom', horizontal: 'center', }} transformOrigin={{ vertical: 'top', horizontal: 'center', }} > <MenuItem onClick={handleClose}>Profile</MenuItem> <MenuItem onClick={handleClose}>My account</MenuItem> <MenuItem onClick={handleClose}>Logout</MenuItem> </StyledMenu> </div> ); } export default StyledComponentsPortal;
react-flux-mui/js/material-ui/src/svg-icons/image/photo-album.js
pbogdan/react-flux-mui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImagePhotoAlbum = (props) => ( <SvgIcon {...props}> <path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4zm0 15l3-3.86 2.14 2.58 3-3.86L18 19H6z"/> </SvgIcon> ); ImagePhotoAlbum = pure(ImagePhotoAlbum); ImagePhotoAlbum.displayName = 'ImagePhotoAlbum'; ImagePhotoAlbum.muiName = 'SvgIcon'; export default ImagePhotoAlbum;
docs/src/app/components/pages/components/TimePicker/Page.js
pancho111203/material-ui
import React from 'react'; import Title from 'react-title-component'; import CodeExample from '../../../CodeExample'; import PropTypeDescription from '../../../PropTypeDescription'; import MarkdownElement from '../../../MarkdownElement'; import timePickerReadmeText from './README'; import TimePickerExampleSimple from './ExampleSimple'; import timePickerExampleSimpleCode from '!raw!./ExampleSimple'; import TimePickerExampleComplex from './ExampleComplex'; import timePickerExampleComplexCode from '!raw!./ExampleComplex'; import TimePickerExampleInternational from './ExampleInternational'; import timePickerExampleInternationalCode from '!raw!./ExampleInternational'; import timePickerCode from '!raw!material-ui/TimePicker/TimePicker'; const descriptions = { simple: 'Time Picker supports 12 hour and 24 hour formats. In 12 hour format the AM and PM indicators toggle the ' + 'selected time period. You can also disable the Dialog passing true to the disabled property.', controlled: '`TimePicker` can be used as a controlled component.', localised: 'The buttons can be localised using the `cancelLabel` and `okLabel` properties.', }; const TimePickersPage = () => ( <div> <Title render={(previousTitle) => `Time Picker - ${previousTitle}`} /> <MarkdownElement text={timePickerReadmeText} /> <CodeExample title="Simple examples" description={descriptions.simple} code={timePickerExampleSimpleCode} > <TimePickerExampleSimple /> </CodeExample> <CodeExample title="Controlled examples" description={descriptions.controlled} code={timePickerExampleComplexCode} > <TimePickerExampleComplex /> </CodeExample> <CodeExample title="Localised example" description={descriptions.localised} code={timePickerExampleInternationalCode} > <TimePickerExampleInternational /> </CodeExample> <PropTypeDescription code={timePickerCode} /> </div> ); export default TimePickersPage;
antd-dva/dva-restart/src/routes/EntryPage.js
JianmingXia/StudyTest
import React from 'react'; import { List } from 'antd'; const links = [ // { // name: "Index", // link: "/0", // desc: "demo" // }, // { // name: "Products", // link: "/1", // desc: "产品描述。。。" // }, // { // name: "TodoList", // link: "/2", // desc: "TodoList demo" // } { name: "Index", link: "#/0", desc: "demo" }, { name: "Products", link: "#/1", desc: "产品描述。。。" }, { name: "TodoList", link: "#/2", desc: "TodoList demo" } ]; const EntryPage = (props) => ( <List itemLayout="horizontal" dataSource={links} renderItem={item => ( <List.Item> <List.Item.Meta title={<a href={item.link}>{item.name}</a>} description={item.desc} /> </List.Item> )} /> ); export default EntryPage;
src/svg-icons/action/euro-symbol.js
manchesergit/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionEuroSymbol = (props) => ( <SvgIcon {...props}> <path d="M15 18.5c-2.51 0-4.68-1.42-5.76-3.5H15v-2H8.58c-.05-.33-.08-.66-.08-1s.03-.67.08-1H15V9H9.24C10.32 6.92 12.5 5.5 15 5.5c1.61 0 3.09.59 4.23 1.57L21 5.3C19.41 3.87 17.3 3 15 3c-3.92 0-7.24 2.51-8.48 6H3v2h3.06c-.04.33-.06.66-.06 1 0 .34.02.67.06 1H3v2h3.52c1.24 3.49 4.56 6 8.48 6 2.31 0 4.41-.87 6-2.3l-1.78-1.77c-1.13.98-2.6 1.57-4.22 1.57z"/> </SvgIcon> ); ActionEuroSymbol = pure(ActionEuroSymbol); ActionEuroSymbol.displayName = 'ActionEuroSymbol'; ActionEuroSymbol.muiName = 'SvgIcon'; export default ActionEuroSymbol;
test/ListGroupItemSpec.js
johanneshilden/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import ListGroupItem from '../src/ListGroupItem'; describe('ListGroupItem', function () { it('Should output a "span" with the class "list-group-item"', function () { let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem>Text</ListGroupItem> ); assert.equal(React.findDOMNode(instance).nodeName, 'SPAN'); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'list-group-item')); }); it('Should output an "anchor" if "href" prop is set', function () { let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem href='#test'>Anchor</ListGroupItem> ); assert.equal(React.findDOMNode(instance).nodeName, 'A'); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'list-group-item')); }); it('Should output an "li" if "listItem" prop is set', function () { let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem listItem>Item 1</ListGroupItem> ); assert.equal(React.findDOMNode(instance).nodeName, 'LI'); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'list-group-item')); }); it('Should support "bsStyle" prop', function () { let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem bsStyle='success'>Item 1</ListGroupItem> ); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'list-group-item-success')); }); it('Should support "active" and "disabled" prop', function () { let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem active>Item 1</ListGroupItem> ); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'active')); }); it('Should support "disabled" prop', function () { let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem disabled>Item 2</ListGroupItem> ); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'disabled')); }); it('Should support "header" prop as a string', function () { let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem header='Heading'>Item text</ListGroupItem> ); let node = React.findDOMNode(instance); assert.equal(node.firstChild.nodeName, 'H4'); assert.equal(node.firstChild.innerText, 'Heading'); assert.ok(node.firstChild.className.match(/\blist-group-item-heading\b/)); assert.equal(node.lastChild.nodeName, 'P'); assert.equal(node.lastChild.innerText, 'Item text'); assert.ok(node.lastChild.className.match(/\blist-group-item-text\b/)); }); it('Should support "header" prop as a ReactComponent', function () { let header = <h2>Heading</h2>; let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem header={header}>Item text</ListGroupItem> ); let node = React.findDOMNode(instance); assert.equal(node.firstChild.nodeName, 'H2'); assert.equal(node.firstChild.innerText, 'Heading'); assert.ok(node.firstChild.className.match(/\blist-group-item-heading\b/)); assert.equal(node.lastChild.nodeName, 'P'); assert.equal(node.lastChild.innerText, 'Item text'); assert.ok(node.lastChild.className.match(/\blist-group-item-text\b/)); }); });
app/javascript/mastodon/features/standalone/compose/index.js
Nyoho/mastodon
import React from 'react'; import ComposeFormContainer from '../../compose/containers/compose_form_container'; import NotificationsContainer from '../../ui/containers/notifications_container'; import LoadingBarContainer from '../../ui/containers/loading_bar_container'; import ModalContainer from '../../ui/containers/modal_container'; export default class Compose extends React.PureComponent { render () { return ( <div> <ComposeFormContainer /> <NotificationsContainer /> <ModalContainer /> <LoadingBarContainer className='loading-bar' /> </div> ); } }
webui/components/missions/SubNavigationLayout.js
stiftungswo/izivi_relaunch
import React from 'react'; import Link from 'next/link'; import { Container, Menu, Segment } from 'semantic-ui-react'; import App from '../AppContainer'; const getPath = subPage => (subPage ? `/missions${subPage}` : '/missions'); const Tab = ({ subPage, url: { pathname }, children }) => ( <Link href={getPath(subPage)}> <Menu.Item active={getPath(subPage) === pathname} href={getPath(subPage)} > {children} </Menu.Item> </Link> ); export default ({ url, children, ...rest }) => ( <App url={url} {...rest}> <Container> <Menu attached="top" tabular> <Tab url={url}> Planung </Tab> <Tab subPage="/reports" url={url}> Auswertungen </Tab> </Menu> <Segment attached="bottom"> {children} </Segment> </Container> </App> );
ajax/libs/rxjs-dom/7.0.2/rx.dom.compat.js
holtkamp/cdnjs
// Copyright (c) Microsoft, Inc. All rights reserved. See License.txt in the project root for license information. ;(function (factory) { var objectTypes = { 'function': true, 'object': true }; function checkGlobal(value) { return (value && value.Object === Object) ? value : null; } var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null; var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null; var freeGlobal = checkGlobal(freeExports && freeModule && typeof global === 'object' && global); var freeSelf = checkGlobal(objectTypes[typeof self] && self); var freeWindow = checkGlobal(objectTypes[typeof window] && window); var moduleExports = (freeModule && freeModule.exports === freeExports) ? freeExports : null; var thisGlobal = checkGlobal(objectTypes[typeof this] && this); var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')(); // Because of build optimizers if (typeof define === 'function' && define.amd) { define(['rx'], function (Rx, exports) { return factory(root, exports, Rx); }); } else if (typeof module === 'object' && module && module.exports === freeExports) { module.exports = factory(root, module.exports, require('rx')); } else { root.Rx = factory(root, {}, root.Rx); } }.call(this, function (root, exp, Rx, undefined) { var Observable = Rx.Observable, ObservableBase = Rx.ObservableBase, AbstractObserver = Rx.internals.AbstractObserver, observerCreate = Rx.Observer.create, observableCreate = Rx.Observable.create, disposableCreate = Rx.Disposable.create, Disposable = Rx.Disposable, CompositeDisposable = Rx.CompositeDisposable, BinaryDisposable = Rx.BinaryDisposable, SingleAssignmentDisposable = Rx.SingleAssignmentDisposable, Subject = Rx.Subject, Scheduler = Rx.Scheduler, dom = Rx.DOM = {}, hasOwnProperty = {}.hasOwnProperty, noop = Rx.helpers.noop, isFunction = Rx.helpers.isFunction, inherits = Rx.internals.inherits; var errorObj = {e: {}}; function tryCatcherGen(tryCatchTarget) { return function tryCatcher() { try { return tryCatchTarget.apply(this, arguments); } catch (e) { errorObj.e = e; return errorObj; } }; } function tryCatch(fn) { if (!isFunction(fn)) { throw new TypeError('fn must be a function'); } return tryCatcherGen(fn); } function thrower(e) { throw e; } root.Element && root.Element.prototype.attachEvent && !root.Element.prototype.addEventListener && (function () { function addMethod(name, fn) { Window.prototype[name] = HTMLDocument.prototype[name] = Element.prototype[name] = fn; } addMethod('addEventListener', function (type, listener) { var target = this; var listeners = target._c1_listeners = target._c1_listeners || {}; var typeListeners = listeners[type] = listeners[type] || []; target.attachEvent('on' + type, typeListeners.event = function (e) { e || (e = root.event); var documentElement = target.document && target.document.documentElement || target.documentElement || { scrollLeft: 0, scrollTop: 0 }; e.currentTarget = target; e.pageX = e.clientX + documentElement.scrollLeft; e.pageY = e.clientY + documentElement.scrollTop; e.preventDefault = function () { e.bubbledKeyCode = e.keyCode; if (e.ctrlKey) { try { e.keyCode = 0; } catch (e) { } } e.defaultPrevented = true; e.returnValue = false; e.modified = true; e.returnValue = false; }; e.stopImmediatePropagation = function () { immediatePropagation = false; e.cancelBubble = true; }; e.stopPropagation = function () { e.cancelBubble = true; }; e.relatedTarget = e.fromElement || null; e.target = e.srcElement || target; e.timeStamp = +new Date(); // Normalize key events switch(e.type) { case 'keypress': var c = ('charCode' in e ? e.charCode : e.keyCode); if (c === 10) { c = 0; e.keyCode = 13; } else if (c === 13 || c === 27) { c = 0; } else if (c === 3) { c = 99; } e.charCode = c; e.keyChar = e.charCode ? String.fromCharCode(e.charCode) : ''; break; } var copiedEvent = {}; for (var prop in e) { copiedEvent[prop] = e[prop]; } for (var i = 0, typeListenersCache = [].concat(typeListeners), typeListenerCache, immediatePropagation = true; immediatePropagation && (typeListenerCache = typeListenersCache[i]); ++i) { for (var ii = 0, typeListener; typeListener = typeListeners[ii]; ++ii) { if (typeListener === typeListenerCache) { typeListener.call(target, copiedEvent); break; } } } }); typeListeners.push(listener); }); addMethod('removeEventListener', function (type, listener) { var target = this; var listeners = target._c1_listeners = target._c1_listeners || {}; var typeListeners = listeners[type] = listeners[type] || []; for (var i = typeListeners.length - 1, typeListener; typeListener = typeListeners[i]; --i) { if (typeListener === listener) { typeListeners.splice(i, 1); break; } } !typeListeners.length && typeListeners.event && target.detachEvent('on' + type, typeListeners.event); }); addMethod('dispatchEvent', function (e) { var target = this; var type = e.type; var listeners = target._c1_listeners = target._c1_listeners || {}; var typeListeners = listeners[type] = listeners[type] || []; try { return target.fireEvent('on' + type, e); } catch (err) { return typeListeners.event && typeListeners.event(e); } }); function ready() { if (ready.interval && document.body) { ready.interval = clearInterval(ready.interval); document.dispatchEvent(new CustomEvent('DOMContentLoaded')); } } ready.interval = setInterval(ready, 1); root.addEventListener('load', ready); }()); (!root.CustomEvent || typeof root.CustomEvent === 'object') && (function() { function CustomEvent (type, params) { var event; params = params || { bubbles: false, cancelable: false, detail: undefined }; try { event = document.createEvent('CustomEvent'); event.initCustomEvent(type, params.bubbles, params.cancelable, params.detail); } catch (error) { event = document.createEvent('Event'); event.initEvent(type, params.bubbles, params.cancelable); event.detail = params.detail; } return event; } root.CustomEvent && (CustomEvent.prototype = root.CustomEvent.prototype); root.CustomEvent = CustomEvent; }()); function CreateListenerDisposable(element, name, handler, useCapture) { this._e = element; this._n = name; this._fn = handler; this._u = useCapture; this._e.addEventListener(this._n, this._fn, this._u); this.isDisposed = false; } CreateListenerDisposable.prototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; this._e.removeEventListener(this._n, this._fn, this._u); } }; function createListener (element, name, handler, useCapture) { if (element.addEventListener) { return new CreateListenerDisposable(element, name, handler, useCapture); } throw new Error('No listener found'); } function createEventListener (el, eventName, handler, useCapture) { var disposables = new CompositeDisposable(); // Asume NodeList or HTMLCollection var toStr = Object.prototype.toString; if (toStr.call(el) === '[object NodeList]' || toStr.call(el) === '[object HTMLCollection]') { for (var i = 0, len = el.length; i < len; i++) { disposables.add(createEventListener(el.item(i), eventName, handler, useCapture)); } } else if (el) { disposables.add(createListener(el, eventName, handler, useCapture)); } return disposables; } var FromEventObservable = (function(__super__) { inherits(FromEventObservable, __super__); function FromEventObservable(element, eventName, selector, useCapture) { this._e = element; this._n = eventName; this._fn = selector; this._uc = useCapture; __super__.call(this); } function createHandler(o, fn) { return function handler() { var results = arguments[0]; if (fn) { results = tryCatch(fn).apply(null, arguments); if (results === errorObj) { return o.onError(results.e); } } o.onNext(results); }; } FromEventObservable.prototype.subscribeCore = function (o) { return createEventListener( this._e, this._n, createHandler(o, this._fn), this._uc); }; return FromEventObservable; }(ObservableBase)); /** * Creates an observable sequence by adding an event listener to the matching DOMElement or each item in the NodeList. * @param {Object} element The DOMElement or NodeList to attach a listener. * @param {String} eventName The event name to attach the observable sequence. * @param {Function} [selector] A selector which takes the arguments from the event handler to produce a single item to yield on next. * @param {Boolean} [useCapture] If true, useCapture indicates that the user wishes to initiate capture. After initiating capture, all events of the specified type will be dispatched to the registered listener before being dispatched to any EventTarget beneath it in the DOM tree. Events which are bubbling upward through the tree will not trigger a listener designated to use capture * @returns {Observable} An observable sequence of events from the specified element and the specified event. */ var fromEvent = dom.fromEvent = function (element, eventName, selector, useCapture) { var selectorFn = isFunction(selector) ? selector : null; typeof selector === 'boolean' && (useCapture = selector); typeof useCapture === 'undefined' && (useCapture = false); return new FromEventObservable(element, eventName, selectorFn, useCapture).publish().refCount(); }; (function () { var events = '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 input'; if (root.PointerEvent) { events += ' pointerdown pointerup pointermove pointerover pointerout pointerenter pointerleave'; } if (root.TouchEvent) { events += ' touchstart touchend touchmove touchcancel'; } events = events.split(' '); for(var i = 0, len = events.length; i < len; i++) { (function (e) { dom[e] = function (element, selector, useCapture) { return fromEvent(element, e, selector, useCapture); }; }(events[i])) } }()); var ReadyObservable = (function (__super__) { inherits(ReadyObservable, __super__); function ReadyObservable() { __super__.call(this); } function createHandler(o) { return function handler() { o.onNext(); o.onCompleted(); }; } ReadyObservable.prototype.subscribeCore = function (o) { return new ReadyDisposable(o, createHandler(o)); }; function ReadyDisposable(o, fn) { this._o = o; this._fn = fn; this._addedHandlers = false; this.isDisposed = false; if (root.document.readyState === 'complete') { setTimeout(this._fn, 0); } else { this._addedHandlers = true; root.document.addEventListener( 'DOMContentLoaded', this._fn, false ); } } ReadyDisposable.prototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; root.document.removeEventListener( 'DOMContentLoaded', this._fn, false ); } }; return ReadyObservable; }(ObservableBase)); /** * Creates an observable sequence when the DOM is loaded * @returns {Observable} An observable sequence fired when the DOM is loaded */ dom.ready = function () { return new ReadyObservable(); }; // Gets the proper XMLHttpRequest for support for older IE function getXMLHttpRequest() { if (root.XMLHttpRequest) { return new root.XMLHttpRequest(); } else { var progId; try { var progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0']; for(var i = 0; i < 3; i++) { try { progId = progIds[i]; if (new root.ActiveXObject(progId)) { break; } } catch(e) { } } return new root.ActiveXObject(progId); } catch (e) { throw new Error('XMLHttpRequest is not supported by your browser'); } } } // Get CORS support even for older IE function getCORSRequest() { var xhr = new root.XMLHttpRequest(); if ('withCredentials' in xhr) { return xhr; } else if (!!root.XDomainRequest) { return new XDomainRequest(); } else { throw new Error('CORS is not supported by your browser'); } } function normalizeAjaxSuccessEvent(e, xhr, settings) { var response = ('response' in xhr) ? xhr.response : xhr.responseText; response = settings.responseType === 'json' ? JSON.parse(response) : response; return { response: response, status: xhr.status, responseType: xhr.responseType, xhr: xhr, originalEvent: e }; } function normalizeAjaxErrorEvent(e, xhr, type) { return { type: type, status: xhr.status, xhr: xhr, originalEvent: e }; } var AjaxObservable = (function(__super__) { inherits(AjaxObservable, __super__); function AjaxObservable(settings) { this._settings = settings; __super__.call(this); } AjaxObservable.prototype.subscribeCore = function (o) { var state = { isDone: false }; var xhr; var settings = this._settings; var normalizeError = settings.normalizeError; var normalizeSuccess = settings.normalizeSuccess; var processResponse = function(xhr, e){ var status = xhr.status === 1223 ? 204 : xhr.status; if ((status >= 200 && status <= 300) || status === 0 || status === '') { o.onNext(normalizeSuccess(e, xhr, settings)); o.onCompleted(); } else { o.onError(settings.normalizeError(e, xhr, 'error')); } state.isDone = true; }; try { xhr = settings.createXHR(); } catch (err) { return o.onError(err); } try { if (settings.user) { xhr.open(settings.method, settings.url, settings.async, settings.user, settings.password); } else { xhr.open(settings.method, settings.url, settings.async); } var headers = settings.headers; for (var header in headers) { if (hasOwnProperty.call(headers, header)) { xhr.setRequestHeader(header, headers[header]); } } xhr.timeout = settings.timeout; xhr.ontimeout = function (e) { settings.progressObserver && settings.progressObserver.onError(e); o.onError(normalizeError(e, xhr, 'timeout')); }; if(!!xhr.upload || (!('withCredentials' in xhr) && !!root.XDomainRequest)) { xhr.onload = function(e) { if(settings.progressObserver) { settings.progressObserver.onNext(e); settings.progressObserver.onCompleted(); } processResponse(xhr, e); }; if(settings.progressObserver) { xhr.onprogress = function(e) { settings.progressObserver.onNext(e); }; } xhr.onerror = function(e) { settings.progressObserver && settings.progressObserver.onError(e); o.onError(normalizeError(e, xhr, 'error')); state.isDone = true; }; xhr.onabort = function(e) { settings.progressObserver && settings.progressObserver.onError(e); o.onError(normalizeError(e, xhr, 'abort')); state.isDone = true; }; } else { xhr.onreadystatechange = function (e) { xhr.readyState === 4 && processResponse(xhr, e); }; } var contentType = settings.headers['Content-Type'] || settings.headers['Content-type'] || settings.headers['content-type']; if (settings.hasContent && contentType === 'application/x-www-form-urlencoded' && typeof settings.body !== 'string') { var newBody = []; for (var prop in settings.body) { if (hasOwnProperty.call(settings.body, prop)) { newBody.push(prop + '=' + settings.body[prop]); } } settings.body = newBody.join('&'); } xhr.send(settings.hasContent && settings.body || null); } catch (e) { o.onError(e); } return new AjaxDisposable(state, xhr); }; function AjaxDisposable(state, xhr) { this._state = state; this._xhr = xhr; this.isDisposed = false; } AjaxDisposable.prototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; if (!this._state.isDone && this._xhr.readyState !== 4) { this._xhr.abort(); } } }; return AjaxObservable; }(ObservableBase)); /** * Creates an observable for an Ajax request with either a settings object with url, headers, etc or a string for a URL. * * @example * source = Rx.DOM.ajax('/products'); * source = Rx.DOM.ajax( url: 'products', method: 'GET' }); * * @param {Object} settings Can be one of the following: * * A string of the URL to make the Ajax call. * An object with the following properties * - url: URL of the request * - body: The body of the request * - method: Method of the request, such as GET, POST, PUT, PATCH, DELETE * - async: Whether the request is async * - headers: Optional headers * - crossDomain: true if a cross domain request, else false * * @returns {Observable} An observable sequence containing the XMLHttpRequest. */ var ajaxRequest = dom.ajax = function (options) { var settings = { method: 'GET', crossDomain: false, async: true, headers: {}, responseType: 'text', timeout: 0, createXHR: function(){ return this.crossDomain ? getCORSRequest() : getXMLHttpRequest() }, normalizeError: normalizeAjaxErrorEvent, normalizeSuccess: normalizeAjaxSuccessEvent }; if(typeof options === 'string') { settings.url = options; } else { for(var prop in options) { if(hasOwnProperty.call(options, prop)) { settings[prop] = options[prop]; } } } if (!settings.crossDomain && !settings.headers['X-Requested-With']) { settings.headers['X-Requested-With'] = 'XMLHttpRequest'; } settings.hasContent = settings.body !== undefined; return new AjaxObservable(settings); }; /** * Creates an observable sequence from an Ajax POST Request with the body. * * @param {String} url The URL to POST * @param {Object} body The body to POST * @returns {Observable} The observable sequence which contains the response from the Ajax POST. */ dom.post = function (url, body) { var settings; if (typeof url === 'string') { settings = {url: url, body: body, method: 'POST' }; } else if (typeof url === 'object') { settings = url; settings.method = 'POST'; } return ajaxRequest(settings); }; /** * Creates an observable sequence from an Ajax GET Request with the body. * * @param {String} url The URL to GET * @returns {Observable} The observable sequence which contains the response from the Ajax GET. */ dom.get = function (url) { var settings; if (typeof url === 'string') { settings = {url: url }; } else if (typeof url === 'object') { settings = url; } return ajaxRequest(settings); }; /** * Creates an observable sequence from JSON from an Ajax request * * @param {String} url The URL to GET * @returns {Observable} The observable sequence which contains the parsed JSON. */ dom.getJSON = function (url) { if (!root.JSON && typeof root.JSON.parse !== 'function') { throw new TypeError('JSON is not supported in your runtime.'); } return ajaxRequest({url: url, responseType: 'json'}).map(function (x) { return x.response; }); }; var destroy = (function () { var trash = 'document' in root && root.document.createElement('div'); return function (element) { trash.appendChild(element); trash.innerHTML = ''; }; })(); var ScriptObservable = (function(__super__) { inherits(ScriptObservable, __super__); function ScriptObservable(settings) { this._settings = settings; __super__.call(this); } ScriptObservable.id = 0; ScriptObservable.prototype.subscribeCore = function (o) { var settings = { jsonp: 'JSONPCallback', async: true, jsonpCallback: 'rxjsjsonpCallbacks' + 'callback_' + (ScriptObservable.id++).toString(36) }; if(typeof this._settings === 'string') { settings.url = this._settings; } else { for(var prop in this._settings) { if(hasOwnProperty.call(this._settings, prop)) { settings[prop] = this._settings[prop]; } } } var script = root.document.createElement('script'); script.type = 'text/javascript'; script.async = settings.async; script.src = settings.url.replace(settings.jsonp, settings.jsonpCallback); root[settings.jsonpCallback] = function(data) { root[settings.jsonpCallback].called = true; root[settings.jsonpCallback].data = data; }; var handler = function(e) { if(e.type === 'load' && !root[settings.jsonpCallback].called) { e = { type: 'error' }; } var status = e.type === 'error' ? 400 : 200; var data = root[settings.jsonpCallback].data; if(status === 200) { o.onNext({ status: status, responseType: 'jsonp', response: data, originalEvent: e }); o.onCompleted(); } else { o.onError({ type: 'error', status: status, originalEvent: e }); } }; script.onload = script.onreadystatechanged = script.onerror = handler; var head = root.document.getElementsByTagName('head')[0] || root.document.documentElement; head.insertBefore(script, head.firstChild); return new ScriptDisposable(script); }; function ScriptDisposable(script) { this._script = script; this.isDisposed = false; } ScriptDisposable.prototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; this._script.onload = this._script.onreadystatechanged = this._script.onerror = null; destroy(this._script); this._script = null; } }; return ScriptObservable; }(ObservableBase)); /** * Creates an observable JSONP Request with the specified settings. * @param {Object} settings Can be one of the following: * * A string of the URL to make the JSONP call with the JSONPCallback=? in the url. * An object with the following properties * - url: URL of the request * - jsonp: The named callback parameter for the JSONP call * - jsonpCallback: Callback to execute. For when the JSONP callback can't be changed * * @returns {Observable} A cold observable containing the results from the JSONP call. */ dom.jsonpRequest = function (settings) { return new ScriptObservable(settings); }; function socketClose(socket, closingObserver, code, reason) { if (socket) { if (closingObserver) { closingObserver.onNext(); closingObserver.onCompleted(); } if (!code) { socket.close(); } else { socket.close(code, reason); } } } var SocketObservable = (function (__super__) { inherits(SocketObservable, __super__); function SocketObservable(state, url, protocol, open, close) { this._state = state; this._url = url; this._protocol = protocol; this._open = open; this._close = close; __super__.call(this); } function createOpenHandler(open, socket) { return function openHandler(e) { open.onNext(e); open.onCompleted(); socket.removeEventListener('open', openHandler, false); }; } function createMsgHandler(o) { return function msgHandler(e) { o.onNext(e); }; } function createErrHandler(o) { return function errHandler(e) { o.onError(e); }; } function createCloseHandler(o) { return function closeHandler(e) { if (e.code !== 1000 || !e.wasClean) { return o.onError(e); } o.onCompleted(); }; } function SocketDisposable(socket, msgFn, errFn, closeFn, close) { this._socket = socket; this._msgFn = msgFn; this._errFn = errFn; this._closeFn = closeFn; this._close = close; this.isDisposed = false; } SocketDisposable.prototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; socketClose(this._socket, this._close); this._socket.removeEventListener('message', this._msgFn, false); this._socket.removeEventListener('error', this._errFn, false); this._socket.removeEventListener('close', this._closeFn, false); } }; SocketObservable.prototype.subscribeCore = function (o) { this._state.socket = this._protocol ? new WebSocket(this._url, this._protocol) : new WebSocket(this._url); var openHandler = createOpenHandler(this._open, this._state.socket); var msgHandler = createMsgHandler(o); var errHandler = createErrHandler(o); var closeHandler = createCloseHandler(o); this._open && this._state.socket.addEventListener('open', openHandler, false); this._state.socket.addEventListener('message', msgHandler, false); this._state.socket.addEventListener('error', errHandler, false); this._state.socket.addEventListener('close', closeHandler, false); return new SocketDisposable(this._state.socket, msgHandler, errHandler, closeHandler, this._close); }; return SocketObservable; }(ObservableBase)); var SocketObserver = (function (__super__) { inherits(SocketObserver, __super__); function SocketObserver(state, close) { this._state = state; this._close = close; __super__.call(this); } SocketObserver.prototype.next = function (x) { this._state.socket && this._state.socket.readyState === WebSocket.OPEN && this._state.socket.send(x); }; SocketObserver.prototype.error = function (e) { if (!e.code) { throw new Error('no code specified. be sure to pass { code: ###, reason: "" } to onError()'); } socketClose(this._state.socket, this._close, e.code, e.reason || ''); }; SocketObserver.prototype.completed = function () { socketClose(this._state.socket, this._close, 1000, ''); }; return SocketObserver; }(AbstractObserver)); /** * Creates a WebSocket Subject with a given URL, protocol and an optional observer for the open event. * * @example * var socket = Rx.DOM.fromWebSocket('http://localhost:8080', 'stock-protocol', openObserver, closingObserver); * * @param {String} url The URL of the WebSocket. * @param {String} protocol The protocol of the WebSocket. * @param {Observer} [openObserver] An optional Observer to capture the open event. * @param {Observer} [closingObserver] An optional Observer to capture the moment before the underlying socket is closed. * @returns {Subject} An observable sequence wrapping a WebSocket. */ dom.fromWebSocket = function (url, protocol, openObserver, closingObserver) { if (!WebSocket) { throw new TypeError('WebSocket not implemented in your runtime.'); } var state = { socket: null }; return Subject.create( new SocketObserver(state, closingObserver), new SocketObservable(state, url, protocol, openObserver, closingObserver) ); }; var WorkerObserver = (function (__super__) { inherits(WorkerObserver, __super__); function WorkerObserver(state) { this._state = state; __super__.call(this); } WorkerObserver.prototype.next = function (x) { this._state.worker && this._state.worker.postMessage(x); }; WorkerObserver.prototype.error = function (e) { throw e; }; WorkerObserver.prototype.completed = function () { }; return WorkerObserver; }(AbstractObserver)); var WorkerObservable = (function (__super__) { inherits(WorkerObservable, __super__); function WorkerObservable(state, url) { this._state = state; this._url = url; __super__.call(this); } function createMessageHandler(o) { return function messageHandler (e) { o.onNext(e); }; } function createErrHandler(o) { return function errHandler(e) { o.onError(e); }; } function WorkerDisposable(w, msgFn, errFn) { this._w = w; this._msgFn = msgFn; this._errFn = errFn; this.isDisposed = false; } WorkerDisposable.prototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; this._w.terminate(); this._w.removeEventListener('message', this._msgFn, false); this._w.removeEventListener('error', this._errFn, false); } }; WorkerObservable.prototype.subscribeCore = function (o) { this._state.worker = new root.Worker(this._url); var messageHandler = createMessageHandler(o); var errHandler = createErrHandler(o); this._state.worker.addEventListener('message', messageHandler, false); this._state.worker.addEventListener('error', errHandler, false); return new WorkerDisposable(this._state.worker, messageHandler, errHandler); }; return WorkerObservable; }(ObservableBase)); /** * Creates a Web Worker with a given URL as a Subject. * * @example * var worker = Rx.DOM.fromWebWorker('worker.js'); * * @param {String} url The URL of the Web Worker. * @returns {Subject} A Subject wrapping the Web Worker. */ dom.fromWorker = function (url) { if (!root.Worker) { throw new TypeError('Worker not implemented in your runtime.'); } var state = { worker: null }; return Subject.create(new WorkerObserver(state), new WorkerObservable(state, url)); }; function getMutationObserver(next) { var M = root.MutationObserver || root.WebKitMutationObserver; return new M(next); } var MutationObserverObservable = (function (__super__) { inherits(MutationObserverObservable, __super__); function MutationObserverObservable(target, options) { this._target = target; this._options = options; __super__.call(this); } function InnerDisposable(mutationObserver) { this._m = mutationObserver; this.isDisposed = false; } InnerDisposable.prototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; this._m.disconnect(); } }; MutationObserverObservable.prototype.subscribeCore = function (o) { var mutationObserver = getMutationObserver(function (e) { o.onNext(e); }); mutationObserver.observe(this._target, this._options); return new InnerDisposable(mutationObserver); }; return MutationObserverObservable; }(ObservableBase)); /** * Creates an observable sequence from a Mutation Observer. * MutationObserver provides developers a way to react to changes in a DOM. * @example * Rx.DOM.fromMutationObserver(document.getElementById('foo'), { attributes: true, childList: true, characterData: true }); * * @param {Object} target The Node on which to obserave DOM mutations. * @param {Object} options A MutationObserverInit object, specifies which DOM mutations should be reported. * @returns {Observable} An observable sequence which contains mutations on the given DOM target. */ dom.fromMutationObserver = function (target, options) { if (!(root.MutationObserver || root.WebKitMutationObserver)) { throw new TypeError('MutationObserver not implemented in your runtime.'); } return new MutationObserverObservable(target, options); }; var CurrentPositionObservable = (function (__super__) { inherits(CurrentPositionObservable, __super__); function CurrentPositionObservable(opts) { this._opts = opts; __super__.call(this); } CurrentPositionObservable.prototype.subscribeCore = function (o) { root.navigator.geolocation.getCurrentPosition( function (data) { o.onNext(data); o.onCompleted(); }, function (e) { o.onError(e); }, this._opts); }; return CurrentPositionObservable; }(ObservableBase)); var WatchPositionObservable = (function (__super__) { inherits(WatchPositionObservable, __super__); function WatchPositionObservable(opts) { this._opts = opts; __super__.call(this); } function WatchPositionDisposable(id) { this._id = id; this.isDisposed = false; } WatchPositionDisposable.prototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; root.navigator.geolocation.clearWatch(this._id); } }; WatchPositionObservable.prototype.subscribeCore = function (o) { var watchId = root.navigator.geolocation.watchPosition( function (x) { o.onNext(x); }, function (e) { o.onError(e); }, this._opts); return new WatchPositionDisposable(watchId); }; return WatchPositionObservable; }(ObservableBase)); Rx.DOM.geolocation = { /** * Obtains the geographic position, in terms of latitude and longitude coordinates, of the device. * @param {Object} [geolocationOptions] An object literal to specify one or more of the following attributes and desired values: * - enableHighAccuracy: Specify true to obtain the most accurate position possible, or false to optimize in favor of performance and power consumption. * - timeout: An Integer value that indicates the time, in milliseconds, allowed for obtaining the position. * If timeout is Infinity, (the default value) the location request will not time out. * If timeout is zero (0) or negative, the results depend on the behavior of the location provider. * - maximumAge: An Integer value indicating the maximum age, in milliseconds, of cached position information. * If maximumAge is non-zero, and a cached position that is no older than maximumAge is available, the cached position is used instead of obtaining an updated location. * If maximumAge is zero (0), watchPosition always tries to obtain an updated position, even if a cached position is already available. * If maximumAge is Infinity, any cached position is used, regardless of its age, and watchPosition only tries to obtain an updated position if no cached position data exists. * @returns {Observable} An observable sequence with the geographical location of the device running the client. */ getCurrentPosition: function (geolocationOptions) { if (!root.navigator && !root.navigation.geolocation) { throw new TypeError('geolocation not available'); } return new CurrentPositionObservable(geolocationOptions); }, /** * Begins listening for updates to the current geographical location of the device running the client. * @param {Object} [geolocationOptions] An object literal to specify one or more of the following attributes and desired values: * - enableHighAccuracy: Specify true to obtain the most accurate position possible, or false to optimize in favor of performance and power consumption. * - timeout: An Integer value that indicates the time, in milliseconds, allowed for obtaining the position. * If timeout is Infinity, (the default value) the location request will not time out. * If timeout is zero (0) or negative, the results depend on the behavior of the location provider. * - maximumAge: An Integer value indicating the maximum age, in milliseconds, of cached position information. * If maximumAge is non-zero, and a cached position that is no older than maximumAge is available, the cached position is used instead of obtaining an updated location. * If maximumAge is zero (0), watchPosition always tries to obtain an updated position, even if a cached position is already available. * If maximumAge is Infinity, any cached position is used, regardless of its age, and watchPosition only tries to obtain an updated position if no cached position data exists. * @returns {Observable} An observable sequence with the current geographical location of the device running the client. */ watchPosition: function (geolocationOptions) { if (!root.navigator && !root.navigation.geolocation) { throw new TypeError('geolocation not available'); } return new WatchPositionObservable(geolocationOptions).publish().refCount(); } }; var FromReaderObservable = (function (__super__) { inherits(FromReaderObservable, __super__); function FromReaderObservable(readerFn, file, progressObserver, encoding) { this._readerFn = readerFn; this._file = file; this._progressObserver = progressObserver; this._encoding = encoding; __super__.call(this); } function createLoadHandler(o, p) { return function loadHandler(e) { p && p.onCompleted(); o.onNext(e.target.result); o.onCompleted(); }; } function createErrorHandler(o) { return function errorHandler (e) { o.onError(e.target.error); }; } function createProgressHandler(o) { return function progressHandler (e) { o.onNext(e); }; } function FromReaderDisposable(reader, progressObserver, loadHandler, errorHandler, progressHandler) { this._r = reader; this._po = progressObserver; this._lFn = loadHandler; this._eFn = errorHandler; this._pFn = progressHandler; this.isDisposed = false; } FromReaderDisposable.prototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; this._r.readyState === root.FileReader.LOADING && this._r.abort(); this._r.removeEventListener('load', this._lFn, false); this._r.removeEventListener('error', this._eFn, false); this._po && this._r.removeEventListener('progress', this._pFn, false); } }; FromReaderObservable.prototype.subscribeCore = function (o) { var reader = new root.FileReader(); var loadHandler = createLoadHandler(o, this._progressObserver); var errorHandler = createErrorHandler(o); var progressHandler = createProgressHandler(this._progressObserver); reader.addEventListener('load', loadHandler, false); reader.addEventListener('error', errorHandler, false); this._progressObserver && reader.addEventListener('progress', progressHandler, false); reader[this._readerFn](this._file, this._encoding); return new FromReaderDisposable(reader, this._progressObserver, loadHandler, errorHandler, progressHandler); }; return FromReaderObservable; }(ObservableBase)); /** * The FileReader object lets web applications asynchronously read the contents of * files (or raw data buffers) stored on the user's computer, using File or Blob objects * to specify the file or data to read as an observable sequence. * @param {String} file The file to read. * @param {Observer} An observer to watch for progress. * @returns {Object} An object which contains methods for reading the data. */ dom.fromReader = function(file, progressObserver) { if (!root.FileReader) { throw new TypeError('FileReader not implemented in your runtime.'); } return { /** * This method is used to read the file as an ArrayBuffer as an Observable stream. * @returns {Observable} An observable stream of an ArrayBuffer */ asArrayBuffer : function() { return new FromReaderObservable('readAsArrayBuffer', file, progressObserver); }, /** * This method is used to read the file as a binary data string as an Observable stream. * @returns {Observable} An observable stream of a binary data string. */ asBinaryString : function() { return new FromReaderObservable('readAsBinaryString', file, progressObserver); }, /** * This method is used to read the file as a URL of the file's data as an Observable stream. * @returns {Observable} An observable stream of a URL representing the file's data. */ asDataURL : function() { return new FromReaderObservable('readAsDataURL', file, progressObserver); }, /** * This method is used to read the file as a string as an Observable stream. * @returns {Observable} An observable stream of the string contents of the file. */ asText : function(encoding) { return new FromReaderObservable('readAsText', file, progressObserver, encoding); } }; }; var EventSourceObservable = (function(__super__) { inherits(EventSourceObservable, __super__); function EventSourceObservable(url, open) { this._url = url; this._open = open; __super__.call(this); } function createOnOpen(o, source) { return function onOpen(e) { o.onNext(e); o.onCompleted(); source.removeEventListener('open', onOpen, false); }; } function createOnError(o) { return function onError(e) { if (e.readyState === EventSource.CLOSED) { o.onCompleted(); } else { o.onError(e); } }; } function createOnMessage(o) { return function onMessage(e) { o.onNext(e.data); }; } function EventSourceDisposable(s, errFn, msgFn) { this._s = s; this._errFn = errFn; this._msgFn = msgFn; this.isDisposed = false; } EventSourceDisposable.prototype.dispose = function () { if (!this.isDisposed) { this._s.removeEventListener('error', this._errFn, false); this._s.removeEventListener('message', this._msgFn, false); this._s.close(); } }; EventSourceObservable.prototype.subscribeCore = function (o) { var source = new EventSource(this._url); var onOpen = createOnOpen(this._open, source); var onError = createOnError(o); var onMessage = createOnMessage(o); this._open && source.addEventListener('open', onOpen, false); source.addEventListener('error', onError, false); source.addEventListener('message', onMessage, false); return new EventSourceDisposable(source, onError, onMessage); }; return EventSourceObservable; }(ObservableBase)); /** * This method wraps an EventSource as an observable sequence. * @param {String} url The url of the server-side script. * @param {Observer} [openObserver] An optional observer for the 'open' event for the server side event. * @returns {Observable} An observable sequence which represents the data from a server-side event. */ dom.fromEventSource = function (url, openObserver) { if (!root.EventSource) { throw new TypeError('EventSource not implemented in your runtime.'); } return new EventSourceObservable(url, openObserver); }; var requestAnimFrame, cancelAnimFrame; if (root.requestAnimationFrame) { requestAnimFrame = root.requestAnimationFrame; cancelAnimFrame = root.cancelAnimationFrame; } else if (root.mozRequestAnimationFrame) { requestAnimFrame = root.mozRequestAnimationFrame; cancelAnimFrame = root.mozCancelAnimationFrame; } else if (root.webkitRequestAnimationFrame) { requestAnimFrame = root.webkitRequestAnimationFrame; cancelAnimFrame = root.webkitCancelAnimationFrame; } else if (root.msRequestAnimationFrame) { requestAnimFrame = root.msRequestAnimationFrame; cancelAnimFrame = root.msCancelAnimationFrame; } else if (root.oRequestAnimationFrame) { requestAnimFrame = root.oRequestAnimationFrame; cancelAnimFrame = root.oCancelAnimationFrame; } else { requestAnimFrame = function(cb) { root.setTimeout(cb, 1000 / 60); }; cancelAnimFrame = root.clearTimeout; } /** * Gets a scheduler that schedules schedules work on the requestAnimationFrame for immediate actions. */ Scheduler.requestAnimationFrame = (function () { var RequestAnimationFrameScheduler = (function (__super__) { inherits(RequestAnimationFrameScheduler, __super__); function RequestAnimationFrameScheduler() { __super__.call(this); } function scheduleAction(disposable, action, scheduler, state) { return function schedule() { !disposable.isDisposed && disposable.setDisposable(Disposable._fixup(action(scheduler, state))); }; } function ClearDisposable(method, id) { this._id = id; this._method = method; this.isDisposed = false; } ClearDisposable.prototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; this._method.call(null, this._id); } }; RequestAnimationFrameScheduler.prototype.schedule = function (state, action) { var disposable = new SingleAssignmentDisposable(), id = requestAnimFrame(scheduleAction(disposable, action, this, state)); return new BinaryDisposable(disposable, new ClearDisposable(cancelAnimFrame, id)); }; RequestAnimationFrameScheduler.prototype._scheduleFuture = function (state, dueTime, action) { if (dueTime === 0) { return this.schedule(state, action); } var disposable = new SingleAssignmentDisposable(), id = root.setTimeout(scheduleAction(disposable, action, this, state), dueTime); return new BinaryDisposable(disposable, new ClearDisposable(root.clearTimeout, id)); }; return RequestAnimationFrameScheduler; }(Scheduler)); return new RequestAnimationFrameScheduler(); }()); /** * Scheduler that uses a MutationObserver changes as the scheduling mechanism */ Scheduler.microtask = (function () { var nextHandle = 1, tasksByHandle = {}, currentlyRunning = false, scheduleMethod; function clearMethod(handle) { delete tasksByHandle[handle]; } function runTask(handle) { if (currentlyRunning) { root.setTimeout(function () { runTask(handle) }, 0); } else { var task = tasksByHandle[handle]; if (task) { currentlyRunning = true; try { task(); } catch (e) { throw e; } finally { clearMethod(handle); currentlyRunning = false; } } } } function postMessageSupported () { // Ensure not in a worker if (!root.postMessage || root.importScripts) { return false; } var isAsync = false, oldHandler = root.onmessage; // Test for async root.onmessage = function () { isAsync = true; }; root.postMessage('', '*'); root.onmessage = oldHandler; return isAsync; } // Use in order, setImmediate, nextTick, postMessage, MessageChannel, script readystatechanged, setTimeout var BrowserMutationObserver = root.MutationObserver || root.WebKitMutationObserver; if (!!BrowserMutationObserver) { var PREFIX = 'drainqueue_'; var observer = new BrowserMutationObserver(function(mutations) { mutations.forEach(function (mutation) { runTask(mutation.attributeName.substring(PREFIX.length)); }) }); var element = root.document.createElement('div'); observer.observe(element, { attributes: true }); // Prevent leaks root.addEventListener('unload', function () { observer.disconnect(); observer = null; }, false); scheduleMethod = function (action) { var id = nextHandle++; tasksByHandle[id] = action; element.setAttribute(PREFIX + id, 'drainQueue'); return id; }; } else if (typeof root.setImmediate === 'function') { scheduleMethod = function (action) { var id = nextHandle++; tasksByHandle[id] = action; root.setImmediate(function () { runTask(id); }); return id; }; } else if (postMessageSupported()) { var MSG_PREFIX = 'ms.rx.schedule' + Math.random(); function onGlobalPostMessage(event) { // Only if we're a match to avoid any other global events if (typeof event.data === 'string' && event.data.substring(0, MSG_PREFIX.length) === MSG_PREFIX) { runTask(event.data.substring(MSG_PREFIX.length)); } } if (root.addEventListener) { root.addEventListener('message', onGlobalPostMessage, false); } else if (root.attachEvent){ root.attachEvent('onmessage', onGlobalPostMessage); } scheduleMethod = function (action) { var id = nextHandle++; tasksByHandle[id] = action; root.postMessage(MSG_PREFIX + id, '*'); return id; }; } else if (!!root.MessageChannel) { var channel = new root.MessageChannel(); channel.port1.onmessage = function (event) { runTask(event.data); }; scheduleMethod = function (action) { var id = nextHandle++; tasksByHandle[id] = action; channel.port2.postMessage(id); return id; }; } else if ('document' in root && 'onreadystatechange' in root.document.createElement('script')) { scheduleMethod = function (action) { var scriptElement = root.document.createElement('script'); var id = nextHandle++; tasksByHandle[id] = action; scriptElement.onreadystatechange = function () { runTask(id); scriptElement.onreadystatechange = null; scriptElement.parentNode.removeChild(scriptElement); scriptElement = null; }; root.document.documentElement.appendChild(scriptElement); return id; }; } else { scheduleMethod = function (action) { var id = nextHandle++; tasksByHandle[id] = action; root.setTimeout(function () { runTask(id); }, 0); return id; }; } var MicroTaskScheduler = (function (__super__) { inherits(MicroTaskScheduler, __super__); function MicroTaskScheduler() { __super__.call(this); } function scheduleAction(disposable, action, scheduler, state) { return function schedule() { !disposable.isDisposed && disposable.setDisposable(Disposable._fixup(action(scheduler, state))); }; } function ClearDisposable(method, id) { this._id = id; this._method = method; this.isDisposed = false; } ClearDisposable.prototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; this._method.call(null, this._id); } }; MicroTaskScheduler.prototype.schedule = function (state, action) { var disposable = new SingleAssignmentDisposable(), id = scheduleMethod(scheduleAction(disposable, action, this, state)); return new BinaryDisposable(disposable, new ClearDisposable(clearMethod, id)); }; MicroTaskScheduler.prototype._scheduleFuture = function (state, dueTime, action) { if (dueTime === 0) { return this.schedule(state, action); } var disposable = new SingleAssignmentDisposable(), id = root.setTimeout(scheduleAction(disposable, action, this, state), dueTime); return new BinaryDisposable(disposable, new ClearDisposable(root.clearTimeout, id)); }; return MicroTaskScheduler; }(Scheduler)); return new MicroTaskScheduler(); }()); return Rx; }));
tools/public-components.js
lo1tuma/react-bootstrap
import React from 'react'; import index from '../src/index'; let components = []; Object.keys(index).forEach(function (item) { if (index[item] instanceof React.Component.constructor) { components.push(item); } }); export default components;
mine-data/src/logout/LogoutLink.js
BerlingskeMedia/nyhedsbreveprofil
import React from 'react'; import { connect } from 'react-redux'; import { logOut } from './logOut.actions'; import './LogoutLink.scss'; const StaticLogoutLink = ({children, onClick}) => ( <a className="LogoutLink" onClick={onClick}>{children}</a> ); const mapDispatchToProps = (dispatch) => ({ onClick: () => dispatch(logOut()) }); export const LogoutLink = connect(null, mapDispatchToProps)(StaticLogoutLink);