text: require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  /* eslint react/prop-types: 0 */
  
  'use strict';
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
  
  var _react = require('react');
  
  var _react2 = _interopRequireDefault(_react);
  
  var _reactSelect = require('react-select');
  
  var _reactSelect2 = _interopRequireDefault(_reactSelect);
  
  var _componentsCustomRenderField = require('./components/CustomRenderField');
  
  var _componentsCustomRenderField2 = _interopRequireDefault(_componentsCustomRenderField);
  
  var _componentsMultiSelectField = require('./components/MultiSelectField');
  
  var _componentsMultiSelectField2 = _interopRequireDefault(_componentsMultiSelectField);
  
  var _componentsRemoteSelectField = require('./components/RemoteSelectField');
  
  var _componentsRemoteSelectField2 = _interopRequireDefault(_componentsRemoteSelectField);
  
  var _componentsSelectedValuesField = require('./components/SelectedValuesField');
  
  var _componentsSelectedValuesField2 = _interopRequireDefault(_componentsSelectedValuesField);
  
  var _componentsStatesField = require('./components/StatesField');
  
  var _componentsStatesField2 = _interopRequireDefault(_componentsStatesField);
  
  var _componentsUsersField = require('./components/UsersField');
  
  var _componentsUsersField2 = _interopRequireDefault(_componentsUsersField);
  
  var _componentsValuesAsNumbersField = require('./components/ValuesAsNumbersField');
  
  var _componentsValuesAsNumbersField2 = _interopRequireDefault(_componentsValuesAsNumbersField);
  
  var _componentsDisabledUpsellOptions = require('./components/DisabledUpsellOptions');
  
  var _componentsDisabledUpsellOptions2 = _interopRequireDefault(_componentsDisabledUpsellOptions);
  
  var FLAVOURS = [{ label: 'Chocolate', value: 'chocolate' }, { label: 'Vanilla', value: 'vanilla' }, { label: 'Strawberry', value: 'strawberry' }, { label: 'Cookies and Cream', value: 'cookiescream' }, { label: 'Peppermint', value: 'peppermint' }];
  var FLAVOURS_WITH_DISABLED_OPTION = FLAVOURS.slice(0);
  FLAVOURS_WITH_DISABLED_OPTION.unshift({ label: 'Caramel (You don\'t like it, apparently)', value: 'caramel', disabled: true });
  
  function logChange() {
  	console.log.apply(console, [].concat(['Select value changed:'], Array.prototype.slice.apply(arguments)));
  }
  
  _react2['default'].render(_react2['default'].createElement(
  	'div',
  	null,
  	_react2['default'].createElement(_componentsStatesField2['default'], { label: 'States', searchable: true }),
  	_react2['default'].createElement(_componentsUsersField2['default'], { label: 'Users (custom options/value)', hint: 'This example uses Gravatar to render user\'s image besides the value and the options' }),
  	_react2['default'].createElement(_componentsValuesAsNumbersField2['default'], { label: 'Values as numbers' }),
  	_react2['default'].createElement(_componentsMultiSelectField2['default'], { label: 'Multiselect' }),
  	_react2['default'].createElement(_componentsSelectedValuesField2['default'], { label: 'Clickable labels (labels as links)', options: FLAVOURS, hint: 'Open the console to see click behaviour (data/event)' }),
  	_react2['default'].createElement(_componentsSelectedValuesField2['default'], { label: 'Disabled option', options: FLAVOURS_WITH_DISABLED_OPTION, hint: 'You savage! Caramel is the best...' }),
  	_react2['default'].createElement(_componentsDisabledUpsellOptions2['default'], { label: 'Disable option with an upsell link' }),
  	_react2['default'].createElement(_componentsSelectedValuesField2['default'], { label: 'Option Creation (tags mode)', options: FLAVOURS, allowCreate: true, hint: 'Enter a value that\'s not in the list, then hit enter' }),
  	_react2['default'].createElement(_componentsCustomRenderField2['default'], { label: 'Custom render options/values' }),
  	_react2['default'].createElement(_componentsCustomRenderField2['default'], { label: 'Custom render options/values (multi)', multi: true, delimiter: ',' }),
  	_react2['default'].createElement(_componentsRemoteSelectField2['default'], { label: 'Remote Options', hint: 'Type anything in the remote example to asynchronously load options. Valid alternative results are "A", "AA", and "AB"' })
  ), document.getElementById('example'));
  
  },{"./components/CustomRenderField":3,"./components/DisabledUpsellOptions":5,"./components/MultiSelectField":6,"./components/RemoteSelectField":7,"./components/SelectedValuesField":8,"./components/StatesField":9,"./components/UsersField":10,"./components/ValuesAsNumbersField":11,"react":undefined,"react-select":undefined}],2:[function(require,module,exports){
  'use strict';
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
  
  var _react = require('react');
  
  var _react2 = _interopRequireDefault(_react);
  
  var _reactGravatar = require('react-gravatar');
  
  var _reactGravatar2 = _interopRequireDefault(_reactGravatar);
  
  var Option = _react2['default'].createClass({
  	displayName: 'Option',
  
  	propTypes: {
  		addLabelText: _react2['default'].PropTypes.string,
  		className: _react2['default'].PropTypes.string,
  		mouseDown: _react2['default'].PropTypes.func,
  		mouseEnter: _react2['default'].PropTypes.func,
  		mouseLeave: _react2['default'].PropTypes.func,
  		option: _react2['default'].PropTypes.object.isRequired,
  		renderFunc: _react2['default'].PropTypes.func
  	},
  	render: function render() {
  		var obj = this.props.option;
  		var size = 15;
  		var gravatarStyle = {
  			borderRadius: 3,
  			display: 'inline-block',
  			marginRight: 10,
  			position: 'relative',
  			top: -2,
  			verticalAlign: 'middle'
  		};
  		return _react2['default'].createElement(
  			'div',
  			{ className: this.props.className,
  				onMouseEnter: this.props.mouseEnter,
  				onMouseLeave: this.props.mouseLeave,
  				onMouseDown: this.props.mouseDown,
  				onClick: this.props.mouseDown },
  			_react2['default'].createElement(_reactGravatar2['default'], { email: obj.email, size: size, style: gravatarStyle }),
  			obj.value
  		);
  	}
  });
  
  module.exports = Option;
  
  },{"react":undefined,"react-gravatar":17}],3:[function(require,module,exports){
  'use strict';
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
  
  var _react = require('react');
  
  var _react2 = _interopRequireDefault(_react);
  
  var _reactSelect = require('react-select');
  
  var _reactSelect2 = _interopRequireDefault(_reactSelect);
  
  function logChange() {
  	console.log.apply(console, [].concat(['Select value changed:'], Array.prototype.slice.apply(arguments)));
  }
  
  var CustomRenderField = _react2['default'].createClass({
  	displayName: 'CustomRenderField',
  	propTypes: {
  		delimiter: _react2['default'].PropTypes.string,
  		label: _react2['default'].PropTypes.string,
  		multi: _react2['default'].PropTypes.bool
  	},
  	renderOption: function renderOption(option) {
  		return _react2['default'].createElement(
  			'span',
  			{ style: { color: option.hex } },
  			option.label,
  			' (',
  			option.hex,
  			')'
  		);
  	},
  	renderValue: function renderValue(option) {
  		return _react2['default'].createElement(
  			'strong',
  			{ style: { color: option.hex } },
  			option.label
  		);
  	},
  	render: function render() {
  		var ops = [{ label: 'Red', value: 'red', hex: '#EC6230' }, { label: 'Green', value: 'green', hex: '#4ED84E' }, { label: 'Blue', value: 'blue', hex: '#6D97E2' }];
  		return _react2['default'].createElement(
  			'div',
  			{ className: 'section' },
  			_react2['default'].createElement(
  				'h3',
  				{ className: 'section-heading' },
  				this.props.label
  			),
  			_react2['default'].createElement(_reactSelect2['default'], {
  				delimiter: this.props.delimiter,
  				multi: this.props.multi,
  				allowCreate: true,
  				placeholder: 'Select your favourite',
  				options: ops,
  				optionRenderer: this.renderOption,
  				valueRenderer: this.renderValue,
  				onChange: logChange })
  		);
  	}
  });
  
  module.exports = CustomRenderField;
  
  },{"react":undefined,"react-select":undefined}],4:[function(require,module,exports){
  'use strict';
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
  
  var _react = require('react');
  
  var _react2 = _interopRequireDefault(_react);
  
  var _reactGravatar = require('react-gravatar');
  
  var _reactGravatar2 = _interopRequireDefault(_reactGravatar);
  
  var SingleValue = _react2['default'].createClass({
  	displayName: 'SingleValue',
  
  	propTypes: {
  		placeholder: _react2['default'].PropTypes.string,
  		value: _react2['default'].PropTypes.object
  	},
  	render: function render() {
  		var obj = this.props.value;
  		var size = 15;
  		var gravatarStyle = {
  			borderRadius: 3,
  			display: 'inline-block',
  			marginRight: 10,
  			position: 'relative',
  			top: -2,
  			verticalAlign: 'middle'
  		};
  
  		return _react2['default'].createElement(
  			'div',
  			{ className: 'Select-placeholder' },
  			obj ? _react2['default'].createElement(
  				'div',
  				null,
  				_react2['default'].createElement(_reactGravatar2['default'], { email: obj.email, size: size, style: gravatarStyle }),
  				obj.value
  			) : this.props.placeholder
  		);
  	}
  });
  
  module.exports = SingleValue;
  
  },{"react":undefined,"react-gravatar":17}],5:[function(require,module,exports){
  'use strict';
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
  
  var _react = require('react');
  
  var _react2 = _interopRequireDefault(_react);
  
  var _reactSelect = require('react-select');
  
  var _reactSelect2 = _interopRequireDefault(_reactSelect);
  
  function logChange() {
  	console.log.apply(console, [].concat(['Select value changed:'], Array.prototype.slice.apply(arguments)));
  }
  
  var DisabledUpsellOptions = _react2['default'].createClass({
  	displayName: 'DisabledUpsellOptions',
  	propTypes: {
  		label: _react2['default'].PropTypes.string
  	},
  	onLabelClick: function onLabelClick(data, event) {
  		console.log(data, event);
  	},
  	renderLink: function renderLink() {
  		return _react2['default'].createElement(
  			'a',
  			{ style: { marginLeft: 5 }, href: '/upgrade', target: '_blank' },
  			'Upgrade here!'
  		);
  	},
  	renderOption: function renderOption(option) {
  		return _react2['default'].createElement(
  			'span',
  			null,
  			option.label,
  			' ',
  			option.link,
  			' '
  		);
  	},
  	render: function render() {
  		var ops = [{ label: 'Basic customer support', value: 'basic' }, { label: 'Premium customer support', value: 'premium' }, { label: 'Pro customer support', value: 'pro', disabled: true, link: this.renderLink() }];
  		return _react2['default'].createElement(
  			'div',
  			{ className: 'section' },
  			_react2['default'].createElement(
  				'h3',
  				{ className: 'section-heading' },
  				this.props.label
  			),
  			_react2['default'].createElement(_reactSelect2['default'], {
  				onOptionLabelClick: this.onLabelClick,
  				placeholder: 'Select your support level',
  				options: ops,
  				optionRenderer: this.renderOption,
  				onChange: logChange })
  		);
  	}
  });
  module.exports = DisabledUpsellOptions;
  
  },{"react":undefined,"react-select":undefined}],6:[function(require,module,exports){
  'use strict';
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
  
  var _react = require('react');
  
  var _react2 = _interopRequireDefault(_react);
  
  var _reactSelect = require('react-select');
  
  var _reactSelect2 = _interopRequireDefault(_reactSelect);
  
  function logChange() {
  	console.log.apply(console, [].concat(['Select value changed:'], Array.prototype.slice.apply(arguments)));
  }
  
  var MultiSelectField = _react2['default'].createClass({
  	displayName: 'MultiSelectField',
  	propTypes: {
  		label: _react2['default'].PropTypes.string
  	},
  	getInitialState: function getInitialState() {
  		return {
  			disabled: false,
  			value: []
  		};
  	},
  	handleSelectChange: function handleSelectChange(value, values) {
  		logChange('New value:', value, 'Values:', values);
  		this.setState({ value: value });
  	},
  	toggleDisabled: function toggleDisabled(e) {
  		this.setState({ 'disabled': e.target.checked });
  	},
  	render: function render() {
  		var ops = [{ label: 'Chocolate', value: 'chocolate' }, { label: 'Vanilla', value: 'vanilla' }, { label: 'Strawberry', value: 'strawberry' }, { label: 'Caramel', value: 'caramel' }, { label: 'Cookies and Cream', value: 'cookiescream' }, { label: 'Peppermint', value: 'peppermint' }];
  		return _react2['default'].createElement(
  			'div',
  			{ className: 'section' },
  			_react2['default'].createElement(
  				'h3',
  				{ className: 'section-heading' },
  				this.props.label
  			),
  			_react2['default'].createElement(_reactSelect2['default'], { multi: true, disabled: this.state.disabled, value: this.state.value, placeholder: 'Select your favourite(s)', options: ops, onChange: this.handleSelectChange }),
  			_react2['default'].createElement(
  				'div',
  				{ className: 'checkbox-list' },
  				_react2['default'].createElement(
  					'label',
  					{ className: 'checkbox' },
  					_react2['default'].createElement('input', { type: 'checkbox', className: 'checkbox-control', checked: this.state.disabled, onChange: this.toggleDisabled }),
  					_react2['default'].createElement(
  						'span',
  						{ className: 'checkbox-label' },
  						'Disabled'
  					)
  				)
  			)
  		);
  	}
  });
  
  module.exports = MultiSelectField;
  
  },{"react":undefined,"react-select":undefined}],7:[function(require,module,exports){
  'use strict';
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
  
  var _react = require('react');
  
  var _react2 = _interopRequireDefault(_react);
  
  var _reactSelect = require('react-select');
  
  var _reactSelect2 = _interopRequireDefault(_reactSelect);
  
  var RemoteSelectField = _react2['default'].createClass({
  	displayName: 'RemoteSelectField',
  	propTypes: {
  		hint: _react2['default'].PropTypes.string,
  		label: _react2['default'].PropTypes.string
  	},
  	loadOptions: function loadOptions(input, callback) {
  		input = input.toLowerCase();
  		var rtn = {
  			options: [{ label: 'One', value: 'one' }, { label: 'Two', value: 'two' }, { label: 'Three', value: 'three' }],
  			complete: true
  		};
  		if (input.slice(0, 1) === 'a') {
  			if (input.slice(0, 2) === 'ab') {
  				rtn = {
  					options: [{ label: 'AB', value: 'ab' }, { label: 'ABC', value: 'abc' }, { label: 'ABCD', value: 'abcd' }],
  					complete: true
  				};
  			} else {
  				rtn = {
  					options: [{ label: 'A', value: 'a' }, { label: 'AA', value: 'aa' }, { label: 'AB', value: 'ab' }],
  					complete: false
  				};
  			}
  		} else if (!input.length) {
  			rtn.complete = false;
  		}
  
  		setTimeout(function () {
  			callback(null, rtn);
  		}, 500);
  	},
  	renderHint: function renderHint() {
  		if (!this.props.hint) return null;
  		return _react2['default'].createElement(
  			'div',
  			{ className: 'hint' },
  			this.props.hint
  		);
  	},
  	render: function render() {
  		return _react2['default'].createElement(
  			'div',
  			{ className: 'section' },
  			_react2['default'].createElement(
  				'h3',
  				{ className: 'section-heading' },
  				this.props.label
  			),
  			_react2['default'].createElement(_reactSelect2['default'], { asyncOptions: this.loadOptions, className: 'remote-example' }),
  			this.renderHint()
  		);
  	}
  });
  
  module.exports = RemoteSelectField;
  
  },{"react":undefined,"react-select":undefined}],8:[function(require,module,exports){
  'use strict';
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
  
  var _react = require('react');
  
  var _react2 = _interopRequireDefault(_react);
  
  var _reactSelect = require('react-select');
  
  var _reactSelect2 = _interopRequireDefault(_reactSelect);
  
  function logChange() {
  	console.log.apply(console, [].concat(['Select value changed:'], Array.prototype.slice.apply(arguments)));
  }
  
  var SelectedValuesField = _react2['default'].createClass({
  	displayName: 'SelectedValuesField',
  	propTypes: {
  		allowCreate: _react2['default'].PropTypes.bool,
  		hint: _react2['default'].PropTypes.string,
  		label: _react2['default'].PropTypes.string,
  		options: _react2['default'].PropTypes.array
  	},
  	onLabelClick: function onLabelClick(data, event) {
  		console.log(data, event);
  	},
  	renderHint: function renderHint() {
  		if (!this.props.hint) return null;
  		return _react2['default'].createElement(
  			'div',
  			{ className: 'hint' },
  			this.props.hint
  		);
  	},
  	render: function render() {
  		return _react2['default'].createElement(
  			'div',
  			{ className: 'section' },
  			_react2['default'].createElement(
  				'h3',
  				{ className: 'section-heading' },
  				this.props.label
  			),
  			_react2['default'].createElement(_reactSelect2['default'], {
  				allowCreate: this.props.allowCreate,
  				onOptionLabelClick: this.onLabelClick,
  				value: this.props.options.slice(1, 3),
  				multi: true,
  				placeholder: 'Select your favourite(s)',
  				options: this.props.options,
  				onChange: logChange }),
  			this.renderHint()
  		);
  	}
  });
  
  module.exports = SelectedValuesField;
  
  },{"react":undefined,"react-select":undefined}],9:[function(require,module,exports){
  'use strict';
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
  
  var _react = require('react');
  
  var _react2 = _interopRequireDefault(_react);
  
  var _reactSelect = require('react-select');
  
  var _reactSelect2 = _interopRequireDefault(_reactSelect);
  
  var STATES = require('../data/states');
  var id = 0;
  
  function logChange() {
  	console.log.apply(console, [].concat(['Select value changed:'], Array.prototype.slice.apply(arguments)));
  }
  
  var StatesField = _react2['default'].createClass({
  	displayName: 'StatesField',
  	propTypes: {
  		label: _react2['default'].PropTypes.string,
  		searchable: _react2['default'].PropTypes.bool
  	},
  	getDefaultProps: function getDefaultProps() {
  		return {
  			label: 'States:',
  			searchable: true
  		};
  	},
  	getInitialState: function getInitialState() {
  		return {
  			country: 'AU',
  			disabled: false,
  			searchable: this.props.searchable,
  			id: ++id,
  			selectValue: 'new-south-wales'
  		};
  	},
  	switchCountry: function switchCountry(e) {
  		var newCountry = e.target.value;
  		console.log('Country changed to ' + newCountry);
  		this.setState({
  			country: newCountry,
  			selectValue: null
  		});
  	},
  	updateValue: function updateValue(newValue) {
  		logChange('State changed to ' + newValue);
  		this.setState({
  			selectValue: newValue || null
  		});
  	},
  	focusStateSelect: function focusStateSelect() {
  		this.refs.stateSelect.focus();
  	},
  	toggleCheckbox: function toggleCheckbox(e) {
  		var newState = {};
  		newState[e.target.name] = e.target.checked;
  		this.setState(newState);
  	},
  	render: function render() {
  		var ops = STATES[this.state.country];
  		return _react2['default'].createElement(
  			'div',
  			{ className: 'section' },
  			_react2['default'].createElement(
  				'h3',
  				{ className: 'section-heading' },
  				this.props.label
  			),
  			_react2['default'].createElement(_reactSelect2['default'], { ref: 'stateSelect', options: ops, disabled: this.state.disabled, value: this.state.selectValue, onChange: this.updateValue, searchable: this.state.searchable }),
  			_react2['default'].createElement(
  				'div',
  				{ style: { marginTop: 14 } },
  				_react2['default'].createElement(
  					'button',
  					{ type: 'button', onClick: this.focusStateSelect },
  					'Focus Select'
  				),
  				_react2['default'].createElement(
  					'label',
  					{ className: 'checkbox', style: { marginLeft: 10 } },
  					_react2['default'].createElement('input', { type: 'checkbox', className: 'checkbox-control', name: 'searchable', checked: this.state.searchable, onChange: this.toggleCheckbox }),
  					_react2['default'].createElement(
  						'span',
  						{ className: 'checkbox-label' },
  						'Searchable'
  					)
  				),
  				_react2['default'].createElement(
  					'label',
  					{ className: 'checkbox', style: { marginLeft: 10 } },
  					_react2['default'].createElement('input', { type: 'checkbox', className: 'checkbox-control', name: 'disabled', checked: this.state.disabled, onChange: this.toggleCheckbox }),
  					_react2['default'].createElement(
  						'span',
  						{ className: 'checkbox-label' },
  						'Disabled'
  					)
  				)
  			),
  			_react2['default'].createElement(
  				'div',
  				{ className: 'checkbox-list' },
  				_react2['default'].createElement(
  					'label',
  					{ className: 'checkbox' },
  					_react2['default'].createElement('input', { type: 'radio', className: 'checkbox-control', checked: this.state.country === 'AU', value: 'AU', onChange: this.switchCountry }),
  					_react2['default'].createElement(
  						'span',
  						{ className: 'checkbox-label' },
  						'Australia'
  					)
  				),
  				_react2['default'].createElement(
  					'label',
  					{ className: 'checkbox' },
  					_react2['default'].createElement('input', { type: 'radio', className: 'checkbox-control', checked: this.state.country === 'US', value: 'US', onChange: this.switchCountry }),
  					_react2['default'].createElement(
  						'span',
  						{ className: 'checkbox-label' },
  						'United States'
  					)
  				)
  			)
  		);
  	}
  });
  
  module.exports = StatesField;
  
  },{"../data/states":12,"react":undefined,"react-select":undefined}],10:[function(require,module,exports){
  'use strict';
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
  
  var _CustomOption = require('./CustomOption');
  
  var _CustomOption2 = _interopRequireDefault(_CustomOption);
  
  var _CustomSingleValue = require('./CustomSingleValue');
  
  var _CustomSingleValue2 = _interopRequireDefault(_CustomSingleValue);
  
  var _react = require('react');
  
  var _react2 = _interopRequireDefault(_react);
  
  var _reactSelect = require('react-select');
  
  var _reactSelect2 = _interopRequireDefault(_reactSelect);
  
  var USERS = require('../data/users');
  
  var UsersField = _react2['default'].createClass({
  	displayName: 'UsersField',
  
  	propTypes: {
  		hint: _react2['default'].PropTypes.string,
  		label: _react2['default'].PropTypes.string
  	},
  	renderHint: function renderHint() {
  		if (!this.props.hint) return null;
  		return _react2['default'].createElement(
  			'div',
  			{ className: 'hint' },
  			this.props.hint
  		);
  	},
  	render: function render() {
  
  		return _react2['default'].createElement(
  			'div',
  			{ className: 'section' },
  			_react2['default'].createElement(
  				'h3',
  				{ className: 'section-heading' },
  				this.props.label
  			),
  			_react2['default'].createElement(_reactSelect2['default'], {
  				onOptionLabelClick: this.onLabelClick,
  				placeholder: 'Select user',
  				optionComponent: _CustomOption2['default'],
  				singleValueComponent: _CustomSingleValue2['default'],
  				options: USERS.users }),
  			this.renderHint()
  		);
  	}
  });
  
  module.exports = UsersField;
  
  },{"../data/users":13,"./CustomOption":2,"./CustomSingleValue":4,"react":undefined,"react-select":undefined}],11:[function(require,module,exports){
  'use strict';
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
  
  var _react = require('react');
  
  var _react2 = _interopRequireDefault(_react);
  
  var _reactSelect = require('react-select');
  
  var _reactSelect2 = _interopRequireDefault(_reactSelect);
  
  function logChange() {
  	console.log.apply(console, [].concat(['Select value changed:'], Array.prototype.slice.apply(arguments)));
  }
  
  var ValuesAsNumbersField = _react2['default'].createClass({
  	displayName: 'ValuesAsNumbersField',
  	propTypes: {
  		label: _react2['default'].PropTypes.string
  	},
  
  	getInitialState: function getInitialState() {
  		return {
  			options: [{ value: 10, label: 'Ten' }, { value: 11, label: 'Eleven' }, { value: 12, label: 'Twelve' }, { value: 23, label: 'Twenty-three' }, { value: 24, label: 'Twenty-four' }],
  			matchPos: 'any',
  			matchValue: true,
  			matchLabel: true,
  			value: null,
  			multi: false
  		};
  	},
  
  	onChangeMatchStart: function onChangeMatchStart(event) {
  		this.setState({
  			matchPos: event.target.checked ? 'start' : 'any'
  		});
  	},
  
  	onChangeMatchValue: function onChangeMatchValue(event) {
  		this.setState({
  			matchValue: event.target.checked
  		});
  	},
  
  	onChangeMatchLabel: function onChangeMatchLabel(event) {
  		this.setState({
  			matchLabel: event.target.checked
  		});
  	},
  
  	onChange: function onChange(value, values) {
  		this.setState({
  			value: value
  		});
  		logChange(value, values);
  	},
  
  	onChangeMulti: function onChangeMulti(event) {
  		this.setState({
  			multi: event.target.checked
  		});
  	},
  
  	render: function render() {
  
  		var matchProp = 'any';
  
  		if (this.state.matchLabel && !this.state.matchValue) {
  			matchProp = 'label';
  		}
  
  		if (!this.state.matchLabel && this.state.matchValue) {
  			matchProp = 'value';
  		}
  
  		return _react2['default'].createElement(
  			'div',
  			{ className: 'section' },
  			_react2['default'].createElement(
  				'h3',
  				{ className: 'section-heading' },
  				this.props.label
  			),
  			_react2['default'].createElement(_reactSelect2['default'], {
  				searchable: true,
  				matchProp: matchProp,
  				matchPos: this.state.matchPos,
  				options: this.state.options,
  				onChange: this.onChange,
  				value: this.state.value,
  				multi: this.state.multi
  			}),
  			_react2['default'].createElement(
  				'div',
  				{ className: 'checkbox-list' },
  				_react2['default'].createElement(
  					'label',
  					{ className: 'checkbox' },
  					_react2['default'].createElement('input', { type: 'checkbox', className: 'checkbox-control', checked: this.state.multi, onChange: this.onChangeMulti }),
  					_react2['default'].createElement(
  						'span',
  						{ className: 'checkbox-label' },
  						'Multi-Select'
  					)
  				),
  				_react2['default'].createElement(
  					'label',
  					{ className: 'checkbox' },
  					_react2['default'].createElement('input', { type: 'checkbox', className: 'checkbox-control', checked: this.state.matchValue, onChange: this.onChangeMatchValue }),
  					_react2['default'].createElement(
  						'span',
  						{ className: 'checkbox-label' },
  						'Match value only'
  					)
  				),
  				_react2['default'].createElement(
  					'label',
  					{ className: 'checkbox' },
  					_react2['default'].createElement('input', { type: 'checkbox', className: 'checkbox-control', checked: this.state.matchLabel, onChange: this.onChangeMatchLabel }),
  					_react2['default'].createElement(
  						'span',
  						{ className: 'checkbox-label' },
  						'Match label only'
  					)
  				),
  				_react2['default'].createElement(
  					'label',
  					{ className: 'checkbox' },
  					_react2['default'].createElement('input', { type: 'checkbox', className: 'checkbox-control', checked: this.state.matchPos === 'start', onChange: this.onChangeMatchStart }),
  					_react2['default'].createElement(
  						'span',
  						{ className: 'checkbox-label' },
  						'Only include matches from the start of the string'
  					)
  				)
  			)
  		);
  	}
  });
  
  module.exports = ValuesAsNumbersField;
  
  },{"react":undefined,"react-select":undefined}],12:[function(require,module,exports){
  'use strict';
  
  exports.AU = [{ value: 'australian-capital-territory', label: 'Australian Capital Territory' }, { value: 'new-south-wales', label: 'New South Wales' }, { value: 'victoria', label: 'Victoria' }, { value: 'queensland', label: 'Queensland' }, { value: 'western-australia', label: 'Western Australia' }, { value: 'south-australia', label: 'South Australia' }, { value: 'tasmania', label: 'Tasmania' }, { value: 'northern-territory', label: 'Northern Territory' }];
  
  exports.US = [{ value: 'AL', label: 'Alabama', disabled: true }, { value: 'AK', label: 'Alaska' }, { value: 'AS', label: 'American Samoa' }, { value: 'AZ', label: 'Arizona' }, { value: 'AR', label: 'Arkansas' }, { value: 'CA', label: 'California' }, { value: 'CO', label: 'Colorado' }, { value: 'CT', label: 'Connecticut' }, { value: 'DE', label: 'Delaware' }, { value: 'DC', label: 'District Of Columbia' }, { value: 'FM', label: 'Federated States Of Micronesia' }, { value: 'FL', label: 'Florida' }, { value: 'GA', label: 'Georgia' }, { value: 'GU', label: 'Guam' }, { value: 'HI', label: 'Hawaii' }, { value: 'ID', label: 'Idaho' }, { value: 'IL', label: 'Illinois' }, { value: 'IN', label: 'Indiana' }, { value: 'IA', label: 'Iowa' }, { value: 'KS', label: 'Kansas' }, { value: 'KY', label: 'Kentucky' }, { value: 'LA', label: 'Louisiana' }, { value: 'ME', label: 'Maine' }, { value: 'MH', label: 'Marshall Islands' }, { value: 'MD', label: 'Maryland' }, { value: 'MA', label: 'Massachusetts' }, { value: 'MI', label: 'Michigan' }, { value: 'MN', label: 'Minnesota' }, { value: 'MS', label: 'Mississippi' }, { value: 'MO', label: 'Missouri' }, { value: 'MT', label: 'Montana' }, { value: 'NE', label: 'Nebraska' }, { value: 'NV', label: 'Nevada' }, { value: 'NH', label: 'New Hampshire' }, { value: 'NJ', label: 'New Jersey' }, { value: 'NM', label: 'New Mexico' }, { value: 'NY', label: 'New York' }, { value: 'NC', label: 'North Carolina' }, { value: 'ND', label: 'North Dakota' }, { value: 'MP', label: 'Northern Mariana Islands' }, { value: 'OH', label: 'Ohio' }, { value: 'OK', label: 'Oklahoma' }, { value: 'OR', label: 'Oregon' }, { value: 'PW', label: 'Palau' }, { value: 'PA', label: 'Pennsylvania' }, { value: 'PR', label: 'Puerto Rico' }, { value: 'RI', label: 'Rhode Island' }, { value: 'SC', label: 'South Carolina' }, { value: 'SD', label: 'South Dakota' }, { value: 'TN', label: 'Tennessee' }, { value: 'TX', label: 'Texas' }, { value: 'UT', label: 'Utah' }, { value: 'VT', label: 'Vermont' }, { value: 'VI', label: 'Virgin Islands' }, { value: 'VA', label: 'Virginia' }, { value: 'WA', label: 'Washington' }, { value: 'WV', label: 'West Virginia' }, { value: 'WI', label: 'Wisconsin' }, { value: 'WY', label: 'Wyoming' }];
  
  },{}],13:[function(require,module,exports){
  'use strict';
  
  exports.users = [{ value: 'John Smith', label: 'John Smith', email: 'john@smith.com' }, { value: 'Merry Jane', label: 'Merry Jane', email: 'merry@jane.com' }, { value: 'Stan Hoper', label: 'Stan Hoper', email: 'stan@hoper.com' }];
  
  },{}],14:[function(require,module,exports){
  // Copyright Joyent, Inc. and other Node contributors.
  //
  // Permission is hereby granted, free of charge, to any person obtaining a
  // copy of this software and associated documentation files (the
  // "Software"), to deal in the Software without restriction, including
  // without limitation the rights to use, copy, modify, merge, publish,
  // distribute, sublicense, and/or sell copies of the Software, and to permit
  // persons to whom the Software is furnished to do so, subject to the
  // following conditions:
  //
  // The above copyright notice and this permission notice shall be included
  // in all copies or substantial portions of the Software.
  //
  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  // USE OR OTHER DEALINGS IN THE SOFTWARE.
  
  'use strict';
  
  // If obj.hasOwnProperty has been overridden, then calling
  // obj.hasOwnProperty(prop) will break.
  // See: https://github.com/joyent/node/issues/1707
  function hasOwnProperty(obj, prop) {
    return Object.prototype.hasOwnProperty.call(obj, prop);
  }
  
  module.exports = function(qs, sep, eq, options) {
    sep = sep || '&';
    eq = eq || '=';
    var obj = {};
  
    if (typeof qs !== 'string' || qs.length === 0) {
      return obj;
    }
  
    var regexp = /\+/g;
    qs = qs.split(sep);
  
    var maxKeys = 1000;
    if (options && typeof options.maxKeys === 'number') {
      maxKeys = options.maxKeys;
    }
  
    var len = qs.length;
    // maxKeys <= 0 means that we should not limit keys count
    if (maxKeys > 0 && len > maxKeys) {
      len = maxKeys;
    }
  
    for (var i = 0; i < len; ++i) {
      var x = qs[i].replace(regexp, '%20'),
          idx = x.indexOf(eq),
          kstr, vstr, k, v;
  
      if (idx >= 0) {
        kstr = x.substr(0, idx);
        vstr = x.substr(idx + 1);
      } else {
        kstr = x;
        vstr = '';
      }
  
      k = decodeURIComponent(kstr);
      v = decodeURIComponent(vstr);
  
      if (!hasOwnProperty(obj, k)) {
        obj[k] = v;
      } else if (isArray(obj[k])) {
        obj[k].push(v);
      } else {
        obj[k] = [obj[k], v];
      }
    }
  
    return obj;
  };
  
  var isArray = Array.isArray || function (xs) {
    return Object.prototype.toString.call(xs) === '[object Array]';
  };
  
  },{}],15:[function(require,module,exports){
  // Copyright Joyent, Inc. and other Node contributors.
  //
  // Permission is hereby granted, free of charge, to any person obtaining a
  // copy of this software and associated documentation files (the
  // "Software"), to deal in the Software without restriction, including
  // without limitation the rights to use, copy, modify, merge, publish,
  // distribute, sublicense, and/or sell copies of the Software, and to permit
  // persons to whom the Software is furnished to do so, subject to the
  // following conditions:
  //
  // The above copyright notice and this permission notice shall be included
  // in all copies or substantial portions of the Software.
  //
  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  // USE OR OTHER DEALINGS IN THE SOFTWARE.
  
  'use strict';
  
  var stringifyPrimitive = function(v) {
    switch (typeof v) {
      case 'string':
        return v;
  
      case 'boolean':
        return v ? 'true' : 'false';
  
      case 'number':
        return isFinite(v) ? v : '';
  
      default:
        return '';
    }
  };
  
  module.exports = function(obj, sep, eq, name) {
    sep = sep || '&';
    eq = eq || '=';
    if (obj === null) {
      obj = undefined;
    }
  
    if (typeof obj === 'object') {
      return map(objectKeys(obj), function(k) {
        var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
        if (isArray(obj[k])) {
          return map(obj[k], function(v) {
            return ks + encodeURIComponent(stringifyPrimitive(v));
          }).join(sep);
        } else {
          return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
        }
      }).join(sep);
  
    }
  
    if (!name) return '';
    return encodeURIComponent(stringifyPrimitive(name)) + eq +
           encodeURIComponent(stringifyPrimitive(obj));
  };
  
  var isArray = Array.isArray || function (xs) {
    return Object.prototype.toString.call(xs) === '[object Array]';
  };
  
  function map (xs, f) {
    if (xs.map) return xs.map(f);
    var res = [];
    for (var i = 0; i < xs.length; i++) {
      res.push(f(xs[i], i));
    }
    return res;
  }
  
  var objectKeys = Object.keys || function (obj) {
    var res = [];
    for (var key in obj) {
      if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
    }
    return res;
  };
  
  },{}],16:[function(require,module,exports){
  'use strict';
  
  exports.decode = exports.parse = require('./decode');
  exports.encode = exports.stringify = require('./encode');
  
  },{"./decode":14,"./encode":15}],17:[function(require,module,exports){
  // Generated by CoffeeScript 1.9.3
  var React, isRetina, md5, querystring;
  
  React = require('react');
  
  md5 = require('md5');
  
  querystring = require('querystring');
  
  isRetina = require('is-retina');
  
  module.exports = React.createClass({
    displayName: 'Gravatar',
    propTypes: {
      email: React.PropTypes.string.isRequired,
      size: React.PropTypes.number,
      rating: React.PropTypes.string,
      https: React.PropTypes.bool,
      "default": React.PropTypes.string,
      className: React.PropTypes.string
    },
    getDefaultProps: function() {
      return {
        size: 50,
        rating: 'g',
        https: false,
        "default": "retro",
        email: '',
        className: ""
      };
    },
    render: function() {
      var base, query, src;
      base = this.props.https ? "https://secure.gravatar.com/avatar/" : 'http://www.gravatar.com/avatar/';
      query = querystring.stringify({
        s: isRetina() ? this.props.size * 2 : this.props.size,
        r: this.props.rating,
        d: this.props["default"]
      });
      src = base + md5(this.props.email) + "?" + query;
      return React.createElement("img", React.__spread({}, this.props, {
        "className": "react-gravatar " + this.props.className,
        "src": src,
        "height": this.props.size,
        "width": this.props.size
      }));
    }
  });
  
  },{"is-retina":18,"md5":19,"querystring":16,"react":undefined}],18:[function(require,module,exports){
  module.exports = function() {
    var mediaQuery;
    if (typeof window !== "undefined" && window !== null) {
      mediaQuery = "(-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5/4), (min-resolution: 1.25dppx)";
      if (window.devicePixelRatio > 1.25) {
        return true;
      }
      if (window.matchMedia && window.matchMedia(mediaQuery).matches) {
        return true;
      }
    }
    return false;
  };
  
  },{}],19:[function(require,module,exports){
  (function(){
    var crypt = require('crypt'),
        utf8 = require('charenc').utf8,
        isBuffer = require('is-buffer'),
        bin = require('charenc').bin,
  
    // The core
    md5 = function (message, options) {
      // Convert to byte array
      if (message.constructor == String)
        if (options && options.encoding === 'binary')
          message = bin.stringToBytes(message);
        else
          message = utf8.stringToBytes(message);
      else if (isBuffer(message))
        message = Array.prototype.slice.call(message, 0);
      else if (!Array.isArray(message))
        message = message.toString();
      // else, assume byte array already
  
      var m = crypt.bytesToWords(message),
          l = message.length * 8,
          a =  1732584193,
          b = -271733879,
          c = -1732584194,
          d =  271733878;
  
      // Swap endian
      for (var i = 0; i < m.length; i++) {
        m[i] = ((m[i] <<  8) | (m[i] >>> 24)) & 0x00FF00FF |
               ((m[i] << 24) | (m[i] >>>  8)) & 0xFF00FF00;
      }
  
      // Padding
      m[l >>> 5] |= 0x80 << (l % 32);
      m[(((l + 64) >>> 9) << 4) + 14] = l;
  
      // Method shortcuts
      var FF = md5._ff,
          GG = md5._gg,
          HH = md5._hh,
          II = md5._ii;
  
      for (var i = 0; i < m.length; i += 16) {
  
        var aa = a,
            bb = b,
            cc = c,
            dd = d;
  
        a = FF(a, b, c, d, m[i+ 0],  7, -680876936);
        d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
        c = FF(c, d, a, b, m[i+ 2], 17,  606105819);
        b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
        a = FF(a, b, c, d, m[i+ 4],  7, -176418897);
        d = FF(d, a, b, c, m[i+ 5], 12,  1200080426);
        c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
        b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
        a = FF(a, b, c, d, m[i+ 8],  7,  1770035416);
        d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
        c = FF(c, d, a, b, m[i+10], 17, -42063);
        b = FF(b, c, d, a, m[i+11], 22, -1990404162);
        a = FF(a, b, c, d, m[i+12],  7,  1804603682);
        d = FF(d, a, b, c, m[i+13], 12, -40341101);
        c = FF(c, d, a, b, m[i+14], 17, -1502002290);
        b = FF(b, c, d, a, m[i+15], 22,  1236535329);
  
        a = GG(a, b, c, d, m[i+ 1],  5, -165796510);
        d = GG(d, a, b, c, m[i+ 6],  9, -1069501632);
        c = GG(c, d, a, b, m[i+11], 14,  643717713);
        b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
        a = GG(a, b, c, d, m[i+ 5],  5, -701558691);
        d = GG(d, a, b, c, m[i+10],  9,  38016083);
        c = GG(c, d, a, b, m[i+15], 14, -660478335);
        b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
        a = GG(a, b, c, d, m[i+ 9],  5,  568446438);
        d = GG(d, a, b, c, m[i+14],  9, -1019803690);
        c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
        b = GG(b, c, d, a, m[i+ 8], 20,  1163531501);
        a = GG(a, b, c, d, m[i+13],  5, -1444681467);
        d = GG(d, a, b, c, m[i+ 2],  9, -51403784);
        c = GG(c, d, a, b, m[i+ 7], 14,  1735328473);
        b = GG(b, c, d, a, m[i+12], 20, -1926607734);
  
        a = HH(a, b, c, d, m[i+ 5],  4, -378558);
        d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
        c = HH(c, d, a, b, m[i+11], 16,  1839030562);
        b = HH(b, c, d, a, m[i+14], 23, -35309556);
        a = HH(a, b, c, d, m[i+ 1],  4, -1530992060);
        d = HH(d, a, b, c, m[i+ 4], 11,  1272893353);
        c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
        b = HH(b, c, d, a, m[i+10], 23, -1094730640);
        a = HH(a, b, c, d, m[i+13],  4,  681279174);
        d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
        c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
        b = HH(b, c, d, a, m[i+ 6], 23,  76029189);
        a = HH(a, b, c, d, m[i+ 9],  4, -640364487);
        d = HH(d, a, b, c, m[i+12], 11, -421815835);
        c = HH(c, d, a, b, m[i+15], 16,  530742520);
        b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
  
        a = II(a, b, c, d, m[i+ 0],  6, -198630844);
        d = II(d, a, b, c, m[i+ 7], 10,  1126891415);
        c = II(c, d, a, b, m[i+14], 15, -1416354905);
        b = II(b, c, d, a, m[i+ 5], 21, -57434055);
        a = II(a, b, c, d, m[i+12],  6,  1700485571);
        d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
        c = II(c, d, a, b, m[i+10], 15, -1051523);
        b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
        a = II(a, b, c, d, m[i+ 8],  6,  1873313359);
        d = II(d, a, b, c, m[i+15], 10, -30611744);
        c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
        b = II(b, c, d, a, m[i+13], 21,  1309151649);
        a = II(a, b, c, d, m[i+ 4],  6, -145523070);
        d = II(d, a, b, c, m[i+11], 10, -1120210379);
        c = II(c, d, a, b, m[i+ 2], 15,  718787259);
        b = II(b, c, d, a, m[i+ 9], 21, -343485551);
  
        a = (a + aa) >>> 0;
        b = (b + bb) >>> 0;
        c = (c + cc) >>> 0;
        d = (d + dd) >>> 0;
      }
  
      return crypt.endian([a, b, c, d]);
    };
  
    // Auxiliary functions
    md5._ff  = function (a, b, c, d, x, s, t) {
      var n = a + (b & c | ~b & d) + (x >>> 0) + t;
      return ((n << s) | (n >>> (32 - s))) + b;
    };
    md5._gg  = function (a, b, c, d, x, s, t) {
      var n = a + (b & d | c & ~d) + (x >>> 0) + t;
      return ((n << s) | (n >>> (32 - s))) + b;
    };
    md5._hh  = function (a, b, c, d, x, s, t) {
      var n = a + (b ^ c ^ d) + (x >>> 0) + t;
      return ((n << s) | (n >>> (32 - s))) + b;
    };
    md5._ii  = function (a, b, c, d, x, s, t) {
      var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
      return ((n << s) | (n >>> (32 - s))) + b;
    };
  
    // Package private blocksize
    md5._blocksize = 16;
    md5._digestsize = 16;
  
    module.exports = function (message, options) {
      if(typeof message == 'undefined')
        return;
  
      var digestbytes = crypt.wordsToBytes(md5(message, options));
      return options && options.asBytes ? digestbytes :
          options && options.asString ? bin.bytesToString(digestbytes) :
          crypt.bytesToHex(digestbytes);
    };
  
  })();
  
  },{"charenc":20,"crypt":21,"is-buffer":22}],20:[function(require,module,exports){
  var charenc = {
    // UTF-8 encoding
    utf8: {
      // Convert a string to a byte array
      stringToBytes: function(str) {
        return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
      },
  
      // Convert a byte array to a string
      bytesToString: function(bytes) {
        return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
      }
    },
  
    // Binary encoding
    bin: {
      // Convert a string to a byte array
      stringToBytes: function(str) {
        for (var bytes = [], i = 0; i < str.length; i++)
          bytes.push(str.charCodeAt(i) & 0xFF);
        return bytes;
      },
  
      // Convert a byte array to a string
      bytesToString: function(bytes) {
        for (var str = [], i = 0; i < bytes.length; i++)
          str.push(String.fromCharCode(bytes[i]));
        return str.join('');
      }
    }
  };
  
  module.exports = charenc;
  
  },{}],21:[function(require,module,exports){
  (function() {
    var base64map
        = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
  
    crypt = {
      // Bit-wise rotation left
      rotl: function(n, b) {
        return (n << b) | (n >>> (32 - b));
      },
  
      // Bit-wise rotation right
      rotr: function(n, b) {
        return (n << (32 - b)) | (n >>> b);
      },
  
      // Swap big-endian to little-endian and vice versa
      endian: function(n) {
        // If number given, swap endian
        if (n.constructor == Number) {
          return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;
        }
  
        // Else, assume array and swap all items
        for (var i = 0; i < n.length; i++)
          n[i] = crypt.endian(n[i]);
        return n;
      },
  
      // Generate an array of any length of random bytes
      randomBytes: function(n) {
        for (var bytes = []; n > 0; n--)
          bytes.push(Math.floor(Math.random() * 256));
        return bytes;
      },
  
      // Convert a byte array to big-endian 32-bit words
      bytesToWords: function(bytes) {
        for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
          words[b >>> 5] |= bytes[i] << (24 - b % 32);
        return words;
      },
  
      // Convert big-endian 32-bit words to a byte array
      wordsToBytes: function(words) {
        for (var bytes = [], b = 0; b < words.length * 32; b += 8)
          bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
        return bytes;
      },
  
      // Convert a byte array to a hex string
      bytesToHex: function(bytes) {
        for (var hex = [], i = 0; i < bytes.length; i++) {
          hex.push((bytes[i] >>> 4).toString(16));
          hex.push((bytes[i] & 0xF).toString(16));
        }
        return hex.join('');
      },
  
      // Convert a hex string to a byte array
      hexToBytes: function(hex) {
        for (var bytes = [], c = 0; c < hex.length; c += 2)
          bytes.push(parseInt(hex.substr(c, 2), 16));
        return bytes;
      },
  
      // Convert a byte array to a base-64 string
      bytesToBase64: function(bytes) {
        for (var base64 = [], i = 0; i < bytes.length; i += 3) {
          var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
          for (var j = 0; j < 4; j++)
            if (i * 8 + j * 6 <= bytes.length * 8)
              base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
            else
              base64.push('=');
        }
        return base64.join('');
      },
  
      // Convert a base-64 string to a byte array
      base64ToBytes: function(base64) {
        // Remove non-base-64 characters
        base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
  
        for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
            imod4 = ++i % 4) {
          if (imod4 == 0) continue;
          bytes.push(((base64map.indexOf(base64.charAt(i - 1))
              & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
              | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
        }
        return bytes;
      }
    };
  
    module.exports = crypt;
  })();
  
  },{}],22:[function(require,module,exports){
  /**
   * Determine if an object is Buffer
   *
   * Author:   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
   * License:  MIT
   *
   * `npm install is-buffer`
   */
  
  module.exports = function (obj) {
    return !!(
      obj != null &&
      obj.constructor &&
      typeof obj.constructor.isBuffer === 'function' &&
      obj.constructor.isBuffer(obj)
    )
  }
  
  },{}]},{},[1]);
  